From d287d140e9d470b77280259ee7e47f554eda6669 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 10 Sep 2024 00:24:56 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc latest, Speakeasy CLI 1.394.0 --- .speakeasy/gen.lock | 162 +- README.md | 116 +- RELEASES.md | 12 +- USAGE.md | 6 +- .../operations/abortmultipartrequestbody.md | 4 +- .../operations/abortmultipartresponsebody.md | 2 +- docs/sdk/models/operations/actionssummary.md | 2 +- .../models/operations/activateuserrequest.md | 2 +- .../operations/activateuserresponsebody.md | 2 +- .../operations/addgroupmembersrequest.md | 8 +- .../operations/addgroupmembersrequestbody.md | 2 +- .../operations/addgroupmembersresponsebody.md | 10 +- docs/sdk/models/operations/adminbadges.md | 30 +- .../models/operations/admingetusergroups.md | 58 +- .../operations/admingetuserpenaltycounts.md | 6 +- .../models/operations/admingetuserrequest.md | 2 +- .../operations/admingetuserresponsebody.md | 188 +- .../operations/adminlistbadgesresponsebody.md | 114 +- .../operations/adminlistusersrequest.md | 2 +- .../operations/adminlistusersresponsebody.md | 44 +- .../models/operations/anonymizeuserrequest.md | 2 +- .../operations/anonymizeuserresponsebody.md | 4 +- docs/sdk/models/operations/approvedby.md | 8 +- docs/sdk/models/operations/archetypes.md | 8 +- docs/sdk/models/operations/badge.md | 42 +- docs/sdk/models/operations/badgegroupings.md | 10 +- docs/sdk/models/operations/badges.md | 42 +- docs/sdk/models/operations/badgetypes.md | 6 +- docs/sdk/models/operations/basicgroup.md | 56 +- .../batchpresignmultipartpartsrequestbody.md | 8 +- .../batchpresignmultipartpartsresponsebody.md | 2 +- .../models/operations/bookmarktopicrequest.md | 6 +- docs/sdk/models/operations/categories.md | 78 +- docs/sdk/models/operations/category.md | 120 +- docs/sdk/models/operations/categorylist.md | 90 +- .../operations/changepasswordrequest.md | 2 +- .../operations/changepasswordrequestbody.md | 4 +- .../completeexternaluploadrequestbody.md | 8 +- .../completeexternaluploadresponsebody.md | 26 +- .../completemultipartrequestbody.md | 22 +- .../completemultipartresponsebody.md | 26 +- .../operations/createbackuprequestbody.md | 2 +- .../operations/createbackupresponsebody.md | 2 +- .../operations/createbadgebadgetypes.md | 6 +- .../operations/createbadgerequestbody.md | 4 +- .../operations/createbadgeresponsebody.md | 58 +- .../operations/createcategoryrequestbody.md | 12 +- .../operations/createcategoryresponsebody.md | 122 +- docs/sdk/models/operations/createdby.md | 8 +- .../operations/creategrouprequestbody.md | 6 +- .../operations/creategroupresponsebody.md | 60 +- .../models/operations/createinviterequest.md | 16 +- .../operations/createinviterequestbody.md | 8 +- .../operations/createinviteresponsebody.md | 26 +- .../createmultipartuploadrequestbody.md | 6 +- .../createmultipartuploadresponsebody.md | 8 +- .../operations/createtaggrouprequestbody.md | 2 +- .../operations/createtaggroupresponsebody.md | 20 +- .../createtopicpostpmactionssummary.md | 4 +- .../createtopicpostpmrequestbody.md | 6 +- .../createtopicpostpmresponsebody.md | 106 +- .../operations/createtopictimerrequest.md | 12 +- .../operations/createtopictimerrequestbody.md | 2 +- .../createtopictimerresponsebody.md | 2 +- .../operations/createuploadresponsebody.md | 26 +- .../models/operations/createuserrequest.md | 4 +- .../operations/createuserrequestbody.md | 8 +- .../operations/createuserresponsebody.md | 6 +- .../operations/deactivateuserrequest.md | 2 +- .../operations/deactivateuserresponsebody.md | 2 +- .../models/operations/deletebadgerequest.md | 2 +- .../models/operations/deletegrouprequest.md | 2 +- .../operations/deletegroupresponsebody.md | 2 +- .../models/operations/deletepostrequest.md | 8 +- .../operations/deletepostrequestbody.md | 2 +- .../models/operations/deleteuserrequest.md | 2 +- .../operations/deleteuserresponsebody.md | 2 +- docs/sdk/models/operations/details.md | 58 +- docs/sdk/models/operations/directoryitems.md | 30 +- .../operations/downloadbackuprequest.md | 4 +- docs/sdk/models/operations/extras.md | 4 +- .../generatepresignedputrequestbody.md | 6 +- .../generatepresignedputresponsebody.md | 9 +- .../models/operations/getcategorycategory.md | 120 +- .../operations/getcategorygrouppermissions.md | 4 +- .../models/operations/getcategoryrequest.md | 2 +- .../getcategoryrequiredtaggroups.md | 4 +- .../operations/getcategoryresponsebody.md | 122 +- docs/sdk/models/operations/getgroupgroup.md | 118 +- docs/sdk/models/operations/getgrouprequest.md | 2 +- .../models/operations/getgroupresponsebody.md | 130 +- docs/sdk/models/operations/getpostrequest.md | 2 +- .../models/operations/getpostresponsebody.md | 100 +- .../models/operations/getsitecategories.md | 82 +- docs/sdk/models/operations/getsitegroups.md | 10 +- .../operations/getsiterequiredtaggroups.md | 4 +- .../models/operations/getsiteresponsebody.md | 342 ++- .../models/operations/gettaggrouprequest.md | 2 +- docs/sdk/models/operations/gettagrequest.md | 2 +- .../operations/gettopicactionssummary.md | 8 +- .../operations/gettopicbyexternalidrequest.md | 2 +- docs/sdk/models/operations/gettopicrequest.md | 6 +- .../models/operations/gettopicresponsebody.md | 396 +-- .../gettopictopicsactionssummary.md | 4 +- docs/sdk/models/operations/gettopicuser.md | 8 +- .../models/operations/getuseremailsrequest.md | 2 +- .../operations/getuseremailsresponsebody.md | 14 +- .../operations/getuserexternalidgroups.md | 58 +- .../operations/getuserexternalidgroupusers.md | 6 +- .../operations/getuserexternalidrequest.md | 6 +- .../getuserexternalidresponsebody.md | 370 +-- .../operations/getuserexternaliduser.md | 370 +-- .../getuserexternaliduserauthtokens.md | 20 +- .../operations/getuserexternaliduserfields.md | 4 +- ...tuserexternalidusernotificationschedule.md | 30 +- .../operations/getuserexternaliduseroption.md | 66 +- docs/sdk/models/operations/getusergroups.md | 58 +- .../getuseridentiyproviderexternalidgroups.md | 58 +- ...useridentiyproviderexternalidgroupusers.md | 6 +- ...getuseridentiyproviderexternalidrequest.md | 8 +- ...eridentiyproviderexternalidresponsebody.md | 370 +-- .../getuseridentiyproviderexternaliduser.md | 370 +-- ...identiyproviderexternaliduserauthtokens.md | 20 +- ...useridentiyproviderexternaliduserfields.md | 4 +- ...viderexternalidusernotificationschedule.md | 30 +- ...useridentiyproviderexternaliduseroption.md | 66 +- docs/sdk/models/operations/getuserrequest.md | 6 +- .../models/operations/getuserresponsebody.md | 370 +-- .../getusersentprivatemessagesrequest.md | 2 +- docs/sdk/models/operations/grantedbies.md | 16 +- docs/sdk/models/operations/group.md | 2 +- .../models/operations/groupedsearchresult.md | 36 +- .../sdk/models/operations/grouppermissions.md | 4 +- docs/sdk/models/operations/groups.md | 58 +- docs/sdk/models/operations/groupusers.md | 6 +- .../models/operations/invitetotopicrequest.md | 6 +- docs/sdk/models/operations/lastposter.md | 8 +- docs/sdk/models/operations/linkcounts.md | 10 +- .../operations/listcategoriesresponsebody.md | 92 +- .../operations/listcategorytopicsposters.md | 8 +- .../operations/listcategorytopicsrequest.md | 4 +- .../listcategorytopicsresponsebody.md | 88 +- .../operations/listgroupmembersrequest.md | 2 +- .../listgroupmembersresponsebody.md | 60 +- .../sdk/models/operations/listgroupsextras.md | 4 +- .../operations/listgroupsresponsebody.md | 76 +- .../operations/listlatesttopicsrequest.md | 4 +- .../sdk/models/operations/listpostsrequest.md | 4 +- .../models/operations/listtoptopicsrequest.md | 4 +- .../operations/listuseractionsrequest.md | 6 +- .../operations/listuseractionsresponsebody.md | 60 +- .../models/operations/listuserbadgesbadges.md | 30 +- .../operations/listuserbadgesbadgetypes.md | 6 +- .../operations/listuserbadgesrequest.md | 2 +- .../operations/listuserbadgesresponsebody.md | 22 +- .../listuserprivatemessagesrequest.md | 2 +- .../models/operations/listuserspublicmeta.md | 6 +- .../operations/listuserspublicrequest.md | 4 +- .../operations/listuserspublicresponsebody.md | 46 +- .../models/operations/listuserspublicuser.md | 10 +- docs/sdk/models/operations/lockpostrequest.md | 6 +- .../models/operations/lockpostrequestbody.md | 2 +- .../models/operations/logoutuserrequest.md | 2 +- .../operations/logoutuserresponsebody.md | 2 +- docs/sdk/models/operations/members.md | 18 +- docs/sdk/models/operations/meta.md | 6 +- .../models/operations/notificationtypes.md | 66 +- docs/sdk/models/operations/owners.md | 18 +- docs/sdk/models/operations/participants.md | 26 +- docs/sdk/models/operations/penaltycounts.md | 4 +- .../operations/performpostactionrequest.md | 4 +- .../performpostactionrequestbody.md | 4 +- docs/sdk/models/operations/permissions.md | 2 +- docs/sdk/models/operations/post.md | 2 +- docs/sdk/models/operations/postactiontypes.md | 14 +- docs/sdk/models/operations/posters.md | 16 +- .../operations/postrepliesactionssummary.md | 4 +- .../models/operations/postrepliesrequest.md | 2 +- .../operations/postrepliesresponsebody.md | 112 +- docs/sdk/models/operations/posts.md | 124 +- docs/sdk/models/operations/poststream.md | 132 +- docs/sdk/models/operations/posttypes.md | 8 +- .../operations/refreshgravatarrequest.md | 2 +- .../operations/refreshgravatarresponsebody.md | 4 +- .../operations/removegroupmembersrequest.md | 8 +- .../removegroupmembersrequestbody.md | 2 +- .../removegroupmembersresponsebody.md | 10 +- .../models/operations/removetopicrequest.md | 6 +- docs/sdk/models/operations/replytouser.md | 4 +- .../models/operations/requiredtaggroups.md | 4 +- docs/sdk/models/operations/responsebody.md | 6 +- docs/sdk/models/operations/searchrequest.md | 4 +- .../models/operations/searchresponsebody.md | 60 +- .../senddownloadbackupemailrequest.md | 2 +- .../sendpasswordresetemailrequestbody.md | 2 +- .../sendpasswordresetemailresponsebody.md | 4 +- .../operations/setnotificationlevelrequest.md | 6 +- .../setnotificationlevelrequestbody.md | 2 +- .../setnotificationlevelresponsebody.md | 2 +- docs/sdk/models/operations/silence.md | 20 +- docs/sdk/models/operations/silencedby.md | 8 +- .../models/operations/silenceuserrequest.md | 10 +- .../operations/silenceuserrequestbody.md | 4 +- .../operations/silenceuserresponsebody.md | 22 +- docs/sdk/models/operations/suggestedtopics.md | 82 +- docs/sdk/models/operations/suspendedby.md | 8 +- .../models/operations/suspenduserrequest.md | 12 +- .../operations/suspenduserrequestbody.md | 6 +- .../operations/suspenduserresponsebody.md | 22 +- docs/sdk/models/operations/suspension.md | 20 +- docs/sdk/models/operations/taggroup.md | 16 +- docs/sdk/models/operations/tl3requirements.md | 68 +- docs/sdk/models/operations/topicflagtypes.md | 14 +- docs/sdk/models/operations/topiclist.md | 82 +- docs/sdk/models/operations/topics.md | 74 +- docs/sdk/models/operations/triggers.md | 10 +- docs/sdk/models/operations/trustlevels.md | 10 +- .../models/operations/updateavatarrequest.md | 2 +- .../operations/updateavatarrequestbody.md | 4 +- .../operations/updateavatarresponsebody.md | 2 +- .../sdk/models/operations/updatebadgebadge.md | 42 +- .../operations/updatebadgebadgetypes.md | 6 +- .../models/operations/updatebadgerequest.md | 2 +- .../operations/updatebadgerequestbody.md | 4 +- .../operations/updatebadgeresponsebody.md | 58 +- .../operations/updatecategorycategory.md | 124 +- .../updatecategorygrouppermissions.md | 4 +- .../operations/updatecategorypermissions.md | 2 +- .../operations/updatecategoryrequest.md | 16 +- .../operations/updatecategoryrequestbody.md | 12 +- .../updatecategoryrequiredtaggroups.md | 4 +- .../operations/updatecategoryresponsebody.md | 128 +- .../models/operations/updateemailrequest.md | 2 +- .../operations/updateemailrequestbody.md | 2 +- .../sdk/models/operations/updategroupgroup.md | 2 +- .../models/operations/updategrouprequest.md | 2 +- .../operations/updategrouprequestbody.md | 6 +- .../operations/updategroupresponsebody.md | 2 +- .../operations/updatepostactionssummary.md | 4 +- docs/sdk/models/operations/updatepostpost.md | 104 +- .../models/operations/updatepostrequest.md | 2 +- .../operations/updatepostresponsebody.md | 108 +- .../operations/updatetaggrouprequest.md | 2 +- .../models/operations/updatetopicrequest.md | 6 +- .../operations/updatetopicstatusrequest.md | 16 +- .../updatetopicstatusrequestbody.md | 6 +- .../updatetopicstatusresponsebody.md | 2 +- .../operations/updatetopictimestamprequest.md | 12 +- .../updatetopictimestamprequestbody.md | 2 +- .../updatetopictimestampresponsebody.md | 2 +- .../operations/updateusernamerequest.md | 2 +- .../operations/updateusernamerequestbody.md | 2 +- .../models/operations/updateuserrequest.md | 6 +- .../operations/updateuserresponsebody.md | 4 +- docs/sdk/models/operations/user.md | 370 +-- docs/sdk/models/operations/useractions.md | 52 +- docs/sdk/models/operations/userauthtokens.md | 20 +- docs/sdk/models/operations/userbadges.md | 14 +- .../sdk/models/operations/usercolorschemes.md | 6 +- docs/sdk/models/operations/userfields.md | 4 +- .../operations/usernotificationschedule.md | 30 +- docs/sdk/models/operations/useroption.md | 66 +- docs/sdk/models/operations/users.md | 8 +- docs/sdk/models/operations/userthemes.md | 8 +- docs/sdk/models/operations/usertips.md | 12 +- gen.yaml | 2 +- jsr.json | 2 +- package.json | 2 +- src/funcs/adminActivateUser.ts | 162 +- src/funcs/adminAdminGetUser.ts | 162 +- src/funcs/adminAdminListUsers.ts | 184 +- src/funcs/adminAnonymizeUser.ts | 162 +- src/funcs/adminDeactivateUser.ts | 162 +- src/funcs/adminDeleteUser.ts | 173 +- src/funcs/adminLogOutUser.ts | 162 +- src/funcs/adminRefreshGravatar.ts | 167 +- src/funcs/adminSilenceUser.ts | 173 +- src/funcs/adminSuspendUser.ts | 173 +- src/funcs/backupsCreateBackup.ts | 156 +- src/funcs/backupsDownloadBackup.ts | 183 +- src/funcs/backupsGetBackups.ts | 125 +- src/funcs/backupsSendDownloadBackupEmail.ts | 172 +- src/funcs/badgesAdminListBadges.ts | 123 +- src/funcs/badgesCreateBadge.ts | 154 +- src/funcs/badgesDeleteBadge.ts | 164 +- src/funcs/badgesListUserBadges.ts | 165 +- src/funcs/badgesUpdateBadge.ts | 173 +- src/funcs/categoriesCreateCategory.ts | 156 +- src/funcs/categoriesGetCategory.ts | 162 +- src/funcs/categoriesGetSite.ts | 123 +- src/funcs/categoriesListCategories.ts | 161 +- src/funcs/categoriesListCategoryTopics.ts | 172 +- src/funcs/categoriesUpdateCategory.ts | 173 +- src/funcs/groupsAddGroupMembers.ts | 173 +- src/funcs/groupsCreateGroup.ts | 154 +- src/funcs/groupsDeleteGroup.ts | 162 +- src/funcs/groupsGetGroup.ts | 162 +- src/funcs/groupsListGroupMembers.ts | 162 +- src/funcs/groupsListGroups.ts | 123 +- src/funcs/groupsRemoveGroupMembers.ts | 174 +- src/funcs/groupsUpdateGroup.ts | 173 +- src/funcs/invitesCreateInvite.ts | 184 +- src/funcs/invitesInviteToTopic.ts | 197 +- src/funcs/notificationsGetNotifications.ts | 123 +- .../notificationsMarkNotificationsAsRead.ts | 160 +- src/funcs/postsCreateTopicPostPM.ts | 156 +- src/funcs/postsDeletePost.ts | 175 +- src/funcs/postsGetPost.ts | 163 +- src/funcs/postsListPosts.ts | 189 +- src/funcs/postsLockPost.ts | 197 +- src/funcs/postsPerformPostAction.ts | 185 +- src/funcs/postsPostReplies.ts | 164 +- src/funcs/postsUpdatePost.ts | 173 +- src/funcs/privateMessagesCreateTopicPostPM.ts | 156 +- ...ivateMessagesGetUserSentPrivateMessages.ts | 175 +- .../privateMessagesListUserPrivateMessages.ts | 172 +- src/funcs/searchSearch.ts | 167 +- src/funcs/siteGetSite.ts | 123 +- src/funcs/tagsCreateTagGroup.ts | 156 +- src/funcs/tagsGetTag.ts | 162 +- src/funcs/tagsGetTagGroup.ts | 162 +- src/funcs/tagsListTagGroups.ts | 123 +- src/funcs/tagsListTags.ts | 123 +- src/funcs/tagsUpdateTagGroup.ts | 173 +- src/funcs/topicsBookmarkTopic.ts | 188 +- src/funcs/topicsCreateTopicPostPM.ts | 156 +- src/funcs/topicsCreateTopicTimer.ts | 197 +- src/funcs/topicsGetTopic.ts | 186 +- src/funcs/topicsGetTopicByExternalId.ts | 168 +- src/funcs/topicsInviteToTopic.ts | 197 +- src/funcs/topicsListLatestTopics.ts | 195 +- src/funcs/topicsListTopTopics.ts | 189 +- src/funcs/topicsRemoveTopic.ts | 188 +- src/funcs/topicsSetNotificationLevel.ts | 198 +- src/funcs/topicsUpdateTopic.ts | 197 +- src/funcs/topicsUpdateTopicStatus.ts | 198 +- src/funcs/topicsUpdateTopicTimestamp.ts | 198 +- src/funcs/uploadsAbortMultipart.ts | 158 +- .../uploadsBatchPresignMultipartParts.ts | 167 +- src/funcs/uploadsCompleteExternalUpload.ts | 162 +- src/funcs/uploadsCompleteMultipart.ts | 158 +- src/funcs/uploadsCreateMultipartUpload.ts | 162 +- src/funcs/uploadsCreateUpload.ts | 204 +- src/funcs/uploadsGeneratePresignedPut.ts | 158 +- src/funcs/usersActivateUser.ts | 162 +- src/funcs/usersAdminGetUser.ts | 162 +- src/funcs/usersAdminListUsers.ts | 184 +- src/funcs/usersAnonymizeUser.ts | 162 +- src/funcs/usersChangePassword.ts | 175 +- src/funcs/usersCreateUser.ts | 184 +- src/funcs/usersDeactivateUser.ts | 162 +- src/funcs/usersDeleteUser.ts | 173 +- src/funcs/usersGetUser.ts | 189 +- src/funcs/usersGetUserEmails.ts | 165 +- src/funcs/usersGetUserExternalId.ts | 190 +- .../usersGetUserIdentiyProviderExternalId.ts | 215 +- src/funcs/usersListUserActions.ts | 173 +- src/funcs/usersListUserBadges.ts | 165 +- src/funcs/usersListUsersPublic.ts | 179 +- src/funcs/usersLogOutUser.ts | 162 +- src/funcs/usersRefreshGravatar.ts | 167 +- src/funcs/usersSendPasswordResetEmail.ts | 160 +- src/funcs/usersSilenceUser.ts | 173 +- src/funcs/usersSuspendUser.ts | 173 +- src/funcs/usersUpdateAvatar.ts | 178 +- src/funcs/usersUpdateEmail.ts | 178 +- src/funcs/usersUpdateUser.ts | 200 +- src/funcs/usersUpdateUsername.ts | 180 +- src/hooks/hooks.ts | 173 +- src/hooks/index.ts | 2 +- src/hooks/types.ts | 107 +- src/index.ts | 2 +- src/lib/config.ts | 85 +- src/lib/matchers.ts | 422 +-- src/lib/schemas.ts | 96 +- src/lib/sdks.ts | 669 ++-- src/lib/security.ts | 271 +- src/sdk/admin.ts | 229 +- src/sdk/backups.ts | 79 +- src/sdk/badges.ts | 107 +- src/sdk/categories.ts | 139 +- src/sdk/groups.ts | 177 +- src/sdk/invites.ts | 61 +- src/sdk/models/errors/httpclienterrors.ts | 40 +- src/sdk/models/errors/sdkerror.ts | 32 +- src/sdk/models/operations/abortmultipart.ts | 100 +- src/sdk/models/operations/activateuser.ts | 64 +- src/sdk/models/operations/addgroupmembers.ts | 158 +- src/sdk/models/operations/admingetuser.ts | 1807 ++++++----- src/sdk/models/operations/adminlistbadges.ts | 696 ++--- src/sdk/models/operations/adminlistusers.ts | 529 ++-- src/sdk/models/operations/anonymizeuser.ts | 72 +- .../operations/batchpresignmultipartparts.ts | 181 +- src/sdk/models/operations/bookmarktopic.ts | 82 +- src/sdk/models/operations/changepassword.ts | 111 +- .../operations/completeexternalupload.ts | 312 +- .../models/operations/completemultipart.ts | 274 +- src/sdk/models/operations/createbackup.ts | 94 +- src/sdk/models/operations/createbadge.ts | 475 ++- src/sdk/models/operations/createcategory.ts | 1092 +++---- src/sdk/models/operations/creategroup.ts | 751 ++--- src/sdk/models/operations/createinvite.ts | 414 ++- .../operations/createmultipartupload.ts | 285 +- src/sdk/models/operations/createtaggroup.ts | 222 +- .../models/operations/createtopicpostpm.ts | 908 +++--- src/sdk/models/operations/createtopictimer.ts | 296 +- src/sdk/models/operations/createupload.ts | 371 ++- src/sdk/models/operations/createuser.ts | 321 +- src/sdk/models/operations/deactivateuser.ts | 64 +- src/sdk/models/operations/deletebadge.ts | 32 +- src/sdk/models/operations/deletegroup.ts | 64 +- src/sdk/models/operations/deletepost.ts | 135 +- src/sdk/models/operations/deleteuser.ts | 197 +- src/sdk/models/operations/downloadbackup.ts | 40 +- .../models/operations/generatepresignedput.ts | 326 +- src/sdk/models/operations/getbackups.ts | 76 +- src/sdk/models/operations/getcategory.ts | 908 +++--- src/sdk/models/operations/getgroup.ts | 1012 ++++--- src/sdk/models/operations/getnotifications.ts | 320 +- src/sdk/models/operations/getpost.ts | 751 +++-- src/sdk/models/operations/getsite.ts | 2558 ++++++++-------- src/sdk/models/operations/gettag.ts | 861 +++--- src/sdk/models/operations/gettaggroup.ts | 234 +- src/sdk/models/operations/gettopic.ts | 2678 +++++++++-------- .../models/operations/gettopicbyexternalid.ts | 62 +- src/sdk/models/operations/getuser.ts | 2556 ++++++++-------- src/sdk/models/operations/getuseremails.ts | 126 +- .../models/operations/getuserexternalid.ts | 2602 ++++++++-------- .../getuseridentiyproviderexternalid.ts | 2590 ++++++++-------- .../operations/getusersentprivatemessages.ts | 806 +++-- src/sdk/models/operations/invitetotopic.ts | 249 +- src/sdk/models/operations/listcategories.ts | 696 +++-- .../models/operations/listcategorytopics.ts | 704 +++-- src/sdk/models/operations/listgroupmembers.ts | 374 +-- src/sdk/models/operations/listgroups.ts | 553 ++-- src/sdk/models/operations/listlatesttopics.ts | 854 +++--- src/sdk/models/operations/listposts.ts | 830 +++-- src/sdk/models/operations/listtaggroups.ts | 198 +- src/sdk/models/operations/listtags.ts | 157 +- src/sdk/models/operations/listtoptopics.ts | 849 +++--- src/sdk/models/operations/listuseractions.ts | 432 ++- src/sdk/models/operations/listuserbadges.ts | 646 ++-- .../operations/listuserprivatemessages.ts | 900 +++--- src/sdk/models/operations/listuserspublic.ts | 516 ++-- src/sdk/models/operations/lockpost.ts | 156 +- src/sdk/models/operations/logoutuser.ts | 67 +- .../operations/marknotificationsasread.ts | 73 +- .../models/operations/performpostaction.ts | 837 +++--- src/sdk/models/operations/postreplies.ts | 772 +++-- src/sdk/models/operations/refreshgravatar.ts | 106 +- .../models/operations/removegroupmembers.ts | 186 +- src/sdk/models/operations/removetopic.ts | 82 +- src/sdk/models/operations/search.ts | 400 ++- .../operations/senddownloadbackupemail.ts | 32 +- .../operations/sendpasswordresetemail.ts | 104 +- .../models/operations/setnotificationlevel.ts | 214 +- src/sdk/models/operations/silenceuser.ts | 371 ++- src/sdk/models/operations/suspenduser.ts | 382 ++- src/sdk/models/operations/updateavatar.ts | 196 +- src/sdk/models/operations/updatebadge.ts | 552 ++-- src/sdk/models/operations/updatecategory.ts | 1180 ++++---- src/sdk/models/operations/updateemail.ts | 102 +- src/sdk/models/operations/updategroup.ts | 424 ++- src/sdk/models/operations/updatepost.ts | 867 +++--- src/sdk/models/operations/updatetaggroup.ts | 312 +- src/sdk/models/operations/updatetopic.ts | 335 +-- .../models/operations/updatetopicstatus.ts | 260 +- .../models/operations/updatetopictimestamp.ts | 160 +- src/sdk/models/operations/updateuser.ts | 250 +- src/sdk/models/operations/updateusername.ts | 131 +- src/sdk/notifications.ts | 41 +- src/sdk/posts.ts | 215 +- src/sdk/privatemessages.ts | 66 +- src/sdk/sdk.ts | 120 +- src/sdk/search.ts | 25 +- src/sdk/site.ts | 23 +- src/sdk/tags.ts | 122 +- src/sdk/topics.ts | 382 ++- src/sdk/types/index.ts | 8 +- src/sdk/uploads.ts | 368 +-- src/sdk/users.ts | 611 ++-- 481 files changed, 38528 insertions(+), 37165 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index aac29b5..8c081b4 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 599a9576-4665-431e-be1e-44cc13ef28aa management: docChecksum: dd4d04e62622de8f631720b5be68964d docVersion: latest - speakeasyVersion: 1.392.1 - generationVersion: 2.411.9 - releaseVersion: 0.8.2 - configChecksum: a578620a51a141cfb038d8ff4ad464ac + speakeasyVersion: 1.394.0 + generationVersion: 2.413.0 + releaseVersion: 0.9.0 + configChecksum: 030c268f7981a3d3ccfa57503ecb1d6a repoURL: https://github.com/LukeHagar/discoursejs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/discoursejs @@ -16,7 +16,7 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.1.1 constsAndDefaults: 0.1.11 - core: 3.16.4 + core: 3.17.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 envVarSecurityUsage: 0.1.1 @@ -669,16 +669,25 @@ examples: query: token: "" getBackups: - speakeasy-default-get-backups: {} + speakeasy-default-get-backups: + responses: + "200": + application/json: [] sendDownloadBackupEmail: speakeasy-default-send-download-backup-email: parameters: path: filename: "your_file_here" adminListBadges: - speakeasy-default-admin-list-badges: {} + speakeasy-default-admin-list-badges: + responses: + "200": + application/json: {"admin_badges": {"badge_grouping_ids": [], "badge_ids": [], "badge_type_ids": [], "protected_system_fields": [], "triggers": {"none": 387044, "post_action": 432656, "post_revision": 889440, "trust_level_change": 105780, "user_change": 410911}}, "badge_groupings": [], "badge_types": [], "badges": []} createBadge: - speakeasy-default-create-badge: {} + speakeasy-default-create-badge: + responses: + "200": + application/json: {"badge": {"allow_title": true, "auto_revoke": true, "badge_grouping_id": 298569, "badge_type_id": 394222, "description": "Optional upward-trending projection", "enabled": true, "grant_count": 364499, "icon": "", "id": 317037, "image_url": "", "listable": true, "long_description": "", "manually_grantable": true, "multiple_grant": true, "name": "", "query": "", "show_posts": false, "slug": "", "system": true, "target_posts": true, "trigger": ""}, "badge_types": []} deleteBadge: speakeasy-default-delete-badge: parameters: @@ -689,11 +698,17 @@ examples: parameters: path: username: "Faustino28" + responses: + "200": + application/json: {"user_badges": []} updateBadge: speakeasy-default-update-badge: parameters: path: id: 280628 + responses: + "200": + application/json: {"badge": {"allow_title": false, "auto_revoke": true, "badge_grouping_id": 569102, "badge_type_id": 247389, "description": "Balanced user-facing alliance", "enabled": false, "grant_count": 934168, "icon": "", "id": 471527, "image_url": "", "listable": true, "long_description": "", "manually_grantable": false, "multiple_grant": true, "name": "", "query": "", "show_posts": true, "slug": "", "system": false, "target_posts": false, "trigger": ""}, "badge_types": []} addGroupMembers: speakeasy-default-add-group-members: parameters: @@ -701,8 +716,14 @@ examples: id: 985975 requestBody: application/json: {"usernames": "username1,username2"} + responses: + "200": + application/json: {"emails": [], "success": "", "usernames": []} createGroup: - speakeasy-default-create-group: {} + speakeasy-default-create-group: + responses: + "200": + application/json: {"basic_group": {"allow_membership_requests": true, "automatic": false, "bio_cooked": "", "bio_excerpt": "", "bio_raw": "", "can_admin_group": true, "can_see_members": false, "default_notification_level": 831661, "flair_bg_color": "", "flair_color": "", "flair_url": "", "full_name": "Tracy Kris", "grant_trust_level": "", "has_messages": false, "id": 491938, "incoming_email": "", "members_visibility_level": 817346, "membership_request_template": "", "mentionable_level": 644356, "messageable_level": 883516, "name": "", "primary_group": false, "public_admission": true, "public_exit": true, "publish_read_state": false, "title": "", "user_count": 302911, "visibility_level": 712589}} deleteGroup: speakeasy-default-delete-group: parameters: @@ -716,13 +737,22 @@ examples: parameters: path: id: "name" + responses: + "200": + application/json: {"extras": {"visible_group_names": []}, "group": {"allow_membership_requests": false, "allow_unknown_sender_topic_replies": true, "automatic": false, "automatic_membership_email_domains": "", "bio_cooked": "", "bio_excerpt": "", "bio_raw": "", "can_admin_group": true, "can_see_members": false, "default_notification_level": 677524, "email_password": "", "email_username": "", "flair_bg_color": "", "flair_color": "", "flair_url": "", "full_name": "Wendy Rowe", "grant_trust_level": "", "has_messages": false, "id": 91266, "imap_last_error": "", "imap_mailbox_name": "", "imap_mailboxes": [], "imap_new_emails": "", "imap_old_emails": "", "imap_port": "", "imap_server": "", "imap_ssl": "", "incoming_email": "", "is_group_owner_display": false, "is_group_user": false, "members_visibility_level": 559262, "membership_request_template": "", "mentionable": false, "mentionable_level": 370583, "message_count": 513531, "messageable": false, "messageable_level": 157142, "muted_category_ids": [], "name": "", "primary_group": false, "public_admission": true, "public_exit": false, "publish_read_state": false, "regular_category_ids": [], "smtp_port": "", "smtp_server": "", "smtp_ssl": "", "title": "", "tracking_category_ids": [], "user_count": 617607, "visibility_level": 423050, "watching_category_ids": [], "watching_first_post_category_ids": []}} listGroupMembers: "": parameters: path: id: "name" + responses: + "200": + application/json: {"members": [], "meta": {"limit": 425642, "offset": 856025, "total": 251404}, "owners": []} listGroups: - speakeasy-default-list-groups: {} + speakeasy-default-list-groups: + responses: + "200": + application/json: {"extras": {"type_filters": []}, "groups": [], "load_more_groups": "", "total_rows_groups": 302778} removeGroupMembers: speakeasy-default-remove-group-members: parameters: @@ -730,6 +760,9 @@ examples: id: 649523 requestBody: application/json: {"usernames": "username1,username2"} + responses: + "200": + application/json: {"skipped_usernames": [], "success": "", "usernames": []} updateGroup: speakeasy-default-update-group: parameters: @@ -751,17 +784,26 @@ examples: parameters: path: id: 386776 + responses: + "200": + application/json: {"active": false, "admin": false, "api_key_count": 641278, "approved_by": {"avatar_template": "", "id": 197613, "name": "", "username": "Madelyn.Schoen"}, "avatar_template": "", "badge_count": 248574, "bounce_score": 227654, "can_activate": false, "can_be_anonymized": true, "can_be_deleted": false, "can_be_merged": true, "can_deactivate": true, "can_delete_all_posts": false, "can_delete_sso_record": false, "can_disable_second_factor": true, "can_grant_admin": false, "can_grant_moderation": false, "can_impersonate": true, "can_revoke_admin": false, "can_revoke_moderation": true, "can_send_activation_email": false, "can_view_action_logs": false, "created_at": "", "created_at_age": "5288.46", "days_visited": 186654, "flags_given_count": 7445, "flags_received_count": 385749, "full_suspend_reason": "", "groups": [], "id": 42319, "ip_address": "208.161.92.82", "last_emailed_age": "4169.5", "last_emailed_at": "", "last_seen_age": "6444.18", "last_seen_at": "", "like_count": 372881, "like_given_count": 434797, "manual_locked_trust_level": "", "moderator": true, "name": "", "post_count": 185274, "posts_read_count": 743147, "primary_group_id": "", "private_topics_count": 514610, "registration_ip_address": "", "reset_bounce_score_after": "", "silence_reason": "", "silenced_by": "", "single_sign_on_record": "", "staged": true, "suspended_by": "", "time_read": 375804, "title": "", "topic_count": 872928, "topics_entered": 493495, "trust_level": 286065, "username": "Rachael.Cummerata", "warnings_received_count": 72244} adminListUsers: speakeasy-default-admin-list-users: parameters: path: flag: "new" query: {} + responses: + "200": + application/json: [] anonymizeUser: speakeasy-default-anonymize-user: parameters: path: id: 418778 + responses: + "200": + application/json: {"success": "", "username": "Heather_Schinner29"} changePassword: speakeasy-default-change-password: parameters: @@ -773,6 +815,9 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"active": true, "message": "", "success": false} deactivateUser: speakeasy-default-deactivate-user: parameters: @@ -786,6 +831,9 @@ examples: parameters: path: id: 251343 + responses: + "200": + application/json: {"deleted": true} getUser: speakeasy-default-get-user: parameters: @@ -794,11 +842,17 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"user": {"admin": true, "allowed_pm_usernames": [], "avatar_template": "", "badge_count": 942250, "can_be_deleted": true, "can_change_bio": true, "can_change_location": false, "can_change_tracking_preferences": true, "can_change_website": true, "can_delete_all_posts": true, "can_edit": false, "can_edit_email": true, "can_edit_name": true, "can_edit_username": true, "can_ignore_user": true, "can_mute_user": false, "can_send_private_message_to_user": false, "can_send_private_messages": true, "can_upload_profile_header": false, "can_upload_user_card_background": false, "created_at": "", "featured_topic": "", "featured_user_badge_ids": [], "flair_bg_color": "", "flair_color": "", "flair_group_id": "", "flair_name": "", "flair_url": "", "group_users": [], "groups": [], "has_title_badges": true, "id": 228025, "ignored": false, "ignored_usernames": [], "invited_by": "", "last_posted_at": "", "last_seen_at": "", "locale": "nl", "mailing_list_posts_per_day": 540531, "moderator": true, "muted": false, "muted_category_ids": [], "muted_tags": [], "muted_usernames": [], "name": "", "pending_count": 261819, "post_count": 215372, "primary_group_id": "", "primary_group_name": "", "profile_view_count": 731773, "recent_time_read": 825238, "regular_category_ids": [], "second_factor_enabled": false, "staged": false, "system_avatar_template": "", "system_avatar_upload_id": "", "time_read": 153902, "title": "", "tracked_category_ids": [], "tracked_tags": [], "trust_level": 832569, "uploaded_avatar_id": "", "use_logo_small_as_avatar": false, "user_api_keys": "", "user_auth_tokens": [], "user_notification_schedule": {"day_0_end_time": 218196, "day_0_start_time": 894430, "day_1_end_time": 138091, "day_1_start_time": 537138, "day_2_end_time": 237845, "day_2_start_time": 141991, "day_3_end_time": 794266, "day_3_start_time": 746075, "day_4_end_time": 852580, "day_4_start_time": 356921, "day_5_end_time": 606039, "day_5_start_time": 635306, "day_6_end_time": 208257, "day_6_start_time": 644767, "enabled": true}, "user_option": {"allow_private_messages": true, "auto_track_topics_after_msecs": 163422, "automatically_unpin_topics": false, "color_scheme_id": "", "dark_scheme_id": "", "digest_after_minutes": 666713, "dynamic_favicon": true, "email_digests": true, "email_in_reply_to": true, "email_level": 107350, "email_messages_level": 843464, "email_previous_replies": 562742, "enable_allowed_pm_users": true, "enable_defer": true, "enable_quoting": false, "external_links_in_new_tab": true, "hide_profile_and_presence": true, "homepage_id": "", "include_tl0_in_digests": true, "like_notification_frequency": 164221, "mailing_list_mode": false, "mailing_list_mode_frequency": 627269, "new_topic_duration_minutes": 664047, "notification_level_when_replying": 186836, "skip_new_user_tips": false, "text_size": "", "text_size_seq": 690559, "theme_ids": [], "theme_key_seq": 76962, "timezone": "Europe/Sarajevo", "title_count_mode": "", "user_id": 268612}, "username": "Adolphus2", "watched_category_ids": [], "watched_first_post_category_ids": [], "watched_tags": [], "watching_first_post_tags": []}, "user_badges": []} getUserEmails: speakeasy-default-get-user-emails: parameters: path: username: "Winifred_OConner64" + responses: + "200": + application/json: {"associated_accounts": [], "email": "Macey_Purdy41@hotmail.com", "secondary_emails": [], "unconfirmed_emails": []} getUserExternalId: speakeasy-default-get-user-external-id: parameters: @@ -807,6 +861,9 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"user": {"admin": true, "allowed_pm_usernames": [], "avatar_template": "", "badge_count": 382257, "can_be_deleted": true, "can_change_bio": true, "can_change_location": true, "can_change_tracking_preferences": false, "can_change_website": true, "can_delete_all_posts": false, "can_edit": true, "can_edit_email": false, "can_edit_name": false, "can_edit_username": false, "can_ignore_user": false, "can_mute_user": false, "can_send_private_message_to_user": true, "can_send_private_messages": true, "can_upload_profile_header": true, "can_upload_user_card_background": true, "created_at": "", "featured_topic": "", "featured_user_badge_ids": [], "flair_bg_color": "", "flair_color": "", "flair_group_id": "", "flair_name": "", "flair_url": "", "group_users": [], "groups": [], "has_title_badges": false, "id": 655637, "ignored": true, "ignored_usernames": [], "invited_by": "", "last_posted_at": "", "last_seen_at": "", "locale": "en_AU_ocker", "mailing_list_posts_per_day": 773497, "moderator": false, "muted": true, "muted_category_ids": [], "muted_tags": [], "muted_usernames": [], "name": "", "pending_count": 438889, "post_count": 587339, "primary_group_id": "", "primary_group_name": "", "profile_view_count": 535710, "recent_time_read": 726013, "regular_category_ids": [], "second_factor_enabled": true, "staged": false, "system_avatar_template": "", "system_avatar_upload_id": "", "time_read": 758196, "title": "", "tracked_category_ids": [], "tracked_tags": [], "trust_level": 543959, "uploaded_avatar_id": "", "use_logo_small_as_avatar": true, "user_api_keys": "", "user_auth_tokens": [], "user_notification_schedule": {"day_0_end_time": 429974, "day_0_start_time": 864367, "day_1_end_time": 397390, "day_1_start_time": 973233, "day_2_end_time": 571577, "day_2_start_time": 332379, "day_3_end_time": 993187, "day_3_start_time": 122806, "day_4_end_time": 860371, "day_4_start_time": 527833, "day_5_end_time": 492716, "day_5_start_time": 861327, "day_6_end_time": 335540, "day_6_start_time": 821980, "enabled": true}, "user_option": {"allow_private_messages": true, "auto_track_topics_after_msecs": 58261, "automatically_unpin_topics": true, "color_scheme_id": "", "dark_scheme_id": "", "digest_after_minutes": 996201, "dynamic_favicon": true, "email_digests": false, "email_in_reply_to": true, "email_level": 140410, "email_messages_level": 445021, "email_previous_replies": 732222, "enable_allowed_pm_users": false, "enable_defer": true, "enable_quoting": true, "external_links_in_new_tab": false, "hide_profile_and_presence": false, "homepage_id": "", "include_tl0_in_digests": true, "like_notification_frequency": 667224, "mailing_list_mode": false, "mailing_list_mode_frequency": 851298, "new_topic_duration_minutes": 410338, "notification_level_when_replying": 122815, "skip_new_user_tips": true, "text_size": "", "text_size_seq": 142352, "theme_ids": [], "theme_key_seq": 972133, "timezone": "Asia/Kathmandu", "title_count_mode": "", "user_id": 789110}, "username": "Drake.Blanda5", "watched_category_ids": [], "watched_first_post_category_ids": [], "watched_tags": [], "watching_first_post_tags": []}, "user_badges": []} getUserIdentiyProviderExternalId: speakeasy-default-get-user-identiy-provider-external-id: parameters: @@ -816,6 +873,9 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"user": {"admin": true, "allowed_pm_usernames": [], "avatar_template": "", "badge_count": 814693, "can_be_deleted": true, "can_change_bio": false, "can_change_location": true, "can_change_tracking_preferences": false, "can_change_website": true, "can_delete_all_posts": false, "can_edit": false, "can_edit_email": true, "can_edit_name": false, "can_edit_username": false, "can_ignore_user": true, "can_mute_user": true, "can_send_private_message_to_user": true, "can_send_private_messages": true, "can_upload_profile_header": false, "can_upload_user_card_background": false, "created_at": "", "featured_topic": "", "featured_user_badge_ids": [], "flair_bg_color": "", "flair_color": "", "flair_group_id": "", "flair_name": "", "flair_url": "", "group_users": [], "groups": [], "has_title_badges": true, "id": 149789, "ignored": true, "ignored_usernames": [], "invited_by": "", "last_posted_at": "", "last_seen_at": "", "locale": "en_IND", "mailing_list_posts_per_day": 357601, "moderator": false, "muted": true, "muted_category_ids": [], "muted_tags": [], "muted_usernames": [], "name": "", "pending_count": 839652, "post_count": 445789, "primary_group_id": "", "primary_group_name": "", "profile_view_count": 812368, "recent_time_read": 816187, "regular_category_ids": [], "second_factor_enabled": true, "staged": false, "system_avatar_template": "", "system_avatar_upload_id": "", "time_read": 373844, "title": "", "tracked_category_ids": [], "tracked_tags": [], "trust_level": 359433, "uploaded_avatar_id": "", "use_logo_small_as_avatar": false, "user_api_keys": "", "user_auth_tokens": [], "user_notification_schedule": {"day_0_end_time": 860936, "day_0_start_time": 449560, "day_1_end_time": 687506, "day_1_start_time": 890578, "day_2_end_time": 176772, "day_2_start_time": 931155, "day_3_end_time": 419697, "day_3_start_time": 350097, "day_4_end_time": 977288, "day_4_start_time": 241415, "day_5_end_time": 547242, "day_5_start_time": 410996, "day_6_end_time": 635248, "day_6_start_time": 644469, "enabled": false}, "user_option": {"allow_private_messages": false, "auto_track_topics_after_msecs": 285447, "automatically_unpin_topics": true, "color_scheme_id": "", "dark_scheme_id": "", "digest_after_minutes": 945448, "dynamic_favicon": false, "email_digests": true, "email_in_reply_to": false, "email_level": 884100, "email_messages_level": 398013, "email_previous_replies": 679780, "enable_allowed_pm_users": false, "enable_defer": false, "enable_quoting": true, "external_links_in_new_tab": true, "hide_profile_and_presence": false, "homepage_id": "", "include_tl0_in_digests": true, "like_notification_frequency": 568247, "mailing_list_mode": true, "mailing_list_mode_frequency": 45697, "new_topic_duration_minutes": 382105, "notification_level_when_replying": 710442, "skip_new_user_tips": true, "text_size": "", "text_size_seq": 759801, "theme_ids": [], "theme_key_seq": 203355, "timezone": "Asia/Almaty", "title_count_mode": "", "user_id": 40695}, "username": "Austin.Bashirian", "watched_category_ids": [], "watched_first_post_category_ids": [], "watched_tags": [], "watching_first_post_tags": []}, "user_badges": []} listUserActions: speakeasy-default-list-user-actions: parameters: @@ -823,12 +883,18 @@ examples: offset: 620550 username: "Deondre75" filter: "" + responses: + "200": + application/json: {"user_actions": []} listUsersPublic: speakeasy-default-list-users-public: parameters: query: period: "monthly" order: "topic_count" + responses: + "200": + application/json: {"directory_items": [], "meta": {"last_updated_at": "", "load_more_directory_items": "", "total_rows_directory_items": 387659}} logOutUser: speakeasy-default-log-out-user: parameters: @@ -842,8 +908,14 @@ examples: parameters: path: username: "Frances39" + responses: + "200": + application/json: {"gravatar_avatar_template": "", "gravatar_upload_id": 361623} sendPasswordResetEmail: - speakeasy-default-send-password-reset-email: {} + speakeasy-default-send-password-reset-email: + responses: + "200": + application/json: {"success": "", "user_found": false} silenceUser: speakeasy-default-silence-user: parameters: @@ -851,6 +923,9 @@ examples: id: 606247 requestBody: application/json: {"post_action": "delete", "silenced_till": "2022-06-01T08:00:00.000Z"} + responses: + "200": + application/json: {"silence": {"silence_reason": "", "silenced": true, "silenced_at": "", "silenced_by": {"avatar_template": "", "id": 170425, "name": "", "username": "Courtney.Schneider"}, "silenced_till": ""}} suspendUser: speakeasy-default-suspend-user: parameters: @@ -858,6 +933,9 @@ examples: id: 970832 requestBody: application/json: {"post_action": "delete", "reason": "", "suspend_until": "2121-02-22"} + responses: + "200": + application/json: {"suspension": {"full_suspend_reason": "", "suspend_reason": "", "suspended_at": "", "suspended_by": {"avatar_template": "", "id": 970832, "name": "", "username": "Myron50"}, "suspended_till": ""}} updateAvatar: speakeasy-default-update-avatar: parameters: @@ -879,6 +957,9 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"success": ""} updateUsername: speakeasy-default-update-username: parameters: @@ -888,21 +969,36 @@ examples: speakeasy-default-create-category: requestBody: application/json: {"color": "49d9e9", "name": "", "permissions": {"everyone": 1}, "text_color": "f0fcfd"} + responses: + "200": + application/json: {"category": {"all_topics_wiki": true, "allow_badges": false, "allow_unlimited_owner_edits_on_first_post": false, "auto_close_based_on_last_post": false, "auto_close_hours": "", "available_groups": [], "can_delete": true, "can_edit": false, "color": "lavender", "default_list_filter": "", "default_slow_mode_seconds": "", "default_top_period": "", "default_view": "", "description": "Secured hybrid moratorium", "description_excerpt": "", "description_text": "", "email_in": "", "email_in_allow_strangers": true, "group_permissions": [], "has_children": false, "id": 576329, "mailinglist_mirror": true, "minimum_required_tags": 49066, "name": "", "navigate_to_first_post_after_read": false, "notification_level": 62502, "num_featured_topics": 973129, "permission": 817435, "position": 505865, "post_count": 432953, "read_only_banner": "", "read_restricted": true, "required_tag_groups": [], "search_priority": 8064, "show_subcategory_list": true, "slug": "", "sort_ascending": "", "sort_order": "", "subcategory_list_style": "", "text_color": "", "topic_count": 409207, "topic_featured_link_allowed": true, "topic_template": "", "topic_url": "", "uploaded_background": "", "uploaded_background_dark": "", "uploaded_logo": "", "uploaded_logo_dark": ""}} getCategory: speakeasy-default-get-category: parameters: path: id: 39147 + responses: + "200": + application/json: {"category": {"all_topics_wiki": true, "allow_badges": false, "allow_unlimited_owner_edits_on_first_post": true, "auto_close_based_on_last_post": true, "auto_close_hours": "", "available_groups": [], "can_delete": false, "can_edit": true, "color": "violet", "default_list_filter": "", "default_slow_mode_seconds": "", "default_top_period": "", "default_view": "", "description": "Multi-layered 5th generation Graphic Interface", "description_excerpt": "", "description_text": "", "email_in": "", "email_in_allow_strangers": true, "group_permissions": [], "has_children": false, "id": 533818, "mailinglist_mirror": false, "minimum_required_tags": 585665, "name": "", "navigate_to_first_post_after_read": false, "notification_level": 733753, "num_featured_topics": 373231, "permission": 543613, "position": 471104, "post_count": 639692, "read_only_banner": "", "read_restricted": true, "required_tag_groups": [], "search_priority": 498406, "show_subcategory_list": false, "slug": "", "sort_ascending": "", "sort_order": "", "subcategory_list_style": "", "text_color": "", "topic_count": 749595, "topic_featured_link_allowed": true, "topic_template": "", "topic_url": "", "uploaded_background": "", "uploaded_background_dark": "", "uploaded_logo": "", "uploaded_logo_dark": ""}} getSite: - speakeasy-default-get-site: {} + speakeasy-default-get-site: + responses: + "200": + application/json: {"anonymous_top_menu_items": [], "archetypes": [], "auth_providers": [], "can_create_tag": false, "can_tag_pms": false, "can_tag_topics": false, "categories": [], "censored_regexp": [], "default_archetype": "", "filters": [], "groups": [], "notification_types": {"bookmark_reminder": 549755, "chat_group_mention": 172835, "chat_invitation": 459147, "chat_mention": 556553, "chat_message": 268348, "code_review_commit_approved": 792595, "custom": 959012, "edited": 839204, "event_invitation": 463313, "event_reminder": 618012, "granted_badge": 471528, "group_mentioned": 410226, "group_message_summary": 862033, "invited_to_private_message": 761618, "invited_to_topic": 57168, "invitee_accepted": 568137, "liked": 613365, "liked_consolidated": 82987, "linked": 994399, "membership_request_accepted": 695132, "membership_request_consolidated": 29756, "mentioned": 434597, "moved_post": 998177, "post_approved": 689563, "posted": 394494, "private_message": 258200, "quoted": 93950, "reaction": 274712, "replied": 207463, "topic_reminder": 326487, "votes_released": 803079, "watching_category_or_tag": 969101, "watching_first_post": 111981}, "periods": [], "post_action_types": [], "post_types": {"moderator_action": 188994, "regular": 3865, "small_action": 833226, "whisper": 524656}, "tags_filter_regexp": "", "top_menu_items": [], "top_tags": [], "topic_featured_link_allowed_category_ids": [], "topic_flag_types": [], "trust_levels": {"basic": 76043, "leader": 236554, "member": 655582, "newuser": 841833, "regular": 507052}, "uncategorized_category_id": 79728, "user_color_schemes": [], "user_field_max_length": 865876, "user_fields": [], "user_themes": [], "watched_words_link": "", "watched_words_replace": ""} listCategories: - speakeasy-default-list-categories: {} + speakeasy-default-list-categories: + responses: + "200": + application/json: {"category_list": {"can_create_category": false, "can_create_topic": false, "categories": []}} listCategoryTopics: speakeasy-default-list-category-topics: parameters: path: slug: "" id: 394133 + responses: + "200": + application/json: {"topic_list": {"can_create_topic": true, "per_page": 513170, "topics": []}} updateCategory: speakeasy-default-update-category: parameters: @@ -910,6 +1006,9 @@ examples: id: 353500 requestBody: application/json: {"color": "49d9e9", "name": "", "permissions": {"everyone": 1}, "text_color": "f0fcfd"} + responses: + "200": + application/json: {"category": {"all_topics_wiki": false, "allow_badges": false, "allow_unlimited_owner_edits_on_first_post": true, "auto_close_based_on_last_post": false, "auto_close_hours": "", "available_groups": [], "can_delete": false, "can_edit": false, "color": "mint green", "default_list_filter": "", "default_slow_mode_seconds": "", "default_top_period": "", "default_view": "", "description": "Open-source demand-driven forecast", "description_excerpt": "", "description_text": "", "email_in": "", "email_in_allow_strangers": true, "form_template_ids": [], "group_permissions": [], "has_children": true, "id": 404301, "mailinglist_mirror": false, "minimum_required_tags": 765787, "name": "", "navigate_to_first_post_after_read": true, "notification_level": 506566, "num_featured_topics": 573945, "permission": 537500, "position": 818896, "post_count": 966055, "read_only_banner": "", "read_restricted": true, "required_tag_groups": [], "search_priority": 574545, "show_subcategory_list": false, "slug": "", "sort_ascending": "", "sort_order": "", "subcategory_list_style": "", "text_color": "", "topic_count": 946944, "topic_featured_link_allowed": false, "topic_template": "", "topic_url": "", "uploaded_background": "", "uploaded_background_dark": "", "uploaded_logo": "", "uploaded_logo_dark": ""}, "success": ""} createInvite: speakeasy-default-create-invite: parameters: @@ -941,6 +1040,9 @@ examples: speakeasy-default-create-topic-post-PM: requestBody: application/json: {"archetype": "private_message", "raw": "", "target_recipients": "blake,sam"} + responses: + "200": + application/json: {"actions_summary": [], "admin": true, "avatar_template": "", "bookmarked": true, "can_delete": false, "can_edit": true, "can_recover": false, "can_view_edit_history": true, "can_wiki": false, "cooked": "", "created_at": "", "deleted_at": "", "display_username": "", "draft_sequence": 177252, "edit_reason": "", "flair_bg_color": "", "flair_color": "", "flair_name": "", "flair_url": "", "hidden": true, "id": 114547, "incoming_link_count": 74808, "moderator": true, "name": "", "post_number": 240122, "post_type": 625045, "primary_group_name": "", "quote_count": 159237, "readers_count": 157793, "reads": 948621, "reply_count": 489264, "reply_to_post_number": "", "reviewable_id": "", "reviewable_score_count": 923875, "reviewable_score_pending_count": 49016, "score": 693419, "staff": true, "topic_id": 861941, "topic_slug": "", "trust_level": 336833, "updated_at": "", "user_deleted": false, "user_id": 869518, "user_title": "", "username": "Kiera_OHara53", "version": 333433, "wiki": false, "yours": false} createTopicTimer: speakeasy-default-create-topic-timer: parameters: @@ -962,6 +1064,9 @@ examples: header: Api-Key: "" Api-Username: "" + responses: + "200": + application/json: {"actions_summary": [], "archetype": "", "archived": false, "bookmarked": true, "bookmarks": [], "category_id": 21052, "chunk_size": 947957, "closed": true, "created_at": "", "deleted_at": "", "deleted_by": "", "details": {"can_archive_topic": true, "can_close_topic": true, "can_convert_topic": true, "can_create_post": false, "can_delete": false, "can_edit": false, "can_edit_staff_notes": true, "can_moderate_category": false, "can_move_posts": false, "can_pin_unpin_topic": true, "can_remove_allowed_users": false, "can_remove_self_id": 326000, "can_reply_as_new_topic": true, "can_review_topic": true, "can_split_merge_topic": true, "can_toggle_topic_visibility": false, "created_by": {"avatar_template": "", "id": 12547, "name": "", "username": "Alexandra.Dickinson"}, "last_poster": {"avatar_template": "", "id": 275899, "name": "", "username": "Frank.Bergnaum47"}, "notification_level": 820547}, "draft": "", "draft_key": "", "draft_sequence": 536811, "fancy_title": "", "featured_link": "", "has_deleted": false, "has_summary": false, "highest_post_number": 803817, "id": 113565, "image_url": "", "last_posted_at": "", "like_count": 39261, "message_bus_last_id": 832960, "participant_count": 440011, "pinned": true, "pinned_at": "", "pinned_globally": true, "pinned_until": "", "post_stream": {"posts": [], "stream": []}, "posts_count": 286296, "reply_count": 724372, "show_read_indicator": true, "slow_mode_enabled_until": "", "slow_mode_seconds": 462346, "slug": "", "suggested_topics": [], "summarizable": true, "tags": [], "thumbnails": "", "timeline_lookup": [], "title": "", "topic_timer": "", "unpinned": "", "user_id": 258928, "views": 815673, "visible": true, "word_count": 317030} getTopicByExternalId: speakeasy-default-get-topic-by-external-id: parameters: @@ -970,12 +1075,14 @@ examples: listLatestTopics: speakeasy-default-list-latest-topics: parameters: + query: {} header: Api-Key: "" Api-Username: "" listTopTopics: speakeasy-default-list-top-topics: parameters: + query: {} header: Api-Key: "" Api-Username: "" @@ -1048,9 +1155,13 @@ examples: parameters: path: id: "" + responses: + "200": + application/json: {"actions_summary": [], "admin": true, "avatar_template": "", "bookmarked": false, "can_delete": false, "can_edit": false, "can_recover": false, "can_view_edit_history": false, "can_wiki": true, "cooked": "", "created_at": "", "deleted_at": "", "edit_reason": "", "flair_bg_color": "", "flair_color": "", "flair_name": "", "flair_url": "", "hidden": true, "id": 274969, "incoming_link_count": 569040, "moderator": true, "post_number": 601256, "post_type": 309263, "primary_group_name": "", "quote_count": 778933, "raw": "", "readers_count": 539682, "reads": 613671, "reply_count": 315298, "reply_to_post_number": "", "reviewable_id": "", "reviewable_score_count": 415792, "reviewable_score_pending_count": 436283, "score": 630377, "staff": true, "topic_id": 448930, "topic_slug": "", "trust_level": 627491, "updated_at": "", "user_deleted": true, "user_id": 26419, "user_title": "", "username": "Myah_Hintz", "version": 119307, "wiki": true, "yours": true, "key": "", "key1": ""} listPosts: speakeasy-default-list-posts: parameters: + query: {} header: Api-Key: "" Api-Username: "" @@ -1073,11 +1184,17 @@ examples: parameters: path: id: "" + responses: + "200": + application/json: [] updatePost: speakeasy-default-update-post: parameters: path: id: "" + responses: + "200": + application/json: {"post": {"actions_summary": [], "admin": true, "avatar_template": "", "bookmarked": false, "can_delete": false, "can_edit": true, "can_recover": true, "can_view_edit_history": false, "can_wiki": true, "cooked": "", "created_at": "", "deleted_at": "", "draft_sequence": 569421, "edit_reason": "", "flair_bg_color": "", "flair_color": "", "flair_name": "", "flair_url": "", "hidden": false, "id": 437966, "incoming_link_count": 537165, "moderator": true, "post_number": 280082, "post_type": 212729, "primary_group_name": "", "quote_count": 880040, "raw": "", "readers_count": 506220, "reads": 778785, "reply_count": 188399, "reply_to_post_number": "", "reviewable_id": "", "reviewable_score_count": 1835, "reviewable_score_pending_count": 766049, "score": 49732, "staff": false, "topic_id": 179027, "topic_slug": "", "trust_level": 424745, "updated_at": "", "user_deleted": false, "user_id": 527776, "user_title": "", "username": "Adrien.Hackett16", "version": 478363, "wiki": true, "yours": false}} getUserSentPrivateMessages: speakeasy-default-get-user-sent-private-messages: parameters: @@ -1094,8 +1211,14 @@ examples: query: q: "api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic" page: 1 + responses: + "200": + application/json: {"categories": [], "grouped_search_result": {"can_create_topic": true, "category_ids": [], "error": "", "group_ids": [], "more_categories": "", "more_full_page_results": "", "more_posts": "", "more_users": "", "post_ids": [], "search_log_id": 263492, "tag_ids": [], "term": "", "user_ids": []}, "groups": [], "posts": [], "tags": [], "users": []} createTagGroup: - speakeasy-default-create-tag-group: {} + speakeasy-default-create-tag-group: + responses: + "200": + application/json: {"tag_group": {"id": 10533, "name": "", "one_per_topic": true, "parent_tag_name": [], "tag_names": []}} getTag: speakeasy-default-get-tag: parameters: @@ -1133,10 +1256,16 @@ examples: speakeasy-default-complete-external-upload: requestBody: application/json: {"for_private_message": "true", "for_site_setting": "true", "pasted": "true", "unique_identifier": "66e86218-80d9-4bda-b4d5-2b6def968705"} + responses: + "200": + application/json: {"extension": "png", "filesize": 655183, "height": 19001, "human_filesize": "", "id": 511225, "original_filename": "", "retain_hours": "", "short_path": "", "short_url": "", "thumbnail_height": 131321, "thumbnail_width": 995440, "url": "https://aggressive-watch.net", "width": 41079} completeMultipart: speakeasy-default-complete-multipart: requestBody: application/json: {"parts": [{"part_number": 1, "etag": "0c376dcfcc2606f4335bbc732de93344"}, {"part_number": 2, "etag": "09ert8cfcc2606f4335bbc732de91122"}], "unique_identifier": "66e86218-80d9-4bda-b4d5-2b6def968705"} + responses: + "200": + application/json: {"extension": "pdf", "filesize": 349952, "height": 720712, "human_filesize": "", "id": 849047, "original_filename": "", "retain_hours": "", "short_path": "", "short_url": "", "thumbnail_height": 230034, "thumbnail_width": 233676, "url": "http://everlasting-clearance.com", "width": 492751} createMultipartUpload: speakeasy-default-create-multipart-upload: requestBody: @@ -1145,7 +1274,10 @@ examples: "200": application/json: {"external_upload_identifier": "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ", "key": "temp/site/uploads/default/12345/67890.jpg", "unique_identifier": "66e86218-80d9-4bda-b4d5-2b6def968705"} createUpload: - speakeasy-default-create-upload: {} + speakeasy-default-create-upload: + responses: + "200": + application/json: {"extension": "wav", "filesize": 630853, "height": 272980, "human_filesize": "", "id": 541628, "original_filename": "", "retain_hours": "", "short_path": "", "short_url": "", "thumbnail_height": 676159, "thumbnail_width": 904119, "url": "http://well-lit-physics.com", "width": 942703} generatePresignedPut: speakeasy-default-generate-presigned-put: requestBody: diff --git a/README.md b/README.md index 2602a89..37348a0 100644 --- a/README.md +++ b/README.md @@ -128,10 +128,10 @@ import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK(); async function run() { - const result = await sdk.backups.createBackup(); + const result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -307,26 +307,26 @@ import { SDKValidationError } from "@lukehagar/discoursejs/sdk/models/errors"; const sdk = new SDK(); async function run() { - let result; - try { - result = await sdk.backups.createBackup(); + let result; + try { + result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); - } catch (err) { - switch (true) { - case err instanceof SDKValidationError: { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - default: { - throw err; - } - } + // Handle the result + console.log(result); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + default: { + throw err; + } } + } } run(); @@ -349,14 +349,14 @@ You can override the default server globally by passing a server index to the `s import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK({ - serverIdx: 0, + serverIdx: 0, }); async function run() { - const result = await sdk.backups.createBackup(); + const result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -376,14 +376,14 @@ The default server can also be overridden globally by passing a URL to the `serv import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK({ - serverURL: "https://{defaultHost}", + serverURL: "https://{defaultHost}", }); async function run() { - const result = await sdk.backups.createBackup(); + const result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -466,10 +466,10 @@ import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK(); async function run() { - const result = await sdk.uploads.createUpload(); + const result = await sdk.uploads.createUpload(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -489,21 +489,21 @@ import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK(); async function run() { - const result = await sdk.backups.createBackup({ - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - }); + const result = await sdk.backups.createBackup({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -515,23 +515,23 @@ If you'd like to override the default retry strategy for all operations that sup import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK({ - retryConfig: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, + retryConnectionErrors: false, + }, }); async function run() { - const result = await sdk.backups.createBackup(); + const result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/RELEASES.md b/RELEASES.md index ad2e3a0..7afdcdd 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -278,4 +278,14 @@ Based on: ### Generated - [typescript v0.8.2] . ### Releases -- [NPM v0.8.2] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.8.2 - . \ No newline at end of file +- [NPM v0.8.2] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.8.2 - . + +## 2024-09-10 00:24:11 +### Changes +Based on: +- OpenAPI Doc latest +- Speakeasy CLI 1.394.0 (2.413.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.9.0] . +### Releases +- [NPM v0.9.0] https://www.npmjs.com/package/@lukehagar/discoursejs/v/0.9.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 5e7d16e..ef2494d 100644 --- a/USAGE.md +++ b/USAGE.md @@ -5,10 +5,10 @@ import { SDK } from "@lukehagar/discoursejs"; const sdk = new SDK(); async function run() { - const result = await sdk.backups.createBackup(); + const result = await sdk.backups.createBackup(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/docs/sdk/models/operations/abortmultipartrequestbody.md b/docs/sdk/models/operations/abortmultipartrequestbody.md index 3943074..2de2d92 100644 --- a/docs/sdk/models/operations/abortmultipartrequestbody.md +++ b/docs/sdk/models/operations/abortmultipartrequestbody.md @@ -6,8 +6,8 @@ import { AbortMultipartRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AbortMultipartRequestBody = { - externalUploadIdentifier: - "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ", + externalUploadIdentifier: + "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ", }; ``` diff --git a/docs/sdk/models/operations/abortmultipartresponsebody.md b/docs/sdk/models/operations/abortmultipartresponsebody.md index 4a99499..9d3dff4 100644 --- a/docs/sdk/models/operations/abortmultipartresponsebody.md +++ b/docs/sdk/models/operations/abortmultipartresponsebody.md @@ -8,7 +8,7 @@ external upload initialized import { AbortMultipartResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AbortMultipartResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/actionssummary.md b/docs/sdk/models/operations/actionssummary.md index 64e53d3..586c3be 100644 --- a/docs/sdk/models/operations/actionssummary.md +++ b/docs/sdk/models/operations/actionssummary.md @@ -6,7 +6,7 @@ import { ActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ActionsSummary = { - id: 63553, + id: 63553, }; ``` diff --git a/docs/sdk/models/operations/activateuserrequest.md b/docs/sdk/models/operations/activateuserrequest.md index 9b8cf00..0f4c285 100644 --- a/docs/sdk/models/operations/activateuserrequest.md +++ b/docs/sdk/models/operations/activateuserrequest.md @@ -6,7 +6,7 @@ import { ActivateUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ActivateUserRequest = { - id: 881736, + id: 881736, }; ``` diff --git a/docs/sdk/models/operations/activateuserresponsebody.md b/docs/sdk/models/operations/activateuserresponsebody.md index f4cd189..2e9320d 100644 --- a/docs/sdk/models/operations/activateuserresponsebody.md +++ b/docs/sdk/models/operations/activateuserresponsebody.md @@ -8,7 +8,7 @@ response import { ActivateUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ActivateUserResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/addgroupmembersrequest.md b/docs/sdk/models/operations/addgroupmembersrequest.md index 292067d..3216144 100644 --- a/docs/sdk/models/operations/addgroupmembersrequest.md +++ b/docs/sdk/models/operations/addgroupmembersrequest.md @@ -6,10 +6,10 @@ import { AddGroupMembersRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AddGroupMembersRequest = { - requestBody: { - usernames: "username1,username2", - }, - id: 253291, + requestBody: { + usernames: "username1,username2", + }, + id: 253291, }; ``` diff --git a/docs/sdk/models/operations/addgroupmembersrequestbody.md b/docs/sdk/models/operations/addgroupmembersrequestbody.md index fadd150..b871f2c 100644 --- a/docs/sdk/models/operations/addgroupmembersrequestbody.md +++ b/docs/sdk/models/operations/addgroupmembersrequestbody.md @@ -6,7 +6,7 @@ import { AddGroupMembersRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AddGroupMembersRequestBody = { - usernames: "username1,username2", + usernames: "username1,username2", }; ``` diff --git a/docs/sdk/models/operations/addgroupmembersresponsebody.md b/docs/sdk/models/operations/addgroupmembersresponsebody.md index e2ce877..7b7c351 100644 --- a/docs/sdk/models/operations/addgroupmembersresponsebody.md +++ b/docs/sdk/models/operations/addgroupmembersresponsebody.md @@ -8,9 +8,13 @@ success response import { AddGroupMembersResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AddGroupMembersResponseBody = { - emails: [""], - success: "", - usernames: [""], + emails: [ + "", + ], + success: "", + usernames: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/adminbadges.md b/docs/sdk/models/operations/adminbadges.md index 4556349..9914474 100644 --- a/docs/sdk/models/operations/adminbadges.md +++ b/docs/sdk/models/operations/adminbadges.md @@ -6,17 +6,25 @@ import { AdminBadges } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminBadges = { - badgeGroupingIds: [""], - badgeIds: [""], - badgeTypeIds: [""], - protectedSystemFields: [""], - triggers: { - none: 544883, - postAction: 847252, - postRevision: 423655, - trustLevelChange: 623564, - userChange: 645894, - }, + badgeGroupingIds: [ + "", + ], + badgeIds: [ + "", + ], + badgeTypeIds: [ + "", + ], + protectedSystemFields: [ + "", + ], + triggers: { + none: 544883, + postAction: 847252, + postRevision: 423655, + trustLevelChange: 623564, + userChange: 645894, + }, }; ``` diff --git a/docs/sdk/models/operations/admingetusergroups.md b/docs/sdk/models/operations/admingetusergroups.md index 162af65..2e3380f 100644 --- a/docs/sdk/models/operations/admingetusergroups.md +++ b/docs/sdk/models/operations/admingetusergroups.md @@ -6,35 +6,35 @@ import { AdminGetUserGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminGetUserGroups = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 533206, - displayName: "Verlie.Feeney", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Ada Moen IV", - grantTrustLevel: "", - hasMessages: false, - id: 301575, - incomingEmail: "", - membersVisibilityLevel: 716075, - membershipRequestTemplate: "", - mentionableLevel: 660174, - messageableLevel: 287991, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 290077, - visibilityLevel: 383462, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 533206, + displayName: "Verlie.Feeney", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Ada Moen IV", + grantTrustLevel: "", + hasMessages: false, + id: 301575, + incomingEmail: "", + membersVisibilityLevel: 716075, + membershipRequestTemplate: "", + mentionableLevel: 660174, + messageableLevel: 287991, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 290077, + visibilityLevel: 383462, }; ``` diff --git a/docs/sdk/models/operations/admingetuserpenaltycounts.md b/docs/sdk/models/operations/admingetuserpenaltycounts.md index 4f937c2..b511d7f 100644 --- a/docs/sdk/models/operations/admingetuserpenaltycounts.md +++ b/docs/sdk/models/operations/admingetuserpenaltycounts.md @@ -6,9 +6,9 @@ import { AdminGetUserPenaltyCounts } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminGetUserPenaltyCounts = { - silenced: 428769, - suspended: 878453, - total: 135474, + silenced: 428769, + suspended: 878453, + total: 135474, }; ``` diff --git a/docs/sdk/models/operations/admingetuserrequest.md b/docs/sdk/models/operations/admingetuserrequest.md index 4120a88..04f1b12 100644 --- a/docs/sdk/models/operations/admingetuserrequest.md +++ b/docs/sdk/models/operations/admingetuserrequest.md @@ -6,7 +6,7 @@ import { AdminGetUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminGetUserRequest = { - id: 965417, + id: 965417, }; ``` diff --git a/docs/sdk/models/operations/admingetuserresponsebody.md b/docs/sdk/models/operations/admingetuserresponsebody.md index bc3ffe0..6869c39 100644 --- a/docs/sdk/models/operations/admingetuserresponsebody.md +++ b/docs/sdk/models/operations/admingetuserresponsebody.md @@ -8,102 +8,102 @@ response import { AdminGetUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminGetUserResponseBody = { - active: false, - admin: false, - apiKeyCount: 99569, - approvedBy: { - avatarTemplate: "", - id: 919483, - name: "", - username: "Felix_Ratke", - }, + active: false, + admin: false, + apiKeyCount: 99569, + approvedBy: { avatarTemplate: "", - badgeCount: 841140, - bounceScore: 149448, - canActivate: false, - canBeAnonymized: false, - canBeDeleted: false, - canBeMerged: false, - canDeactivate: false, - canDeleteAllPosts: false, - canDeleteSsoRecord: false, - canDisableSecondFactor: false, - canGrantAdmin: false, - canGrantModeration: false, - canImpersonate: false, - canRevokeAdmin: false, - canRevokeModeration: false, - canSendActivationEmail: false, - canViewActionLogs: false, - createdAt: "", - createdAtAge: 9046.48, - daysVisited: 868126, - externalIds: {}, - flagsGivenCount: 37559, - flagsReceivedCount: 162493, - fullSuspendReason: "", - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 508315, - displayName: "Levi77", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Ervin Schoen", - grantTrustLevel: "", - hasMessages: false, - id: 139972, - incomingEmail: "", - membersVisibilityLevel: 407183, - membershipRequestTemplate: "", - mentionableLevel: 33222, - messageableLevel: 69167, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 982575, - visibilityLevel: 697429, - }, - ], - id: 373291, - ipAddress: "116.107.184.12", - lastEmailedAge: 8663.83, - lastEmailedAt: "", - lastSeenAge: 3654.96, - lastSeenAt: "", - likeCount: 975522, - likeGivenCount: 16627, - manualLockedTrustLevel: "", - moderator: false, + id: 919483, name: "", - postCount: 855804, - postsReadCount: 230742, - primaryGroupId: "", - privateTopicsCount: 11714, - registrationIpAddress: "", - resetBounceScoreAfter: "", - silenceReason: "", - silencedBy: "", - singleSignOnRecord: "", - staged: false, - suspendedBy: "", - timeRead: 764912, - title: "", - topicCount: 359978, - topicsEntered: 944124, - trustLevel: 729991, - username: "Nelson_DAmore", - warningsReceivedCount: 489549, + username: "Felix_Ratke", + }, + avatarTemplate: "", + badgeCount: 841140, + bounceScore: 149448, + canActivate: false, + canBeAnonymized: false, + canBeDeleted: false, + canBeMerged: false, + canDeactivate: false, + canDeleteAllPosts: false, + canDeleteSsoRecord: false, + canDisableSecondFactor: false, + canGrantAdmin: false, + canGrantModeration: false, + canImpersonate: false, + canRevokeAdmin: false, + canRevokeModeration: false, + canSendActivationEmail: false, + canViewActionLogs: false, + createdAt: "", + createdAtAge: 9046.48, + daysVisited: 868126, + externalIds: {}, + flagsGivenCount: 37559, + flagsReceivedCount: 162493, + fullSuspendReason: "", + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 508315, + displayName: "Levi77", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Ervin Schoen", + grantTrustLevel: "", + hasMessages: false, + id: 139972, + incomingEmail: "", + membersVisibilityLevel: 407183, + membershipRequestTemplate: "", + mentionableLevel: 33222, + messageableLevel: 69167, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 982575, + visibilityLevel: 697429, + }, + ], + id: 373291, + ipAddress: "116.107.184.12", + lastEmailedAge: 8663.83, + lastEmailedAt: "", + lastSeenAge: 3654.96, + lastSeenAt: "", + likeCount: 975522, + likeGivenCount: 16627, + manualLockedTrustLevel: "", + moderator: false, + name: "", + postCount: 855804, + postsReadCount: 230742, + primaryGroupId: "", + privateTopicsCount: 11714, + registrationIpAddress: "", + resetBounceScoreAfter: "", + silenceReason: "", + silencedBy: "", + singleSignOnRecord: "", + staged: false, + suspendedBy: "", + timeRead: 764912, + title: "", + topicCount: 359978, + topicsEntered: 944124, + trustLevel: 729991, + username: "Nelson_DAmore", + warningsReceivedCount: 489549, }; ``` diff --git a/docs/sdk/models/operations/adminlistbadgesresponsebody.md b/docs/sdk/models/operations/adminlistbadgesresponsebody.md index c13fc71..fa169a1 100644 --- a/docs/sdk/models/operations/adminlistbadgesresponsebody.md +++ b/docs/sdk/models/operations/adminlistbadgesresponsebody.md @@ -8,60 +8,68 @@ success response import { AdminListBadgesResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminListBadgesResponseBody = { - adminBadges: { - badgeGroupingIds: [""], - badgeIds: [""], - badgeTypeIds: [""], - protectedSystemFields: [""], - triggers: { - none: 925597, - postAction: 836079, - postRevision: 71036, - trustLevelChange: 337396, - userChange: 87129, - }, + adminBadges: { + badgeGroupingIds: [ + "", + ], + badgeIds: [ + "", + ], + badgeTypeIds: [ + "", + ], + protectedSystemFields: [ + "", + ], + triggers: { + none: 925597, + postAction: 836079, + postRevision: 71036, + trustLevelChange: 337396, + userChange: 87129, }, - badgeGroupings: [ - { - description: "Profit-focused 3rd generation framework", - id: 832620, - name: "", - position: 957156, - system: false, - }, - ], - badgeTypes: [ - { - id: 778157, - name: "", - sortOrder: 140350, - }, - ], - badges: [ - { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 870013, - badgeTypeId: 870088, - description: "Virtual holistic projection", - enabled: false, - grantCount: 800911, - icon: "", - id: 461479, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: 520478, - }, - ], + }, + badgeGroupings: [ + { + description: "Profit-focused 3rd generation framework", + id: 832620, + name: "", + position: 957156, + system: false, + }, + ], + badgeTypes: [ + { + id: 778157, + name: "", + sortOrder: 140350, + }, + ], + badges: [ + { + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 870013, + badgeTypeId: 870088, + description: "Virtual holistic projection", + enabled: false, + grantCount: 800911, + icon: "", + id: 461479, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: 520478, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/adminlistusersrequest.md b/docs/sdk/models/operations/adminlistusersrequest.md index cec8960..9ab96ba 100644 --- a/docs/sdk/models/operations/adminlistusersrequest.md +++ b/docs/sdk/models/operations/adminlistusersrequest.md @@ -6,7 +6,7 @@ import { AdminListUsersRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminListUsersRequest = { - flag: "new", + flag: "new", }; ``` diff --git a/docs/sdk/models/operations/adminlistusersresponsebody.md b/docs/sdk/models/operations/adminlistusersresponsebody.md index c52901f..4fdc564 100644 --- a/docs/sdk/models/operations/adminlistusersresponsebody.md +++ b/docs/sdk/models/operations/adminlistusersresponsebody.md @@ -6,28 +6,28 @@ import { AdminListUsersResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AdminListUsersResponseBody = { - active: false, - admin: false, - avatarTemplate: "", - createdAt: "", - createdAtAge: 1794.9, - daysVisited: 18521, - id: 170986, - lastEmailedAge: 7936.98, - lastEmailedAt: "", - lastSeenAge: 4634.51, - lastSeenAt: "", - manualLockedTrustLevel: "", - moderator: false, - name: "", - postCount: 223924, - postsReadCount: 874573, - staged: false, - timeRead: 345352, - title: "", - topicsEntered: 944120, - trustLevel: 928082, - username: "Leo.Purdy", + active: false, + admin: false, + avatarTemplate: "", + createdAt: "", + createdAtAge: 1794.9, + daysVisited: 18521, + id: 170986, + lastEmailedAge: 7936.98, + lastEmailedAt: "", + lastSeenAge: 4634.51, + lastSeenAt: "", + manualLockedTrustLevel: "", + moderator: false, + name: "", + postCount: 223924, + postsReadCount: 874573, + staged: false, + timeRead: 345352, + title: "", + topicsEntered: 944120, + trustLevel: 928082, + username: "Leo.Purdy", }; ``` diff --git a/docs/sdk/models/operations/anonymizeuserrequest.md b/docs/sdk/models/operations/anonymizeuserrequest.md index 6d6b6bd..ae6e170 100644 --- a/docs/sdk/models/operations/anonymizeuserrequest.md +++ b/docs/sdk/models/operations/anonymizeuserrequest.md @@ -6,7 +6,7 @@ import { AnonymizeUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AnonymizeUserRequest = { - id: 783645, + id: 783645, }; ``` diff --git a/docs/sdk/models/operations/anonymizeuserresponsebody.md b/docs/sdk/models/operations/anonymizeuserresponsebody.md index a71b282..e8e085a 100644 --- a/docs/sdk/models/operations/anonymizeuserresponsebody.md +++ b/docs/sdk/models/operations/anonymizeuserresponsebody.md @@ -8,8 +8,8 @@ response import { AnonymizeUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: AnonymizeUserResponseBody = { - success: "", - username: "Casimer.Kutch", + success: "", + username: "Casimer.Kutch", }; ``` diff --git a/docs/sdk/models/operations/approvedby.md b/docs/sdk/models/operations/approvedby.md index 3d89efc..cbc11bb 100644 --- a/docs/sdk/models/operations/approvedby.md +++ b/docs/sdk/models/operations/approvedby.md @@ -6,10 +6,10 @@ import { ApprovedBy } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ApprovedBy = { - avatarTemplate: "", - id: 692532, - name: "", - username: "Lafayette_Reinger", + avatarTemplate: "", + id: 692532, + name: "", + username: "Lafayette_Reinger", }; ``` diff --git a/docs/sdk/models/operations/archetypes.md b/docs/sdk/models/operations/archetypes.md index 8a873e9..bc7e4ca 100644 --- a/docs/sdk/models/operations/archetypes.md +++ b/docs/sdk/models/operations/archetypes.md @@ -6,9 +6,11 @@ import { Archetypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Archetypes = { - id: "", - name: "", - options: [""], + id: "", + name: "", + options: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/badge.md b/docs/sdk/models/operations/badge.md index b111d79..5055fe5 100644 --- a/docs/sdk/models/operations/badge.md +++ b/docs/sdk/models/operations/badge.md @@ -6,27 +6,27 @@ import { Badge } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Badge = { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 678880, - badgeTypeId: 118274, - description: "Re-contextualized motivating leverage", - enabled: false, - grantCount: 143353, - icon: "", - id: 537373, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: "", + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 678880, + badgeTypeId: 118274, + description: "Re-contextualized motivating leverage", + enabled: false, + grantCount: 143353, + icon: "", + id: 537373, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: "", }; ``` diff --git a/docs/sdk/models/operations/badgegroupings.md b/docs/sdk/models/operations/badgegroupings.md index 3ef62aa..2152e53 100644 --- a/docs/sdk/models/operations/badgegroupings.md +++ b/docs/sdk/models/operations/badgegroupings.md @@ -6,11 +6,11 @@ import { BadgeGroupings } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BadgeGroupings = { - description: "Innovative grid-enabled encoding", - id: 891773, - name: "", - position: 56713, - system: false, + description: "Innovative grid-enabled encoding", + id: 891773, + name: "", + position: 56713, + system: false, }; ``` diff --git a/docs/sdk/models/operations/badges.md b/docs/sdk/models/operations/badges.md index ae6538e..7456b64 100644 --- a/docs/sdk/models/operations/badges.md +++ b/docs/sdk/models/operations/badges.md @@ -6,27 +6,27 @@ import { Badges } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Badges = { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 383441, - badgeTypeId: 477665, - description: "Secured secondary internet solution", - enabled: false, - grantCount: 479977, - icon: "", - id: 568045, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: 392785, + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 383441, + badgeTypeId: 477665, + description: "Secured secondary internet solution", + enabled: false, + grantCount: 479977, + icon: "", + id: 568045, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: 392785, }; ``` diff --git a/docs/sdk/models/operations/badgetypes.md b/docs/sdk/models/operations/badgetypes.md index 7007e66..d0fb780 100644 --- a/docs/sdk/models/operations/badgetypes.md +++ b/docs/sdk/models/operations/badgetypes.md @@ -6,9 +6,9 @@ import { BadgeTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BadgeTypes = { - id: 963663, - name: "", - sortOrder: 272656, + id: 963663, + name: "", + sortOrder: 272656, }; ``` diff --git a/docs/sdk/models/operations/basicgroup.md b/docs/sdk/models/operations/basicgroup.md index 3f099c5..03c51d9 100644 --- a/docs/sdk/models/operations/basicgroup.md +++ b/docs/sdk/models/operations/basicgroup.md @@ -6,34 +6,34 @@ import { BasicGroup } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BasicGroup = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 414369, - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Nellie Frami", - grantTrustLevel: "", - hasMessages: false, - id: 338007, - incomingEmail: "", - membersVisibilityLevel: 110375, - membershipRequestTemplate: "", - mentionableLevel: 674752, - messageableLevel: 656330, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 317202, - visibilityLevel: 138183, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 414369, + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Nellie Frami", + grantTrustLevel: "", + hasMessages: false, + id: 338007, + incomingEmail: "", + membersVisibilityLevel: 110375, + membershipRequestTemplate: "", + mentionableLevel: 674752, + messageableLevel: 656330, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 317202, + visibilityLevel: 138183, }; ``` diff --git a/docs/sdk/models/operations/batchpresignmultipartpartsrequestbody.md b/docs/sdk/models/operations/batchpresignmultipartpartsrequestbody.md index 360c756..e39cc10 100644 --- a/docs/sdk/models/operations/batchpresignmultipartpartsrequestbody.md +++ b/docs/sdk/models/operations/batchpresignmultipartpartsrequestbody.md @@ -6,8 +6,12 @@ import { BatchPresignMultipartPartsRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BatchPresignMultipartPartsRequestBody = { - partNumbers: [1, 2, 3], - uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", + partNumbers: [ + 1, + 2, + 3, + ], + uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", }; ``` diff --git a/docs/sdk/models/operations/batchpresignmultipartpartsresponsebody.md b/docs/sdk/models/operations/batchpresignmultipartpartsresponsebody.md index a10569c..44e18dd 100644 --- a/docs/sdk/models/operations/batchpresignmultipartpartsresponsebody.md +++ b/docs/sdk/models/operations/batchpresignmultipartpartsresponsebody.md @@ -8,7 +8,7 @@ external upload initialized import { BatchPresignMultipartPartsResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BatchPresignMultipartPartsResponseBody = { - presignedUrls: {}, + presignedUrls: {}, }; ``` diff --git a/docs/sdk/models/operations/bookmarktopicrequest.md b/docs/sdk/models/operations/bookmarktopicrequest.md index 0fbbf15..6b475c3 100644 --- a/docs/sdk/models/operations/bookmarktopicrequest.md +++ b/docs/sdk/models/operations/bookmarktopicrequest.md @@ -6,9 +6,9 @@ import { BookmarkTopicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: BookmarkTopicRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/categories.md b/docs/sdk/models/operations/categories.md index 33fb420..bd343da 100644 --- a/docs/sdk/models/operations/categories.md +++ b/docs/sdk/models/operations/categories.md @@ -6,44 +6,46 @@ import { Categories } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Categories = { - canEdit: false, - color: "olive", - defaultListFilter: "", - defaultTopPeriod: "", - defaultView: "", - description: "Total systemic ability", - descriptionExcerpt: "", - descriptionText: "", - hasChildren: false, - id: 97258, - minimumRequiredTags: 90233, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 497777, - numFeaturedTopics: 619183, - permission: 581082, - position: 382440, - postCount: 241557, - readRestricted: false, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryIds: [""], - subcategoryListStyle: "", - textColor: "", - topicCount: 96562, - topicTemplate: "", - topicUrl: "", - topicsAllTime: 169025, - topicsDay: 984934, - topicsMonth: 859581, - topicsWeek: 896582, - topicsYear: 58534, - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", + canEdit: false, + color: "olive", + defaultListFilter: "", + defaultTopPeriod: "", + defaultView: "", + description: "Total systemic ability", + descriptionExcerpt: "", + descriptionText: "", + hasChildren: false, + id: 97258, + minimumRequiredTags: 90233, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 497777, + numFeaturedTopics: 619183, + permission: 581082, + position: 382440, + postCount: 241557, + readRestricted: false, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryIds: [ + "", + ], + subcategoryListStyle: "", + textColor: "", + topicCount: 96562, + topicTemplate: "", + topicUrl: "", + topicsAllTime: 169025, + topicsDay: 984934, + topicsMonth: 859581, + topicsWeek: 896582, + topicsYear: 58534, + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }; ``` diff --git a/docs/sdk/models/operations/category.md b/docs/sdk/models/operations/category.md index 8b6b34a..72145ae 100644 --- a/docs/sdk/models/operations/category.md +++ b/docs/sdk/models/operations/category.md @@ -6,65 +6,67 @@ import { Category } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Category = { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "gold", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Public-key impactful moderator", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - groupPermissions: [ - { - groupName: "", - permissionType: 333965, - }, - ], - hasChildren: false, - id: 29100, - mailinglistMirror: false, - minimumRequiredTags: 790840, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 919532, - numFeaturedTopics: 97243, - permission: 542457, - position: 442036, - postCount: 991142, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 519952, - name: "", - }, - ], - searchPriority: 383103, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 693957, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "gold", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Public-key impactful moderator", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + groupPermissions: [ + { + groupName: "", + permissionType: 333965, + }, + ], + hasChildren: false, + id: 29100, + mailinglistMirror: false, + minimumRequiredTags: 790840, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 919532, + numFeaturedTopics: 97243, + permission: 542457, + position: 442036, + postCount: 991142, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 519952, + name: "", + }, + ], + searchPriority: 383103, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 693957, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }; ``` diff --git a/docs/sdk/models/operations/categorylist.md b/docs/sdk/models/operations/categorylist.md index 1dbcfd1..a530c2c 100644 --- a/docs/sdk/models/operations/categorylist.md +++ b/docs/sdk/models/operations/categorylist.md @@ -6,50 +6,52 @@ import { CategoryList } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CategoryList = { - canCreateCategory: false, - canCreateTopic: false, - categories: [ - { - canEdit: false, - color: "black", - defaultListFilter: "", - defaultTopPeriod: "", - defaultView: "", - description: "Multi-layered holistic attitude", - descriptionExcerpt: "", - descriptionText: "", - hasChildren: false, - id: 479754, - minimumRequiredTags: 457059, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 508390, - numFeaturedTopics: 979963, - permission: 967260, - position: 423706, - postCount: 99958, - readRestricted: false, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryIds: [""], - subcategoryListStyle: "", - textColor: "", - topicCount: 857125, - topicTemplate: "", - topicUrl: "", - topicsAllTime: 39650, - topicsDay: 117315, - topicsMonth: 483706, - topicsWeek: 271252, - topicsYear: 458259, - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, - ], + canCreateCategory: false, + canCreateTopic: false, + categories: [ + { + canEdit: false, + color: "black", + defaultListFilter: "", + defaultTopPeriod: "", + defaultView: "", + description: "Multi-layered holistic attitude", + descriptionExcerpt: "", + descriptionText: "", + hasChildren: false, + id: 479754, + minimumRequiredTags: 457059, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 508390, + numFeaturedTopics: 979963, + permission: 967260, + position: 423706, + postCount: 99958, + readRestricted: false, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryIds: [ + "", + ], + subcategoryListStyle: "", + textColor: "", + topicCount: 857125, + topicTemplate: "", + topicUrl: "", + topicsAllTime: 39650, + topicsDay: 117315, + topicsMonth: 483706, + topicsWeek: 271252, + topicsYear: 458259, + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/changepasswordrequest.md b/docs/sdk/models/operations/changepasswordrequest.md index 5ca354b..152ec4f 100644 --- a/docs/sdk/models/operations/changepasswordrequest.md +++ b/docs/sdk/models/operations/changepasswordrequest.md @@ -6,7 +6,7 @@ import { ChangePasswordRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ChangePasswordRequest = { - token: "", + token: "", }; ``` diff --git a/docs/sdk/models/operations/changepasswordrequestbody.md b/docs/sdk/models/operations/changepasswordrequestbody.md index e0dbe3e..84dc03e 100644 --- a/docs/sdk/models/operations/changepasswordrequestbody.md +++ b/docs/sdk/models/operations/changepasswordrequestbody.md @@ -6,8 +6,8 @@ import { ChangePasswordRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ChangePasswordRequestBody = { - password: "Wc7yaSsYhfUF546", - username: "Christy_Erdman73", + password: "Wc7yaSsYhfUF546", + username: "Christy_Erdman73", }; ``` diff --git a/docs/sdk/models/operations/completeexternaluploadrequestbody.md b/docs/sdk/models/operations/completeexternaluploadrequestbody.md index c5d8f70..046f262 100644 --- a/docs/sdk/models/operations/completeexternaluploadrequestbody.md +++ b/docs/sdk/models/operations/completeexternaluploadrequestbody.md @@ -6,10 +6,10 @@ import { CompleteExternalUploadRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CompleteExternalUploadRequestBody = { - forPrivateMessage: "true", - forSiteSetting: "true", - pasted: "true", - uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", + forPrivateMessage: "true", + forSiteSetting: "true", + pasted: "true", + uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", }; ``` diff --git a/docs/sdk/models/operations/completeexternaluploadresponsebody.md b/docs/sdk/models/operations/completeexternaluploadresponsebody.md index 03e548a..fdebd62 100644 --- a/docs/sdk/models/operations/completeexternaluploadresponsebody.md +++ b/docs/sdk/models/operations/completeexternaluploadresponsebody.md @@ -8,19 +8,19 @@ external upload initialized import { CompleteExternalUploadResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CompleteExternalUploadResponseBody = { - extension: "mp4", - filesize: 727547, - height: 189753, - humanFilesize: "", - id: 289913, - originalFilename: "", - retainHours: "", - shortPath: "", - shortUrl: "", - thumbnailHeight: 520875, - thumbnailWidth: 577709, - url: "http://sore-death.net", - width: 684553, + extension: "mp4", + filesize: 727547, + height: 189753, + humanFilesize: "", + id: 289913, + originalFilename: "", + retainHours: "", + shortPath: "", + shortUrl: "", + thumbnailHeight: 520875, + thumbnailWidth: 577709, + url: "http://sore-death.net", + width: 684553, }; ``` diff --git a/docs/sdk/models/operations/completemultipartrequestbody.md b/docs/sdk/models/operations/completemultipartrequestbody.md index 3ec9cd3..b921a2f 100644 --- a/docs/sdk/models/operations/completemultipartrequestbody.md +++ b/docs/sdk/models/operations/completemultipartrequestbody.md @@ -6,17 +6,17 @@ import { CompleteMultipartRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CompleteMultipartRequestBody = { - parts: [ - { - part_number: 1, - etag: "0c376dcfcc2606f4335bbc732de93344", - }, - { - part_number: 2, - etag: "09ert8cfcc2606f4335bbc732de91122", - }, - ], - uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", + parts: [ + { + "part_number": 1, + "etag": "0c376dcfcc2606f4335bbc732de93344", + }, + { + "part_number": 2, + "etag": "09ert8cfcc2606f4335bbc732de91122", + }, + ], + uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", }; ``` diff --git a/docs/sdk/models/operations/completemultipartresponsebody.md b/docs/sdk/models/operations/completemultipartresponsebody.md index 4887701..a12d1b0 100644 --- a/docs/sdk/models/operations/completemultipartresponsebody.md +++ b/docs/sdk/models/operations/completemultipartresponsebody.md @@ -8,19 +8,19 @@ external upload initialized import { CompleteMultipartResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CompleteMultipartResponseBody = { - extension: "png", - filesize: 669237, - height: 770873, - humanFilesize: "", - id: 963741, - originalFilename: "", - retainHours: "", - shortPath: "", - shortUrl: "", - thumbnailHeight: 735894, - thumbnailWidth: 878601, - url: "http://zany-subsidy.info", - width: 441321, + extension: "png", + filesize: 669237, + height: 770873, + humanFilesize: "", + id: 963741, + originalFilename: "", + retainHours: "", + shortPath: "", + shortUrl: "", + thumbnailHeight: 735894, + thumbnailWidth: 878601, + url: "http://zany-subsidy.info", + width: 441321, }; ``` diff --git a/docs/sdk/models/operations/createbackuprequestbody.md b/docs/sdk/models/operations/createbackuprequestbody.md index 6a57347..11abddd 100644 --- a/docs/sdk/models/operations/createbackuprequestbody.md +++ b/docs/sdk/models/operations/createbackuprequestbody.md @@ -6,7 +6,7 @@ import { CreateBackupRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateBackupRequestBody = { - withUploads: false, + withUploads: false, }; ``` diff --git a/docs/sdk/models/operations/createbackupresponsebody.md b/docs/sdk/models/operations/createbackupresponsebody.md index 8b95f64..28ce709 100644 --- a/docs/sdk/models/operations/createbackupresponsebody.md +++ b/docs/sdk/models/operations/createbackupresponsebody.md @@ -8,7 +8,7 @@ success response import { CreateBackupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateBackupResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/createbadgebadgetypes.md b/docs/sdk/models/operations/createbadgebadgetypes.md index 3153c89..301c004 100644 --- a/docs/sdk/models/operations/createbadgebadgetypes.md +++ b/docs/sdk/models/operations/createbadgebadgetypes.md @@ -6,9 +6,9 @@ import { CreateBadgeBadgeTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateBadgeBadgeTypes = { - id: 944669, - name: "", - sortOrder: 758616, + id: 944669, + name: "", + sortOrder: 758616, }; ``` diff --git a/docs/sdk/models/operations/createbadgerequestbody.md b/docs/sdk/models/operations/createbadgerequestbody.md index 2c1bb4a..b794bb1 100644 --- a/docs/sdk/models/operations/createbadgerequestbody.md +++ b/docs/sdk/models/operations/createbadgerequestbody.md @@ -6,8 +6,8 @@ import { CreateBadgeRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateBadgeRequestBody = { - badgeTypeId: 780529, - name: "", + badgeTypeId: 780529, + name: "", }; ``` diff --git a/docs/sdk/models/operations/createbadgeresponsebody.md b/docs/sdk/models/operations/createbadgeresponsebody.md index cbd4e5d..f71fc18 100644 --- a/docs/sdk/models/operations/createbadgeresponsebody.md +++ b/docs/sdk/models/operations/createbadgeresponsebody.md @@ -8,36 +8,36 @@ success response import { CreateBadgeResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateBadgeResponseBody = { - badge: { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 521848, - badgeTypeId: 105907, - description: "Inverse holistic data-warehouse", - enabled: false, - grantCount: 186332, - icon: "", - id: 774234, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: "", + badge: { + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 521848, + badgeTypeId: 105907, + description: "Inverse holistic data-warehouse", + enabled: false, + grantCount: 186332, + icon: "", + id: 774234, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: "", + }, + badgeTypes: [ + { + id: 736918, + name: "", + sortOrder: 456150, }, - badgeTypes: [ - { - id: 736918, - name: "", - sortOrder: 456150, - }, - ], + ], }; ``` diff --git a/docs/sdk/models/operations/createcategoryrequestbody.md b/docs/sdk/models/operations/createcategoryrequestbody.md index 1ca3748..caf4481 100644 --- a/docs/sdk/models/operations/createcategoryrequestbody.md +++ b/docs/sdk/models/operations/createcategoryrequestbody.md @@ -6,12 +6,12 @@ import { CreateCategoryRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateCategoryRequestBody = { - color: "49d9e9", - name: "", - permissions: { - everyone: 1, - }, - textColor: "f0fcfd", + color: "49d9e9", + name: "", + permissions: { + everyone: 1, + }, + textColor: "f0fcfd", }; ``` diff --git a/docs/sdk/models/operations/createcategoryresponsebody.md b/docs/sdk/models/operations/createcategoryresponsebody.md index 77e0650..b1f9a33 100644 --- a/docs/sdk/models/operations/createcategoryresponsebody.md +++ b/docs/sdk/models/operations/createcategoryresponsebody.md @@ -8,67 +8,69 @@ success response import { CreateCategoryResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateCategoryResponseBody = { - category: { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "gold", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Compatible high-level contingency", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - groupPermissions: [ - { - groupName: "", - permissionType: 826825, - }, - ], - hasChildren: false, - id: 410301, - mailinglistMirror: false, - minimumRequiredTags: 539118, + category: { + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "gold", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Compatible high-level contingency", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + groupPermissions: [ + { + groupName: "", + permissionType: 826825, + }, + ], + hasChildren: false, + id: 410301, + mailinglistMirror: false, + minimumRequiredTags: 539118, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 623295, + numFeaturedTopics: 887265, + permission: 886961, + position: 880107, + postCount: 618826, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 328303, name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 623295, - numFeaturedTopics: 887265, - permission: 886961, - position: 880107, - postCount: 618826, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 328303, - name: "", - }, - ], - searchPriority: 133461, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 404425, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, + }, + ], + searchPriority: 133461, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 404425, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", + }, }; ``` diff --git a/docs/sdk/models/operations/createdby.md b/docs/sdk/models/operations/createdby.md index ef57fe1..f2191ac 100644 --- a/docs/sdk/models/operations/createdby.md +++ b/docs/sdk/models/operations/createdby.md @@ -6,10 +6,10 @@ import { CreatedBy } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreatedBy = { - avatarTemplate: "", - id: 392569, - name: "", - username: "Sasha_Thiel19", + avatarTemplate: "", + id: 392569, + name: "", + username: "Sasha_Thiel19", }; ``` diff --git a/docs/sdk/models/operations/creategrouprequestbody.md b/docs/sdk/models/operations/creategrouprequestbody.md index 6f80bc6..6273f93 100644 --- a/docs/sdk/models/operations/creategrouprequestbody.md +++ b/docs/sdk/models/operations/creategrouprequestbody.md @@ -6,9 +6,9 @@ import { CreateGroupRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateGroupRequestBody = { - group: { - name: "", - }, + group: { + name: "", + }, }; ``` diff --git a/docs/sdk/models/operations/creategroupresponsebody.md b/docs/sdk/models/operations/creategroupresponsebody.md index 4223118..5d10a88 100644 --- a/docs/sdk/models/operations/creategroupresponsebody.md +++ b/docs/sdk/models/operations/creategroupresponsebody.md @@ -8,36 +8,36 @@ group created import { CreateGroupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateGroupResponseBody = { - basicGroup: { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 778346, - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Mandy Hills", - grantTrustLevel: "", - hasMessages: false, - id: 13571, - incomingEmail: "", - membersVisibilityLevel: 97101, - membershipRequestTemplate: "", - mentionableLevel: 622846, - messageableLevel: 837945, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 673660, - visibilityLevel: 96098, - }, + basicGroup: { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 778346, + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Mandy Hills", + grantTrustLevel: "", + hasMessages: false, + id: 13571, + incomingEmail: "", + membersVisibilityLevel: 97101, + membershipRequestTemplate: "", + mentionableLevel: 622846, + messageableLevel: 837945, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 673660, + visibilityLevel: 96098, + }, }; ``` diff --git a/docs/sdk/models/operations/createinviterequest.md b/docs/sdk/models/operations/createinviterequest.md index 3766e45..8cffe10 100644 --- a/docs/sdk/models/operations/createinviterequest.md +++ b/docs/sdk/models/operations/createinviterequest.md @@ -6,14 +6,14 @@ import { CreateInviteRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateInviteRequest = { - apiKey: "", - apiUsername: "", - requestBody: { - email: "not-a-user-yet@example.com", - groupIds: "42,43", - groupNames: "foo,bar", - maxRedemptionsAllowed: 5, - }, + apiKey: "", + apiUsername: "", + requestBody: { + email: "not-a-user-yet@example.com", + groupIds: "42,43", + groupNames: "foo,bar", + maxRedemptionsAllowed: 5, + }, }; ``` diff --git a/docs/sdk/models/operations/createinviterequestbody.md b/docs/sdk/models/operations/createinviterequestbody.md index 2977470..a7ec16d 100644 --- a/docs/sdk/models/operations/createinviterequestbody.md +++ b/docs/sdk/models/operations/createinviterequestbody.md @@ -6,10 +6,10 @@ import { CreateInviteRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateInviteRequestBody = { - email: "not-a-user-yet@example.com", - groupIds: "42,43", - groupNames: "foo,bar", - maxRedemptionsAllowed: 5, + email: "not-a-user-yet@example.com", + groupIds: "42,43", + groupNames: "foo,bar", + maxRedemptionsAllowed: 5, }; ``` diff --git a/docs/sdk/models/operations/createinviteresponsebody.md b/docs/sdk/models/operations/createinviteresponsebody.md index cf96ed3..4c64760 100644 --- a/docs/sdk/models/operations/createinviteresponsebody.md +++ b/docs/sdk/models/operations/createinviteresponsebody.md @@ -8,17 +8,21 @@ success response import { CreateInviteResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateInviteResponseBody = { - createdAt: "2021-01-01T12:00:00.000Z", - customMessage: "Hello world!", - email: "not-a-user-yet@example.com", - emailed: false, - expired: false, - expiresAt: "2021-02-01T12:00:00.000Z", - groups: [""], - id: 42, - link: "http://example.com/invites/9045fd767efe201ca60c6658bcf14158", - topics: [""], - updatedAt: "2021-01-01T12:00:00.000Z", + createdAt: "2021-01-01T12:00:00.000Z", + customMessage: "Hello world!", + email: "not-a-user-yet@example.com", + emailed: false, + expired: false, + expiresAt: "2021-02-01T12:00:00.000Z", + groups: [ + "", + ], + id: 42, + link: "http://example.com/invites/9045fd767efe201ca60c6658bcf14158", + topics: [ + "", + ], + updatedAt: "2021-01-01T12:00:00.000Z", }; ``` diff --git a/docs/sdk/models/operations/createmultipartuploadrequestbody.md b/docs/sdk/models/operations/createmultipartuploadrequestbody.md index 52e17b6..279d1db 100644 --- a/docs/sdk/models/operations/createmultipartuploadrequestbody.md +++ b/docs/sdk/models/operations/createmultipartuploadrequestbody.md @@ -6,9 +6,9 @@ import { CreateMultipartUploadRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateMultipartUploadRequestBody = { - fileName: "IMG_2021.jpeg", - fileSize: 4096, - uploadType: "card_background", + fileName: "IMG_2021.jpeg", + fileSize: 4096, + uploadType: "card_background", }; ``` diff --git a/docs/sdk/models/operations/createmultipartuploadresponsebody.md b/docs/sdk/models/operations/createmultipartuploadresponsebody.md index 78b4506..59448dd 100644 --- a/docs/sdk/models/operations/createmultipartuploadresponsebody.md +++ b/docs/sdk/models/operations/createmultipartuploadresponsebody.md @@ -8,10 +8,10 @@ external upload initialized import { CreateMultipartUploadResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateMultipartUploadResponseBody = { - externalUploadIdentifier: - "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ", - key: "temp/site/uploads/default/12345/67890.jpg", - uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", + externalUploadIdentifier: + "84x83tmxy398t3y._Q_z8CoJYVr69bE6D7f8J6Oo0434QquLFoYdGVerWFx9X5HDEI_TP_95c34n853495x35345394.d.ghQ", + key: "temp/site/uploads/default/12345/67890.jpg", + uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", }; ``` diff --git a/docs/sdk/models/operations/createtaggrouprequestbody.md b/docs/sdk/models/operations/createtaggrouprequestbody.md index ead8417..2f73c08 100644 --- a/docs/sdk/models/operations/createtaggrouprequestbody.md +++ b/docs/sdk/models/operations/createtaggrouprequestbody.md @@ -6,7 +6,7 @@ import { CreateTagGroupRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTagGroupRequestBody = { - name: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/createtaggroupresponsebody.md b/docs/sdk/models/operations/createtaggroupresponsebody.md index 779c9f9..d4739c3 100644 --- a/docs/sdk/models/operations/createtaggroupresponsebody.md +++ b/docs/sdk/models/operations/createtaggroupresponsebody.md @@ -8,14 +8,18 @@ tag group created import { CreateTagGroupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTagGroupResponseBody = { - tagGroup: { - id: 978173, - name: "", - onePerTopic: false, - parentTagName: [""], - permissions: {}, - tagNames: [""], - }, + tagGroup: { + id: 978173, + name: "", + onePerTopic: false, + parentTagName: [ + "", + ], + permissions: {}, + tagNames: [ + "", + ], + }, }; ``` diff --git a/docs/sdk/models/operations/createtopicpostpmactionssummary.md b/docs/sdk/models/operations/createtopicpostpmactionssummary.md index 70e289b..d4c7763 100644 --- a/docs/sdk/models/operations/createtopicpostpmactionssummary.md +++ b/docs/sdk/models/operations/createtopicpostpmactionssummary.md @@ -6,8 +6,8 @@ import { CreateTopicPostPMActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicPostPMActionsSummary = { - canAct: false, - id: 773456, + canAct: false, + id: 773456, }; ``` diff --git a/docs/sdk/models/operations/createtopicpostpmrequestbody.md b/docs/sdk/models/operations/createtopicpostpmrequestbody.md index 25a1871..8d7629f 100644 --- a/docs/sdk/models/operations/createtopicpostpmrequestbody.md +++ b/docs/sdk/models/operations/createtopicpostpmrequestbody.md @@ -6,9 +6,9 @@ import { CreateTopicPostPMRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicPostPMRequestBody = { - archetype: "private_message", - raw: "", - targetRecipients: "blake,sam", + archetype: "private_message", + raw: "", + targetRecipients: "blake,sam", }; ``` diff --git a/docs/sdk/models/operations/createtopicpostpmresponsebody.md b/docs/sdk/models/operations/createtopicpostpmresponsebody.md index 59b234a..6d9ba27 100644 --- a/docs/sdk/models/operations/createtopicpostpmresponsebody.md +++ b/docs/sdk/models/operations/createtopicpostpmresponsebody.md @@ -8,59 +8,59 @@ post created import { CreateTopicPostPMResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicPostPMResponseBody = { - actionsSummary: [ - { - canAct: false, - id: 884952, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - displayUsername: "", - draftSequence: 456410, - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 897277, - incomingLinkCount: 153369, - moderator: false, - name: "", - postNumber: 332191, - postType: 199596, - primaryGroupName: "", - quoteCount: 712927, - readersCount: 432984, - reads: 426943, - replyCount: 528234, - replyToPostNumber: "", - reviewableId: "", - reviewableScoreCount: 301692, - reviewableScorePendingCount: 349440, - score: 70410, - staff: false, - topicId: 781480, - topicSlug: "", - trustLevel: 421844, - updatedAt: "", - userDeleted: false, - userId: 751022, - userTitle: "", - username: "Gilberto2", - version: 350207, - wiki: false, - yours: false, + actionsSummary: [ + { + canAct: false, + id: 884952, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + displayUsername: "", + draftSequence: 456410, + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 897277, + incomingLinkCount: 153369, + moderator: false, + name: "", + postNumber: 332191, + postType: 199596, + primaryGroupName: "", + quoteCount: 712927, + readersCount: 432984, + reads: 426943, + replyCount: 528234, + replyToPostNumber: "", + reviewableId: "", + reviewableScoreCount: 301692, + reviewableScorePendingCount: 349440, + score: 70410, + staff: false, + topicId: 781480, + topicSlug: "", + trustLevel: 421844, + updatedAt: "", + userDeleted: false, + userId: 751022, + userTitle: "", + username: "Gilberto2", + version: 350207, + wiki: false, + yours: false, }; ``` diff --git a/docs/sdk/models/operations/createtopictimerrequest.md b/docs/sdk/models/operations/createtopictimerrequest.md index d2c5f24..ac4fbe6 100644 --- a/docs/sdk/models/operations/createtopictimerrequest.md +++ b/docs/sdk/models/operations/createtopictimerrequest.md @@ -6,12 +6,12 @@ import { CreateTopicTimerRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicTimerRequest = { - apiKey: "", - apiUsername: "", - requestBody: { - time: "", - }, - id: "", + apiKey: "", + apiUsername: "", + requestBody: { + time: "", + }, + id: "", }; ``` diff --git a/docs/sdk/models/operations/createtopictimerrequestbody.md b/docs/sdk/models/operations/createtopictimerrequestbody.md index 79f3c83..32dab6d 100644 --- a/docs/sdk/models/operations/createtopictimerrequestbody.md +++ b/docs/sdk/models/operations/createtopictimerrequestbody.md @@ -6,7 +6,7 @@ import { CreateTopicTimerRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicTimerRequestBody = { - time: "", + time: "", }; ``` diff --git a/docs/sdk/models/operations/createtopictimerresponsebody.md b/docs/sdk/models/operations/createtopictimerresponsebody.md index d0d9400..1bd0cad 100644 --- a/docs/sdk/models/operations/createtopictimerresponsebody.md +++ b/docs/sdk/models/operations/createtopictimerresponsebody.md @@ -8,7 +8,7 @@ topic updated import { CreateTopicTimerResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateTopicTimerResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/createuploadresponsebody.md b/docs/sdk/models/operations/createuploadresponsebody.md index 350ed2b..6b94646 100644 --- a/docs/sdk/models/operations/createuploadresponsebody.md +++ b/docs/sdk/models/operations/createuploadresponsebody.md @@ -8,19 +8,19 @@ file uploaded import { CreateUploadResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateUploadResponseBody = { - extension: "jpg", - filesize: 567846, - height: 172195, - humanFilesize: "", - id: 621169, - originalFilename: "", - retainHours: "", - shortPath: "", - shortUrl: "", - thumbnailHeight: 85076, - thumbnailWidth: 498180, - url: "http://tragic-tuba.name", - width: 763165, + extension: "jpg", + filesize: 567846, + height: 172195, + humanFilesize: "", + id: 621169, + originalFilename: "", + retainHours: "", + shortPath: "", + shortUrl: "", + thumbnailHeight: 85076, + thumbnailWidth: 498180, + url: "http://tragic-tuba.name", + width: 763165, }; ``` diff --git a/docs/sdk/models/operations/createuserrequest.md b/docs/sdk/models/operations/createuserrequest.md index c02bc8a..f0ebeef 100644 --- a/docs/sdk/models/operations/createuserrequest.md +++ b/docs/sdk/models/operations/createuserrequest.md @@ -6,8 +6,8 @@ import { CreateUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateUserRequest = { - apiKey: "", - apiUsername: "", + apiKey: "", + apiUsername: "", }; ``` diff --git a/docs/sdk/models/operations/createuserrequestbody.md b/docs/sdk/models/operations/createuserrequestbody.md index 7599023..5401c09 100644 --- a/docs/sdk/models/operations/createuserrequestbody.md +++ b/docs/sdk/models/operations/createuserrequestbody.md @@ -6,10 +6,10 @@ import { CreateUserRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateUserRequestBody = { - email: "Jennifer68@yahoo.com", - name: "", - password: "9JOtcD2TrgaNLaS", - username: "Lenny_Treutel46", + email: "Jennifer68@yahoo.com", + name: "", + password: "9JOtcD2TrgaNLaS", + username: "Lenny_Treutel46", }; ``` diff --git a/docs/sdk/models/operations/createuserresponsebody.md b/docs/sdk/models/operations/createuserresponsebody.md index 8e887fe..65a3dc2 100644 --- a/docs/sdk/models/operations/createuserresponsebody.md +++ b/docs/sdk/models/operations/createuserresponsebody.md @@ -8,9 +8,9 @@ user created import { CreateUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: CreateUserResponseBody = { - active: false, - message: "", - success: false, + active: false, + message: "", + success: false, }; ``` diff --git a/docs/sdk/models/operations/deactivateuserrequest.md b/docs/sdk/models/operations/deactivateuserrequest.md index 3167884..1fcb0ea 100644 --- a/docs/sdk/models/operations/deactivateuserrequest.md +++ b/docs/sdk/models/operations/deactivateuserrequest.md @@ -6,7 +6,7 @@ import { DeactivateUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeactivateUserRequest = { - id: 216897, + id: 216897, }; ``` diff --git a/docs/sdk/models/operations/deactivateuserresponsebody.md b/docs/sdk/models/operations/deactivateuserresponsebody.md index 4f0c971..b4db313 100644 --- a/docs/sdk/models/operations/deactivateuserresponsebody.md +++ b/docs/sdk/models/operations/deactivateuserresponsebody.md @@ -8,7 +8,7 @@ response import { DeactivateUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeactivateUserResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/deletebadgerequest.md b/docs/sdk/models/operations/deletebadgerequest.md index f36e770..fc2f8ee 100644 --- a/docs/sdk/models/operations/deletebadgerequest.md +++ b/docs/sdk/models/operations/deletebadgerequest.md @@ -6,7 +6,7 @@ import { DeleteBadgeRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeleteBadgeRequest = { - id: 216550, + id: 216550, }; ``` diff --git a/docs/sdk/models/operations/deletegrouprequest.md b/docs/sdk/models/operations/deletegrouprequest.md index e06acab..0a6e969 100644 --- a/docs/sdk/models/operations/deletegrouprequest.md +++ b/docs/sdk/models/operations/deletegrouprequest.md @@ -6,7 +6,7 @@ import { DeleteGroupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeleteGroupRequest = { - id: 971945, + id: 971945, }; ``` diff --git a/docs/sdk/models/operations/deletegroupresponsebody.md b/docs/sdk/models/operations/deletegroupresponsebody.md index 8f75d34..cbb7938 100644 --- a/docs/sdk/models/operations/deletegroupresponsebody.md +++ b/docs/sdk/models/operations/deletegroupresponsebody.md @@ -8,7 +8,7 @@ response import { DeleteGroupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeleteGroupResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/deletepostrequest.md b/docs/sdk/models/operations/deletepostrequest.md index 0553786..9563134 100644 --- a/docs/sdk/models/operations/deletepostrequest.md +++ b/docs/sdk/models/operations/deletepostrequest.md @@ -6,10 +6,10 @@ import { DeletePostRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeletePostRequest = { - requestBody: { - forceDestroy: true, - }, - id: 64435, + requestBody: { + forceDestroy: true, + }, + id: 64435, }; ``` diff --git a/docs/sdk/models/operations/deletepostrequestbody.md b/docs/sdk/models/operations/deletepostrequestbody.md index 4860e67..8371620 100644 --- a/docs/sdk/models/operations/deletepostrequestbody.md +++ b/docs/sdk/models/operations/deletepostrequestbody.md @@ -6,7 +6,7 @@ import { DeletePostRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeletePostRequestBody = { - forceDestroy: true, + forceDestroy: true, }; ``` diff --git a/docs/sdk/models/operations/deleteuserrequest.md b/docs/sdk/models/operations/deleteuserrequest.md index e95e379..8526065 100644 --- a/docs/sdk/models/operations/deleteuserrequest.md +++ b/docs/sdk/models/operations/deleteuserrequest.md @@ -6,7 +6,7 @@ import { DeleteUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeleteUserRequest = { - id: 456015, + id: 456015, }; ``` diff --git a/docs/sdk/models/operations/deleteuserresponsebody.md b/docs/sdk/models/operations/deleteuserresponsebody.md index 29c188c..da4241d 100644 --- a/docs/sdk/models/operations/deleteuserresponsebody.md +++ b/docs/sdk/models/operations/deleteuserresponsebody.md @@ -8,7 +8,7 @@ response import { DeleteUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DeleteUserResponseBody = { - deleted: false, + deleted: false, }; ``` diff --git a/docs/sdk/models/operations/details.md b/docs/sdk/models/operations/details.md index 04a95d2..dc0f91b 100644 --- a/docs/sdk/models/operations/details.md +++ b/docs/sdk/models/operations/details.md @@ -6,35 +6,35 @@ import { Details } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Details = { - canArchiveTopic: false, - canCloseTopic: false, - canConvertTopic: false, - canCreatePost: false, - canDelete: false, - canEdit: false, - canEditStaffNotes: false, - canModerateCategory: false, - canMovePosts: false, - canPinUnpinTopic: false, - canRemoveAllowedUsers: false, - canRemoveSelfId: 260904, - canReplyAsNewTopic: false, - canReviewTopic: false, - canSplitMergeTopic: false, - canToggleTopicVisibility: false, - createdBy: { - avatarTemplate: "", - id: 131903, - name: "", - username: "Jerrell_Dooley27", - }, - lastPoster: { - avatarTemplate: "", - id: 97493, - name: "", - username: "Judge39", - }, - notificationLevel: 159845, + canArchiveTopic: false, + canCloseTopic: false, + canConvertTopic: false, + canCreatePost: false, + canDelete: false, + canEdit: false, + canEditStaffNotes: false, + canModerateCategory: false, + canMovePosts: false, + canPinUnpinTopic: false, + canRemoveAllowedUsers: false, + canRemoveSelfId: 260904, + canReplyAsNewTopic: false, + canReviewTopic: false, + canSplitMergeTopic: false, + canToggleTopicVisibility: false, + createdBy: { + avatarTemplate: "", + id: 131903, + name: "", + username: "Jerrell_Dooley27", + }, + lastPoster: { + avatarTemplate: "", + id: 97493, + name: "", + username: "Judge39", + }, + notificationLevel: 159845, }; ``` diff --git a/docs/sdk/models/operations/directoryitems.md b/docs/sdk/models/operations/directoryitems.md index 6675523..42aaf6a 100644 --- a/docs/sdk/models/operations/directoryitems.md +++ b/docs/sdk/models/operations/directoryitems.md @@ -6,21 +6,21 @@ import { DirectoryItems } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DirectoryItems = { - daysVisited: 455444, - id: 970076, - likesGiven: 401713, - likesReceived: 25497, - postCount: 248413, - postsRead: 888044, - topicCount: 505866, - topicsEntered: 708609, - user: { - avatarTemplate: "", - id: 310381, - name: "", - title: "", - username: "Drew_Hintz2", - }, + daysVisited: 455444, + id: 970076, + likesGiven: 401713, + likesReceived: 25497, + postCount: 248413, + postsRead: 888044, + topicCount: 505866, + topicsEntered: 708609, + user: { + avatarTemplate: "", + id: 310381, + name: "", + title: "", + username: "Drew_Hintz2", + }, }; ``` diff --git a/docs/sdk/models/operations/downloadbackuprequest.md b/docs/sdk/models/operations/downloadbackuprequest.md index 2323831..e80abf4 100644 --- a/docs/sdk/models/operations/downloadbackuprequest.md +++ b/docs/sdk/models/operations/downloadbackuprequest.md @@ -6,8 +6,8 @@ import { DownloadBackupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: DownloadBackupRequest = { - filename: "your_file_here", - token: "", + filename: "your_file_here", + token: "", }; ``` diff --git a/docs/sdk/models/operations/extras.md b/docs/sdk/models/operations/extras.md index ed8156d..3f1745d 100644 --- a/docs/sdk/models/operations/extras.md +++ b/docs/sdk/models/operations/extras.md @@ -6,7 +6,9 @@ import { Extras } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Extras = { - visibleGroupNames: [""], + visibleGroupNames: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/generatepresignedputrequestbody.md b/docs/sdk/models/operations/generatepresignedputrequestbody.md index a992c0c..bcced73 100644 --- a/docs/sdk/models/operations/generatepresignedputrequestbody.md +++ b/docs/sdk/models/operations/generatepresignedputrequestbody.md @@ -6,9 +6,9 @@ import { GeneratePresignedPutRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GeneratePresignedPutRequestBody = { - fileName: "IMG_2021.jpeg", - fileSize: 4096, - type: "profile_background", + fileName: "IMG_2021.jpeg", + fileSize: 4096, + type: "profile_background", }; ``` diff --git a/docs/sdk/models/operations/generatepresignedputresponsebody.md b/docs/sdk/models/operations/generatepresignedputresponsebody.md index 6009ac1..0dcb0fb 100644 --- a/docs/sdk/models/operations/generatepresignedputresponsebody.md +++ b/docs/sdk/models/operations/generatepresignedputresponsebody.md @@ -8,10 +8,11 @@ external upload initialized import { GeneratePresignedPutResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GeneratePresignedPutResponseBody = { - key: "temp/site/uploads/default/12345/67890.jpg", - signedHeaders: {}, - uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", - url: "https://file-uploads.s3.us-west-2.amazonaws.com/temp/site/uploads/default/123/456.jpg?x-amz-acl=private&x-amz-meta-sha1-checksum=sha1&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAAAus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211221T011246Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=12345678", + key: "temp/site/uploads/default/12345/67890.jpg", + signedHeaders: {}, + uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705", + url: + "https://file-uploads.s3.us-west-2.amazonaws.com/temp/site/uploads/default/123/456.jpg?x-amz-acl=private&x-amz-meta-sha1-checksum=sha1&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAAAus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211221T011246Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=12345678", }; ``` diff --git a/docs/sdk/models/operations/getcategorycategory.md b/docs/sdk/models/operations/getcategorycategory.md index e707903..b7510db 100644 --- a/docs/sdk/models/operations/getcategorycategory.md +++ b/docs/sdk/models/operations/getcategorycategory.md @@ -6,65 +6,67 @@ import { GetCategoryCategory } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetCategoryCategory = { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "orchid", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Object-based exuding synergy", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - groupPermissions: [ - { - groupName: "", - permissionType: 542129, - }, - ], - hasChildren: false, - id: 541381, - mailinglistMirror: false, - minimumRequiredTags: 120919, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 923306, - numFeaturedTopics: 680697, - permission: 829898, - position: 287119, - postCount: 968287, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 42976, - name: "", - }, - ], - searchPriority: 919783, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 116098, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "orchid", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Object-based exuding synergy", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + groupPermissions: [ + { + groupName: "", + permissionType: 542129, + }, + ], + hasChildren: false, + id: 541381, + mailinglistMirror: false, + minimumRequiredTags: 120919, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 923306, + numFeaturedTopics: 680697, + permission: 829898, + position: 287119, + postCount: 968287, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 42976, + name: "", + }, + ], + searchPriority: 919783, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 116098, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }; ``` diff --git a/docs/sdk/models/operations/getcategorygrouppermissions.md b/docs/sdk/models/operations/getcategorygrouppermissions.md index 4806adf..7009d22 100644 --- a/docs/sdk/models/operations/getcategorygrouppermissions.md +++ b/docs/sdk/models/operations/getcategorygrouppermissions.md @@ -6,8 +6,8 @@ import { GetCategoryGroupPermissions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetCategoryGroupPermissions = { - groupName: "", - permissionType: 544647, + groupName: "", + permissionType: 544647, }; ``` diff --git a/docs/sdk/models/operations/getcategoryrequest.md b/docs/sdk/models/operations/getcategoryrequest.md index 3999266..029be6a 100644 --- a/docs/sdk/models/operations/getcategoryrequest.md +++ b/docs/sdk/models/operations/getcategoryrequest.md @@ -6,7 +6,7 @@ import { GetCategoryRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetCategoryRequest = { - id: 980581, + id: 980581, }; ``` diff --git a/docs/sdk/models/operations/getcategoryrequiredtaggroups.md b/docs/sdk/models/operations/getcategoryrequiredtaggroups.md index d1fb9ec..95e88b8 100644 --- a/docs/sdk/models/operations/getcategoryrequiredtaggroups.md +++ b/docs/sdk/models/operations/getcategoryrequiredtaggroups.md @@ -6,8 +6,8 @@ import { GetCategoryRequiredTagGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetCategoryRequiredTagGroups = { - minCount: 871786, - name: "", + minCount: 871786, + name: "", }; ``` diff --git a/docs/sdk/models/operations/getcategoryresponsebody.md b/docs/sdk/models/operations/getcategoryresponsebody.md index e31fba2..2f909bc 100644 --- a/docs/sdk/models/operations/getcategoryresponsebody.md +++ b/docs/sdk/models/operations/getcategoryresponsebody.md @@ -8,67 +8,69 @@ response import { GetCategoryResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetCategoryResponseBody = { - category: { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "green", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Configurable client-driven extranet", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - groupPermissions: [ - { - groupName: "", - permissionType: 389135, - }, - ], - hasChildren: false, - id: 246535, - mailinglistMirror: false, - minimumRequiredTags: 952143, + category: { + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "green", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Configurable client-driven extranet", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + groupPermissions: [ + { + groupName: "", + permissionType: 389135, + }, + ], + hasChildren: false, + id: 246535, + mailinglistMirror: false, + minimumRequiredTags: 952143, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 562783, + numFeaturedTopics: 300029, + permission: 906355, + position: 160467, + postCount: 580107, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 886305, name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 562783, - numFeaturedTopics: 300029, - permission: 906355, - position: 160467, - postCount: 580107, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 886305, - name: "", - }, - ], - searchPriority: 597937, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 446394, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, + }, + ], + searchPriority: 597937, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 446394, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", + }, }; ``` diff --git a/docs/sdk/models/operations/getgroupgroup.md b/docs/sdk/models/operations/getgroupgroup.md index 7c52215..77dd75d 100644 --- a/docs/sdk/models/operations/getgroupgroup.md +++ b/docs/sdk/models/operations/getgroupgroup.md @@ -6,59 +6,71 @@ import { GetGroupGroup } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetGroupGroup = { - allowMembershipRequests: false, - allowUnknownSenderTopicReplies: false, - automatic: false, - automaticMembershipEmailDomains: "", - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 976460, - emailPassword: "", - emailUsername: "", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Jessie Langosh V", - grantTrustLevel: "", - hasMessages: false, - id: 451159, - imapLastError: "", - imapMailboxName: "", - imapMailboxes: [""], - imapNewEmails: "", - imapOldEmails: "", - imapPort: "", - imapServer: "", - imapSsl: "", - incomingEmail: "", - isGroupOwnerDisplay: false, - isGroupUser: false, - membersVisibilityLevel: 739264, - membershipRequestTemplate: "", - mentionable: false, - mentionableLevel: 19987, - messageCount: 39187, - messageable: false, - messageableLevel: 441711, - mutedCategoryIds: [""], - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - regularCategoryIds: [""], - smtpPort: "", - smtpServer: "", - smtpSsl: "", - title: "", - trackingCategoryIds: [""], - userCount: 282807, - visibilityLevel: 979587, - watchingCategoryIds: [""], - watchingFirstPostCategoryIds: [""], + allowMembershipRequests: false, + allowUnknownSenderTopicReplies: false, + automatic: false, + automaticMembershipEmailDomains: "", + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 976460, + emailPassword: "", + emailUsername: "", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Jessie Langosh V", + grantTrustLevel: "", + hasMessages: false, + id: 451159, + imapLastError: "", + imapMailboxName: "", + imapMailboxes: [ + "", + ], + imapNewEmails: "", + imapOldEmails: "", + imapPort: "", + imapServer: "", + imapSsl: "", + incomingEmail: "", + isGroupOwnerDisplay: false, + isGroupUser: false, + membersVisibilityLevel: 739264, + membershipRequestTemplate: "", + mentionable: false, + mentionableLevel: 19987, + messageCount: 39187, + messageable: false, + messageableLevel: 441711, + mutedCategoryIds: [ + "", + ], + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + regularCategoryIds: [ + "", + ], + smtpPort: "", + smtpServer: "", + smtpSsl: "", + title: "", + trackingCategoryIds: [ + "", + ], + userCount: 282807, + visibilityLevel: 979587, + watchingCategoryIds: [ + "", + ], + watchingFirstPostCategoryIds: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getgrouprequest.md b/docs/sdk/models/operations/getgrouprequest.md index 3ed8d52..0f793c2 100644 --- a/docs/sdk/models/operations/getgrouprequest.md +++ b/docs/sdk/models/operations/getgrouprequest.md @@ -6,7 +6,7 @@ import { GetGroupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetGroupRequest = { - id: "name", + id: "name", }; ``` diff --git a/docs/sdk/models/operations/getgroupresponsebody.md b/docs/sdk/models/operations/getgroupresponsebody.md index f731460..baaf099 100644 --- a/docs/sdk/models/operations/getgroupresponsebody.md +++ b/docs/sdk/models/operations/getgroupresponsebody.md @@ -8,64 +8,78 @@ success response import { GetGroupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetGroupResponseBody = { - extras: { - visibleGroupNames: [""], - }, - group: { - allowMembershipRequests: false, - allowUnknownSenderTopicReplies: false, - automatic: false, - automaticMembershipEmailDomains: "", - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 120196, - emailPassword: "", - emailUsername: "", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Miss Valerie Kshlerin", - grantTrustLevel: "", - hasMessages: false, - id: 880476, - imapLastError: "", - imapMailboxName: "", - imapMailboxes: [""], - imapNewEmails: "", - imapOldEmails: "", - imapPort: "", - imapServer: "", - imapSsl: "", - incomingEmail: "", - isGroupOwnerDisplay: false, - isGroupUser: false, - membersVisibilityLevel: 414263, - membershipRequestTemplate: "", - mentionable: false, - mentionableLevel: 918236, - messageCount: 64147, - messageable: false, - messageableLevel: 216822, - mutedCategoryIds: [""], - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - regularCategoryIds: [""], - smtpPort: "", - smtpServer: "", - smtpSsl: "", - title: "", - trackingCategoryIds: [""], - userCount: 692472, - visibilityLevel: 565189, - watchingCategoryIds: [""], - watchingFirstPostCategoryIds: [""], - }, + extras: { + visibleGroupNames: [ + "", + ], + }, + group: { + allowMembershipRequests: false, + allowUnknownSenderTopicReplies: false, + automatic: false, + automaticMembershipEmailDomains: "", + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 120196, + emailPassword: "", + emailUsername: "", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Miss Valerie Kshlerin", + grantTrustLevel: "", + hasMessages: false, + id: 880476, + imapLastError: "", + imapMailboxName: "", + imapMailboxes: [ + "", + ], + imapNewEmails: "", + imapOldEmails: "", + imapPort: "", + imapServer: "", + imapSsl: "", + incomingEmail: "", + isGroupOwnerDisplay: false, + isGroupUser: false, + membersVisibilityLevel: 414263, + membershipRequestTemplate: "", + mentionable: false, + mentionableLevel: 918236, + messageCount: 64147, + messageable: false, + messageableLevel: 216822, + mutedCategoryIds: [ + "", + ], + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + regularCategoryIds: [ + "", + ], + smtpPort: "", + smtpServer: "", + smtpSsl: "", + title: "", + trackingCategoryIds: [ + "", + ], + userCount: 692472, + visibilityLevel: 565189, + watchingCategoryIds: [ + "", + ], + watchingFirstPostCategoryIds: [ + "", + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getpostrequest.md b/docs/sdk/models/operations/getpostrequest.md index ae1de31..b229ea2 100644 --- a/docs/sdk/models/operations/getpostrequest.md +++ b/docs/sdk/models/operations/getpostrequest.md @@ -6,7 +6,7 @@ import { GetPostRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetPostRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/getpostresponsebody.md b/docs/sdk/models/operations/getpostresponsebody.md index 630ad84..f033a32 100644 --- a/docs/sdk/models/operations/getpostresponsebody.md +++ b/docs/sdk/models/operations/getpostresponsebody.md @@ -8,56 +8,56 @@ single post import { GetPostResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetPostResponseBody = { - actionsSummary: [ - { - id: 264333, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 208253, - incomingLinkCount: 348357, - moderator: false, - postNumber: 932394, - postType: 88248, - primaryGroupName: "", - quoteCount: 215398, - raw: "", - readersCount: 602229, - reads: 858338, - replyCount: 714376, - replyToPostNumber: "", - reviewableId: "", - reviewableScoreCount: 802894, - reviewableScorePendingCount: 157222, - score: 159146, - staff: false, - topicId: 342137, - topicSlug: "", - trustLevel: 605712, - updatedAt: "", - userDeleted: false, - userId: 727250, - userTitle: "", - username: "Bettie_Ondricka63", - version: 554603, - wiki: false, - yours: false, + actionsSummary: [ + { + id: 264333, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 208253, + incomingLinkCount: 348357, + moderator: false, + postNumber: 932394, + postType: 88248, + primaryGroupName: "", + quoteCount: 215398, + raw: "", + readersCount: 602229, + reads: 858338, + replyCount: 714376, + replyToPostNumber: "", + reviewableId: "", + reviewableScoreCount: 802894, + reviewableScorePendingCount: 157222, + score: 159146, + staff: false, + topicId: 342137, + topicSlug: "", + trustLevel: 605712, + updatedAt: "", + userDeleted: false, + userId: 727250, + userTitle: "", + username: "Bettie_Ondricka63", + version: 554603, + wiki: false, + yours: false, }; ``` diff --git a/docs/sdk/models/operations/getsitecategories.md b/docs/sdk/models/operations/getsitecategories.md index bae3aca..2147468 100644 --- a/docs/sdk/models/operations/getsitecategories.md +++ b/docs/sdk/models/operations/getsitecategories.md @@ -6,45 +6,49 @@ import { GetSiteCategories } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetSiteCategories = { - allowGlobalTags: false, - allowedTagGroups: [""], - allowedTags: [""], - canEdit: false, - color: "azure", - defaultListFilter: "", - defaultTopPeriod: "", - defaultView: "", - hasChildren: false, - id: 580887, - minimumRequiredTags: 160230, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 145870, - numFeaturedTopics: 661118, - permission: 335631, - position: 440264, - postCount: 625528, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 76486, - name: "", - }, - ], - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 361306, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", + allowGlobalTags: false, + allowedTagGroups: [ + "", + ], + allowedTags: [ + "", + ], + canEdit: false, + color: "azure", + defaultListFilter: "", + defaultTopPeriod: "", + defaultView: "", + hasChildren: false, + id: 580887, + minimumRequiredTags: 160230, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 145870, + numFeaturedTopics: 661118, + permission: 335631, + position: 440264, + postCount: 625528, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 76486, + name: "", + }, + ], + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 361306, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }; ``` diff --git a/docs/sdk/models/operations/getsitegroups.md b/docs/sdk/models/operations/getsitegroups.md index 32570b3..883b8b9 100644 --- a/docs/sdk/models/operations/getsitegroups.md +++ b/docs/sdk/models/operations/getsitegroups.md @@ -6,11 +6,11 @@ import { GetSiteGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetSiteGroups = { - flairBgColor: "", - flairColor: "", - flairUrl: "", - id: 696463, - name: "", + flairBgColor: "", + flairColor: "", + flairUrl: "", + id: 696463, + name: "", }; ``` diff --git a/docs/sdk/models/operations/getsiterequiredtaggroups.md b/docs/sdk/models/operations/getsiterequiredtaggroups.md index 89f7a14..c6f537a 100644 --- a/docs/sdk/models/operations/getsiterequiredtaggroups.md +++ b/docs/sdk/models/operations/getsiterequiredtaggroups.md @@ -6,8 +6,8 @@ import { GetSiteRequiredTagGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetSiteRequiredTagGroups = { - minCount: 238043, - name: "", + minCount: 238043, + name: "", }; ``` diff --git a/docs/sdk/models/operations/getsiteresponsebody.md b/docs/sdk/models/operations/getsiteresponsebody.md index c1c547f..110737c 100644 --- a/docs/sdk/models/operations/getsiteresponsebody.md +++ b/docs/sdk/models/operations/getsiteresponsebody.md @@ -8,170 +8,194 @@ success response import { GetSiteResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetSiteResponseBody = { - anonymousTopMenuItems: [""], - archetypes: [ - { - id: "", - name: "", - options: [""], - }, - ], - authProviders: [""], - canCreateTag: false, - canTagPms: false, - canTagTopics: false, - categories: [ - { - allowGlobalTags: false, - allowedTagGroups: [""], - allowedTags: [""], - canEdit: false, - color: "yellow", - defaultListFilter: "", - defaultTopPeriod: "", - defaultView: "", - hasChildren: false, - id: 657020, - minimumRequiredTags: 343392, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 652309, - numFeaturedTopics: 591027, - permission: 821719, - position: 659177, - postCount: 402767, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 397257, - name: "", - }, - ], - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 37565, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, - ], - censoredRegexp: [{}], - customEmojiTranslation: {}, - defaultArchetype: "", - defaultDarkColorScheme: {}, - filters: [""], - groups: [ - { - flairBgColor: "", - flairColor: "", - flairUrl: "", - id: 999278, - name: "", - }, - ], - notificationTypes: { - bookmarkReminder: 984632, - chatGroupMention: 351893, - chatInvitation: 448143, - chatMention: 721407, - chatMessage: 937636, - codeReviewCommitApproved: 637583, - custom: 672041, - edited: 813054, - eventInvitation: 266697, - eventReminder: 976226, - grantedBadge: 564064, - groupMentioned: 889794, - groupMessageSummary: 956933, - invitedToPrivateMessage: 764562, - invitedToTopic: 113486, - inviteeAccepted: 698249, - liked: 272229, - likedConsolidated: 335498, - linked: 82057, - membershipRequestAccepted: 147685, - membershipRequestConsolidated: 765271, - mentioned: 62636, - movedPost: 21688, - postApproved: 241901, - posted: 137251, - privateMessage: 432281, - quoted: 260628, - reaction: 521996, - replied: 871083, - topicReminder: 773084, - votesReleased: 179410, - watchingCategoryOrTag: 958741, - watchingFirstPost: 433279, + anonymousTopMenuItems: [ + "", + ], + archetypes: [ + { + id: "", + name: "", + options: [ + "", + ], }, - periods: [""], - postActionTypes: [ + ], + authProviders: [ + "", + ], + canCreateTag: false, + canTagPms: false, + canTagTopics: false, + categories: [ + { + allowGlobalTags: false, + allowedTagGroups: [ + "", + ], + allowedTags: [ + "", + ], + canEdit: false, + color: "yellow", + defaultListFilter: "", + defaultTopPeriod: "", + defaultView: "", + hasChildren: false, + id: 657020, + minimumRequiredTags: 343392, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 652309, + numFeaturedTopics: 591027, + permission: 821719, + position: 659177, + postCount: 402767, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ { - description: "Cross-group eco-centric array", - id: 583404, - isCustomFlag: false, - isFlag: false, - name: "", - nameKey: "", - shortDescription: "", + minCount: 397257, + name: "", }, - ], - postTypes: { - moderatorAction: 589695, - regular: 936469, - smallAction: 745398, - whisper: 940782, + ], + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 37565, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }, - tagsFilterRegexp: "", - topMenuItems: [""], - topTags: [""], - topicFeaturedLinkAllowedCategoryIds: [""], - topicFlagTypes: [ - { - description: "Switchable 6th generation task-force", - id: 596211, - isCustomFlag: false, - isFlag: false, - name: "", - nameKey: "", - shortDescription: "", - }, - ], - trustLevels: { - basic: 983427, - leader: 891801, - member: 399802, - newuser: 780931, - regular: 380335, + ], + censoredRegexp: [ + {}, + ], + customEmojiTranslation: {}, + defaultArchetype: "", + defaultDarkColorScheme: {}, + filters: [ + "", + ], + groups: [ + { + flairBgColor: "", + flairColor: "", + flairUrl: "", + id: 999278, + name: "", }, - uncategorizedCategoryId: 211534, - userColorSchemes: [ - { - id: 147808, - isDark: false, - name: "", - }, - ], - userFieldMaxLength: 764995, - userFields: [""], - userThemes: [ - { - colorSchemeId: 684935, - default: false, - name: "", - themeId: 189062, - }, - ], - watchedWordsLink: "", - watchedWordsReplace: "", + ], + notificationTypes: { + bookmarkReminder: 984632, + chatGroupMention: 351893, + chatInvitation: 448143, + chatMention: 721407, + chatMessage: 937636, + codeReviewCommitApproved: 637583, + custom: 672041, + edited: 813054, + eventInvitation: 266697, + eventReminder: 976226, + grantedBadge: 564064, + groupMentioned: 889794, + groupMessageSummary: 956933, + invitedToPrivateMessage: 764562, + invitedToTopic: 113486, + inviteeAccepted: 698249, + liked: 272229, + likedConsolidated: 335498, + linked: 82057, + membershipRequestAccepted: 147685, + membershipRequestConsolidated: 765271, + mentioned: 62636, + movedPost: 21688, + postApproved: 241901, + posted: 137251, + privateMessage: 432281, + quoted: 260628, + reaction: 521996, + replied: 871083, + topicReminder: 773084, + votesReleased: 179410, + watchingCategoryOrTag: 958741, + watchingFirstPost: 433279, + }, + periods: [ + "", + ], + postActionTypes: [ + { + description: "Cross-group eco-centric array", + id: 583404, + isCustomFlag: false, + isFlag: false, + name: "", + nameKey: "", + shortDescription: "", + }, + ], + postTypes: { + moderatorAction: 589695, + regular: 936469, + smallAction: 745398, + whisper: 940782, + }, + tagsFilterRegexp: "", + topMenuItems: [ + "", + ], + topTags: [ + "", + ], + topicFeaturedLinkAllowedCategoryIds: [ + "", + ], + topicFlagTypes: [ + { + description: "Switchable 6th generation task-force", + id: 596211, + isCustomFlag: false, + isFlag: false, + name: "", + nameKey: "", + shortDescription: "", + }, + ], + trustLevels: { + basic: 983427, + leader: 891801, + member: 399802, + newuser: 780931, + regular: 380335, + }, + uncategorizedCategoryId: 211534, + userColorSchemes: [ + { + id: 147808, + isDark: false, + name: "", + }, + ], + userFieldMaxLength: 764995, + userFields: [ + "", + ], + userThemes: [ + { + colorSchemeId: 684935, + default: false, + name: "", + themeId: 189062, + }, + ], + watchedWordsLink: "", + watchedWordsReplace: "", }; ``` diff --git a/docs/sdk/models/operations/gettaggrouprequest.md b/docs/sdk/models/operations/gettaggrouprequest.md index 5cd68f7..527b380 100644 --- a/docs/sdk/models/operations/gettaggrouprequest.md +++ b/docs/sdk/models/operations/gettaggrouprequest.md @@ -6,7 +6,7 @@ import { GetTagGroupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTagGroupRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/gettagrequest.md b/docs/sdk/models/operations/gettagrequest.md index e6f4426..e0a06da 100644 --- a/docs/sdk/models/operations/gettagrequest.md +++ b/docs/sdk/models/operations/gettagrequest.md @@ -6,7 +6,7 @@ import { GetTagRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTagRequest = { - name: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/gettopicactionssummary.md b/docs/sdk/models/operations/gettopicactionssummary.md index 422a8d5..fd32ebf 100644 --- a/docs/sdk/models/operations/gettopicactionssummary.md +++ b/docs/sdk/models/operations/gettopicactionssummary.md @@ -6,10 +6,10 @@ import { GetTopicActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicActionsSummary = { - canAct: false, - count: 895692, - hidden: false, - id: 95619, + canAct: false, + count: 895692, + hidden: false, + id: 95619, }; ``` diff --git a/docs/sdk/models/operations/gettopicbyexternalidrequest.md b/docs/sdk/models/operations/gettopicbyexternalidrequest.md index 40fcf94..8b64cee 100644 --- a/docs/sdk/models/operations/gettopicbyexternalidrequest.md +++ b/docs/sdk/models/operations/gettopicbyexternalidrequest.md @@ -6,7 +6,7 @@ import { GetTopicByExternalIdRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicByExternalIdRequest = { - externalId: "", + externalId: "", }; ``` diff --git a/docs/sdk/models/operations/gettopicrequest.md b/docs/sdk/models/operations/gettopicrequest.md index d0ff9dd..44458af 100644 --- a/docs/sdk/models/operations/gettopicrequest.md +++ b/docs/sdk/models/operations/gettopicrequest.md @@ -6,9 +6,9 @@ import { GetTopicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/gettopicresponsebody.md b/docs/sdk/models/operations/gettopicresponsebody.md index 0c2fe41..d6691ee 100644 --- a/docs/sdk/models/operations/gettopicresponsebody.md +++ b/docs/sdk/models/operations/gettopicresponsebody.md @@ -8,204 +8,214 @@ specific posts import { GetTopicResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicResponseBody = { - actionsSummary: [ - { + actionsSummary: [ + { + canAct: false, + count: 726878, + hidden: false, + id: 102413, + }, + ], + archetype: "", + archived: false, + bookmarked: false, + bookmarks: [ + "", + ], + categoryId: 975425, + chunkSize: 156383, + closed: false, + createdAt: "", + deletedAt: "", + deletedBy: "", + details: { + canArchiveTopic: false, + canCloseTopic: false, + canConvertTopic: false, + canCreatePost: false, + canDelete: false, + canEdit: false, + canEditStaffNotes: false, + canModerateCategory: false, + canMovePosts: false, + canPinUnpinTopic: false, + canRemoveAllowedUsers: false, + canRemoveSelfId: 782090, + canReplyAsNewTopic: false, + canReviewTopic: false, + canSplitMergeTopic: false, + canToggleTopicVisibility: false, + createdBy: { + avatarTemplate: "", + id: 304198, + name: "", + username: "Delia42", + }, + lastPoster: { + avatarTemplate: "", + id: 406922, + name: "", + username: "Berenice.Thiel", + }, + notificationLevel: 246557, + }, + draft: "", + draftKey: "", + draftSequence: 284086, + fancyTitle: "", + featuredLink: "", + hasDeleted: false, + hasSummary: false, + highestPostNumber: 596433, + id: 935302, + imageUrl: "", + lastPostedAt: "", + likeCount: 117525, + messageBusLastId: 772266, + participantCount: 975884, + pinned: false, + pinnedAt: "", + pinnedGlobally: false, + pinnedUntil: "", + postStream: { + posts: [ + { + actionsSummary: [ + { canAct: false, - count: 726878, - hidden: false, - id: 102413, - }, - ], - archetype: "", - archived: false, - bookmarked: false, - bookmarks: [""], - categoryId: 975425, - chunkSize: 156383, - closed: false, - createdAt: "", - deletedAt: "", - deletedBy: "", - details: { - canArchiveTopic: false, - canCloseTopic: false, - canConvertTopic: false, - canCreatePost: false, + id: 610987, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, canDelete: false, canEdit: false, - canEditStaffNotes: false, - canModerateCategory: false, - canMovePosts: false, - canPinUnpinTopic: false, - canRemoveAllowedUsers: false, - canRemoveSelfId: 782090, - canReplyAsNewTopic: false, - canReviewTopic: false, - canSplitMergeTopic: false, - canToggleTopicVisibility: false, - createdBy: { - avatarTemplate: "", - id: 304198, - name: "", - username: "Delia42", - }, - lastPoster: { - avatarTemplate: "", - id: 406922, - name: "", - username: "Berenice.Thiel", - }, - notificationLevel: 246557, - }, - draft: "", - draftKey: "", - draftSequence: 284086, - fancyTitle: "", - featuredLink: "", - hasDeleted: false, - hasSummary: false, - highestPostNumber: 596433, - id: 935302, - imageUrl: "", - lastPostedAt: "", - likeCount: 117525, - messageBusLastId: 772266, - participantCount: 975884, - pinned: false, - pinnedAt: "", - pinnedGlobally: false, - pinnedUntil: "", - postStream: { - posts: [ - { - actionsSummary: [ - { - canAct: false, - id: 610987, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - displayUsername: "", - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 932562, - incomingLinkCount: 2677, - linkCounts: [ - { - clicks: 391797, - internal: false, - reflection: false, - title: "", - url: "https://esteemed-poet.biz", - }, - ], - moderator: false, - name: "", - postNumber: 224467, - postType: 483394, - primaryGroupName: "", - quoteCount: 24753, - read: false, - readersCount: 39992, - reads: 7468, - replyCount: 639705, - replyToPostNumber: "", - reviewableId: 927403, - reviewableScoreCount: 408303, - reviewableScorePendingCount: 693153, - score: 377406, - staff: false, - topicId: 705148, - topicSlug: "", - trustLevel: 809365, - updatedAt: "", - userDeleted: false, - userId: 596065, - userTitle: "", - username: "Melvin.Lind35", - version: 600193, - wiki: false, - yours: false, - }, - ], - stream: [""], - }, - postsCount: 897543, - replyCount: 654082, - showReadIndicator: false, - slowModeEnabledUntil: "", - slowModeSeconds: 769967, - slug: "", - suggestedTopics: [ - { - archetype: "", - archived: false, - bookmarked: "", - bumped: false, - bumpedAt: "", - categoryId: 373040, - closed: false, - createdAt: "", - excerpt: "", - fancyTitle: "", - featuredLink: "", - highestPostNumber: 357425, - id: 668234, - imageUrl: "", - lastPostedAt: "", - likeCount: 621666, - liked: "", - pinned: false, - posters: [ - { - description: "Multi-channelled discrete architecture", - extras: "", - user: { - avatarTemplate: "", - id: 874400, - name: "", - username: "Daron21", - }, - }, - ], - postsCount: 322017, - replyCount: 183033, - slug: "", - tags: [""], - tagsDescriptions: {}, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + displayUsername: "", + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 932562, + incomingLinkCount: 2677, + linkCounts: [ + { + clicks: 391797, + internal: false, + reflection: false, title: "", - unpinned: "", - unseen: false, - views: 611328, - visible: false, - }, + url: "https://esteemed-poet.biz", + }, + ], + moderator: false, + name: "", + postNumber: 224467, + postType: 483394, + primaryGroupName: "", + quoteCount: 24753, + read: false, + readersCount: 39992, + reads: 7468, + replyCount: 639705, + replyToPostNumber: "", + reviewableId: 927403, + reviewableScoreCount: 408303, + reviewableScorePendingCount: 693153, + score: 377406, + staff: false, + topicId: 705148, + topicSlug: "", + trustLevel: 809365, + updatedAt: "", + userDeleted: false, + userId: 596065, + userTitle: "", + username: "Melvin.Lind35", + version: 600193, + wiki: false, + yours: false, + }, ], - summarizable: false, - tags: [""], - tagsDescriptions: {}, - thumbnails: "", - timelineLookup: [""], - title: "", - topicTimer: "", - unpinned: "", - userId: 403026, - views: 367626, - visible: false, - wordCount: 745233, + stream: [ + "", + ], + }, + postsCount: 897543, + replyCount: 654082, + showReadIndicator: false, + slowModeEnabledUntil: "", + slowModeSeconds: 769967, + slug: "", + suggestedTopics: [ + { + archetype: "", + archived: false, + bookmarked: "", + bumped: false, + bumpedAt: "", + categoryId: 373040, + closed: false, + createdAt: "", + excerpt: "", + fancyTitle: "", + featuredLink: "", + highestPostNumber: 357425, + id: 668234, + imageUrl: "", + lastPostedAt: "", + likeCount: 621666, + liked: "", + pinned: false, + posters: [ + { + description: "Multi-channelled discrete architecture", + extras: "", + user: { + avatarTemplate: "", + id: 874400, + name: "", + username: "Daron21", + }, + }, + ], + postsCount: 322017, + replyCount: 183033, + slug: "", + tags: [ + "", + ], + tagsDescriptions: {}, + title: "", + unpinned: "", + unseen: false, + views: 611328, + visible: false, + }, + ], + summarizable: false, + tags: [ + "", + ], + tagsDescriptions: {}, + thumbnails: "", + timelineLookup: [ + "", + ], + title: "", + topicTimer: "", + unpinned: "", + userId: 403026, + views: 367626, + visible: false, + wordCount: 745233, }; ``` diff --git a/docs/sdk/models/operations/gettopictopicsactionssummary.md b/docs/sdk/models/operations/gettopictopicsactionssummary.md index 7af710f..7f03963 100644 --- a/docs/sdk/models/operations/gettopictopicsactionssummary.md +++ b/docs/sdk/models/operations/gettopictopicsactionssummary.md @@ -6,8 +6,8 @@ import { GetTopicTopicsActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicTopicsActionsSummary = { - canAct: false, - id: 233078, + canAct: false, + id: 233078, }; ``` diff --git a/docs/sdk/models/operations/gettopicuser.md b/docs/sdk/models/operations/gettopicuser.md index 698db79..6f7c2ca 100644 --- a/docs/sdk/models/operations/gettopicuser.md +++ b/docs/sdk/models/operations/gettopicuser.md @@ -6,10 +6,10 @@ import { GetTopicUser } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetTopicUser = { - avatarTemplate: "", - id: 65082, - name: "", - username: "Paxton.Pfannerstill24", + avatarTemplate: "", + id: 65082, + name: "", + username: "Paxton.Pfannerstill24", }; ``` diff --git a/docs/sdk/models/operations/getuseremailsrequest.md b/docs/sdk/models/operations/getuseremailsrequest.md index 99d36e0..75fac48 100644 --- a/docs/sdk/models/operations/getuseremailsrequest.md +++ b/docs/sdk/models/operations/getuseremailsrequest.md @@ -6,7 +6,7 @@ import { GetUserEmailsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserEmailsRequest = { - username: "Everett_Willms41", + username: "Everett_Willms41", }; ``` diff --git a/docs/sdk/models/operations/getuseremailsresponsebody.md b/docs/sdk/models/operations/getuseremailsresponsebody.md index da3d980..df12948 100644 --- a/docs/sdk/models/operations/getuseremailsresponsebody.md +++ b/docs/sdk/models/operations/getuseremailsresponsebody.md @@ -8,10 +8,16 @@ success response import { GetUserEmailsResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserEmailsResponseBody = { - associatedAccounts: [""], - email: "Flossie.Hartmann@hotmail.com", - secondaryEmails: [""], - unconfirmedEmails: [""], + associatedAccounts: [ + "", + ], + email: "Flossie.Hartmann@hotmail.com", + secondaryEmails: [ + "", + ], + unconfirmedEmails: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getuserexternalidgroups.md b/docs/sdk/models/operations/getuserexternalidgroups.md index 4044444..553d0a4 100644 --- a/docs/sdk/models/operations/getuserexternalidgroups.md +++ b/docs/sdk/models/operations/getuserexternalidgroups.md @@ -6,35 +6,35 @@ import { GetUserExternalIdGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdGroups = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 232234, - displayName: "Tierra5", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Ms. Marco Ankunding", - grantTrustLevel: "", - hasMessages: false, - id: 304582, - incomingEmail: "", - membersVisibilityLevel: 146946, - membershipRequestTemplate: "", - mentionableLevel: 882860, - messageableLevel: 79522, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 250622, - visibilityLevel: 89603, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 232234, + displayName: "Tierra5", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Ms. Marco Ankunding", + grantTrustLevel: "", + hasMessages: false, + id: 304582, + incomingEmail: "", + membersVisibilityLevel: 146946, + membershipRequestTemplate: "", + mentionableLevel: 882860, + messageableLevel: 79522, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 250622, + visibilityLevel: 89603, }; ``` diff --git a/docs/sdk/models/operations/getuserexternalidgroupusers.md b/docs/sdk/models/operations/getuserexternalidgroupusers.md index a4b7879..c1fc4ac 100644 --- a/docs/sdk/models/operations/getuserexternalidgroupusers.md +++ b/docs/sdk/models/operations/getuserexternalidgroupusers.md @@ -6,9 +6,9 @@ import { GetUserExternalIdGroupUsers } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdGroupUsers = { - groupId: 301831, - notificationLevel: 407241, - userId: 775220, + groupId: 301831, + notificationLevel: 407241, + userId: 775220, }; ``` diff --git a/docs/sdk/models/operations/getuserexternalidrequest.md b/docs/sdk/models/operations/getuserexternalidrequest.md index 9cc011a..330f8b4 100644 --- a/docs/sdk/models/operations/getuserexternalidrequest.md +++ b/docs/sdk/models/operations/getuserexternalidrequest.md @@ -6,9 +6,9 @@ import { GetUserExternalIdRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdRequest = { - apiKey: "", - apiUsername: "", - externalId: "", + apiKey: "", + apiUsername: "", + externalId: "", }; ``` diff --git a/docs/sdk/models/operations/getuserexternalidresponsebody.md b/docs/sdk/models/operations/getuserexternalidresponsebody.md index f7128f6..5cc3ae4 100644 --- a/docs/sdk/models/operations/getuserexternalidresponsebody.md +++ b/docs/sdk/models/operations/getuserexternalidresponsebody.md @@ -8,182 +8,212 @@ user response import { GetUserExternalIdResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdResponseBody = { - user: { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 147014, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], + user: { + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 147014, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 956406, + notificationLevel: 159870, + userId: 187131, + }, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 129412, + displayName: "Stuart.Mayert", flairBgColor: "", flairColor: "", - flairGroupId: "", - flairName: "", flairUrl: "", - groupUsers: [ - { - groupId: 956406, - notificationLevel: 159870, - userId: 187131, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 129412, - displayName: "Stuart.Mayert", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Ms. Olive Tillman", - grantTrustLevel: "", - hasMessages: false, - id: 724168, - incomingEmail: "", - membersVisibilityLevel: 877131, - membershipRequestTemplate: "", - mentionableLevel: 399025, - messageableLevel: 93459, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 904045, - visibilityLevel: 426306, - }, - ], - hasTitleBadges: false, - id: 690025, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "fr_CA", - mailingListPostsPerDay: 699622, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], + fullName: "Ms. Olive Tillman", + grantTrustLevel: "", + hasMessages: false, + id: 724168, + incomingEmail: "", + membersVisibilityLevel: 877131, + membershipRequestTemplate: "", + mentionableLevel: 399025, + messageableLevel: 93459, name: "", - pendingCount: 580197, - postCount: 327720, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 716244, - recentTimeRead: 756779, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 27069, + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 636061, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 731398, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 240020, - day0StartTime: 766964, - day1EndTime: 160538, - day1StartTime: 9766, - day2EndTime: 796392, - day2StartTime: 308286, - day3EndTime: 959167, - day3StartTime: 232865, - day4EndTime: 458139, - day4StartTime: 503427, - day5EndTime: 590984, - day5StartTime: 953722, - day6EndTime: 857723, - day6StartTime: 557811, - enabled: false, - }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 457223, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 97468, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 951875, - emailMessagesLevel: 621679, - emailPreviousReplies: 575751, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 863023, - mailingListMode: false, - mailingListModeFrequency: 820767, - newTopicDurationMinutes: 157632, - notificationLevelWhenReplying: 908844, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 992430, - themeIds: [""], - themeKeySeq: 815524, - timezone: "America/Chicago", - titleCountMode: "", - userId: 159414, - }, - username: "Aurelie.Murphy", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + userCount: 904045, + visibilityLevel: 426306, + }, + ], + hasTitleBadges: false, + id: 690025, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "fr_CA", + mailingListPostsPerDay: 699622, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 580197, + postCount: 327720, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 716244, + recentTimeRead: 756779, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 27069, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 636061, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 731398, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 240020, + day0StartTime: 766964, + day1EndTime: 160538, + day1StartTime: 9766, + day2EndTime: 796392, + day2StartTime: 308286, + day3EndTime: 959167, + day3StartTime: 232865, + day4EndTime: 458139, + day4StartTime: 503427, + day5EndTime: 590984, + day5StartTime: 953722, + day6EndTime: 857723, + day6StartTime: 557811, + enabled: false, }, - userBadges: [""], + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 457223, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 97468, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 951875, + emailMessagesLevel: 621679, + emailPreviousReplies: 575751, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 863023, + mailingListMode: false, + mailingListModeFrequency: 820767, + newTopicDurationMinutes: 157632, + notificationLevelWhenReplying: 908844, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 992430, + themeIds: [ + "", + ], + themeKeySeq: 815524, + timezone: "America/Chicago", + titleCountMode: "", + userId: 159414, + }, + username: "Aurelie.Murphy", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], + }, + userBadges: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getuserexternaliduser.md b/docs/sdk/models/operations/getuserexternaliduser.md index ea91ae5..0def6ac 100644 --- a/docs/sdk/models/operations/getuserexternaliduser.md +++ b/docs/sdk/models/operations/getuserexternaliduser.md @@ -6,179 +6,207 @@ import { GetUserExternalIdUser } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdUser = { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 852635, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], - flairBgColor: "", - flairColor: "", - flairGroupId: "", - flairName: "", - flairUrl: "", - groupUsers: [ - { - groupId: 283519, - notificationLevel: 433439, - userId: 379927, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 826871, - displayName: "Chet.Lang5", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Rickey DuBuque", - grantTrustLevel: "", - hasMessages: false, - id: 777408, - incomingEmail: "", - membersVisibilityLevel: 681359, - membershipRequestTemplate: "", - mentionableLevel: 259422, - messageableLevel: 178367, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 373813, - visibilityLevel: 69859, - }, - ], - hasTitleBadges: false, - id: 587600, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "af_ZA", - mailingListPostsPerDay: 272822, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], - name: "", - pendingCount: 892050, - postCount: 370853, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 133465, - recentTimeRead: 197054, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 779192, - title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 459856, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 925164, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 44612, - day0StartTime: 715179, - day1EndTime: 799796, - day1StartTime: 490819, - day2EndTime: 76956, - day2StartTime: 469498, - day3EndTime: 518835, - day3StartTime: 882710, - day4EndTime: 306810, - day4StartTime: 488410, - day5EndTime: 577543, - day5StartTime: 414567, - day6EndTime: 959434, - day6StartTime: 174112, - enabled: false, + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 852635, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 283519, + notificationLevel: 433439, + userId: 379927, }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 645570, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 475289, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 35362, - emailMessagesLevel: 783648, - emailPreviousReplies: 430402, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 556429, - mailingListMode: false, - mailingListModeFrequency: 510017, - newTopicDurationMinutes: 159867, - notificationLevelWhenReplying: 536178, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 143829, - themeIds: [""], - themeKeySeq: 681393, - timezone: "Asia/Yekaterinburg", - titleCountMode: "", - userId: 277596, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 826871, + displayName: "Chet.Lang5", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Rickey DuBuque", + grantTrustLevel: "", + hasMessages: false, + id: 777408, + incomingEmail: "", + membersVisibilityLevel: 681359, + membershipRequestTemplate: "", + mentionableLevel: 259422, + messageableLevel: 178367, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 373813, + visibilityLevel: 69859, }, - username: "Kameron39", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + ], + hasTitleBadges: false, + id: 587600, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "af_ZA", + mailingListPostsPerDay: 272822, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 892050, + postCount: 370853, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 133465, + recentTimeRead: 197054, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 779192, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 459856, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 925164, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 44612, + day0StartTime: 715179, + day1EndTime: 799796, + day1StartTime: 490819, + day2EndTime: 76956, + day2StartTime: 469498, + day3EndTime: 518835, + day3StartTime: 882710, + day4EndTime: 306810, + day4StartTime: 488410, + day5EndTime: 577543, + day5StartTime: 414567, + day6EndTime: 959434, + day6StartTime: 174112, + enabled: false, + }, + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 645570, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 475289, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 35362, + emailMessagesLevel: 783648, + emailPreviousReplies: 430402, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 556429, + mailingListMode: false, + mailingListModeFrequency: 510017, + newTopicDurationMinutes: 159867, + notificationLevelWhenReplying: 536178, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 143829, + themeIds: [ + "", + ], + themeKeySeq: 681393, + timezone: "Asia/Yekaterinburg", + titleCountMode: "", + userId: 277596, + }, + username: "Kameron39", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getuserexternaliduserauthtokens.md b/docs/sdk/models/operations/getuserexternaliduserauthtokens.md index 43a33c8..0937927 100644 --- a/docs/sdk/models/operations/getuserexternaliduserauthtokens.md +++ b/docs/sdk/models/operations/getuserexternaliduserauthtokens.md @@ -6,16 +6,16 @@ import { GetUserExternalIdUserAuthTokens } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdUserAuthTokens = { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 677412, - isActive: false, - location: "", - os: "", - seenAt: "", + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 677412, + isActive: false, + location: "", + os: "", + seenAt: "", }; ``` diff --git a/docs/sdk/models/operations/getuserexternaliduserfields.md b/docs/sdk/models/operations/getuserexternaliduserfields.md index e74a790..049c681 100644 --- a/docs/sdk/models/operations/getuserexternaliduserfields.md +++ b/docs/sdk/models/operations/getuserexternaliduserfields.md @@ -6,8 +6,8 @@ import { GetUserExternalIdUserFields } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdUserFields = { - one: "", - two: "", + one: "", + two: "", }; ``` diff --git a/docs/sdk/models/operations/getuserexternalidusernotificationschedule.md b/docs/sdk/models/operations/getuserexternalidusernotificationschedule.md index 41928e1..8d8dcec 100644 --- a/docs/sdk/models/operations/getuserexternalidusernotificationschedule.md +++ b/docs/sdk/models/operations/getuserexternalidusernotificationschedule.md @@ -6,21 +6,21 @@ import { GetUserExternalIdUserNotificationSchedule } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdUserNotificationSchedule = { - day0EndTime: 672048, - day0StartTime: 810424, - day1EndTime: 245367, - day1StartTime: 432148, - day2EndTime: 420539, - day2StartTime: 752135, - day3EndTime: 557369, - day3StartTime: 829603, - day4EndTime: 860552, - day4StartTime: 379034, - day5EndTime: 727044, - day5StartTime: 96549, - day6EndTime: 270328, - day6StartTime: 256139, - enabled: false, + day0EndTime: 672048, + day0StartTime: 810424, + day1EndTime: 245367, + day1StartTime: 432148, + day2EndTime: 420539, + day2StartTime: 752135, + day3EndTime: 557369, + day3StartTime: 829603, + day4EndTime: 860552, + day4StartTime: 379034, + day5EndTime: 727044, + day5StartTime: 96549, + day6EndTime: 270328, + day6StartTime: 256139, + enabled: false, }; ``` diff --git a/docs/sdk/models/operations/getuserexternaliduseroption.md b/docs/sdk/models/operations/getuserexternaliduseroption.md index 9f7de1e..2a17ab3 100644 --- a/docs/sdk/models/operations/getuserexternaliduseroption.md +++ b/docs/sdk/models/operations/getuserexternaliduseroption.md @@ -6,38 +6,40 @@ import { GetUserExternalIdUserOption } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserExternalIdUserOption = { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 131482, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 591935, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 55374, - emailMessagesLevel: 476477, - emailPreviousReplies: 301598, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 487935, - mailingListMode: false, - mailingListModeFrequency: 262118, - newTopicDurationMinutes: 458515, - notificationLevelWhenReplying: 456141, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 524593, - themeIds: [""], - themeKeySeq: 683282, - timezone: "Africa/Algiers", - titleCountMode: "", - userId: 695626, + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 131482, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 591935, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 55374, + emailMessagesLevel: 476477, + emailPreviousReplies: 301598, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 487935, + mailingListMode: false, + mailingListModeFrequency: 262118, + newTopicDurationMinutes: 458515, + notificationLevelWhenReplying: 456141, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 524593, + themeIds: [ + "", + ], + themeKeySeq: 683282, + timezone: "Africa/Algiers", + titleCountMode: "", + userId: 695626, }; ``` diff --git a/docs/sdk/models/operations/getusergroups.md b/docs/sdk/models/operations/getusergroups.md index 8e92c8d..e09acaa 100644 --- a/docs/sdk/models/operations/getusergroups.md +++ b/docs/sdk/models/operations/getusergroups.md @@ -6,35 +6,35 @@ import { GetUserGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserGroups = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 881586, - displayName: "Emmanuelle_Turner", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Derek Sipes", - grantTrustLevel: "", - hasMessages: false, - id: 55, - incomingEmail: "", - membersVisibilityLevel: 872651, - membershipRequestTemplate: "", - mentionableLevel: 311860, - messageableLevel: 273542, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 425451, - visibilityLevel: 798047, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 881586, + displayName: "Emmanuelle_Turner", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Derek Sipes", + grantTrustLevel: "", + hasMessages: false, + id: 55, + incomingEmail: "", + membersVisibilityLevel: 872651, + membershipRequestTemplate: "", + mentionableLevel: 311860, + messageableLevel: 273542, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 425451, + visibilityLevel: 798047, }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternalidgroups.md b/docs/sdk/models/operations/getuseridentiyproviderexternalidgroups.md index 983e9ca..fa52804 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternalidgroups.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternalidgroups.md @@ -6,35 +6,35 @@ import { GetUserIdentiyProviderExternalIdGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdGroups = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 424032, - displayName: "Isai_Gerlach74", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Mrs. Michele Williamson", - grantTrustLevel: "", - hasMessages: false, - id: 356707, - incomingEmail: "", - membersVisibilityLevel: 391774, - membershipRequestTemplate: "", - mentionableLevel: 16328, - messageableLevel: 531849, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 185232, - visibilityLevel: 845358, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 424032, + displayName: "Isai_Gerlach74", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Mrs. Michele Williamson", + grantTrustLevel: "", + hasMessages: false, + id: 356707, + incomingEmail: "", + membersVisibilityLevel: 391774, + membershipRequestTemplate: "", + mentionableLevel: 16328, + messageableLevel: 531849, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 185232, + visibilityLevel: 845358, }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternalidgroupusers.md b/docs/sdk/models/operations/getuseridentiyproviderexternalidgroupusers.md index b652d54..42e6e48 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternalidgroupusers.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternalidgroupusers.md @@ -6,9 +6,9 @@ import { GetUserIdentiyProviderExternalIdGroupUsers } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdGroupUsers = { - groupId: 949298, - notificationLevel: 62713, - userId: 936747, + groupId: 949298, + notificationLevel: 62713, + userId: 936747, }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternalidrequest.md b/docs/sdk/models/operations/getuseridentiyproviderexternalidrequest.md index 7610883..aae01c0 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternalidrequest.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternalidrequest.md @@ -6,10 +6,10 @@ import { GetUserIdentiyProviderExternalIdRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdRequest = { - apiKey: "", - apiUsername: "", - externalId: "", - provider: "", + apiKey: "", + apiUsername: "", + externalId: "", + provider: "", }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternalidresponsebody.md b/docs/sdk/models/operations/getuseridentiyproviderexternalidresponsebody.md index 12b9c2b..c6bc11f 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternalidresponsebody.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternalidresponsebody.md @@ -8,182 +8,212 @@ user response import { GetUserIdentiyProviderExternalIdResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdResponseBody = { - user: { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 348519, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], + user: { + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 348519, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 937285, + notificationLevel: 814967, + userId: 257233, + }, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 985492, + displayName: "Georgianna_Wisozk89", flairBgColor: "", flairColor: "", - flairGroupId: "", - flairName: "", flairUrl: "", - groupUsers: [ - { - groupId: 937285, - notificationLevel: 814967, - userId: 257233, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 985492, - displayName: "Georgianna_Wisozk89", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Katherine Zemlak", - grantTrustLevel: "", - hasMessages: false, - id: 228263, - incomingEmail: "", - membersVisibilityLevel: 105906, - membershipRequestTemplate: "", - mentionableLevel: 489509, - messageableLevel: 950953, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 891523, - visibilityLevel: 233420, - }, - ], - hasTitleBadges: false, - id: 358107, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "nb_NO", - mailingListPostsPerDay: 385237, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], + fullName: "Katherine Zemlak", + grantTrustLevel: "", + hasMessages: false, + id: 228263, + incomingEmail: "", + membersVisibilityLevel: 105906, + membershipRequestTemplate: "", + mentionableLevel: 489509, + messageableLevel: 950953, name: "", - pendingCount: 58356, - postCount: 916727, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 730709, - recentTimeRead: 113816, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 881721, + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 631126, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 272437, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 132815, - day0StartTime: 379057, - day1EndTime: 374244, - day1StartTime: 374296, - day2EndTime: 324405, - day2StartTime: 748789, - day3EndTime: 680116, - day3StartTime: 237807, - day4EndTime: 795535, - day4StartTime: 171853, - day5EndTime: 503934, - day5StartTime: 449292, - day6EndTime: 296242, - day6StartTime: 304468, - enabled: false, - }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 885963, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 839189, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 351870, - emailMessagesLevel: 237742, - emailPreviousReplies: 738391, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 502389, - mailingListMode: false, - mailingListModeFrequency: 555361, - newTopicDurationMinutes: 942584, - notificationLevelWhenReplying: 201517, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 633998, - themeIds: [""], - themeKeySeq: 548519, - timezone: "Australia/Adelaide", - titleCountMode: "", - userId: 519643, - }, - username: "Tristian.Heidenreich69", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + userCount: 891523, + visibilityLevel: 233420, + }, + ], + hasTitleBadges: false, + id: 358107, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "nb_NO", + mailingListPostsPerDay: 385237, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 58356, + postCount: 916727, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 730709, + recentTimeRead: 113816, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 881721, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 631126, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 272437, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 132815, + day0StartTime: 379057, + day1EndTime: 374244, + day1StartTime: 374296, + day2EndTime: 324405, + day2StartTime: 748789, + day3EndTime: 680116, + day3StartTime: 237807, + day4EndTime: 795535, + day4StartTime: 171853, + day5EndTime: 503934, + day5StartTime: 449292, + day6EndTime: 296242, + day6StartTime: 304468, + enabled: false, }, - userBadges: [""], + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 885963, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 839189, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 351870, + emailMessagesLevel: 237742, + emailPreviousReplies: 738391, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 502389, + mailingListMode: false, + mailingListModeFrequency: 555361, + newTopicDurationMinutes: 942584, + notificationLevelWhenReplying: 201517, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 633998, + themeIds: [ + "", + ], + themeKeySeq: 548519, + timezone: "Australia/Adelaide", + titleCountMode: "", + userId: 519643, + }, + username: "Tristian.Heidenreich69", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], + }, + userBadges: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternaliduser.md b/docs/sdk/models/operations/getuseridentiyproviderexternaliduser.md index a941cd5..4ffe980 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternaliduser.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternaliduser.md @@ -6,179 +6,207 @@ import { GetUserIdentiyProviderExternalIdUser } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdUser = { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 221161, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], - flairBgColor: "", - flairColor: "", - flairGroupId: "", - flairName: "", - flairUrl: "", - groupUsers: [ - { - groupId: 580152, - notificationLevel: 253191, - userId: 771089, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 131055, - displayName: "Garrison.Anderson", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Wendell Frami", - grantTrustLevel: "", - hasMessages: false, - id: 990345, - incomingEmail: "", - membersVisibilityLevel: 45659, - membershipRequestTemplate: "", - mentionableLevel: 409054, - messageableLevel: 310067, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 162954, - visibilityLevel: 831520, - }, - ], - hasTitleBadges: false, - id: 638762, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "ro", - mailingListPostsPerDay: 490305, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], - name: "", - pendingCount: 640024, - postCount: 989410, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 368102, - recentTimeRead: 65304, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 312753, - title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 783235, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 801836, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 288398, - day0StartTime: 70447, - day1EndTime: 241418, - day1StartTime: 683573, - day2EndTime: 662505, - day2StartTime: 380729, - day3EndTime: 246063, - day3StartTime: 633931, - day4EndTime: 665859, - day4StartTime: 926880, - day5EndTime: 517309, - day5StartTime: 853940, - day6EndTime: 424089, - day6StartTime: 497678, - enabled: false, + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 221161, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 580152, + notificationLevel: 253191, + userId: 771089, }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 554688, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 427834, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 287051, - emailMessagesLevel: 822560, - emailPreviousReplies: 706575, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 738227, - mailingListMode: false, - mailingListModeFrequency: 414857, - newTopicDurationMinutes: 447144, - notificationLevelWhenReplying: 360545, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 968904, - themeIds: [""], - themeKeySeq: 828657, - timezone: "Europe/Zagreb", - titleCountMode: "", - userId: 924967, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 131055, + displayName: "Garrison.Anderson", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Wendell Frami", + grantTrustLevel: "", + hasMessages: false, + id: 990345, + incomingEmail: "", + membersVisibilityLevel: 45659, + membershipRequestTemplate: "", + mentionableLevel: 409054, + messageableLevel: 310067, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 162954, + visibilityLevel: 831520, }, - username: "Graham.Bayer44", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + ], + hasTitleBadges: false, + id: 638762, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "ro", + mailingListPostsPerDay: 490305, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 640024, + postCount: 989410, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 368102, + recentTimeRead: 65304, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 312753, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 783235, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 801836, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 288398, + day0StartTime: 70447, + day1EndTime: 241418, + day1StartTime: 683573, + day2EndTime: 662505, + day2StartTime: 380729, + day3EndTime: 246063, + day3StartTime: 633931, + day4EndTime: 665859, + day4StartTime: 926880, + day5EndTime: 517309, + day5StartTime: 853940, + day6EndTime: 424089, + day6StartTime: 497678, + enabled: false, + }, + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 554688, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 427834, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 287051, + emailMessagesLevel: 822560, + emailPreviousReplies: 706575, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 738227, + mailingListMode: false, + mailingListModeFrequency: 414857, + newTopicDurationMinutes: 447144, + notificationLevelWhenReplying: 360545, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 968904, + themeIds: [ + "", + ], + themeKeySeq: 828657, + timezone: "Europe/Zagreb", + titleCountMode: "", + userId: 924967, + }, + username: "Graham.Bayer44", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternaliduserauthtokens.md b/docs/sdk/models/operations/getuseridentiyproviderexternaliduserauthtokens.md index 8bb2b0a..51fee6f 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternaliduserauthtokens.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternaliduserauthtokens.md @@ -6,16 +6,16 @@ import { GetUserIdentiyProviderExternalIdUserAuthTokens } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdUserAuthTokens = { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 401259, - isActive: false, - location: "", - os: "", - seenAt: "", + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 401259, + isActive: false, + location: "", + os: "", + seenAt: "", }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternaliduserfields.md b/docs/sdk/models/operations/getuseridentiyproviderexternaliduserfields.md index 2ab5486..1c0febd 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternaliduserfields.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternaliduserfields.md @@ -6,8 +6,8 @@ import { GetUserIdentiyProviderExternalIdUserFields } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdUserFields = { - one: "", - two: "", + one: "", + two: "", }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternalidusernotificationschedule.md b/docs/sdk/models/operations/getuseridentiyproviderexternalidusernotificationschedule.md index e2fd65d..0420784 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternalidusernotificationschedule.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternalidusernotificationschedule.md @@ -6,21 +6,21 @@ import { GetUserIdentiyProviderExternalIdUserNotificationSchedule } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdUserNotificationSchedule = { - day0EndTime: 536275, - day0StartTime: 929292, - day1EndTime: 680270, - day1StartTime: 99615, - day2EndTime: 609178, - day2StartTime: 945302, - day3EndTime: 98478, - day3StartTime: 869489, - day4EndTime: 92027, - day4StartTime: 454162, - day5EndTime: 55965, - day5StartTime: 326701, - day6EndTime: 86532, - day6StartTime: 232744, - enabled: false, + day0EndTime: 536275, + day0StartTime: 929292, + day1EndTime: 680270, + day1StartTime: 99615, + day2EndTime: 609178, + day2StartTime: 945302, + day3EndTime: 98478, + day3StartTime: 869489, + day4EndTime: 92027, + day4StartTime: 454162, + day5EndTime: 55965, + day5StartTime: 326701, + day6EndTime: 86532, + day6StartTime: 232744, + enabled: false, }; ``` diff --git a/docs/sdk/models/operations/getuseridentiyproviderexternaliduseroption.md b/docs/sdk/models/operations/getuseridentiyproviderexternaliduseroption.md index 282bd51..18fbaf3 100644 --- a/docs/sdk/models/operations/getuseridentiyproviderexternaliduseroption.md +++ b/docs/sdk/models/operations/getuseridentiyproviderexternaliduseroption.md @@ -6,38 +6,40 @@ import { GetUserIdentiyProviderExternalIdUserOption } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserIdentiyProviderExternalIdUserOption = { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 237173, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 614465, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 839513, - emailMessagesLevel: 33074, - emailPreviousReplies: 522371, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 15606, - mailingListMode: false, - mailingListModeFrequency: 513075, - newTopicDurationMinutes: 428796, - notificationLevelWhenReplying: 649832, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 68074, - themeIds: [""], - themeKeySeq: 544591, - timezone: "Europe/Dublin", - titleCountMode: "", - userId: 32465, + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 237173, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 614465, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 839513, + emailMessagesLevel: 33074, + emailPreviousReplies: 522371, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 15606, + mailingListMode: false, + mailingListModeFrequency: 513075, + newTopicDurationMinutes: 428796, + notificationLevelWhenReplying: 649832, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 68074, + themeIds: [ + "", + ], + themeKeySeq: 544591, + timezone: "Europe/Dublin", + titleCountMode: "", + userId: 32465, }; ``` diff --git a/docs/sdk/models/operations/getuserrequest.md b/docs/sdk/models/operations/getuserrequest.md index 6be8da9..3733fdc 100644 --- a/docs/sdk/models/operations/getuserrequest.md +++ b/docs/sdk/models/operations/getuserrequest.md @@ -6,9 +6,9 @@ import { GetUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserRequest = { - apiKey: "", - apiUsername: "", - username: "Makenzie13", + apiKey: "", + apiUsername: "", + username: "Makenzie13", }; ``` diff --git a/docs/sdk/models/operations/getuserresponsebody.md b/docs/sdk/models/operations/getuserresponsebody.md index 3544cc9..55877e2 100644 --- a/docs/sdk/models/operations/getuserresponsebody.md +++ b/docs/sdk/models/operations/getuserresponsebody.md @@ -8,182 +8,212 @@ user response import { GetUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserResponseBody = { - user: { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 63955, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], + user: { + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 63955, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 512393, + notificationLevel: 485628, + userId: 580447, + }, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 977496, + displayName: "Paris.Terry", flairBgColor: "", flairColor: "", - flairGroupId: "", - flairName: "", flairUrl: "", - groupUsers: [ - { - groupId: 512393, - notificationLevel: 485628, - userId: 580447, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 977496, - displayName: "Paris.Terry", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Dixie Klocko", - grantTrustLevel: "", - hasMessages: false, - id: 949319, - incomingEmail: "", - membersVisibilityLevel: 492268, - membershipRequestTemplate: "", - mentionableLevel: 941378, - messageableLevel: 715561, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 799203, - visibilityLevel: 486160, - }, - ], - hasTitleBadges: false, - id: 630448, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "ne", - mailingListPostsPerDay: 874288, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], + fullName: "Dixie Klocko", + grantTrustLevel: "", + hasMessages: false, + id: 949319, + incomingEmail: "", + membersVisibilityLevel: 492268, + membershipRequestTemplate: "", + mentionableLevel: 941378, + messageableLevel: 715561, name: "", - pendingCount: 498140, - postCount: 293020, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 844550, - recentTimeRead: 848944, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 194342, + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 617877, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 773326, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 13236, - day0StartTime: 974259, - day1EndTime: 347233, - day1StartTime: 862310, - day2EndTime: 148141, - day2StartTime: 780427, - day3EndTime: 981830, - day3StartTime: 985033, - day4EndTime: 478370, - day4StartTime: 753570, - day5EndTime: 497391, - day5StartTime: 4048, - day6EndTime: 639473, - day6StartTime: 269479, - enabled: false, - }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 368584, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 410492, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 136900, - emailMessagesLevel: 428224, - emailPreviousReplies: 822118, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 297842, - mailingListMode: false, - mailingListModeFrequency: 189848, - newTopicDurationMinutes: 401132, - notificationLevelWhenReplying: 511319, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 120657, - themeIds: [""], - themeKeySeq: 224317, - timezone: "Pacific/Tongatapu", - titleCountMode: "", - userId: 97844, - }, - username: "Gustave_Stoltenberg", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + userCount: 799203, + visibilityLevel: 486160, + }, + ], + hasTitleBadges: false, + id: 630448, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "ne", + mailingListPostsPerDay: 874288, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 498140, + postCount: 293020, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 844550, + recentTimeRead: 848944, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 194342, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 617877, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 773326, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 13236, + day0StartTime: 974259, + day1EndTime: 347233, + day1StartTime: 862310, + day2EndTime: 148141, + day2StartTime: 780427, + day3EndTime: 981830, + day3StartTime: 985033, + day4EndTime: 478370, + day4StartTime: 753570, + day5EndTime: 497391, + day5StartTime: 4048, + day6EndTime: 639473, + day6StartTime: 269479, + enabled: false, }, - userBadges: [""], + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 368584, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 410492, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 136900, + emailMessagesLevel: 428224, + emailPreviousReplies: 822118, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 297842, + mailingListMode: false, + mailingListModeFrequency: 189848, + newTopicDurationMinutes: 401132, + notificationLevelWhenReplying: 511319, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 120657, + themeIds: [ + "", + ], + themeKeySeq: 224317, + timezone: "Pacific/Tongatapu", + titleCountMode: "", + userId: 97844, + }, + username: "Gustave_Stoltenberg", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], + }, + userBadges: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/getusersentprivatemessagesrequest.md b/docs/sdk/models/operations/getusersentprivatemessagesrequest.md index 082a7aa..421c424 100644 --- a/docs/sdk/models/operations/getusersentprivatemessagesrequest.md +++ b/docs/sdk/models/operations/getusersentprivatemessagesrequest.md @@ -6,7 +6,7 @@ import { GetUserSentPrivateMessagesRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GetUserSentPrivateMessagesRequest = { - username: "Lacey.Hansen20", + username: "Lacey.Hansen20", }; ``` diff --git a/docs/sdk/models/operations/grantedbies.md b/docs/sdk/models/operations/grantedbies.md index 7111421..08dd233 100644 --- a/docs/sdk/models/operations/grantedbies.md +++ b/docs/sdk/models/operations/grantedbies.md @@ -6,14 +6,14 @@ import { GrantedBies } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GrantedBies = { - admin: false, - avatarTemplate: "", - flairName: "", - id: 449950, - moderator: false, - name: "", - trustLevel: 359508, - username: "Leslie_Kertzmann9", + admin: false, + avatarTemplate: "", + flairName: "", + id: 449950, + moderator: false, + name: "", + trustLevel: 359508, + username: "Leslie_Kertzmann9", }; ``` diff --git a/docs/sdk/models/operations/group.md b/docs/sdk/models/operations/group.md index 2208cca..b8dded3 100644 --- a/docs/sdk/models/operations/group.md +++ b/docs/sdk/models/operations/group.md @@ -6,7 +6,7 @@ import { Group } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Group = { - name: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/groupedsearchresult.md b/docs/sdk/models/operations/groupedsearchresult.md index 4e211ae..db06069 100644 --- a/docs/sdk/models/operations/groupedsearchresult.md +++ b/docs/sdk/models/operations/groupedsearchresult.md @@ -6,19 +6,29 @@ import { GroupedSearchResult } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GroupedSearchResult = { - canCreateTopic: false, - categoryIds: [""], - error: "", - groupIds: [""], - moreCategories: "", - moreFullPageResults: "", - morePosts: "", - moreUsers: "", - postIds: [""], - searchLogId: 357347, - tagIds: [""], - term: "", - userIds: [""], + canCreateTopic: false, + categoryIds: [ + "", + ], + error: "", + groupIds: [ + "", + ], + moreCategories: "", + moreFullPageResults: "", + morePosts: "", + moreUsers: "", + postIds: [ + "", + ], + searchLogId: 357347, + tagIds: [ + "", + ], + term: "", + userIds: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/grouppermissions.md b/docs/sdk/models/operations/grouppermissions.md index 49093db..0639051 100644 --- a/docs/sdk/models/operations/grouppermissions.md +++ b/docs/sdk/models/operations/grouppermissions.md @@ -6,8 +6,8 @@ import { GroupPermissions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GroupPermissions = { - groupName: "", - permissionType: 696483, + groupName: "", + permissionType: 696483, }; ``` diff --git a/docs/sdk/models/operations/groups.md b/docs/sdk/models/operations/groups.md index 221449c..fcb37d8 100644 --- a/docs/sdk/models/operations/groups.md +++ b/docs/sdk/models/operations/groups.md @@ -6,35 +6,35 @@ import { Groups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Groups = { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 146441, - displayName: "Mariano70", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Francisco Windler", - grantTrustLevel: "", - hasMessages: false, - id: 756107, - incomingEmail: "", - membersVisibilityLevel: 576157, - membershipRequestTemplate: "", - mentionableLevel: 396098, - messageableLevel: 592042, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 896039, - visibilityLevel: 572252, + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 146441, + displayName: "Mariano70", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Francisco Windler", + grantTrustLevel: "", + hasMessages: false, + id: 756107, + incomingEmail: "", + membersVisibilityLevel: 576157, + membershipRequestTemplate: "", + mentionableLevel: 396098, + messageableLevel: 592042, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 896039, + visibilityLevel: 572252, }; ``` diff --git a/docs/sdk/models/operations/groupusers.md b/docs/sdk/models/operations/groupusers.md index 5f004eb..cb8698f 100644 --- a/docs/sdk/models/operations/groupusers.md +++ b/docs/sdk/models/operations/groupusers.md @@ -6,9 +6,9 @@ import { GroupUsers } from "@lukehagar/discoursejs/sdk/models/operations"; let value: GroupUsers = { - groupId: 20651, - notificationLevel: 229219, - userId: 758379, + groupId: 20651, + notificationLevel: 229219, + userId: 758379, }; ``` diff --git a/docs/sdk/models/operations/invitetotopicrequest.md b/docs/sdk/models/operations/invitetotopicrequest.md index 58d1a66..fb4afed 100644 --- a/docs/sdk/models/operations/invitetotopicrequest.md +++ b/docs/sdk/models/operations/invitetotopicrequest.md @@ -6,9 +6,9 @@ import { InviteToTopicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: InviteToTopicRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/lastposter.md b/docs/sdk/models/operations/lastposter.md index 731cfea..664250a 100644 --- a/docs/sdk/models/operations/lastposter.md +++ b/docs/sdk/models/operations/lastposter.md @@ -6,10 +6,10 @@ import { LastPoster } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LastPoster = { - avatarTemplate: "", - id: 987349, - name: "", - username: "Terrence.Rowe", + avatarTemplate: "", + id: 987349, + name: "", + username: "Terrence.Rowe", }; ``` diff --git a/docs/sdk/models/operations/linkcounts.md b/docs/sdk/models/operations/linkcounts.md index 64eaeae..4b77a57 100644 --- a/docs/sdk/models/operations/linkcounts.md +++ b/docs/sdk/models/operations/linkcounts.md @@ -6,11 +6,11 @@ import { LinkCounts } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LinkCounts = { - clicks: 46806, - internal: false, - reflection: false, - title: "", - url: "https://wild-retrospectivity.com", + clicks: 46806, + internal: false, + reflection: false, + title: "", + url: "https://wild-retrospectivity.com", }; ``` diff --git a/docs/sdk/models/operations/listcategoriesresponsebody.md b/docs/sdk/models/operations/listcategoriesresponsebody.md index c93739d..05a0581 100644 --- a/docs/sdk/models/operations/listcategoriesresponsebody.md +++ b/docs/sdk/models/operations/listcategoriesresponsebody.md @@ -8,52 +8,54 @@ success response import { ListCategoriesResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListCategoriesResponseBody = { - categoryList: { - canCreateCategory: false, - canCreateTopic: false, - categories: [ - { - canEdit: false, - color: "maroon", - defaultListFilter: "", - defaultTopPeriod: "", - defaultView: "", - description: "Enterprise-wide foreground application", - descriptionExcerpt: "", - descriptionText: "", - hasChildren: false, - id: 671384, - minimumRequiredTags: 123844, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 344718, - numFeaturedTopics: 856756, - permission: 713767, - position: 399667, - postCount: 639187, - readRestricted: false, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryIds: [""], - subcategoryListStyle: "", - textColor: "", - topicCount: 381397, - topicTemplate: "", - topicUrl: "", - topicsAllTime: 399161, - topicsDay: 21973, - topicsMonth: 431760, - topicsWeek: 374753, - topicsYear: 614528, - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, + categoryList: { + canCreateCategory: false, + canCreateTopic: false, + categories: [ + { + canEdit: false, + color: "maroon", + defaultListFilter: "", + defaultTopPeriod: "", + defaultView: "", + description: "Enterprise-wide foreground application", + descriptionExcerpt: "", + descriptionText: "", + hasChildren: false, + id: 671384, + minimumRequiredTags: 123844, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 344718, + numFeaturedTopics: 856756, + permission: 713767, + position: 399667, + postCount: 639187, + readRestricted: false, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryIds: [ + "", ], - }, + subcategoryListStyle: "", + textColor: "", + topicCount: 381397, + topicTemplate: "", + topicUrl: "", + topicsAllTime: 399161, + topicsDay: 21973, + topicsMonth: 431760, + topicsWeek: 374753, + topicsYear: 614528, + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/listcategorytopicsposters.md b/docs/sdk/models/operations/listcategorytopicsposters.md index c2297ff..cde64ee 100644 --- a/docs/sdk/models/operations/listcategorytopicsposters.md +++ b/docs/sdk/models/operations/listcategorytopicsposters.md @@ -6,10 +6,10 @@ import { ListCategoryTopicsPosters } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListCategoryTopicsPosters = { - description: "Centralized modular secured line", - extras: "", - primaryGroupId: "", - userId: 913992, + description: "Centralized modular secured line", + extras: "", + primaryGroupId: "", + userId: 913992, }; ``` diff --git a/docs/sdk/models/operations/listcategorytopicsrequest.md b/docs/sdk/models/operations/listcategorytopicsrequest.md index d693294..24047ba 100644 --- a/docs/sdk/models/operations/listcategorytopicsrequest.md +++ b/docs/sdk/models/operations/listcategorytopicsrequest.md @@ -6,8 +6,8 @@ import { ListCategoryTopicsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListCategoryTopicsRequest = { - id: 661607, - slug: "", + id: 661607, + slug: "", }; ``` diff --git a/docs/sdk/models/operations/listcategorytopicsresponsebody.md b/docs/sdk/models/operations/listcategorytopicsresponsebody.md index e108abf..befbeea 100644 --- a/docs/sdk/models/operations/listcategorytopicsresponsebody.md +++ b/docs/sdk/models/operations/listcategorytopicsresponsebody.md @@ -8,51 +8,51 @@ success response import { ListCategoryTopicsResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListCategoryTopicsResponseBody = { - topicList: { - canCreateTopic: false, - perPage: 682119, - topics: [ - { - archetype: "", - archived: false, - bookmarked: "", - bumped: false, - bumpedAt: "", - categoryId: 867168, - closed: false, - createdAt: "", - excerpt: "", - fancyTitle: "", - featuredLink: "", - hasSummary: false, - highestPostNumber: 891315, - id: 29190, - imageUrl: "", - lastPostedAt: "", - lastPosterUsername: "", - likeCount: 1207, - liked: "", - pinned: false, - pinnedGlobally: false, - posters: [ - { - description: "Operative user-facing groupware", - extras: "", - primaryGroupId: "", - userId: 958308, - }, - ], - postsCount: 524184, - replyCount: 796320, - slug: "", - title: "", - unpinned: "", - unseen: false, - views: 365100, - visible: false, - }, + topicList: { + canCreateTopic: false, + perPage: 682119, + topics: [ + { + archetype: "", + archived: false, + bookmarked: "", + bumped: false, + bumpedAt: "", + categoryId: 867168, + closed: false, + createdAt: "", + excerpt: "", + fancyTitle: "", + featuredLink: "", + hasSummary: false, + highestPostNumber: 891315, + id: 29190, + imageUrl: "", + lastPostedAt: "", + lastPosterUsername: "", + likeCount: 1207, + liked: "", + pinned: false, + pinnedGlobally: false, + posters: [ + { + description: "Operative user-facing groupware", + extras: "", + primaryGroupId: "", + userId: 958308, + }, ], - }, + postsCount: 524184, + replyCount: 796320, + slug: "", + title: "", + unpinned: "", + unseen: false, + views: 365100, + visible: false, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/listgroupmembersrequest.md b/docs/sdk/models/operations/listgroupmembersrequest.md index 8e00d2d..92a45ec 100644 --- a/docs/sdk/models/operations/listgroupmembersrequest.md +++ b/docs/sdk/models/operations/listgroupmembersrequest.md @@ -6,7 +6,7 @@ import { ListGroupMembersRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListGroupMembersRequest = { - id: "name", + id: "name", }; ``` diff --git a/docs/sdk/models/operations/listgroupmembersresponsebody.md b/docs/sdk/models/operations/listgroupmembersresponsebody.md index 4d1167c..5b4632e 100644 --- a/docs/sdk/models/operations/listgroupmembersresponsebody.md +++ b/docs/sdk/models/operations/listgroupmembersresponsebody.md @@ -8,37 +8,37 @@ success response import { ListGroupMembersResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListGroupMembersResponseBody = { - members: [ - { - addedAt: "", - avatarTemplate: "", - id: 842342, - lastPostedAt: "", - lastSeenAt: "", - name: "", - timezone: "America/Indiana/Indianapolis", - title: "", - username: "Luther.Rau26", - }, - ], - meta: { - limit: 183191, - offset: 397821, - total: 586513, + members: [ + { + addedAt: "", + avatarTemplate: "", + id: 842342, + lastPostedAt: "", + lastSeenAt: "", + name: "", + timezone: "America/Indiana/Indianapolis", + title: "", + username: "Luther.Rau26", }, - owners: [ - { - addedAt: "", - avatarTemplate: "", - id: 552822, - lastPostedAt: "", - lastSeenAt: "", - name: "", - timezone: "Pacific/Honolulu", - title: "", - username: "Casimir.Simonis", - }, - ], + ], + meta: { + limit: 183191, + offset: 397821, + total: 586513, + }, + owners: [ + { + addedAt: "", + avatarTemplate: "", + id: 552822, + lastPostedAt: "", + lastSeenAt: "", + name: "", + timezone: "Pacific/Honolulu", + title: "", + username: "Casimir.Simonis", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/listgroupsextras.md b/docs/sdk/models/operations/listgroupsextras.md index db1ff6d..aff6f5e 100644 --- a/docs/sdk/models/operations/listgroupsextras.md +++ b/docs/sdk/models/operations/listgroupsextras.md @@ -6,7 +6,9 @@ import { ListGroupsExtras } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListGroupsExtras = { - typeFilters: [""], + typeFilters: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/listgroupsresponsebody.md b/docs/sdk/models/operations/listgroupsresponsebody.md index a84331f..b5cacbc 100644 --- a/docs/sdk/models/operations/listgroupsresponsebody.md +++ b/docs/sdk/models/operations/listgroupsresponsebody.md @@ -8,44 +8,46 @@ response import { ListGroupsResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListGroupsResponseBody = { - extras: { - typeFilters: [""], - }, - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 638921, - displayName: "Damien_Toy44", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Angel Wolff II", - grantTrustLevel: "", - hasMessages: false, - id: 767024, - incomingEmail: "", - membersVisibilityLevel: 813798, - membershipRequestTemplate: "", - mentionableLevel: 411820, - messageableLevel: 396506, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 675439, - visibilityLevel: 881104, - }, + extras: { + typeFilters: [ + "", ], - loadMoreGroups: "", - totalRowsGroups: 249796, + }, + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 638921, + displayName: "Damien_Toy44", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Angel Wolff II", + grantTrustLevel: "", + hasMessages: false, + id: 767024, + incomingEmail: "", + membersVisibilityLevel: 813798, + membershipRequestTemplate: "", + mentionableLevel: 411820, + messageableLevel: 396506, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 675439, + visibilityLevel: 881104, + }, + ], + loadMoreGroups: "", + totalRowsGroups: 249796, }; ``` diff --git a/docs/sdk/models/operations/listlatesttopicsrequest.md b/docs/sdk/models/operations/listlatesttopicsrequest.md index 0fe2240..2c5daad 100644 --- a/docs/sdk/models/operations/listlatesttopicsrequest.md +++ b/docs/sdk/models/operations/listlatesttopicsrequest.md @@ -6,8 +6,8 @@ import { ListLatestTopicsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListLatestTopicsRequest = { - apiKey: "", - apiUsername: "", + apiKey: "", + apiUsername: "", }; ``` diff --git a/docs/sdk/models/operations/listpostsrequest.md b/docs/sdk/models/operations/listpostsrequest.md index d23a345..b10bdc7 100644 --- a/docs/sdk/models/operations/listpostsrequest.md +++ b/docs/sdk/models/operations/listpostsrequest.md @@ -6,8 +6,8 @@ import { ListPostsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListPostsRequest = { - apiKey: "", - apiUsername: "", + apiKey: "", + apiUsername: "", }; ``` diff --git a/docs/sdk/models/operations/listtoptopicsrequest.md b/docs/sdk/models/operations/listtoptopicsrequest.md index 15d1f4b..a9834f4 100644 --- a/docs/sdk/models/operations/listtoptopicsrequest.md +++ b/docs/sdk/models/operations/listtoptopicsrequest.md @@ -6,8 +6,8 @@ import { ListTopTopicsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListTopTopicsRequest = { - apiKey: "", - apiUsername: "", + apiKey: "", + apiUsername: "", }; ``` diff --git a/docs/sdk/models/operations/listuseractionsrequest.md b/docs/sdk/models/operations/listuseractionsrequest.md index 0949a78..85e406e 100644 --- a/docs/sdk/models/operations/listuseractionsrequest.md +++ b/docs/sdk/models/operations/listuseractionsrequest.md @@ -6,9 +6,9 @@ import { ListUserActionsRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserActionsRequest = { - filter: "", - offset: 148829, - username: "Viviane_Cole45", + filter: "", + offset: 148829, + username: "Viviane_Cole45", }; ``` diff --git a/docs/sdk/models/operations/listuseractionsresponsebody.md b/docs/sdk/models/operations/listuseractionsresponsebody.md index 003e2f5..c3ae4c3 100644 --- a/docs/sdk/models/operations/listuseractionsresponsebody.md +++ b/docs/sdk/models/operations/listuseractionsresponsebody.md @@ -8,36 +8,36 @@ response import { ListUserActionsResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserActionsResponseBody = { - userActions: [ - { - actingAvatarTemplate: "", - actingName: "", - actingUserId: 604118, - actingUsername: "", - actionCode: "", - actionType: 100032, - archived: false, - avatarTemplate: "", - categoryId: 382808, - closed: false, - createdAt: "", - deleted: false, - excerpt: "", - hidden: "", - name: "", - postId: "", - postNumber: 960257, - postType: "", - slug: "", - targetName: "", - targetUserId: 895386, - targetUsername: "", - title: "", - topicId: 72434, - userId: 967795, - username: "Aileen.Lockman14", - }, - ], + userActions: [ + { + actingAvatarTemplate: "", + actingName: "", + actingUserId: 604118, + actingUsername: "", + actionCode: "", + actionType: 100032, + archived: false, + avatarTemplate: "", + categoryId: 382808, + closed: false, + createdAt: "", + deleted: false, + excerpt: "", + hidden: "", + name: "", + postId: "", + postNumber: 960257, + postType: "", + slug: "", + targetName: "", + targetUserId: 895386, + targetUsername: "", + title: "", + topicId: 72434, + userId: 967795, + username: "Aileen.Lockman14", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/listuserbadgesbadges.md b/docs/sdk/models/operations/listuserbadgesbadges.md index beef5d9..33ff436 100644 --- a/docs/sdk/models/operations/listuserbadgesbadges.md +++ b/docs/sdk/models/operations/listuserbadgesbadges.md @@ -6,21 +6,21 @@ import { ListUserBadgesBadges } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserBadgesBadges = { - allowTitle: false, - badgeGroupingId: 612096, - badgeTypeId: 222321, - description: "Polarised fault-tolerant throughput", - enabled: false, - grantCount: 902599, - icon: "", - id: 681820, - imageUrl: "", - listable: false, - manuallyGrantable: false, - multipleGrant: false, - name: "", - slug: "", - system: false, + allowTitle: false, + badgeGroupingId: 612096, + badgeTypeId: 222321, + description: "Polarised fault-tolerant throughput", + enabled: false, + grantCount: 902599, + icon: "", + id: 681820, + imageUrl: "", + listable: false, + manuallyGrantable: false, + multipleGrant: false, + name: "", + slug: "", + system: false, }; ``` diff --git a/docs/sdk/models/operations/listuserbadgesbadgetypes.md b/docs/sdk/models/operations/listuserbadgesbadgetypes.md index a872450..6fd7730 100644 --- a/docs/sdk/models/operations/listuserbadgesbadgetypes.md +++ b/docs/sdk/models/operations/listuserbadgesbadgetypes.md @@ -6,9 +6,9 @@ import { ListUserBadgesBadgeTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserBadgesBadgeTypes = { - id: 617636, - name: "", - sortOrder: 149675, + id: 617636, + name: "", + sortOrder: 149675, }; ``` diff --git a/docs/sdk/models/operations/listuserbadgesrequest.md b/docs/sdk/models/operations/listuserbadgesrequest.md index 065a835..da1e7ea 100644 --- a/docs/sdk/models/operations/listuserbadgesrequest.md +++ b/docs/sdk/models/operations/listuserbadgesrequest.md @@ -6,7 +6,7 @@ import { ListUserBadgesRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserBadgesRequest = { - username: "Keshaun32", + username: "Keshaun32", }; ``` diff --git a/docs/sdk/models/operations/listuserbadgesresponsebody.md b/docs/sdk/models/operations/listuserbadgesresponsebody.md index 4043b42..af767d0 100644 --- a/docs/sdk/models/operations/listuserbadgesresponsebody.md +++ b/docs/sdk/models/operations/listuserbadgesresponsebody.md @@ -8,17 +8,17 @@ success response import { ListUserBadgesResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserBadgesResponseBody = { - userBadges: [ - { - badgeId: 670638, - canFavorite: false, - grantedAt: "", - grantedById: 170909, - groupingPosition: 210382, - id: 358152, - isFavorite: "", - }, - ], + userBadges: [ + { + badgeId: 670638, + canFavorite: false, + grantedAt: "", + grantedById: 170909, + groupingPosition: 210382, + id: 358152, + isFavorite: "", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/listuserprivatemessagesrequest.md b/docs/sdk/models/operations/listuserprivatemessagesrequest.md index 66db506..d66de95 100644 --- a/docs/sdk/models/operations/listuserprivatemessagesrequest.md +++ b/docs/sdk/models/operations/listuserprivatemessagesrequest.md @@ -6,7 +6,7 @@ import { ListUserPrivateMessagesRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUserPrivateMessagesRequest = { - username: "Isac.Schinner", + username: "Isac.Schinner", }; ``` diff --git a/docs/sdk/models/operations/listuserspublicmeta.md b/docs/sdk/models/operations/listuserspublicmeta.md index 25e52b0..30656cb 100644 --- a/docs/sdk/models/operations/listuserspublicmeta.md +++ b/docs/sdk/models/operations/listuserspublicmeta.md @@ -6,9 +6,9 @@ import { ListUsersPublicMeta } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUsersPublicMeta = { - lastUpdatedAt: "", - loadMoreDirectoryItems: "", - totalRowsDirectoryItems: 750595, + lastUpdatedAt: "", + loadMoreDirectoryItems: "", + totalRowsDirectoryItems: 750595, }; ``` diff --git a/docs/sdk/models/operations/listuserspublicrequest.md b/docs/sdk/models/operations/listuserspublicrequest.md index ba1ca6a..2068ec3 100644 --- a/docs/sdk/models/operations/listuserspublicrequest.md +++ b/docs/sdk/models/operations/listuserspublicrequest.md @@ -6,8 +6,8 @@ import { ListUsersPublicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUsersPublicRequest = { - order: "days_visited", - period: "weekly", + order: "days_visited", + period: "weekly", }; ``` diff --git a/docs/sdk/models/operations/listuserspublicresponsebody.md b/docs/sdk/models/operations/listuserspublicresponsebody.md index 4020c94..5283485 100644 --- a/docs/sdk/models/operations/listuserspublicresponsebody.md +++ b/docs/sdk/models/operations/listuserspublicresponsebody.md @@ -8,30 +8,30 @@ directory items response import { ListUsersPublicResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUsersPublicResponseBody = { - directoryItems: [ - { - daysVisited: 625637, - id: 333507, - likesGiven: 329543, - likesReceived: 924159, - postCount: 967122, - postsRead: 862319, - topicCount: 168576, - topicsEntered: 48690, - user: { - avatarTemplate: "", - id: 901483, - name: "", - title: "", - username: "Deondre_Harris", - }, - }, - ], - meta: { - lastUpdatedAt: "", - loadMoreDirectoryItems: "", - totalRowsDirectoryItems: 104627, + directoryItems: [ + { + daysVisited: 625637, + id: 333507, + likesGiven: 329543, + likesReceived: 924159, + postCount: 967122, + postsRead: 862319, + topicCount: 168576, + topicsEntered: 48690, + user: { + avatarTemplate: "", + id: 901483, + name: "", + title: "", + username: "Deondre_Harris", + }, }, + ], + meta: { + lastUpdatedAt: "", + loadMoreDirectoryItems: "", + totalRowsDirectoryItems: 104627, + }, }; ``` diff --git a/docs/sdk/models/operations/listuserspublicuser.md b/docs/sdk/models/operations/listuserspublicuser.md index b8722b0..d18fb1b 100644 --- a/docs/sdk/models/operations/listuserspublicuser.md +++ b/docs/sdk/models/operations/listuserspublicuser.md @@ -6,11 +6,11 @@ import { ListUsersPublicUser } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ListUsersPublicUser = { - avatarTemplate: "", - id: 406733, - name: "", - title: "", - username: "Kory.Lueilwitz27", + avatarTemplate: "", + id: 406733, + name: "", + title: "", + username: "Kory.Lueilwitz27", }; ``` diff --git a/docs/sdk/models/operations/lockpostrequest.md b/docs/sdk/models/operations/lockpostrequest.md index a653f50..944f499 100644 --- a/docs/sdk/models/operations/lockpostrequest.md +++ b/docs/sdk/models/operations/lockpostrequest.md @@ -6,9 +6,9 @@ import { LockPostRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LockPostRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/lockpostrequestbody.md b/docs/sdk/models/operations/lockpostrequestbody.md index 7bb9eb3..02fc155 100644 --- a/docs/sdk/models/operations/lockpostrequestbody.md +++ b/docs/sdk/models/operations/lockpostrequestbody.md @@ -6,7 +6,7 @@ import { LockPostRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LockPostRequestBody = { - locked: "", + locked: "", }; ``` diff --git a/docs/sdk/models/operations/logoutuserrequest.md b/docs/sdk/models/operations/logoutuserrequest.md index 5d3b8c9..104f758 100644 --- a/docs/sdk/models/operations/logoutuserrequest.md +++ b/docs/sdk/models/operations/logoutuserrequest.md @@ -6,7 +6,7 @@ import { LogOutUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LogOutUserRequest = { - id: 512452, + id: 512452, }; ``` diff --git a/docs/sdk/models/operations/logoutuserresponsebody.md b/docs/sdk/models/operations/logoutuserresponsebody.md index 67db142..f4c8340 100644 --- a/docs/sdk/models/operations/logoutuserresponsebody.md +++ b/docs/sdk/models/operations/logoutuserresponsebody.md @@ -8,7 +8,7 @@ response import { LogOutUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: LogOutUserResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/members.md b/docs/sdk/models/operations/members.md index bcfc0da..c55893d 100644 --- a/docs/sdk/models/operations/members.md +++ b/docs/sdk/models/operations/members.md @@ -6,15 +6,15 @@ import { Members } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Members = { - addedAt: "", - avatarTemplate: "", - id: 566602, - lastPostedAt: "", - lastSeenAt: "", - name: "", - timezone: "Australia/Adelaide", - title: "", - username: "Dimitri_Lang", + addedAt: "", + avatarTemplate: "", + id: 566602, + lastPostedAt: "", + lastSeenAt: "", + name: "", + timezone: "Australia/Adelaide", + title: "", + username: "Dimitri_Lang", }; ``` diff --git a/docs/sdk/models/operations/meta.md b/docs/sdk/models/operations/meta.md index 3cd6699..e7f2cb2 100644 --- a/docs/sdk/models/operations/meta.md +++ b/docs/sdk/models/operations/meta.md @@ -6,9 +6,9 @@ import { Meta } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Meta = { - limit: 93940, - offset: 921158, - total: 575947, + limit: 93940, + offset: 921158, + total: 575947, }; ``` diff --git a/docs/sdk/models/operations/notificationtypes.md b/docs/sdk/models/operations/notificationtypes.md index 824988b..150eb3f 100644 --- a/docs/sdk/models/operations/notificationtypes.md +++ b/docs/sdk/models/operations/notificationtypes.md @@ -6,39 +6,39 @@ import { NotificationTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: NotificationTypes = { - bookmarkReminder: 910994, - chatGroupMention: 247399, - chatInvitation: 878493, - chatMention: 39615, - chatMessage: 434156, - codeReviewCommitApproved: 59944, - custom: 517612, - edited: 61078, - eventInvitation: 474668, - eventReminder: 907733, - grantedBadge: 184362, - groupMentioned: 739884, - groupMessageSummary: 434761, - invitedToPrivateMessage: 898063, - invitedToTopic: 187552, - inviteeAccepted: 672582, - liked: 715208, - likedConsolidated: 528940, - linked: 523006, - membershipRequestAccepted: 304446, - membershipRequestConsolidated: 320565, - mentioned: 997963, - movedPost: 3099, - postApproved: 362189, - posted: 597303, - privateMessage: 470649, - quoted: 649078, - reaction: 378245, - replied: 5189, - topicReminder: 979527, - votesReleased: 970222, - watchingCategoryOrTag: 174658, - watchingFirstPost: 663866, + bookmarkReminder: 910994, + chatGroupMention: 247399, + chatInvitation: 878493, + chatMention: 39615, + chatMessage: 434156, + codeReviewCommitApproved: 59944, + custom: 517612, + edited: 61078, + eventInvitation: 474668, + eventReminder: 907733, + grantedBadge: 184362, + groupMentioned: 739884, + groupMessageSummary: 434761, + invitedToPrivateMessage: 898063, + invitedToTopic: 187552, + inviteeAccepted: 672582, + liked: 715208, + likedConsolidated: 528940, + linked: 523006, + membershipRequestAccepted: 304446, + membershipRequestConsolidated: 320565, + mentioned: 997963, + movedPost: 3099, + postApproved: 362189, + posted: 597303, + privateMessage: 470649, + quoted: 649078, + reaction: 378245, + replied: 5189, + topicReminder: 979527, + votesReleased: 970222, + watchingCategoryOrTag: 174658, + watchingFirstPost: 663866, }; ``` diff --git a/docs/sdk/models/operations/owners.md b/docs/sdk/models/operations/owners.md index 4d859b7..95655c4 100644 --- a/docs/sdk/models/operations/owners.md +++ b/docs/sdk/models/operations/owners.md @@ -6,15 +6,15 @@ import { Owners } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Owners = { - addedAt: "", - avatarTemplate: "", - id: 83112, - lastPostedAt: "", - lastSeenAt: "", - name: "", - timezone: "Asia/Magadan", - title: "", - username: "Drew66", + addedAt: "", + avatarTemplate: "", + id: 83112, + lastPostedAt: "", + lastSeenAt: "", + name: "", + timezone: "Asia/Magadan", + title: "", + username: "Drew66", }; ``` diff --git a/docs/sdk/models/operations/participants.md b/docs/sdk/models/operations/participants.md index de2f03c..e624f38 100644 --- a/docs/sdk/models/operations/participants.md +++ b/docs/sdk/models/operations/participants.md @@ -6,19 +6,19 @@ import { Participants } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Participants = { - admin: false, - avatarTemplate: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - id: 455898, - moderator: false, - name: "", - postCount: 501063, - primaryGroupName: "", - trustLevel: 642352, - username: "Garry_Funk", + admin: false, + avatarTemplate: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + id: 455898, + moderator: false, + name: "", + postCount: 501063, + primaryGroupName: "", + trustLevel: 642352, + username: "Garry_Funk", }; ``` diff --git a/docs/sdk/models/operations/penaltycounts.md b/docs/sdk/models/operations/penaltycounts.md index 7457ecc..696a9d0 100644 --- a/docs/sdk/models/operations/penaltycounts.md +++ b/docs/sdk/models/operations/penaltycounts.md @@ -6,8 +6,8 @@ import { PenaltyCounts } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PenaltyCounts = { - silenced: 618016, - suspended: 749170, + silenced: 618016, + suspended: 749170, }; ``` diff --git a/docs/sdk/models/operations/performpostactionrequest.md b/docs/sdk/models/operations/performpostactionrequest.md index 6e6d2f1..dbe7ce5 100644 --- a/docs/sdk/models/operations/performpostactionrequest.md +++ b/docs/sdk/models/operations/performpostactionrequest.md @@ -6,8 +6,8 @@ import { PerformPostActionRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PerformPostActionRequest = { - apiKey: "", - apiUsername: "", + apiKey: "", + apiUsername: "", }; ``` diff --git a/docs/sdk/models/operations/performpostactionrequestbody.md b/docs/sdk/models/operations/performpostactionrequestbody.md index b351b9d..8d02e89 100644 --- a/docs/sdk/models/operations/performpostactionrequestbody.md +++ b/docs/sdk/models/operations/performpostactionrequestbody.md @@ -6,8 +6,8 @@ import { PerformPostActionRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PerformPostActionRequestBody = { - id: 811939, - postActionTypeId: 25756, + id: 811939, + postActionTypeId: 25756, }; ``` diff --git a/docs/sdk/models/operations/permissions.md b/docs/sdk/models/operations/permissions.md index 7f3ee62..5edaf30 100644 --- a/docs/sdk/models/operations/permissions.md +++ b/docs/sdk/models/operations/permissions.md @@ -6,7 +6,7 @@ import { Permissions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Permissions = { - everyone: 1, + everyone: 1, }; ``` diff --git a/docs/sdk/models/operations/post.md b/docs/sdk/models/operations/post.md index f17b767..cb1a41a 100644 --- a/docs/sdk/models/operations/post.md +++ b/docs/sdk/models/operations/post.md @@ -6,7 +6,7 @@ import { Post } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Post = { - raw: "", + raw: "", }; ``` diff --git a/docs/sdk/models/operations/postactiontypes.md b/docs/sdk/models/operations/postactiontypes.md index fb295c9..8441303 100644 --- a/docs/sdk/models/operations/postactiontypes.md +++ b/docs/sdk/models/operations/postactiontypes.md @@ -6,13 +6,13 @@ import { PostActionTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostActionTypes = { - description: "Function-based discrete neural-net", - id: 200364, - isCustomFlag: false, - isFlag: false, - name: "", - nameKey: "", - shortDescription: "", + description: "Function-based discrete neural-net", + id: 200364, + isCustomFlag: false, + isFlag: false, + name: "", + nameKey: "", + shortDescription: "", }; ``` diff --git a/docs/sdk/models/operations/posters.md b/docs/sdk/models/operations/posters.md index 63ab995..148971a 100644 --- a/docs/sdk/models/operations/posters.md +++ b/docs/sdk/models/operations/posters.md @@ -6,14 +6,14 @@ import { Posters } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Posters = { - description: "Operative composite product", - extras: "", - user: { - avatarTemplate: "", - id: 166047, - name: "", - username: "Neal.Walker48", - }, + description: "Operative composite product", + extras: "", + user: { + avatarTemplate: "", + id: 166047, + name: "", + username: "Neal.Walker48", + }, }; ``` diff --git a/docs/sdk/models/operations/postrepliesactionssummary.md b/docs/sdk/models/operations/postrepliesactionssummary.md index 0ff3508..46b00e5 100644 --- a/docs/sdk/models/operations/postrepliesactionssummary.md +++ b/docs/sdk/models/operations/postrepliesactionssummary.md @@ -6,8 +6,8 @@ import { PostRepliesActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostRepliesActionsSummary = { - canAct: false, - id: 479385, + canAct: false, + id: 479385, }; ``` diff --git a/docs/sdk/models/operations/postrepliesrequest.md b/docs/sdk/models/operations/postrepliesrequest.md index 2bc9dd8..0600439 100644 --- a/docs/sdk/models/operations/postrepliesrequest.md +++ b/docs/sdk/models/operations/postrepliesrequest.md @@ -6,7 +6,7 @@ import { PostRepliesRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostRepliesRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/postrepliesresponsebody.md b/docs/sdk/models/operations/postrepliesresponsebody.md index 8f9aca7..b16232e 100644 --- a/docs/sdk/models/operations/postrepliesresponsebody.md +++ b/docs/sdk/models/operations/postrepliesresponsebody.md @@ -6,63 +6,63 @@ import { PostRepliesResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostRepliesResponseBody = { - actionsSummary: [ - { - canAct: false, - id: 517137, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canSeeHiddenPost: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - displayUsername: "", - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 292888, - incomingLinkCount: 755106, - moderator: false, - name: "", - postNumber: 715053, - postType: 32273, - primaryGroupName: "", - quoteCount: 418109, - readersCount: 456688, - reads: 172951, - replyCount: 824798, - replyToPostNumber: 107210, - replyToUser: { - avatarTemplate: "", - username: "Marcella.Schumm", + actionsSummary: [ + { + canAct: false, + id: 517137, }, - reviewableId: "", - reviewableScoreCount: 588812, - reviewableScorePendingCount: 882284, - score: 896480, - staff: false, - topicId: 733289, - topicSlug: "", - trustLevel: 575078, - updatedAt: "", - userDeleted: false, - userId: 409726, - userTitle: "", - username: "Hellen_Hintz35", - version: 889060, - wiki: false, - yours: false, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canSeeHiddenPost: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + displayUsername: "", + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 292888, + incomingLinkCount: 755106, + moderator: false, + name: "", + postNumber: 715053, + postType: 32273, + primaryGroupName: "", + quoteCount: 418109, + readersCount: 456688, + reads: 172951, + replyCount: 824798, + replyToPostNumber: 107210, + replyToUser: { + avatarTemplate: "", + username: "Marcella.Schumm", + }, + reviewableId: "", + reviewableScoreCount: 588812, + reviewableScorePendingCount: 882284, + score: 896480, + staff: false, + topicId: 733289, + topicSlug: "", + trustLevel: 575078, + updatedAt: "", + userDeleted: false, + userId: 409726, + userTitle: "", + username: "Hellen_Hintz35", + version: 889060, + wiki: false, + yours: false, }; ``` diff --git a/docs/sdk/models/operations/posts.md b/docs/sdk/models/operations/posts.md index 960deda..7d9d0b1 100644 --- a/docs/sdk/models/operations/posts.md +++ b/docs/sdk/models/operations/posts.md @@ -6,68 +6,68 @@ import { Posts } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Posts = { - actionsSummary: [ - { - canAct: false, - id: 608989, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - displayUsername: "", - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 178580, - incomingLinkCount: 579011, - linkCounts: [ - { - clicks: 612867, - internal: false, - reflection: false, - title: "", - url: "http://bogus-prefix.org", - }, - ], - moderator: false, - name: "", - postNumber: 976802, - postType: 719620, - primaryGroupName: "", - quoteCount: 608593, - read: false, - readersCount: 966390, - reads: 328379, - replyCount: 507636, - replyToPostNumber: "", - reviewableId: 802692, - reviewableScoreCount: 300403, - reviewableScorePendingCount: 836364, - score: 549501, - staff: false, - topicId: 415280, - topicSlug: "", - trustLevel: 930819, - updatedAt: "", - userDeleted: false, - userId: 415608, - userTitle: "", - username: "Jovan72", - version: 877399, - wiki: false, - yours: false, + actionsSummary: [ + { + canAct: false, + id: 608989, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + displayUsername: "", + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 178580, + incomingLinkCount: 579011, + linkCounts: [ + { + clicks: 612867, + internal: false, + reflection: false, + title: "", + url: "http://bogus-prefix.org", + }, + ], + moderator: false, + name: "", + postNumber: 976802, + postType: 719620, + primaryGroupName: "", + quoteCount: 608593, + read: false, + readersCount: 966390, + reads: 328379, + replyCount: 507636, + replyToPostNumber: "", + reviewableId: 802692, + reviewableScoreCount: 300403, + reviewableScorePendingCount: 836364, + score: 549501, + staff: false, + topicId: 415280, + topicSlug: "", + trustLevel: 930819, + updatedAt: "", + userDeleted: false, + userId: 415608, + userTitle: "", + username: "Jovan72", + version: 877399, + wiki: false, + yours: false, }; ``` diff --git a/docs/sdk/models/operations/poststream.md b/docs/sdk/models/operations/poststream.md index a42ea14..7646acf 100644 --- a/docs/sdk/models/operations/poststream.md +++ b/docs/sdk/models/operations/poststream.md @@ -6,73 +6,75 @@ import { PostStream } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostStream = { - posts: [ + posts: [ + { + actionsSummary: [ { - actionsSummary: [ - { - canAct: false, - id: 32901, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - displayUsername: "", - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 371919, - incomingLinkCount: 425946, - linkCounts: [ - { - clicks: 1383, - internal: false, - reflection: false, - title: "", - url: "http://evil-wheat.biz", - }, - ], - moderator: false, - name: "", - postNumber: 575213, - postType: 858778, - primaryGroupName: "", - quoteCount: 643678, - read: false, - readersCount: 458503, - reads: 364463, - replyCount: 444587, - replyToPostNumber: "", - reviewableId: 667715, - reviewableScoreCount: 336102, - reviewableScorePendingCount: 571844, - score: 880679, - staff: false, - topicId: 774684, - topicSlug: "", - trustLevel: 945027, - updatedAt: "", - userDeleted: false, - userId: 900103, - userTitle: "", - username: "Zachariah_Jakubowski", - version: 966148, - wiki: false, - yours: false, + canAct: false, + id: 32901, }, - ], - stream: [""], + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + displayUsername: "", + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 371919, + incomingLinkCount: 425946, + linkCounts: [ + { + clicks: 1383, + internal: false, + reflection: false, + title: "", + url: "http://evil-wheat.biz", + }, + ], + moderator: false, + name: "", + postNumber: 575213, + postType: 858778, + primaryGroupName: "", + quoteCount: 643678, + read: false, + readersCount: 458503, + reads: 364463, + replyCount: 444587, + replyToPostNumber: "", + reviewableId: 667715, + reviewableScoreCount: 336102, + reviewableScorePendingCount: 571844, + score: 880679, + staff: false, + topicId: 774684, + topicSlug: "", + trustLevel: 945027, + updatedAt: "", + userDeleted: false, + userId: 900103, + userTitle: "", + username: "Zachariah_Jakubowski", + version: 966148, + wiki: false, + yours: false, + }, + ], + stream: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/posttypes.md b/docs/sdk/models/operations/posttypes.md index 5ae3168..9ab44f5 100644 --- a/docs/sdk/models/operations/posttypes.md +++ b/docs/sdk/models/operations/posttypes.md @@ -6,10 +6,10 @@ import { PostTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: PostTypes = { - moderatorAction: 63207, - regular: 925703, - smallAction: 607249, - whisper: 309251, + moderatorAction: 63207, + regular: 925703, + smallAction: 607249, + whisper: 309251, }; ``` diff --git a/docs/sdk/models/operations/refreshgravatarrequest.md b/docs/sdk/models/operations/refreshgravatarrequest.md index f02142b..502f348 100644 --- a/docs/sdk/models/operations/refreshgravatarrequest.md +++ b/docs/sdk/models/operations/refreshgravatarrequest.md @@ -6,7 +6,7 @@ import { RefreshGravatarRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RefreshGravatarRequest = { - username: "Faustino.Langosh68", + username: "Faustino.Langosh68", }; ``` diff --git a/docs/sdk/models/operations/refreshgravatarresponsebody.md b/docs/sdk/models/operations/refreshgravatarresponsebody.md index 32144f7..aacd596 100644 --- a/docs/sdk/models/operations/refreshgravatarresponsebody.md +++ b/docs/sdk/models/operations/refreshgravatarresponsebody.md @@ -8,8 +8,8 @@ response import { RefreshGravatarResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RefreshGravatarResponseBody = { - gravatarAvatarTemplate: "", - gravatarUploadId: 530089, + gravatarAvatarTemplate: "", + gravatarUploadId: 530089, }; ``` diff --git a/docs/sdk/models/operations/removegroupmembersrequest.md b/docs/sdk/models/operations/removegroupmembersrequest.md index b2f289f..f5aee1f 100644 --- a/docs/sdk/models/operations/removegroupmembersrequest.md +++ b/docs/sdk/models/operations/removegroupmembersrequest.md @@ -6,10 +6,10 @@ import { RemoveGroupMembersRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RemoveGroupMembersRequest = { - requestBody: { - usernames: "username1,username2", - }, - id: 581273, + requestBody: { + usernames: "username1,username2", + }, + id: 581273, }; ``` diff --git a/docs/sdk/models/operations/removegroupmembersrequestbody.md b/docs/sdk/models/operations/removegroupmembersrequestbody.md index 0d56619..1dbe4d6 100644 --- a/docs/sdk/models/operations/removegroupmembersrequestbody.md +++ b/docs/sdk/models/operations/removegroupmembersrequestbody.md @@ -6,7 +6,7 @@ import { RemoveGroupMembersRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RemoveGroupMembersRequestBody = { - usernames: "username1,username2", + usernames: "username1,username2", }; ``` diff --git a/docs/sdk/models/operations/removegroupmembersresponsebody.md b/docs/sdk/models/operations/removegroupmembersresponsebody.md index aa03405..611581e 100644 --- a/docs/sdk/models/operations/removegroupmembersresponsebody.md +++ b/docs/sdk/models/operations/removegroupmembersresponsebody.md @@ -8,9 +8,13 @@ success response import { RemoveGroupMembersResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RemoveGroupMembersResponseBody = { - skippedUsernames: [""], - success: "", - usernames: [""], + skippedUsernames: [ + "", + ], + success: "", + usernames: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/removetopicrequest.md b/docs/sdk/models/operations/removetopicrequest.md index 2bf3365..f9b6979 100644 --- a/docs/sdk/models/operations/removetopicrequest.md +++ b/docs/sdk/models/operations/removetopicrequest.md @@ -6,9 +6,9 @@ import { RemoveTopicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RemoveTopicRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/replytouser.md b/docs/sdk/models/operations/replytouser.md index 84a46c8..d0f6867 100644 --- a/docs/sdk/models/operations/replytouser.md +++ b/docs/sdk/models/operations/replytouser.md @@ -6,8 +6,8 @@ import { ReplyToUser } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ReplyToUser = { - avatarTemplate: "", - username: "Anastacio4", + avatarTemplate: "", + username: "Anastacio4", }; ``` diff --git a/docs/sdk/models/operations/requiredtaggroups.md b/docs/sdk/models/operations/requiredtaggroups.md index a8a1131..80ca51d 100644 --- a/docs/sdk/models/operations/requiredtaggroups.md +++ b/docs/sdk/models/operations/requiredtaggroups.md @@ -6,8 +6,8 @@ import { RequiredTagGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: RequiredTagGroups = { - minCount: 440666, - name: "", + minCount: 440666, + name: "", }; ``` diff --git a/docs/sdk/models/operations/responsebody.md b/docs/sdk/models/operations/responsebody.md index b1f63e5..5ee9d78 100644 --- a/docs/sdk/models/operations/responsebody.md +++ b/docs/sdk/models/operations/responsebody.md @@ -6,9 +6,9 @@ import { ResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: ResponseBody = { - filename: "your_file_here", - lastModified: "", - size: 548814, + filename: "your_file_here", + lastModified: "", + size: 548814, }; ``` diff --git a/docs/sdk/models/operations/searchrequest.md b/docs/sdk/models/operations/searchrequest.md index 8cce783..7908176 100644 --- a/docs/sdk/models/operations/searchrequest.md +++ b/docs/sdk/models/operations/searchrequest.md @@ -6,8 +6,8 @@ import { SearchRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SearchRequest = { - page: 1, - q: "api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic", + page: 1, + q: "api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic", }; ``` diff --git a/docs/sdk/models/operations/searchresponsebody.md b/docs/sdk/models/operations/searchresponsebody.md index 58cdf41..7efcd03 100644 --- a/docs/sdk/models/operations/searchresponsebody.md +++ b/docs/sdk/models/operations/searchresponsebody.md @@ -8,26 +8,46 @@ success response import { SearchResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SearchResponseBody = { - categories: [""], - groupedSearchResult: { - canCreateTopic: false, - categoryIds: [""], - error: "", - groupIds: [""], - moreCategories: "", - moreFullPageResults: "", - morePosts: "", - moreUsers: "", - postIds: [""], - searchLogId: 298264, - tagIds: [""], - term: "", - userIds: [""], - }, - groups: [""], - posts: [""], - tags: [""], - users: [""], + categories: [ + "", + ], + groupedSearchResult: { + canCreateTopic: false, + categoryIds: [ + "", + ], + error: "", + groupIds: [ + "", + ], + moreCategories: "", + moreFullPageResults: "", + morePosts: "", + moreUsers: "", + postIds: [ + "", + ], + searchLogId: 298264, + tagIds: [ + "", + ], + term: "", + userIds: [ + "", + ], + }, + groups: [ + "", + ], + posts: [ + "", + ], + tags: [ + "", + ], + users: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/senddownloadbackupemailrequest.md b/docs/sdk/models/operations/senddownloadbackupemailrequest.md index 9199a5a..f2cf3bd 100644 --- a/docs/sdk/models/operations/senddownloadbackupemailrequest.md +++ b/docs/sdk/models/operations/senddownloadbackupemailrequest.md @@ -6,7 +6,7 @@ import { SendDownloadBackupEmailRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SendDownloadBackupEmailRequest = { - filename: "your_file_here", + filename: "your_file_here", }; ``` diff --git a/docs/sdk/models/operations/sendpasswordresetemailrequestbody.md b/docs/sdk/models/operations/sendpasswordresetemailrequestbody.md index 5bd1625..ca6db72 100644 --- a/docs/sdk/models/operations/sendpasswordresetemailrequestbody.md +++ b/docs/sdk/models/operations/sendpasswordresetemailrequestbody.md @@ -6,7 +6,7 @@ import { SendPasswordResetEmailRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SendPasswordResetEmailRequestBody = { - login: "Lilyan_Welch20", + login: "Lilyan_Welch20", }; ``` diff --git a/docs/sdk/models/operations/sendpasswordresetemailresponsebody.md b/docs/sdk/models/operations/sendpasswordresetemailresponsebody.md index 851a998..e1abc70 100644 --- a/docs/sdk/models/operations/sendpasswordresetemailresponsebody.md +++ b/docs/sdk/models/operations/sendpasswordresetemailresponsebody.md @@ -8,8 +8,8 @@ success response import { SendPasswordResetEmailResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SendPasswordResetEmailResponseBody = { - success: "", - userFound: false, + success: "", + userFound: false, }; ``` diff --git a/docs/sdk/models/operations/setnotificationlevelrequest.md b/docs/sdk/models/operations/setnotificationlevelrequest.md index f879093..fc0fad5 100644 --- a/docs/sdk/models/operations/setnotificationlevelrequest.md +++ b/docs/sdk/models/operations/setnotificationlevelrequest.md @@ -6,9 +6,9 @@ import { SetNotificationLevelRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SetNotificationLevelRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/setnotificationlevelrequestbody.md b/docs/sdk/models/operations/setnotificationlevelrequestbody.md index 89ea56f..ec40eb8 100644 --- a/docs/sdk/models/operations/setnotificationlevelrequestbody.md +++ b/docs/sdk/models/operations/setnotificationlevelrequestbody.md @@ -6,7 +6,7 @@ import { SetNotificationLevelRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SetNotificationLevelRequestBody = { - notificationLevel: "2", + notificationLevel: "2", }; ``` diff --git a/docs/sdk/models/operations/setnotificationlevelresponsebody.md b/docs/sdk/models/operations/setnotificationlevelresponsebody.md index 8f8cf49..eac607a 100644 --- a/docs/sdk/models/operations/setnotificationlevelresponsebody.md +++ b/docs/sdk/models/operations/setnotificationlevelresponsebody.md @@ -8,7 +8,7 @@ topic updated import { SetNotificationLevelResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SetNotificationLevelResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/silence.md b/docs/sdk/models/operations/silence.md index 7642ce8..ebeb097 100644 --- a/docs/sdk/models/operations/silence.md +++ b/docs/sdk/models/operations/silence.md @@ -6,16 +6,16 @@ import { Silence } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Silence = { - silenceReason: "", - silenced: false, - silencedAt: "", - silencedBy: { - avatarTemplate: "", - id: 272683, - name: "", - username: "Karina85", - }, - silencedTill: "", + silenceReason: "", + silenced: false, + silencedAt: "", + silencedBy: { + avatarTemplate: "", + id: 272683, + name: "", + username: "Karina85", + }, + silencedTill: "", }; ``` diff --git a/docs/sdk/models/operations/silencedby.md b/docs/sdk/models/operations/silencedby.md index 3ca73bd..161044c 100644 --- a/docs/sdk/models/operations/silencedby.md +++ b/docs/sdk/models/operations/silencedby.md @@ -6,10 +6,10 @@ import { SilencedBy } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SilencedBy = { - avatarTemplate: "", - id: 341698, - name: "", - username: "Lucas_Padberg", + avatarTemplate: "", + id: 341698, + name: "", + username: "Lucas_Padberg", }; ``` diff --git a/docs/sdk/models/operations/silenceuserrequest.md b/docs/sdk/models/operations/silenceuserrequest.md index e2b1462..a988eca 100644 --- a/docs/sdk/models/operations/silenceuserrequest.md +++ b/docs/sdk/models/operations/silenceuserrequest.md @@ -6,11 +6,11 @@ import { SilenceUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SilenceUserRequest = { - requestBody: { - postAction: "delete", - silencedTill: "2022-06-01T08:00:00.000Z", - }, - id: 677115, + requestBody: { + postAction: "delete", + silencedTill: "2022-06-01T08:00:00.000Z", + }, + id: 677115, }; ``` diff --git a/docs/sdk/models/operations/silenceuserrequestbody.md b/docs/sdk/models/operations/silenceuserrequestbody.md index b8d414a..c038dcb 100644 --- a/docs/sdk/models/operations/silenceuserrequestbody.md +++ b/docs/sdk/models/operations/silenceuserrequestbody.md @@ -6,8 +6,8 @@ import { SilenceUserRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SilenceUserRequestBody = { - postAction: "delete", - silencedTill: "2022-06-01T08:00:00.000Z", + postAction: "delete", + silencedTill: "2022-06-01T08:00:00.000Z", }; ``` diff --git a/docs/sdk/models/operations/silenceuserresponsebody.md b/docs/sdk/models/operations/silenceuserresponsebody.md index 86c29ba..0733495 100644 --- a/docs/sdk/models/operations/silenceuserresponsebody.md +++ b/docs/sdk/models/operations/silenceuserresponsebody.md @@ -8,18 +8,18 @@ response import { SilenceUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SilenceUserResponseBody = { - silence: { - silenceReason: "", - silenced: false, - silencedAt: "", - silencedBy: { - avatarTemplate: "", - id: 30235, - name: "", - username: "Lorine0", - }, - silencedTill: "", + silence: { + silenceReason: "", + silenced: false, + silencedAt: "", + silencedBy: { + avatarTemplate: "", + id: 30235, + name: "", + username: "Lorine0", }, + silencedTill: "", + }, }; ``` diff --git a/docs/sdk/models/operations/suggestedtopics.md b/docs/sdk/models/operations/suggestedtopics.md index 2e78a70..c5c915b 100644 --- a/docs/sdk/models/operations/suggestedtopics.md +++ b/docs/sdk/models/operations/suggestedtopics.md @@ -6,46 +6,48 @@ import { SuggestedTopics } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SuggestedTopics = { - archetype: "", - archived: false, - bookmarked: "", - bumped: false, - bumpedAt: "", - categoryId: 453094, - closed: false, - createdAt: "", - excerpt: "", - fancyTitle: "", - featuredLink: "", - highestPostNumber: 194023, - id: 493958, - imageUrl: "", - lastPostedAt: "", - likeCount: 205566, - liked: "", - pinned: false, - posters: [ - { - description: "Robust interactive software", - extras: "", - user: { - avatarTemplate: "", - id: 437814, - name: "", - username: "Brock.Wolf", - }, - }, - ], - postsCount: 842855, - replyCount: 78969, - slug: "", - tags: [""], - tagsDescriptions: {}, - title: "", - unpinned: "", - unseen: false, - views: 818034, - visible: false, + archetype: "", + archived: false, + bookmarked: "", + bumped: false, + bumpedAt: "", + categoryId: 453094, + closed: false, + createdAt: "", + excerpt: "", + fancyTitle: "", + featuredLink: "", + highestPostNumber: 194023, + id: 493958, + imageUrl: "", + lastPostedAt: "", + likeCount: 205566, + liked: "", + pinned: false, + posters: [ + { + description: "Robust interactive software", + extras: "", + user: { + avatarTemplate: "", + id: 437814, + name: "", + username: "Brock.Wolf", + }, + }, + ], + postsCount: 842855, + replyCount: 78969, + slug: "", + tags: [ + "", + ], + tagsDescriptions: {}, + title: "", + unpinned: "", + unseen: false, + views: 818034, + visible: false, }; ``` diff --git a/docs/sdk/models/operations/suspendedby.md b/docs/sdk/models/operations/suspendedby.md index 46c93f6..b30d42e 100644 --- a/docs/sdk/models/operations/suspendedby.md +++ b/docs/sdk/models/operations/suspendedby.md @@ -6,10 +6,10 @@ import { SuspendedBy } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SuspendedBy = { - avatarTemplate: "", - id: 372679, - name: "", - username: "Alberto_Lehner", + avatarTemplate: "", + id: 372679, + name: "", + username: "Alberto_Lehner", }; ``` diff --git a/docs/sdk/models/operations/suspenduserrequest.md b/docs/sdk/models/operations/suspenduserrequest.md index 9e1c74d..8558b06 100644 --- a/docs/sdk/models/operations/suspenduserrequest.md +++ b/docs/sdk/models/operations/suspenduserrequest.md @@ -6,12 +6,12 @@ import { SuspendUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SuspendUserRequest = { - requestBody: { - postAction: "delete", - reason: "", - suspendUntil: "2121-02-22", - }, - id: 460220, + requestBody: { + postAction: "delete", + reason: "", + suspendUntil: "2121-02-22", + }, + id: 460220, }; ``` diff --git a/docs/sdk/models/operations/suspenduserrequestbody.md b/docs/sdk/models/operations/suspenduserrequestbody.md index 67524ab..174f441 100644 --- a/docs/sdk/models/operations/suspenduserrequestbody.md +++ b/docs/sdk/models/operations/suspenduserrequestbody.md @@ -6,9 +6,9 @@ import { SuspendUserRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SuspendUserRequestBody = { - postAction: "delete", - reason: "", - suspendUntil: "2121-02-22", + postAction: "delete", + reason: "", + suspendUntil: "2121-02-22", }; ``` diff --git a/docs/sdk/models/operations/suspenduserresponsebody.md b/docs/sdk/models/operations/suspenduserresponsebody.md index 1f6ba4f..be659fe 100644 --- a/docs/sdk/models/operations/suspenduserresponsebody.md +++ b/docs/sdk/models/operations/suspenduserresponsebody.md @@ -8,18 +8,18 @@ response import { SuspendUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: SuspendUserResponseBody = { - suspension: { - fullSuspendReason: "", - suspendReason: "", - suspendedAt: "", - suspendedBy: { - avatarTemplate: "", - id: 24313, - name: "", - username: "Herminia_Heathcote0", - }, - suspendedTill: "", + suspension: { + fullSuspendReason: "", + suspendReason: "", + suspendedAt: "", + suspendedBy: { + avatarTemplate: "", + id: 24313, + name: "", + username: "Herminia_Heathcote0", }, + suspendedTill: "", + }, }; ``` diff --git a/docs/sdk/models/operations/suspension.md b/docs/sdk/models/operations/suspension.md index f537b4e..f55785c 100644 --- a/docs/sdk/models/operations/suspension.md +++ b/docs/sdk/models/operations/suspension.md @@ -6,16 +6,16 @@ import { Suspension } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Suspension = { - fullSuspendReason: "", - suspendReason: "", - suspendedAt: "", - suspendedBy: { - avatarTemplate: "", - id: 361151, - name: "", - username: "Asia.Kuvalis", - }, - suspendedTill: "", + fullSuspendReason: "", + suspendReason: "", + suspendedAt: "", + suspendedBy: { + avatarTemplate: "", + id: 361151, + name: "", + username: "Asia.Kuvalis", + }, + suspendedTill: "", }; ``` diff --git a/docs/sdk/models/operations/taggroup.md b/docs/sdk/models/operations/taggroup.md index d7f00ef..d03e1b7 100644 --- a/docs/sdk/models/operations/taggroup.md +++ b/docs/sdk/models/operations/taggroup.md @@ -6,12 +6,16 @@ import { TagGroup } from "@lukehagar/discoursejs/sdk/models/operations"; let value: TagGroup = { - id: 914971, - name: "", - onePerTopic: false, - parentTagName: [""], - permissions: {}, - tagNames: [""], + id: 914971, + name: "", + onePerTopic: false, + parentTagName: [ + "", + ], + permissions: {}, + tagNames: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/tl3requirements.md b/docs/sdk/models/operations/tl3requirements.md index 6c9f7d9..a12dbca 100644 --- a/docs/sdk/models/operations/tl3requirements.md +++ b/docs/sdk/models/operations/tl3requirements.md @@ -6,40 +6,40 @@ import { Tl3Requirements } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Tl3Requirements = { - daysVisited: 102863, - maxFlaggedByUsers: 298282, - maxFlaggedPosts: 92373, - minDaysVisited: 569965, - minLikesGiven: 354047, - minLikesReceived: 590873, - minLikesReceivedDays: 551816, - minLikesReceivedUsers: 574325, - minPostsRead: 33625, - minPostsReadAllTime: 653201, - minTopicsRepliedTo: 968962, - minTopicsViewed: 652103, - minTopicsViewedAllTime: 320997, - numFlaggedByUsers: 431418, - numFlaggedPosts: 221262, - numLikesGiven: 896547, - numLikesReceived: 141264, - numLikesReceivedDays: 367562, - numLikesReceivedUsers: 97260, - numTopicsRepliedTo: 435865, - onGracePeriod: false, - penaltyCounts: { - silenced: 984043, - suspended: 891924, - total: 260341, - }, - postsRead: 806194, - postsReadAllTime: 537023, - requirementsLost: false, - requirementsMet: false, - timePeriod: 703889, - topicsViewed: 447926, - topicsViewedAllTime: 100226, - trustLevelLocked: false, + daysVisited: 102863, + maxFlaggedByUsers: 298282, + maxFlaggedPosts: 92373, + minDaysVisited: 569965, + minLikesGiven: 354047, + minLikesReceived: 590873, + minLikesReceivedDays: 551816, + minLikesReceivedUsers: 574325, + minPostsRead: 33625, + minPostsReadAllTime: 653201, + minTopicsRepliedTo: 968962, + minTopicsViewed: 652103, + minTopicsViewedAllTime: 320997, + numFlaggedByUsers: 431418, + numFlaggedPosts: 221262, + numLikesGiven: 896547, + numLikesReceived: 141264, + numLikesReceivedDays: 367562, + numLikesReceivedUsers: 97260, + numTopicsRepliedTo: 435865, + onGracePeriod: false, + penaltyCounts: { + silenced: 984043, + suspended: 891924, + total: 260341, + }, + postsRead: 806194, + postsReadAllTime: 537023, + requirementsLost: false, + requirementsMet: false, + timePeriod: 703889, + topicsViewed: 447926, + topicsViewedAllTime: 100226, + trustLevelLocked: false, }; ``` diff --git a/docs/sdk/models/operations/topicflagtypes.md b/docs/sdk/models/operations/topicflagtypes.md index f1eb348..ce4ec44 100644 --- a/docs/sdk/models/operations/topicflagtypes.md +++ b/docs/sdk/models/operations/topicflagtypes.md @@ -6,13 +6,13 @@ import { TopicFlagTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: TopicFlagTypes = { - description: "Multi-layered foreground emulation", - id: 633062, - isCustomFlag: false, - isFlag: false, - name: "", - nameKey: "", - shortDescription: "", + description: "Multi-layered foreground emulation", + id: 633062, + isCustomFlag: false, + isFlag: false, + name: "", + nameKey: "", + shortDescription: "", }; ``` diff --git a/docs/sdk/models/operations/topiclist.md b/docs/sdk/models/operations/topiclist.md index ceb3e24..ad1e07f 100644 --- a/docs/sdk/models/operations/topiclist.md +++ b/docs/sdk/models/operations/topiclist.md @@ -6,49 +6,49 @@ import { TopicList } from "@lukehagar/discoursejs/sdk/models/operations"; let value: TopicList = { - canCreateTopic: false, - perPage: 281153, - topics: [ + canCreateTopic: false, + perPage: 281153, + topics: [ + { + archetype: "", + archived: false, + bookmarked: "", + bumped: false, + bumpedAt: "", + categoryId: 321043, + closed: false, + createdAt: "", + excerpt: "", + fancyTitle: "", + featuredLink: "", + hasSummary: false, + highestPostNumber: 713927, + id: 29950, + imageUrl: "", + lastPostedAt: "", + lastPosterUsername: "", + likeCount: 561577, + liked: "", + pinned: false, + pinnedGlobally: false, + posters: [ { - archetype: "", - archived: false, - bookmarked: "", - bumped: false, - bumpedAt: "", - categoryId: 321043, - closed: false, - createdAt: "", - excerpt: "", - fancyTitle: "", - featuredLink: "", - hasSummary: false, - highestPostNumber: 713927, - id: 29950, - imageUrl: "", - lastPostedAt: "", - lastPosterUsername: "", - likeCount: 561577, - liked: "", - pinned: false, - pinnedGlobally: false, - posters: [ - { - description: "Re-engineered foreground array", - extras: "", - primaryGroupId: "", - userId: 530860, - }, - ], - postsCount: 606308, - replyCount: 85233, - slug: "", - title: "", - unpinned: "", - unseen: false, - views: 703218, - visible: false, + description: "Re-engineered foreground array", + extras: "", + primaryGroupId: "", + userId: 530860, }, - ], + ], + postsCount: 606308, + replyCount: 85233, + slug: "", + title: "", + unpinned: "", + unseen: false, + views: 703218, + visible: false, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/topics.md b/docs/sdk/models/operations/topics.md index 296f8e4..1b413b6 100644 --- a/docs/sdk/models/operations/topics.md +++ b/docs/sdk/models/operations/topics.md @@ -6,43 +6,43 @@ import { Topics } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Topics = { - archetype: "", - archived: false, - bookmarked: "", - bumped: false, - bumpedAt: "", - categoryId: 653421, - closed: false, - createdAt: "", - excerpt: "", - fancyTitle: "", - featuredLink: "", - hasSummary: false, - highestPostNumber: 671794, - id: 726343, - imageUrl: "", - lastPostedAt: "", - lastPosterUsername: "", - likeCount: 324083, - liked: "", - pinned: false, - pinnedGlobally: false, - posters: [ - { - description: "Operative dynamic array", - extras: "", - primaryGroupId: "", - userId: 833316, - }, - ], - postsCount: 405036, - replyCount: 775803, - slug: "", - title: "", - unpinned: "", - unseen: false, - views: 405373, - visible: false, + archetype: "", + archived: false, + bookmarked: "", + bumped: false, + bumpedAt: "", + categoryId: 653421, + closed: false, + createdAt: "", + excerpt: "", + fancyTitle: "", + featuredLink: "", + hasSummary: false, + highestPostNumber: 671794, + id: 726343, + imageUrl: "", + lastPostedAt: "", + lastPosterUsername: "", + likeCount: 324083, + liked: "", + pinned: false, + pinnedGlobally: false, + posters: [ + { + description: "Operative dynamic array", + extras: "", + primaryGroupId: "", + userId: 833316, + }, + ], + postsCount: 405036, + replyCount: 775803, + slug: "", + title: "", + unpinned: "", + unseen: false, + views: 405373, + visible: false, }; ``` diff --git a/docs/sdk/models/operations/triggers.md b/docs/sdk/models/operations/triggers.md index b872a1e..b370531 100644 --- a/docs/sdk/models/operations/triggers.md +++ b/docs/sdk/models/operations/triggers.md @@ -6,11 +6,11 @@ import { Triggers } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Triggers = { - none: 592845, - postAction: 715190, - postRevision: 844266, - trustLevelChange: 602763, - userChange: 857946, + none: 592845, + postAction: 715190, + postRevision: 844266, + trustLevelChange: 602763, + userChange: 857946, }; ``` diff --git a/docs/sdk/models/operations/trustlevels.md b/docs/sdk/models/operations/trustlevels.md index 593f639..483a651 100644 --- a/docs/sdk/models/operations/trustlevels.md +++ b/docs/sdk/models/operations/trustlevels.md @@ -6,11 +6,11 @@ import { TrustLevels } from "@lukehagar/discoursejs/sdk/models/operations"; let value: TrustLevels = { - basic: 238413, - leader: 890653, - member: 514513, - newuser: 432606, - regular: 367927, + basic: 238413, + leader: 890653, + member: 514513, + newuser: 432606, + regular: 367927, }; ``` diff --git a/docs/sdk/models/operations/updateavatarrequest.md b/docs/sdk/models/operations/updateavatarrequest.md index ea2c164..feb607c 100644 --- a/docs/sdk/models/operations/updateavatarrequest.md +++ b/docs/sdk/models/operations/updateavatarrequest.md @@ -6,7 +6,7 @@ import { UpdateAvatarRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateAvatarRequest = { - username: "Mason57", + username: "Mason57", }; ``` diff --git a/docs/sdk/models/operations/updateavatarrequestbody.md b/docs/sdk/models/operations/updateavatarrequestbody.md index 2e18b7a..6f7052f 100644 --- a/docs/sdk/models/operations/updateavatarrequestbody.md +++ b/docs/sdk/models/operations/updateavatarrequestbody.md @@ -6,8 +6,8 @@ import { UpdateAvatarRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateAvatarRequestBody = { - type: "system", - uploadId: 209750, + type: "system", + uploadId: 209750, }; ``` diff --git a/docs/sdk/models/operations/updateavatarresponsebody.md b/docs/sdk/models/operations/updateavatarresponsebody.md index 691dff9..1d40d45 100644 --- a/docs/sdk/models/operations/updateavatarresponsebody.md +++ b/docs/sdk/models/operations/updateavatarresponsebody.md @@ -8,7 +8,7 @@ avatar updated import { UpdateAvatarResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateAvatarResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/updatebadgebadge.md b/docs/sdk/models/operations/updatebadgebadge.md index c7c6365..66a8d81 100644 --- a/docs/sdk/models/operations/updatebadgebadge.md +++ b/docs/sdk/models/operations/updatebadgebadge.md @@ -6,27 +6,27 @@ import { UpdateBadgeBadge } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateBadgeBadge = { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 315428, - badgeTypeId: 607831, - description: "Horizontal eco-centric local area network", - enabled: false, - grantCount: 38425, - icon: "", - id: 438601, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: "", + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 315428, + badgeTypeId: 607831, + description: "Horizontal eco-centric local area network", + enabled: false, + grantCount: 38425, + icon: "", + id: 438601, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: "", }; ``` diff --git a/docs/sdk/models/operations/updatebadgebadgetypes.md b/docs/sdk/models/operations/updatebadgebadgetypes.md index d3501a8..8d1d512 100644 --- a/docs/sdk/models/operations/updatebadgebadgetypes.md +++ b/docs/sdk/models/operations/updatebadgebadgetypes.md @@ -6,9 +6,9 @@ import { UpdateBadgeBadgeTypes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateBadgeBadgeTypes = { - id: 634274, - name: "", - sortOrder: 988374, + id: 634274, + name: "", + sortOrder: 988374, }; ``` diff --git a/docs/sdk/models/operations/updatebadgerequest.md b/docs/sdk/models/operations/updatebadgerequest.md index d6c2055..c4d61b7 100644 --- a/docs/sdk/models/operations/updatebadgerequest.md +++ b/docs/sdk/models/operations/updatebadgerequest.md @@ -6,7 +6,7 @@ import { UpdateBadgeRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateBadgeRequest = { - id: 750686, + id: 750686, }; ``` diff --git a/docs/sdk/models/operations/updatebadgerequestbody.md b/docs/sdk/models/operations/updatebadgerequestbody.md index 3921cd8..ba9a051 100644 --- a/docs/sdk/models/operations/updatebadgerequestbody.md +++ b/docs/sdk/models/operations/updatebadgerequestbody.md @@ -6,8 +6,8 @@ import { UpdateBadgeRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateBadgeRequestBody = { - badgeTypeId: 128926, - name: "", + badgeTypeId: 128926, + name: "", }; ``` diff --git a/docs/sdk/models/operations/updatebadgeresponsebody.md b/docs/sdk/models/operations/updatebadgeresponsebody.md index 75ce69f..0828c0c 100644 --- a/docs/sdk/models/operations/updatebadgeresponsebody.md +++ b/docs/sdk/models/operations/updatebadgeresponsebody.md @@ -8,36 +8,36 @@ success response import { UpdateBadgeResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateBadgeResponseBody = { - badge: { - allowTitle: false, - autoRevoke: false, - badgeGroupingId: 958950, - badgeTypeId: 102044, - description: "Profound composite model", - enabled: false, - grantCount: 161309, - icon: "", - id: 995300, - imageUrl: "", - listable: false, - longDescription: "", - manuallyGrantable: false, - multipleGrant: false, - name: "", - query: "", - showPosts: false, - slug: "", - system: false, - targetPosts: false, - trigger: "", + badge: { + allowTitle: false, + autoRevoke: false, + badgeGroupingId: 958950, + badgeTypeId: 102044, + description: "Profound composite model", + enabled: false, + grantCount: 161309, + icon: "", + id: 995300, + imageUrl: "", + listable: false, + longDescription: "", + manuallyGrantable: false, + multipleGrant: false, + name: "", + query: "", + showPosts: false, + slug: "", + system: false, + targetPosts: false, + trigger: "", + }, + badgeTypes: [ + { + id: 653108, + name: "", + sortOrder: 581850, }, - badgeTypes: [ - { - id: 653108, - name: "", - sortOrder: 581850, - }, - ], + ], }; ``` diff --git a/docs/sdk/models/operations/updatecategorycategory.md b/docs/sdk/models/operations/updatecategorycategory.md index d22765c..1c9feef 100644 --- a/docs/sdk/models/operations/updatecategorycategory.md +++ b/docs/sdk/models/operations/updatecategorycategory.md @@ -6,66 +6,70 @@ import { UpdateCategoryCategory } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryCategory = { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "red", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Switchable incremental product", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - formTemplateIds: [""], - groupPermissions: [ - { - groupName: "", - permissionType: 842777, - }, - ], - hasChildren: false, - id: 720528, - mailinglistMirror: false, - minimumRequiredTags: 373216, - name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 633415, - numFeaturedTopics: 222864, - permission: 307376, - position: 80532, - postCount: 537279, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 85311, - name: "", - }, - ], - searchPriority: 274575, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 221396, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "red", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Switchable incremental product", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + formTemplateIds: [ + "", + ], + groupPermissions: [ + { + groupName: "", + permissionType: 842777, + }, + ], + hasChildren: false, + id: 720528, + mailinglistMirror: false, + minimumRequiredTags: 373216, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 633415, + numFeaturedTopics: 222864, + permission: 307376, + position: 80532, + postCount: 537279, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 85311, + name: "", + }, + ], + searchPriority: 274575, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 221396, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", }; ``` diff --git a/docs/sdk/models/operations/updatecategorygrouppermissions.md b/docs/sdk/models/operations/updatecategorygrouppermissions.md index 0d3d000..1c93683 100644 --- a/docs/sdk/models/operations/updatecategorygrouppermissions.md +++ b/docs/sdk/models/operations/updatecategorygrouppermissions.md @@ -6,8 +6,8 @@ import { UpdateCategoryGroupPermissions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryGroupPermissions = { - groupName: "", - permissionType: 190567, + groupName: "", + permissionType: 190567, }; ``` diff --git a/docs/sdk/models/operations/updatecategorypermissions.md b/docs/sdk/models/operations/updatecategorypermissions.md index 1ae6133..9ee83bd 100644 --- a/docs/sdk/models/operations/updatecategorypermissions.md +++ b/docs/sdk/models/operations/updatecategorypermissions.md @@ -6,7 +6,7 @@ import { UpdateCategoryPermissions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryPermissions = { - everyone: 1, + everyone: 1, }; ``` diff --git a/docs/sdk/models/operations/updatecategoryrequest.md b/docs/sdk/models/operations/updatecategoryrequest.md index acc4003..1dbe228 100644 --- a/docs/sdk/models/operations/updatecategoryrequest.md +++ b/docs/sdk/models/operations/updatecategoryrequest.md @@ -6,15 +6,15 @@ import { UpdateCategoryRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryRequest = { - requestBody: { - color: "49d9e9", - name: "", - permissions: { - everyone: 1, - }, - textColor: "f0fcfd", + requestBody: { + color: "49d9e9", + name: "", + permissions: { + everyone: 1, }, - id: 992074, + textColor: "f0fcfd", + }, + id: 992074, }; ``` diff --git a/docs/sdk/models/operations/updatecategoryrequestbody.md b/docs/sdk/models/operations/updatecategoryrequestbody.md index 25cb912..86cb206 100644 --- a/docs/sdk/models/operations/updatecategoryrequestbody.md +++ b/docs/sdk/models/operations/updatecategoryrequestbody.md @@ -6,12 +6,12 @@ import { UpdateCategoryRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryRequestBody = { - color: "49d9e9", - name: "", - permissions: { - everyone: 1, - }, - textColor: "f0fcfd", + color: "49d9e9", + name: "", + permissions: { + everyone: 1, + }, + textColor: "f0fcfd", }; ``` diff --git a/docs/sdk/models/operations/updatecategoryrequiredtaggroups.md b/docs/sdk/models/operations/updatecategoryrequiredtaggroups.md index e805caf..60e7001 100644 --- a/docs/sdk/models/operations/updatecategoryrequiredtaggroups.md +++ b/docs/sdk/models/operations/updatecategoryrequiredtaggroups.md @@ -6,8 +6,8 @@ import { UpdateCategoryRequiredTagGroups } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryRequiredTagGroups = { - minCount: 355225, - name: "", + minCount: 355225, + name: "", }; ``` diff --git a/docs/sdk/models/operations/updatecategoryresponsebody.md b/docs/sdk/models/operations/updatecategoryresponsebody.md index 5317307..3c4dd70 100644 --- a/docs/sdk/models/operations/updatecategoryresponsebody.md +++ b/docs/sdk/models/operations/updatecategoryresponsebody.md @@ -8,69 +8,73 @@ success response import { UpdateCategoryResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateCategoryResponseBody = { - category: { - allTopicsWiki: false, - allowBadges: false, - allowUnlimitedOwnerEditsOnFirstPost: false, - autoCloseBasedOnLastPost: false, - autoCloseHours: "", - availableGroups: [""], - canDelete: false, - canEdit: false, - color: "red", - customFields: {}, - defaultListFilter: "", - defaultSlowModeSeconds: "", - defaultTopPeriod: "", - defaultView: "", - description: "Configurable 3rd generation data-warehouse", - descriptionExcerpt: "", - descriptionText: "", - emailIn: "", - emailInAllowStrangers: false, - formTemplateIds: [""], - groupPermissions: [ - { - groupName: "", - permissionType: 144286, - }, - ], - hasChildren: false, - id: 66149, - mailinglistMirror: false, - minimumRequiredTags: 513760, + category: { + allTopicsWiki: false, + allowBadges: false, + allowUnlimitedOwnerEditsOnFirstPost: false, + autoCloseBasedOnLastPost: false, + autoCloseHours: "", + availableGroups: [ + "", + ], + canDelete: false, + canEdit: false, + color: "red", + customFields: {}, + defaultListFilter: "", + defaultSlowModeSeconds: "", + defaultTopPeriod: "", + defaultView: "", + description: "Configurable 3rd generation data-warehouse", + descriptionExcerpt: "", + descriptionText: "", + emailIn: "", + emailInAllowStrangers: false, + formTemplateIds: [ + "", + ], + groupPermissions: [ + { + groupName: "", + permissionType: 144286, + }, + ], + hasChildren: false, + id: 66149, + mailinglistMirror: false, + minimumRequiredTags: 513760, + name: "", + navigateToFirstPostAfterRead: false, + notificationLevel: 65604, + numFeaturedTopics: 222658, + permission: 856277, + position: 369490, + postCount: 162120, + readOnlyBanner: "", + readRestricted: false, + requiredTagGroups: [ + { + minCount: 55107, name: "", - navigateToFirstPostAfterRead: false, - notificationLevel: 65604, - numFeaturedTopics: 222658, - permission: 856277, - position: 369490, - postCount: 162120, - readOnlyBanner: "", - readRestricted: false, - requiredTagGroups: [ - { - minCount: 55107, - name: "", - }, - ], - searchPriority: 559682, - showSubcategoryList: false, - slug: "", - sortAscending: "", - sortOrder: "", - subcategoryListStyle: "", - textColor: "", - topicCount: 911198, - topicFeaturedLinkAllowed: false, - topicTemplate: "", - topicUrl: "", - uploadedBackground: "", - uploadedBackgroundDark: "", - uploadedLogo: "", - uploadedLogoDark: "", - }, - success: "", + }, + ], + searchPriority: 559682, + showSubcategoryList: false, + slug: "", + sortAscending: "", + sortOrder: "", + subcategoryListStyle: "", + textColor: "", + topicCount: 911198, + topicFeaturedLinkAllowed: false, + topicTemplate: "", + topicUrl: "", + uploadedBackground: "", + uploadedBackgroundDark: "", + uploadedLogo: "", + uploadedLogoDark: "", + }, + success: "", }; ``` diff --git a/docs/sdk/models/operations/updateemailrequest.md b/docs/sdk/models/operations/updateemailrequest.md index e138757..982ea9f 100644 --- a/docs/sdk/models/operations/updateemailrequest.md +++ b/docs/sdk/models/operations/updateemailrequest.md @@ -6,7 +6,7 @@ import { UpdateEmailRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateEmailRequest = { - username: "Giles64", + username: "Giles64", }; ``` diff --git a/docs/sdk/models/operations/updateemailrequestbody.md b/docs/sdk/models/operations/updateemailrequestbody.md index a27e907..be8f600 100644 --- a/docs/sdk/models/operations/updateemailrequestbody.md +++ b/docs/sdk/models/operations/updateemailrequestbody.md @@ -6,7 +6,7 @@ import { UpdateEmailRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateEmailRequestBody = { - email: "Maureen_Lind94@gmail.com", + email: "Maureen_Lind94@gmail.com", }; ``` diff --git a/docs/sdk/models/operations/updategroupgroup.md b/docs/sdk/models/operations/updategroupgroup.md index f151a6a..60581fb 100644 --- a/docs/sdk/models/operations/updategroupgroup.md +++ b/docs/sdk/models/operations/updategroupgroup.md @@ -6,7 +6,7 @@ import { UpdateGroupGroup } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateGroupGroup = { - name: "", + name: "", }; ``` diff --git a/docs/sdk/models/operations/updategrouprequest.md b/docs/sdk/models/operations/updategrouprequest.md index 20e26e5..e1e0557 100644 --- a/docs/sdk/models/operations/updategrouprequest.md +++ b/docs/sdk/models/operations/updategrouprequest.md @@ -6,7 +6,7 @@ import { UpdateGroupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateGroupRequest = { - id: 313218, + id: 313218, }; ``` diff --git a/docs/sdk/models/operations/updategrouprequestbody.md b/docs/sdk/models/operations/updategrouprequestbody.md index 0c3cf85..bb9adde 100644 --- a/docs/sdk/models/operations/updategrouprequestbody.md +++ b/docs/sdk/models/operations/updategrouprequestbody.md @@ -6,9 +6,9 @@ import { UpdateGroupRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateGroupRequestBody = { - group: { - name: "", - }, + group: { + name: "", + }, }; ``` diff --git a/docs/sdk/models/operations/updategroupresponsebody.md b/docs/sdk/models/operations/updategroupresponsebody.md index 5668c2e..ac9ffa9 100644 --- a/docs/sdk/models/operations/updategroupresponsebody.md +++ b/docs/sdk/models/operations/updategroupresponsebody.md @@ -8,7 +8,7 @@ success response import { UpdateGroupResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateGroupResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/updatepostactionssummary.md b/docs/sdk/models/operations/updatepostactionssummary.md index e5fb751..d50bd75 100644 --- a/docs/sdk/models/operations/updatepostactionssummary.md +++ b/docs/sdk/models/operations/updatepostactionssummary.md @@ -6,8 +6,8 @@ import { UpdatePostActionsSummary } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdatePostActionsSummary = { - canAct: false, - id: 972912, + canAct: false, + id: 972912, }; ``` diff --git a/docs/sdk/models/operations/updatepostpost.md b/docs/sdk/models/operations/updatepostpost.md index 96cc417..8e50102 100644 --- a/docs/sdk/models/operations/updatepostpost.md +++ b/docs/sdk/models/operations/updatepostpost.md @@ -6,58 +6,58 @@ import { UpdatePostPost } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdatePostPost = { - actionsSummary: [ - { - canAct: false, - id: 737279, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - draftSequence: 872303, - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 5152, - incomingLinkCount: 156653, - moderator: false, - postNumber: 694158, - postType: 684126, - primaryGroupName: "", - quoteCount: 919508, - raw: "", - readersCount: 34070, - reads: 710456, - replyCount: 885208, - replyToPostNumber: "", - reviewableId: "", - reviewableScoreCount: 177005, - reviewableScorePendingCount: 844854, - score: 483518, - staff: false, - topicId: 510128, - topicSlug: "", - trustLevel: 140316, - updatedAt: "", - userDeleted: false, - userId: 127688, - userTitle: "", - username: "Florine.Mraz92", - version: 630871, - wiki: false, - yours: false, + actionsSummary: [ + { + canAct: false, + id: 737279, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + draftSequence: 872303, + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 5152, + incomingLinkCount: 156653, + moderator: false, + postNumber: 694158, + postType: 684126, + primaryGroupName: "", + quoteCount: 919508, + raw: "", + readersCount: 34070, + reads: 710456, + replyCount: 885208, + replyToPostNumber: "", + reviewableId: "", + reviewableScoreCount: 177005, + reviewableScorePendingCount: 844854, + score: 483518, + staff: false, + topicId: 510128, + topicSlug: "", + trustLevel: 140316, + updatedAt: "", + userDeleted: false, + userId: 127688, + userTitle: "", + username: "Florine.Mraz92", + version: 630871, + wiki: false, + yours: false, }; ``` diff --git a/docs/sdk/models/operations/updatepostrequest.md b/docs/sdk/models/operations/updatepostrequest.md index e2cc122..3b56ec5 100644 --- a/docs/sdk/models/operations/updatepostrequest.md +++ b/docs/sdk/models/operations/updatepostrequest.md @@ -6,7 +6,7 @@ import { UpdatePostRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdatePostRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/updatepostresponsebody.md b/docs/sdk/models/operations/updatepostresponsebody.md index 2896bb2..30d9710 100644 --- a/docs/sdk/models/operations/updatepostresponsebody.md +++ b/docs/sdk/models/operations/updatepostresponsebody.md @@ -8,60 +8,60 @@ post updated import { UpdatePostResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdatePostResponseBody = { - post: { - actionsSummary: [ - { - canAct: false, - id: 282837, - }, - ], - admin: false, - avatarTemplate: "", - bookmarked: false, - canDelete: false, - canEdit: false, - canRecover: false, - canViewEditHistory: false, - canWiki: false, - cooked: "", - createdAt: "", - deletedAt: "", - draftSequence: 693746, - editReason: "", - flairBgColor: "", - flairColor: "", - flairName: "", - flairUrl: "", - hidden: false, - id: 339631, - incomingLinkCount: 106255, - moderator: false, - postNumber: 600213, - postType: 476946, - primaryGroupName: "", - quoteCount: 963198, - raw: "", - readersCount: 585593, - reads: 147801, - replyCount: 253625, - replyToPostNumber: "", - reviewableId: "", - reviewableScoreCount: 256916, - reviewableScorePendingCount: 201010, - score: 873557, - staff: false, - topicId: 637856, - topicSlug: "", - trustLevel: 491892, - updatedAt: "", - userDeleted: false, - userId: 760744, - userTitle: "", - username: "Stanton70", - version: 532669, - wiki: false, - yours: false, - }, + post: { + actionsSummary: [ + { + canAct: false, + id: 282837, + }, + ], + admin: false, + avatarTemplate: "", + bookmarked: false, + canDelete: false, + canEdit: false, + canRecover: false, + canViewEditHistory: false, + canWiki: false, + cooked: "", + createdAt: "", + deletedAt: "", + draftSequence: 693746, + editReason: "", + flairBgColor: "", + flairColor: "", + flairName: "", + flairUrl: "", + hidden: false, + id: 339631, + incomingLinkCount: 106255, + moderator: false, + postNumber: 600213, + postType: 476946, + primaryGroupName: "", + quoteCount: 963198, + raw: "", + readersCount: 585593, + reads: 147801, + replyCount: 253625, + replyToPostNumber: "", + reviewableId: "", + reviewableScoreCount: 256916, + reviewableScorePendingCount: 201010, + score: 873557, + staff: false, + topicId: 637856, + topicSlug: "", + trustLevel: 491892, + updatedAt: "", + userDeleted: false, + userId: 760744, + userTitle: "", + username: "Stanton70", + version: 532669, + wiki: false, + yours: false, + }, }; ``` diff --git a/docs/sdk/models/operations/updatetaggrouprequest.md b/docs/sdk/models/operations/updatetaggrouprequest.md index 8cb06bc..2d946d1 100644 --- a/docs/sdk/models/operations/updatetaggrouprequest.md +++ b/docs/sdk/models/operations/updatetaggrouprequest.md @@ -6,7 +6,7 @@ import { UpdateTagGroupRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTagGroupRequest = { - id: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/updatetopicrequest.md b/docs/sdk/models/operations/updatetopicrequest.md index 11a71aa..dcec8ec 100644 --- a/docs/sdk/models/operations/updatetopicrequest.md +++ b/docs/sdk/models/operations/updatetopicrequest.md @@ -6,9 +6,9 @@ import { UpdateTopicRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicRequest = { - apiKey: "", - apiUsername: "", - id: "", + apiKey: "", + apiUsername: "", + id: "", }; ``` diff --git a/docs/sdk/models/operations/updatetopicstatusrequest.md b/docs/sdk/models/operations/updatetopicstatusrequest.md index 94dc7cc..e64bb2e 100644 --- a/docs/sdk/models/operations/updatetopicstatusrequest.md +++ b/docs/sdk/models/operations/updatetopicstatusrequest.md @@ -6,14 +6,14 @@ import { UpdateTopicStatusRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicStatusRequest = { - apiKey: "", - apiUsername: "", - requestBody: { - enabled: "true", - status: "pinned_globally", - until: "2030-12-31", - }, - id: "", + apiKey: "", + apiUsername: "", + requestBody: { + enabled: "true", + status: "pinned_globally", + until: "2030-12-31", + }, + id: "", }; ``` diff --git a/docs/sdk/models/operations/updatetopicstatusrequestbody.md b/docs/sdk/models/operations/updatetopicstatusrequestbody.md index d0c45e8..8103b08 100644 --- a/docs/sdk/models/operations/updatetopicstatusrequestbody.md +++ b/docs/sdk/models/operations/updatetopicstatusrequestbody.md @@ -6,9 +6,9 @@ import { UpdateTopicStatusRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicStatusRequestBody = { - enabled: "true", - status: "closed", - until: "2030-12-31", + enabled: "true", + status: "closed", + until: "2030-12-31", }; ``` diff --git a/docs/sdk/models/operations/updatetopicstatusresponsebody.md b/docs/sdk/models/operations/updatetopicstatusresponsebody.md index 2944f90..69c54c7 100644 --- a/docs/sdk/models/operations/updatetopicstatusresponsebody.md +++ b/docs/sdk/models/operations/updatetopicstatusresponsebody.md @@ -8,7 +8,7 @@ topic updated import { UpdateTopicStatusResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicStatusResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/updatetopictimestamprequest.md b/docs/sdk/models/operations/updatetopictimestamprequest.md index 733b327..6613f94 100644 --- a/docs/sdk/models/operations/updatetopictimestamprequest.md +++ b/docs/sdk/models/operations/updatetopictimestamprequest.md @@ -6,12 +6,12 @@ import { UpdateTopicTimestampRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicTimestampRequest = { - apiKey: "", - apiUsername: "", - requestBody: { - timestamp: "1594291380", - }, - id: "", + apiKey: "", + apiUsername: "", + requestBody: { + timestamp: "1594291380", + }, + id: "", }; ``` diff --git a/docs/sdk/models/operations/updatetopictimestamprequestbody.md b/docs/sdk/models/operations/updatetopictimestamprequestbody.md index 3efbe5d..da68fc6 100644 --- a/docs/sdk/models/operations/updatetopictimestamprequestbody.md +++ b/docs/sdk/models/operations/updatetopictimestamprequestbody.md @@ -6,7 +6,7 @@ import { UpdateTopicTimestampRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicTimestampRequestBody = { - timestamp: "1594291380", + timestamp: "1594291380", }; ``` diff --git a/docs/sdk/models/operations/updatetopictimestampresponsebody.md b/docs/sdk/models/operations/updatetopictimestampresponsebody.md index c9cd8b7..89f960a 100644 --- a/docs/sdk/models/operations/updatetopictimestampresponsebody.md +++ b/docs/sdk/models/operations/updatetopictimestampresponsebody.md @@ -8,7 +8,7 @@ topic updated import { UpdateTopicTimestampResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateTopicTimestampResponseBody = { - success: "OK", + success: "OK", }; ``` diff --git a/docs/sdk/models/operations/updateusernamerequest.md b/docs/sdk/models/operations/updateusernamerequest.md index 8ab292a..3e1b011 100644 --- a/docs/sdk/models/operations/updateusernamerequest.md +++ b/docs/sdk/models/operations/updateusernamerequest.md @@ -6,7 +6,7 @@ import { UpdateUsernameRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateUsernameRequest = { - username: "Vincent66", + username: "Vincent66", }; ``` diff --git a/docs/sdk/models/operations/updateusernamerequestbody.md b/docs/sdk/models/operations/updateusernamerequestbody.md index 491c82f..531c553 100644 --- a/docs/sdk/models/operations/updateusernamerequestbody.md +++ b/docs/sdk/models/operations/updateusernamerequestbody.md @@ -6,7 +6,7 @@ import { UpdateUsernameRequestBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateUsernameRequestBody = { - newUsername: "", + newUsername: "", }; ``` diff --git a/docs/sdk/models/operations/updateuserrequest.md b/docs/sdk/models/operations/updateuserrequest.md index 05e6095..10c8fa5 100644 --- a/docs/sdk/models/operations/updateuserrequest.md +++ b/docs/sdk/models/operations/updateuserrequest.md @@ -6,9 +6,9 @@ import { UpdateUserRequest } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateUserRequest = { - apiKey: "", - apiUsername: "", - username: "Jackeline_Miller83", + apiKey: "", + apiUsername: "", + username: "Jackeline_Miller83", }; ``` diff --git a/docs/sdk/models/operations/updateuserresponsebody.md b/docs/sdk/models/operations/updateuserresponsebody.md index 8f90d46..0679a59 100644 --- a/docs/sdk/models/operations/updateuserresponsebody.md +++ b/docs/sdk/models/operations/updateuserresponsebody.md @@ -8,8 +8,8 @@ user updated import { UpdateUserResponseBody } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UpdateUserResponseBody = { - success: "", - user: {}, + success: "", + user: {}, }; ``` diff --git a/docs/sdk/models/operations/user.md b/docs/sdk/models/operations/user.md index 0fd5afe..47de69b 100644 --- a/docs/sdk/models/operations/user.md +++ b/docs/sdk/models/operations/user.md @@ -6,179 +6,207 @@ import { User } from "@lukehagar/discoursejs/sdk/models/operations"; let value: User = { - admin: false, - allowedPmUsernames: [""], - avatarTemplate: "", - badgeCount: 214880, - canBeDeleted: false, - canChangeBio: false, - canChangeLocation: false, - canChangeTrackingPreferences: false, - canChangeWebsite: false, - canDeleteAllPosts: false, - canEdit: false, - canEditEmail: false, - canEditName: false, - canEditUsername: false, - canIgnoreUser: false, - canMuteUser: false, - canSendPrivateMessageToUser: false, - canSendPrivateMessages: false, - canUploadProfileHeader: false, - canUploadUserCardBackground: false, - createdAt: "", - customFields: {}, - featuredTopic: "", - featuredUserBadgeIds: [""], - flairBgColor: "", - flairColor: "", - flairGroupId: "", - flairName: "", - flairUrl: "", - groupUsers: [ - { - groupId: 277628, - notificationLevel: 186458, - userId: 586784, - }, - ], - groups: [ - { - allowMembershipRequests: false, - automatic: false, - bioCooked: "", - bioExcerpt: "", - bioRaw: "", - canAdminGroup: false, - canSeeMembers: false, - defaultNotificationLevel: 807581, - displayName: "Salvador67", - flairBgColor: "", - flairColor: "", - flairUrl: "", - fullName: "Randall Cole", - grantTrustLevel: "", - hasMessages: false, - id: 704474, - incomingEmail: "", - membersVisibilityLevel: 396060, - membershipRequestTemplate: "", - mentionableLevel: 463150, - messageableLevel: 565421, - name: "", - primaryGroup: false, - publicAdmission: false, - publicExit: false, - publishReadState: false, - title: "", - userCount: 840429, - visibilityLevel: 183280, - }, - ], - hasTitleBadges: false, - id: 204865, - ignored: false, - ignoredUsernames: [""], - invitedBy: "", - lastPostedAt: "", - lastSeenAt: "", - locale: "en", - mailingListPostsPerDay: 164959, - moderator: false, - muted: false, - mutedCategoryIds: [""], - mutedTags: [""], - mutedUsernames: [""], - name: "", - pendingCount: 488056, - postCount: 124833, - primaryGroupId: "", - primaryGroupName: "", - profileViewCount: 355613, - recentTimeRead: 722081, - regularCategoryIds: [""], - secondFactorEnabled: false, - staged: false, - systemAvatarTemplate: "", - systemAvatarUploadId: "", - timeRead: 940432, - title: "", - trackedCategoryIds: [""], - trackedTags: [""], - trustLevel: 30452, - uploadedAvatarId: "", - useLogoSmallAsAvatar: false, - userApiKeys: "", - userAuthTokens: [ - { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 765326, - isActive: false, - location: "", - os: "", - seenAt: "", - }, - ], - userNotificationSchedule: { - day0EndTime: 746994, - day0StartTime: 748664, - day1EndTime: 92596, - day1StartTime: 903720, - day2EndTime: 217450, - day2StartTime: 83422, - day3EndTime: 749255, - day3StartTime: 552193, - day4EndTime: 731694, - day4StartTime: 584476, - day5EndTime: 45614, - day5StartTime: 961937, - day6EndTime: 209157, - day6StartTime: 292147, - enabled: false, + admin: false, + allowedPmUsernames: [ + "", + ], + avatarTemplate: "", + badgeCount: 214880, + canBeDeleted: false, + canChangeBio: false, + canChangeLocation: false, + canChangeTrackingPreferences: false, + canChangeWebsite: false, + canDeleteAllPosts: false, + canEdit: false, + canEditEmail: false, + canEditName: false, + canEditUsername: false, + canIgnoreUser: false, + canMuteUser: false, + canSendPrivateMessageToUser: false, + canSendPrivateMessages: false, + canUploadProfileHeader: false, + canUploadUserCardBackground: false, + createdAt: "", + customFields: {}, + featuredTopic: "", + featuredUserBadgeIds: [ + "", + ], + flairBgColor: "", + flairColor: "", + flairGroupId: "", + flairName: "", + flairUrl: "", + groupUsers: [ + { + groupId: 277628, + notificationLevel: 186458, + userId: 586784, }, - userOption: { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 286915, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 240829, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 677263, - emailMessagesLevel: 100294, - emailPreviousReplies: 63038, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 16429, - mailingListMode: false, - mailingListModeFrequency: 555649, - newTopicDurationMinutes: 929530, - notificationLevelWhenReplying: 9240, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 669917, - themeIds: [""], - themeKeySeq: 833038, - timezone: "Asia/Kuala_Lumpur", - titleCountMode: "", - userId: 984330, + ], + groups: [ + { + allowMembershipRequests: false, + automatic: false, + bioCooked: "", + bioExcerpt: "", + bioRaw: "", + canAdminGroup: false, + canSeeMembers: false, + defaultNotificationLevel: 807581, + displayName: "Salvador67", + flairBgColor: "", + flairColor: "", + flairUrl: "", + fullName: "Randall Cole", + grantTrustLevel: "", + hasMessages: false, + id: 704474, + incomingEmail: "", + membersVisibilityLevel: 396060, + membershipRequestTemplate: "", + mentionableLevel: 463150, + messageableLevel: 565421, + name: "", + primaryGroup: false, + publicAdmission: false, + publicExit: false, + publishReadState: false, + title: "", + userCount: 840429, + visibilityLevel: 183280, }, - username: "Earline.Prosacco", - watchedCategoryIds: [""], - watchedFirstPostCategoryIds: [""], - watchedTags: [""], - watchingFirstPostTags: [""], + ], + hasTitleBadges: false, + id: 204865, + ignored: false, + ignoredUsernames: [ + "", + ], + invitedBy: "", + lastPostedAt: "", + lastSeenAt: "", + locale: "en", + mailingListPostsPerDay: 164959, + moderator: false, + muted: false, + mutedCategoryIds: [ + "", + ], + mutedTags: [ + "", + ], + mutedUsernames: [ + "", + ], + name: "", + pendingCount: 488056, + postCount: 124833, + primaryGroupId: "", + primaryGroupName: "", + profileViewCount: 355613, + recentTimeRead: 722081, + regularCategoryIds: [ + "", + ], + secondFactorEnabled: false, + staged: false, + systemAvatarTemplate: "", + systemAvatarUploadId: "", + timeRead: 940432, + title: "", + trackedCategoryIds: [ + "", + ], + trackedTags: [ + "", + ], + trustLevel: 30452, + uploadedAvatarId: "", + useLogoSmallAsAvatar: false, + userApiKeys: "", + userAuthTokens: [ + { + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 765326, + isActive: false, + location: "", + os: "", + seenAt: "", + }, + ], + userNotificationSchedule: { + day0EndTime: 746994, + day0StartTime: 748664, + day1EndTime: 92596, + day1StartTime: 903720, + day2EndTime: 217450, + day2StartTime: 83422, + day3EndTime: 749255, + day3StartTime: 552193, + day4EndTime: 731694, + day4StartTime: 584476, + day5EndTime: 45614, + day5StartTime: 961937, + day6EndTime: 209157, + day6StartTime: 292147, + enabled: false, + }, + userOption: { + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 286915, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 240829, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 677263, + emailMessagesLevel: 100294, + emailPreviousReplies: 63038, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 16429, + mailingListMode: false, + mailingListModeFrequency: 555649, + newTopicDurationMinutes: 929530, + notificationLevelWhenReplying: 9240, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 669917, + themeIds: [ + "", + ], + themeKeySeq: 833038, + timezone: "Asia/Kuala_Lumpur", + titleCountMode: "", + userId: 984330, + }, + username: "Earline.Prosacco", + watchedCategoryIds: [ + "", + ], + watchedFirstPostCategoryIds: [ + "", + ], + watchedTags: [ + "", + ], + watchingFirstPostTags: [ + "", + ], }; ``` diff --git a/docs/sdk/models/operations/useractions.md b/docs/sdk/models/operations/useractions.md index cc899f6..b22a8b9 100644 --- a/docs/sdk/models/operations/useractions.md +++ b/docs/sdk/models/operations/useractions.md @@ -6,32 +6,32 @@ import { UserActions } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserActions = { - actingAvatarTemplate: "", - actingName: "", - actingUserId: 709072, - actingUsername: "", - actionCode: "", - actionType: 70869, - archived: false, - avatarTemplate: "", - categoryId: 611749, - closed: false, - createdAt: "", - deleted: false, - excerpt: "", - hidden: "", - name: "", - postId: "", - postNumber: 292794, - postType: "", - slug: "", - targetName: "", - targetUserId: 671907, - targetUsername: "", - title: "", - topicId: 152354, - userId: 447516, - username: "Haylie37", + actingAvatarTemplate: "", + actingName: "", + actingUserId: 709072, + actingUsername: "", + actionCode: "", + actionType: 70869, + archived: false, + avatarTemplate: "", + categoryId: 611749, + closed: false, + createdAt: "", + deleted: false, + excerpt: "", + hidden: "", + name: "", + postId: "", + postNumber: 292794, + postType: "", + slug: "", + targetName: "", + targetUserId: 671907, + targetUsername: "", + title: "", + topicId: 152354, + userId: 447516, + username: "Haylie37", }; ``` diff --git a/docs/sdk/models/operations/userauthtokens.md b/docs/sdk/models/operations/userauthtokens.md index 6b6f779..bdae83b 100644 --- a/docs/sdk/models/operations/userauthtokens.md +++ b/docs/sdk/models/operations/userauthtokens.md @@ -6,16 +6,16 @@ import { UserAuthTokens } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserAuthTokens = { - browser: "", - clientIp: "", - createdAt: "", - device: "", - icon: "", - id: 885338, - isActive: false, - location: "", - os: "", - seenAt: "", + browser: "", + clientIp: "", + createdAt: "", + device: "", + icon: "", + id: 885338, + isActive: false, + location: "", + os: "", + seenAt: "", }; ``` diff --git a/docs/sdk/models/operations/userbadges.md b/docs/sdk/models/operations/userbadges.md index 4662254..bdf568b 100644 --- a/docs/sdk/models/operations/userbadges.md +++ b/docs/sdk/models/operations/userbadges.md @@ -6,13 +6,13 @@ import { UserBadges } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserBadges = { - badgeId: 60225, - canFavorite: false, - grantedAt: "", - grantedById: 969810, - groupingPosition: 666767, - id: 653140, - isFavorite: "", + badgeId: 60225, + canFavorite: false, + grantedAt: "", + grantedById: 969810, + groupingPosition: 666767, + id: 653140, + isFavorite: "", }; ``` diff --git a/docs/sdk/models/operations/usercolorschemes.md b/docs/sdk/models/operations/usercolorschemes.md index 00c799c..3ac8147 100644 --- a/docs/sdk/models/operations/usercolorschemes.md +++ b/docs/sdk/models/operations/usercolorschemes.md @@ -6,9 +6,9 @@ import { UserColorSchemes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserColorSchemes = { - id: 928219, - isDark: false, - name: "", + id: 928219, + isDark: false, + name: "", }; ``` diff --git a/docs/sdk/models/operations/userfields.md b/docs/sdk/models/operations/userfields.md index 89c9b5a..0ce9015 100644 --- a/docs/sdk/models/operations/userfields.md +++ b/docs/sdk/models/operations/userfields.md @@ -6,8 +6,8 @@ import { UserFields } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserFields = { - one: "", - two: "", + one: "", + two: "", }; ``` diff --git a/docs/sdk/models/operations/usernotificationschedule.md b/docs/sdk/models/operations/usernotificationschedule.md index 2ad3a75..0787033 100644 --- a/docs/sdk/models/operations/usernotificationschedule.md +++ b/docs/sdk/models/operations/usernotificationschedule.md @@ -6,21 +6,21 @@ import { UserNotificationSchedule } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserNotificationSchedule = { - day0EndTime: 185636, - day0StartTime: 679880, - day1EndTime: 952792, - day1StartTime: 456130, - day2EndTime: 687488, - day2StartTime: 483409, - day3EndTime: 215507, - day3StartTime: 788740, - day4EndTime: 947371, - day4StartTime: 229442, - day5EndTime: 730856, - day5StartTime: 880298, - day6EndTime: 253941, - day6StartTime: 313692, - enabled: false, + day0EndTime: 185636, + day0StartTime: 679880, + day1EndTime: 952792, + day1StartTime: 456130, + day2EndTime: 687488, + day2StartTime: 483409, + day3EndTime: 215507, + day3StartTime: 788740, + day4EndTime: 947371, + day4StartTime: 229442, + day5EndTime: 730856, + day5StartTime: 880298, + day6EndTime: 253941, + day6StartTime: 313692, + enabled: false, }; ``` diff --git a/docs/sdk/models/operations/useroption.md b/docs/sdk/models/operations/useroption.md index 71fff85..7063f78 100644 --- a/docs/sdk/models/operations/useroption.md +++ b/docs/sdk/models/operations/useroption.md @@ -6,38 +6,40 @@ import { UserOption } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserOption = { - allowPrivateMessages: false, - autoTrackTopicsAfterMsecs: 213312, - automaticallyUnpinTopics: false, - colorSchemeId: "", - darkSchemeId: "", - digestAfterMinutes: 957451, - dynamicFavicon: false, - emailDigests: false, - emailInReplyTo: false, - emailLevel: 518201, - emailMessagesLevel: 471752, - emailPreviousReplies: 25662, - enableAllowedPmUsers: false, - enableDefer: false, - enableQuoting: false, - externalLinksInNewTab: false, - hideProfileAndPresence: false, - homepageId: "", - includeTl0InDigests: false, - likeNotificationFrequency: 711584, - mailingListMode: false, - mailingListModeFrequency: 207470, - newTopicDurationMinutes: 153694, - notificationLevelWhenReplying: 424685, - skipNewUserTips: false, - textSize: "", - textSizeSeq: 730442, - themeIds: [""], - themeKeySeq: 374170, - timezone: "Asia/Kabul", - titleCountMode: "", - userId: 463575, + allowPrivateMessages: false, + autoTrackTopicsAfterMsecs: 213312, + automaticallyUnpinTopics: false, + colorSchemeId: "", + darkSchemeId: "", + digestAfterMinutes: 957451, + dynamicFavicon: false, + emailDigests: false, + emailInReplyTo: false, + emailLevel: 518201, + emailMessagesLevel: 471752, + emailPreviousReplies: 25662, + enableAllowedPmUsers: false, + enableDefer: false, + enableQuoting: false, + externalLinksInNewTab: false, + hideProfileAndPresence: false, + homepageId: "", + includeTl0InDigests: false, + likeNotificationFrequency: 711584, + mailingListMode: false, + mailingListModeFrequency: 207470, + newTopicDurationMinutes: 153694, + notificationLevelWhenReplying: 424685, + skipNewUserTips: false, + textSize: "", + textSizeSeq: 730442, + themeIds: [ + "", + ], + themeKeySeq: 374170, + timezone: "Asia/Kabul", + titleCountMode: "", + userId: 463575, }; ``` diff --git a/docs/sdk/models/operations/users.md b/docs/sdk/models/operations/users.md index fe5c46b..75b2bb5 100644 --- a/docs/sdk/models/operations/users.md +++ b/docs/sdk/models/operations/users.md @@ -6,10 +6,10 @@ import { Users } from "@lukehagar/discoursejs/sdk/models/operations"; let value: Users = { - avatarTemplate: "", - id: 665678, - name: "", - username: "Lori_Bartell10", + avatarTemplate: "", + id: 665678, + name: "", + username: "Lori_Bartell10", }; ``` diff --git a/docs/sdk/models/operations/userthemes.md b/docs/sdk/models/operations/userthemes.md index 7a0886a..1bb5dd6 100644 --- a/docs/sdk/models/operations/userthemes.md +++ b/docs/sdk/models/operations/userthemes.md @@ -6,10 +6,10 @@ import { UserThemes } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserThemes = { - colorSchemeId: 456520, - default: false, - name: "", - themeId: 592081, + colorSchemeId: 456520, + default: false, + name: "", + themeId: 592081, }; ``` diff --git a/docs/sdk/models/operations/usertips.md b/docs/sdk/models/operations/usertips.md index 164642d..29522a2 100644 --- a/docs/sdk/models/operations/usertips.md +++ b/docs/sdk/models/operations/usertips.md @@ -6,12 +6,12 @@ import { UserTips } from "@lukehagar/discoursejs/sdk/models/operations"; let value: UserTips = { - adminGuide: 337477, - firstNotification: 431785, - postMenu: 970494, - suggestedTopics: 592780, - topicNotificationLevels: 133439, - topicTimeline: 354506, + adminGuide: 337477, + firstNotification: 431785, + postMenu: 970494, + suggestedTopics: 592780, + topicNotificationLevels: 133439, + topicTimeline: 354506, }; ``` diff --git a/gen.yaml b/gen.yaml index abd80be..24cd528 100644 --- a/gen.yaml +++ b/gen.yaml @@ -11,7 +11,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.8.2 + version: 0.9.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/jsr.json b/jsr.json index b71f01e..f00eda6 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/discoursejs", - "version": "0.8.2", + "version": "0.9.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package.json b/package.json index 70655de..8168e45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/discoursejs", - "version": "0.8.2", + "version": "0.9.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/adminActivateUser.ts b/src/funcs/adminActivateUser.ts index d33c1e9..eb270af 100644 --- a/src/funcs/adminActivateUser.ts +++ b/src/funcs/adminActivateUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Activate a user */ export async function adminActivateUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.ActivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ActivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ActivateUserRequest = { - id: id, - }; + const input$: operations.ActivateUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ActivateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ActivateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/activate.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/activate.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "activateUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "activateUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ActivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ActivateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ActivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ActivateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminAdminGetUser.ts b/src/funcs/adminAdminGetUser.ts index 91fc3b8..1d61e7f 100644 --- a/src/funcs/adminAdminGetUser.ts +++ b/src/funcs/adminAdminGetUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get a user by id */ export async function adminAdminGetUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.AdminGetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AdminGetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AdminGetUserRequest = { - id: id, - }; + const input$: operations.AdminGetUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AdminGetUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AdminGetUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "adminGetUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "adminGetUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AdminGetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AdminGetUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AdminGetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AdminGetUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminAdminListUsers.ts b/src/funcs/adminAdminListUsers.ts index 3039804..1ace507 100644 --- a/src/funcs/adminAdminListUsers.ts +++ b/src/funcs/adminAdminListUsers.ts @@ -2,123 +2,129 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Get a list of users */ export async function adminAdminListUsers( - client$: SDKCore, - request: operations.AdminListUsersRequest, - options?: RequestOptions + client$: SDKCore, + request: operations.AdminListUsersRequest, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AdminListUsersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AdminListUsersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - flag: encodeSimple$("flag", payload$.flag, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + flag: encodeSimple$("flag", payload$.flag, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/list/{flag}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/list/{flag}.json")(pathParams$); - const query$ = encodeFormQuery$({ - asc: payload$.asc, - email: payload$.email, - ip: payload$.ip, - order: payload$.order, - page: payload$.page, - show_emails: payload$.show_emails, - stats: payload$.stats, - }); + const query$ = encodeFormQuery$({ + "asc": payload$.asc, + "email": payload$.email, + "ip": payload$.ip, + "order": payload$.order, + "page": payload$.page, + "show_emails": payload$.show_emails, + "stats": payload$.stats, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "adminListUsers", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "adminListUsers", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, z.array(operations.AdminListUsersResponseBody$inboundSchema)))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, z.array(operations.AdminListUsersResponseBody$inboundSchema)), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminAnonymizeUser.ts b/src/funcs/adminAnonymizeUser.ts index 4639821..f2d6041 100644 --- a/src/funcs/adminAnonymizeUser.ts +++ b/src/funcs/adminAnonymizeUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Anonymize a user */ export async function adminAnonymizeUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.AnonymizeUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AnonymizeUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AnonymizeUserRequest = { - id: id, - }; + const input$: operations.AnonymizeUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AnonymizeUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AnonymizeUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/anonymize.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/anonymize.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "anonymizeUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "anonymizeUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AnonymizeUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AnonymizeUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AnonymizeUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AnonymizeUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminDeactivateUser.ts b/src/funcs/adminDeactivateUser.ts index f3c4cff..2003a7f 100644 --- a/src/funcs/adminDeactivateUser.ts +++ b/src/funcs/adminDeactivateUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Deactivate a user */ export async function adminDeactivateUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.DeactivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeactivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeactivateUserRequest = { - id: id, - }; + const input$: operations.DeactivateUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeactivateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeactivateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/deactivate.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/deactivate.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "deactivateUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deactivateUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.DeactivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeactivateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.DeactivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeactivateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminDeleteUser.ts b/src/funcs/adminDeleteUser.ts index 977ef5e..e8e2c59 100644 --- a/src/funcs/adminDeleteUser.ts +++ b/src/funcs/adminDeleteUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Delete a user */ export async function adminDeleteUser( - client$: SDKCore, - id: number, - requestBody?: operations.DeleteUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.DeleteUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.DeleteUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "deleteUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deleteUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.DeleteUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.DeleteUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminLogOutUser.ts b/src/funcs/adminLogOutUser.ts index c1f6c1b..f51b52e 100644 --- a/src/funcs/adminLogOutUser.ts +++ b/src/funcs/adminLogOutUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Log a user out */ export async function adminLogOutUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.LogOutUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.LogOutUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.LogOutUserRequest = { - id: id, - }; + const input$: operations.LogOutUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.LogOutUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.LogOutUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/log_out.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/log_out.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "logOutUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "logOutUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.LogOutUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.LogOutUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.LogOutUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.LogOutUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminRefreshGravatar.ts b/src/funcs/adminRefreshGravatar.ts index 5e4dc93..55cffe6 100644 --- a/src/funcs/adminRefreshGravatar.ts +++ b/src/funcs/adminRefreshGravatar.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,96 @@ import { Result } from "../sdk/types/fp.js"; * Refresh gravatar */ export async function adminRefreshGravatar( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.RefreshGravatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.RefreshGravatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.RefreshGravatarRequest = { - username: username, - }; + const input$: operations.RefreshGravatarRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.RefreshGravatarRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.RefreshGravatarRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/user_avatar/{username}/refresh_gravatar.json")(pathParams$); + const path$ = pathToFunc("/user_avatar/{username}/refresh_gravatar.json")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "refreshGravatar", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "refreshGravatar", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.RefreshGravatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.RefreshGravatarResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.RefreshGravatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.RefreshGravatarResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminSilenceUser.ts b/src/funcs/adminSilenceUser.ts index c1137d7..24b7bb8 100644 --- a/src/funcs/adminSilenceUser.ts +++ b/src/funcs/adminSilenceUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Silence a user */ export async function adminSilenceUser( - client$: SDKCore, - id: number, - requestBody?: operations.SilenceUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.SilenceUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SilenceUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SilenceUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SilenceUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.SilenceUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SilenceUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SilenceUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/silence.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/silence.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "silenceUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "silenceUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SilenceUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SilenceUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SilenceUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SilenceUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/adminSuspendUser.ts b/src/funcs/adminSuspendUser.ts index 02ddd11..1f3dea9 100644 --- a/src/funcs/adminSuspendUser.ts +++ b/src/funcs/adminSuspendUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Suspend a user */ export async function adminSuspendUser( - client$: SDKCore, - id: number, - requestBody?: operations.SuspendUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.SuspendUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SuspendUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SuspendUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SuspendUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.SuspendUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SuspendUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SuspendUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/suspend.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/suspend.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "suspendUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "suspendUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SuspendUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SuspendUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SuspendUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SuspendUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/backupsCreateBackup.ts b/src/funcs/backupsCreateBackup.ts index c66e380..cdf8ef9 100644 --- a/src/funcs/backupsCreateBackup.ts +++ b/src/funcs/backupsCreateBackup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Create backup */ export async function backupsCreateBackup( - client$: SDKCore, - request?: operations.CreateBackupRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateBackupRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateBackupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateBackupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateBackupRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateBackupRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/admin/backups.json")(); + const path$ = pathToFunc("/admin/backups.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createBackup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createBackup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateBackupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateBackupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateBackupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateBackupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/backupsDownloadBackup.ts b/src/funcs/backupsDownloadBackup.ts index 9ce3d0d..4dd61c8 100644 --- a/src/funcs/backupsDownloadBackup.ts +++ b/src/funcs/backupsDownloadBackup.ts @@ -2,124 +2,127 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Download backup */ export async function backupsDownloadBackup( - client$: SDKCore, - filename: string, - token: string, - options?: RequestOptions + client$: SDKCore, + filename: string, + token: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DownloadBackupRequest = { - filename: filename, - token: token, - }; + const input$: operations.DownloadBackupRequest = { + filename: filename, + token: token, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DownloadBackupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DownloadBackupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - filename: encodeSimple$("filename", payload$.filename, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + filename: encodeSimple$("filename", payload$.filename, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/backups/{filename}")(pathParams$); + const path$ = pathToFunc("/admin/backups/{filename}")(pathParams$); - const query$ = encodeFormQuery$({ - token: payload$.token, - }); + const query$ = encodeFormQuery$({ + "token": payload$.token, + }); - const headers$ = new Headers({ - Accept: "*/*", - }); + const headers$ = new Headers({ + Accept: "*/*", + }); - const context = { operationID: "downloadBackup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "downloadBackup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/backupsGetBackups.ts b/src/funcs/backupsGetBackups.ts index 1dec503..cac87c0 100644 --- a/src/funcs/backupsGetBackups.ts +++ b/src/funcs/backupsGetBackups.ts @@ -2,88 +2,91 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * List backups */ export async function backupsGetBackups( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/admin/backups.json")(); + const path$ = pathToFunc("/admin/backups.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getBackups", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getBackups", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, z.array(operations.ResponseBody$inboundSchema)))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, z.array(operations.ResponseBody$inboundSchema)), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/backupsSendDownloadBackupEmail.ts b/src/funcs/backupsSendDownloadBackupEmail.ts index ace6466..9fc31cc 100644 --- a/src/funcs/backupsSendDownloadBackupEmail.ts +++ b/src/funcs/backupsSendDownloadBackupEmail.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,111 +10,110 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Send download backup email */ export async function backupsSendDownloadBackupEmail( - client$: SDKCore, - filename: string, - options?: RequestOptions + client$: SDKCore, + filename: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SendDownloadBackupEmailRequest = { - filename: filename, - }; + const input$: operations.SendDownloadBackupEmailRequest = { + filename: filename, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SendDownloadBackupEmailRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SendDownloadBackupEmailRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - filename: encodeSimple$("filename", payload$.filename, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + filename: encodeSimple$("filename", payload$.filename, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/backups/{filename}")(pathParams$); + const path$ = pathToFunc("/admin/backups/{filename}")(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - }); + const headers$ = new Headers({ + Accept: "*/*", + }); - const context = { - operationID: "sendDownloadBackupEmail", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "sendDownloadBackupEmail", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/badgesAdminListBadges.ts b/src/funcs/badgesAdminListBadges.ts index ea281fd..54b2634 100644 --- a/src/funcs/badgesAdminListBadges.ts +++ b/src/funcs/badgesAdminListBadges.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -22,67 +22,70 @@ import { Result } from "../sdk/types/fp.js"; * List badges */ export async function badgesAdminListBadges( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.AdminListBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AdminListBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/admin/badges.json")(); + const path$ = pathToFunc("/admin/badges.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "adminListBadges", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "adminListBadges", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AdminListBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AdminListBadgesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AdminListBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AdminListBadgesResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/badgesCreateBadge.ts b/src/funcs/badgesCreateBadge.ts index ee5a32a..44bdd3b 100644 --- a/src/funcs/badgesCreateBadge.ts +++ b/src/funcs/badgesCreateBadge.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,89 @@ import { Result } from "../sdk/types/fp.js"; * Create badge */ export async function badgesCreateBadge( - client$: SDKCore, - request?: operations.CreateBadgeRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateBadgeRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateBadgeResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateBadgeResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateBadgeRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateBadgeRequestBody$outboundSchema.optional().parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/admin/badges.json")(); + const path$ = pathToFunc("/admin/badges.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createBadge", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createBadge", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateBadgeResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateBadgeResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateBadgeResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateBadgeResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/badgesDeleteBadge.ts b/src/funcs/badgesDeleteBadge.ts index f1fe4fa..0b713b0 100644 --- a/src/funcs/badgesDeleteBadge.ts +++ b/src/funcs/badgesDeleteBadge.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,104 +10,109 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Delete badge */ export async function badgesDeleteBadge( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteBadgeRequest = { - id: id, - }; + const input$: operations.DeleteBadgeRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteBadgeRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteBadgeRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/badges/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/badges/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - }); + const headers$ = new Headers({ + Accept: "*/*", + }); - const context = { operationID: "deleteBadge", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deleteBadge", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/badgesListUserBadges.ts b/src/funcs/badgesListUserBadges.ts index 797fbac..dfe47e4 100644 --- a/src/funcs/badgesListUserBadges.ts +++ b/src/funcs/badgesListUserBadges.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * List badges for a user */ export async function badgesListUserBadges( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListUserBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListUserBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListUserBadgesRequest = { - username: username, - }; + const input$: operations.ListUserBadgesRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListUserBadgesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListUserBadgesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/user-badges/{username}.json")(pathParams$); + const path$ = pathToFunc("/user-badges/{username}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listUserBadges", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listUserBadges", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListUserBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListUserBadgesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListUserBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListUserBadgesResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/badgesUpdateBadge.ts b/src/funcs/badgesUpdateBadge.ts index 9593815..e4382d4 100644 --- a/src/funcs/badgesUpdateBadge.ts +++ b/src/funcs/badgesUpdateBadge.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Update badge */ export async function badgesUpdateBadge( - client$: SDKCore, - id: number, - requestBody?: operations.UpdateBadgeRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.UpdateBadgeRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateBadgeResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateBadgeResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateBadgeRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateBadgeRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateBadgeRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateBadgeRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/badges/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/badges/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updateBadge", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateBadge", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateBadgeResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateBadgeResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateBadgeResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateBadgeResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesCreateCategory.ts b/src/funcs/categoriesCreateCategory.ts index ea0cd97..e36982a 100644 --- a/src/funcs/categoriesCreateCategory.ts +++ b/src/funcs/categoriesCreateCategory.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Creates a category */ export async function categoriesCreateCategory( - client$: SDKCore, - request?: operations.CreateCategoryRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateCategoryRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateCategoryRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateCategoryRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/categories.json")(); + const path$ = pathToFunc("/categories.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createCategory", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createCategory", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateCategoryResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateCategoryResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesGetCategory.ts b/src/funcs/categoriesGetCategory.ts index c5d37a7..6e4b816 100644 --- a/src/funcs/categoriesGetCategory.ts +++ b/src/funcs/categoriesGetCategory.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Show category */ export async function categoriesGetCategory( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.GetCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetCategoryRequest = { - id: id, - }; + const input$: operations.GetCategoryRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetCategoryRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetCategoryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/c/{id}/show.json")(pathParams$); + const path$ = pathToFunc("/c/{id}/show.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getCategory", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getCategory", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetCategoryResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetCategoryResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesGetSite.ts b/src/funcs/categoriesGetSite.ts index e397d58..7bbe073 100644 --- a/src/funcs/categoriesGetSite.ts +++ b/src/funcs/categoriesGetSite.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -25,67 +25,70 @@ import { Result } from "../sdk/types/fp.js"; * Can be used to fetch all categories and subcategories */ export async function categoriesGetSite( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.GetSiteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSiteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/site.json")(); + const path$ = pathToFunc("/site.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getSite", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getSite", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetSiteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetSiteResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetSiteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSiteResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesListCategories.ts b/src/funcs/categoriesListCategories.ts index 1a5007a..ba7576b 100644 --- a/src/funcs/categoriesListCategories.ts +++ b/src/funcs/categoriesListCategories.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,89 +24,92 @@ import { Result } from "../sdk/types/fp.js"; * Retrieves a list of categories */ export async function categoriesListCategories( - client$: SDKCore, - includeSubcategories?: boolean | undefined, - options?: RequestOptions + client$: SDKCore, + includeSubcategories?: boolean | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ListCategoriesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListCategoriesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListCategoriesRequest = { - includeSubcategories: includeSubcategories, - }; + const input$: operations.ListCategoriesRequest = { + includeSubcategories: includeSubcategories, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListCategoriesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListCategoriesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/categories.json")(); + const path$ = pathToFunc("/categories.json")(); - const query$ = encodeFormQuery$({ - include_subcategories: payload$.include_subcategories, - }); + const query$ = encodeFormQuery$({ + "include_subcategories": payload$.include_subcategories, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listCategories", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listCategories", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListCategoriesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListCategoriesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListCategoriesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListCategoriesResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesListCategoryTopics.ts b/src/funcs/categoriesListCategoryTopics.ts index 9c3101b..b0a7f70 100644 --- a/src/funcs/categoriesListCategoryTopics.ts +++ b/src/funcs/categoriesListCategoryTopics.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,101 @@ import { Result } from "../sdk/types/fp.js"; * List topics */ export async function categoriesListCategoryTopics( - client$: SDKCore, - id: number, - slug: string, - options?: RequestOptions + client$: SDKCore, + id: number, + slug: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListCategoryTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListCategoryTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListCategoryTopicsRequest = { - id: id, - slug: slug, - }; + const input$: operations.ListCategoryTopicsRequest = { + id: id, + slug: slug, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListCategoryTopicsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListCategoryTopicsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - slug: encodeSimple$("slug", payload$.slug, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + slug: encodeSimple$("slug", payload$.slug, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/c/{slug}/{id}.json")(pathParams$); + const path$ = pathToFunc("/c/{slug}/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listCategoryTopics", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listCategoryTopics", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListCategoryTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListCategoryTopicsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListCategoryTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListCategoryTopicsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/categoriesUpdateCategory.ts b/src/funcs/categoriesUpdateCategory.ts index 368250c..e2d7526 100644 --- a/src/funcs/categoriesUpdateCategory.ts +++ b/src/funcs/categoriesUpdateCategory.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Updates a category */ export async function categoriesUpdateCategory( - client$: SDKCore, - id: number, - requestBody?: operations.UpdateCategoryRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.UpdateCategoryRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateCategoryRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateCategoryRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateCategoryRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateCategoryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/categories/{id}.json")(pathParams$); + const path$ = pathToFunc("/categories/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updateCategory", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateCategory", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateCategoryResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateCategoryResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateCategoryResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateCategoryResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsAddGroupMembers.ts b/src/funcs/groupsAddGroupMembers.ts index 4b1581f..f3871a9 100644 --- a/src/funcs/groupsAddGroupMembers.ts +++ b/src/funcs/groupsAddGroupMembers.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Add group members */ export async function groupsAddGroupMembers( - client$: SDKCore, - id: number, - requestBody?: operations.AddGroupMembersRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.AddGroupMembersRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.AddGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AddGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AddGroupMembersRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.AddGroupMembersRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AddGroupMembersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AddGroupMembersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); + const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "addGroupMembers", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "addGroupMembers", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AddGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AddGroupMembersResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AddGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AddGroupMembersResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsCreateGroup.ts b/src/funcs/groupsCreateGroup.ts index 025ee4e..a44369e 100644 --- a/src/funcs/groupsCreateGroup.ts +++ b/src/funcs/groupsCreateGroup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,89 @@ import { Result } from "../sdk/types/fp.js"; * Create a group */ export async function groupsCreateGroup( - client$: SDKCore, - request?: operations.CreateGroupRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateGroupRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateGroupRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateGroupRequestBody$outboundSchema.optional().parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/admin/groups.json")(); + const path$ = pathToFunc("/admin/groups.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsDeleteGroup.ts b/src/funcs/groupsDeleteGroup.ts index c954a47..ba0a9eb 100644 --- a/src/funcs/groupsDeleteGroup.ts +++ b/src/funcs/groupsDeleteGroup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Delete a group */ export async function groupsDeleteGroup( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteGroupRequest = { - id: id, - }; + const input$: operations.DeleteGroupRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteGroupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteGroupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/groups/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/groups/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "deleteGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deleteGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.DeleteGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.DeleteGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsGetGroup.ts b/src/funcs/groupsGetGroup.ts index 35f808c..95bead3 100644 --- a/src/funcs/groupsGetGroup.ts +++ b/src/funcs/groupsGetGroup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get a group */ export async function groupsGetGroup( - client$: SDKCore, - id: string, - options?: RequestOptions + client$: SDKCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetGroupRequest = { - id: id, - }; + const input$: operations.GetGroupRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetGroupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetGroupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/groups/{id}.json")(pathParams$); + const path$ = pathToFunc("/groups/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsListGroupMembers.ts b/src/funcs/groupsListGroupMembers.ts index 2ef2600..90d62bb 100644 --- a/src/funcs/groupsListGroupMembers.ts +++ b/src/funcs/groupsListGroupMembers.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * List group members */ export async function groupsListGroupMembers( - client$: SDKCore, - id: string, - options?: RequestOptions + client$: SDKCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListGroupMembersRequest = { - id: id, - }; + const input$: operations.ListGroupMembersRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListGroupMembersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListGroupMembersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); + const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listGroupMembers", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listGroupMembers", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListGroupMembersResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListGroupMembersResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsListGroups.ts b/src/funcs/groupsListGroups.ts index c6cda7e..cf510ca 100644 --- a/src/funcs/groupsListGroups.ts +++ b/src/funcs/groupsListGroups.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -22,67 +22,70 @@ import { Result } from "../sdk/types/fp.js"; * List groups */ export async function groupsListGroups( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.ListGroupsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListGroupsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/groups.json")(); + const path$ = pathToFunc("/groups.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listGroups", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listGroups", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListGroupsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListGroupsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListGroupsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListGroupsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsRemoveGroupMembers.ts b/src/funcs/groupsRemoveGroupMembers.ts index 89e6b65..7281a69 100644 --- a/src/funcs/groupsRemoveGroupMembers.ts +++ b/src/funcs/groupsRemoveGroupMembers.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,98 @@ import { Result } from "../sdk/types/fp.js"; * Remove group members */ export async function groupsRemoveGroupMembers( - client$: SDKCore, - id: number, - requestBody?: operations.RemoveGroupMembersRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.RemoveGroupMembersRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.RemoveGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.RemoveGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.RemoveGroupMembersRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.RemoveGroupMembersRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.RemoveGroupMembersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.RemoveGroupMembersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); + const path$ = pathToFunc("/groups/{id}/members.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "removeGroupMembers", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "removeGroupMembers", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.RemoveGroupMembersResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.RemoveGroupMembersResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.RemoveGroupMembersResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.RemoveGroupMembersResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/groupsUpdateGroup.ts b/src/funcs/groupsUpdateGroup.ts index fd2fbfd..46a321d 100644 --- a/src/funcs/groupsUpdateGroup.ts +++ b/src/funcs/groupsUpdateGroup.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Update a group */ export async function groupsUpdateGroup( - client$: SDKCore, - id: number, - requestBody?: operations.UpdateGroupRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.UpdateGroupRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateGroupRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateGroupRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateGroupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateGroupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/groups/{id}.json")(pathParams$); + const path$ = pathToFunc("/groups/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updateGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/invitesCreateInvite.ts b/src/funcs/invitesCreateInvite.ts index 20a48dd..c56f493 100644 --- a/src/funcs/invitesCreateInvite.ts +++ b/src/funcs/invitesCreateInvite.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,97 +27,100 @@ import { Result } from "../sdk/types/fp.js"; * Create an invite */ export async function invitesCreateInvite( - client$: SDKCore, - apiKey: string, - apiUsername: string, - requestBody?: operations.CreateInviteRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + requestBody?: operations.CreateInviteRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateInviteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateInviteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.CreateInviteRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - }; + const input$: operations.CreateInviteRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateInviteRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateInviteRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/invites.json")(); + const path$ = pathToFunc("/invites.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "createInvite", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createInvite", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateInviteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateInviteResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateInviteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateInviteResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/invitesInviteToTopic.ts b/src/funcs/invitesInviteToTopic.ts index caeba68..f4c95ef 100644 --- a/src/funcs/invitesInviteToTopic.ts +++ b/src/funcs/invitesInviteToTopic.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Invite to topic */ export async function invitesInviteToTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.InviteToTopicRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.InviteToTopicRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.InviteToTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.InviteToTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.InviteToTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.InviteToTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.InviteToTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.InviteToTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/invite.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/invite.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "inviteToTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "inviteToTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.InviteToTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.InviteToTopicResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.InviteToTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.InviteToTopicResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsGetNotifications.ts b/src/funcs/notificationsGetNotifications.ts index 77c3820..8b5dad0 100644 --- a/src/funcs/notificationsGetNotifications.ts +++ b/src/funcs/notificationsGetNotifications.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -22,67 +22,70 @@ import { Result } from "../sdk/types/fp.js"; * Get the notifications that belong to the current user */ export async function notificationsGetNotifications( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.GetNotificationsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetNotificationsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/notifications.json")(); + const path$ = pathToFunc("/notifications.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getNotifications", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getNotifications", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetNotificationsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetNotificationsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetNotificationsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetNotificationsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/notificationsMarkNotificationsAsRead.ts b/src/funcs/notificationsMarkNotificationsAsRead.ts index 19c2833..d3aecc4 100644 --- a/src/funcs/notificationsMarkNotificationsAsRead.ts +++ b/src/funcs/notificationsMarkNotificationsAsRead.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,90 @@ import { Result } from "../sdk/types/fp.js"; * Mark notifications as read */ export async function notificationsMarkNotificationsAsRead( - client$: SDKCore, - request?: operations.MarkNotificationsAsReadRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.MarkNotificationsAsReadRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.MarkNotificationsAsReadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.MarkNotificationsAsReadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.MarkNotificationsAsReadRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.MarkNotificationsAsReadRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/notifications/mark-read.json")(); + const path$ = pathToFunc("/notifications/mark-read.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { - operationID: "markNotificationsAsRead", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "markNotificationsAsRead", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.MarkNotificationsAsReadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.MarkNotificationsAsReadResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.MarkNotificationsAsReadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.MarkNotificationsAsReadResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsCreateTopicPostPM.ts b/src/funcs/postsCreateTopicPostPM.ts index 528a6cd..d8e7535 100644 --- a/src/funcs/postsCreateTopicPostPM.ts +++ b/src/funcs/postsCreateTopicPostPM.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Creates a new topic, a new post, or a private message */ export async function postsCreateTopicPostPM( - client$: SDKCore, - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/posts.json")(); + const path$ = pathToFunc("/posts.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createTopicPostPM", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createTopicPostPM", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsDeletePost.ts b/src/funcs/postsDeletePost.ts index 3888b7c..e04f4a5 100644 --- a/src/funcs/postsDeletePost.ts +++ b/src/funcs/postsDeletePost.ts @@ -2,114 +2,123 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * delete a single post */ export async function postsDeletePost( - client$: SDKCore, - id: number, - requestBody?: operations.DeletePostRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.DeletePostRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeletePostRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.DeletePostRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeletePostRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeletePostRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/posts/{id}.json")(pathParams$); + const path$ = pathToFunc("/posts/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const context = { operationID: "deletePost", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deletePost", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsGetPost.ts b/src/funcs/postsGetPost.ts index cc2d1ee..f7187eb 100644 --- a/src/funcs/postsGetPost.ts +++ b/src/funcs/postsGetPost.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -29,91 +29,96 @@ import { Result } from "../sdk/types/fp.js"; * with the id of `2` signify a `like`. If there are no `actions_summary` * items with the id of `2`, that means there are 0 likes. Other ids likely * refer to various different flag types. - * */ export async function postsGetPost( - client$: SDKCore, - id: string, - options?: RequestOptions + client$: SDKCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetPostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetPostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetPostRequest = { - id: id, - }; + const input$: operations.GetPostRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetPostRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPostRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/posts/{id}.json")(pathParams$); + const path$ = pathToFunc("/posts/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getPost", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getPost", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetPostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetPostResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetPostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetPostResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsListPosts.ts b/src/funcs/postsListPosts.ts index a2e0484..1a9c960 100644 --- a/src/funcs/postsListPosts.ts +++ b/src/funcs/postsListPosts.ts @@ -4,19 +4,19 @@ import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -27,101 +27,104 @@ import { Result } from "../sdk/types/fp.js"; * List latest posts across topics */ export async function postsListPosts( - client$: SDKCore, - apiKey: string, - apiUsername: string, - before?: string | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + before?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ListPostsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListPostsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListPostsRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - before: before, - }; + const input$: operations.ListPostsRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + before: before, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListPostsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListPostsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/posts.json")(); + const path$ = pathToFunc("/posts.json")(); - const query$ = encodeFormQuery$({ - before: payload$.before, - }); + const query$ = encodeFormQuery$({ + "before": payload$.before, + }); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "listPosts", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listPosts", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListPostsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListPostsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListPostsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListPostsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsLockPost.ts b/src/funcs/postsLockPost.ts index 971e60b..e2dd1f4 100644 --- a/src/funcs/postsLockPost.ts +++ b/src/funcs/postsLockPost.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Lock a post from being edited */ export async function postsLockPost( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.LockPostRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.LockPostRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.LockPostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.LockPostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.LockPostRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.LockPostRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.LockPostRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.LockPostRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/posts/{id}/locked.json")(pathParams$); + const path$ = pathToFunc("/posts/{id}/locked.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "lockPost", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "lockPost", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.LockPostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.LockPostResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.LockPostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.LockPostResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsPerformPostAction.ts b/src/funcs/postsPerformPostAction.ts index 55717f7..7fd569b 100644 --- a/src/funcs/postsPerformPostAction.ts +++ b/src/funcs/postsPerformPostAction.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,97 +27,101 @@ import { Result } from "../sdk/types/fp.js"; * Like a post and other actions */ export async function postsPerformPostAction( - client$: SDKCore, - apiKey: string, - apiUsername: string, - requestBody?: operations.PerformPostActionRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + requestBody?: operations.PerformPostActionRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformPostActionResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformPostActionResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.PerformPostActionRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - }; + const input$: operations.PerformPostActionRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PerformPostActionRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PerformPostActionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/post_actions.json")(); + const path$ = pathToFunc("/post_actions.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "performPostAction", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "performPostAction", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.PerformPostActionResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.PerformPostActionResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.PerformPostActionResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.PerformPostActionResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsPostReplies.ts b/src/funcs/postsPostReplies.ts index 585bece..d56827b 100644 --- a/src/funcs/postsPostReplies.ts +++ b/src/funcs/postsPostReplies.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,104 +10,109 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * List replies to a post */ export async function postsPostReplies( - client$: SDKCore, - id: string, - options?: RequestOptions + client$: SDKCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.PostRepliesRequest = { - id: id, - }; + const input$: operations.PostRepliesRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PostRepliesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.PostRepliesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/posts/{id}/replies.json")(pathParams$); + const path$ = pathToFunc("/posts/{id}/replies.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "postReplies", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "postReplies", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, z.array(operations.PostRepliesResponseBody$inboundSchema)))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, z.array(operations.PostRepliesResponseBody$inboundSchema)), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/postsUpdatePost.ts b/src/funcs/postsUpdatePost.ts index 1157005..ff02968 100644 --- a/src/funcs/postsUpdatePost.ts +++ b/src/funcs/postsUpdatePost.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Update a single post */ export async function postsUpdatePost( - client$: SDKCore, - id: string, - requestBody?: operations.UpdatePostRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: string, + requestBody?: operations.UpdatePostRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdatePostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdatePostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdatePostRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdatePostRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdatePostRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdatePostRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/posts/{id}.json")(pathParams$); + const path$ = pathToFunc("/posts/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updatePost", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updatePost", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdatePostResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdatePostResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdatePostResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdatePostResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/privateMessagesCreateTopicPostPM.ts b/src/funcs/privateMessagesCreateTopicPostPM.ts index 980a9c6..0b560b6 100644 --- a/src/funcs/privateMessagesCreateTopicPostPM.ts +++ b/src/funcs/privateMessagesCreateTopicPostPM.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Creates a new topic, a new post, or a private message */ export async function privateMessagesCreateTopicPostPM( - client$: SDKCore, - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/posts.json")(); + const path$ = pathToFunc("/posts.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createTopicPostPM", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createTopicPostPM", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/privateMessagesGetUserSentPrivateMessages.ts b/src/funcs/privateMessagesGetUserSentPrivateMessages.ts index 838ce89..a1f0fd4 100644 --- a/src/funcs/privateMessagesGetUserSentPrivateMessages.ts +++ b/src/funcs/privateMessagesGetUserSentPrivateMessages.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,95 +24,100 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of private messages sent for a user */ export async function privateMessagesGetUserSentPrivateMessages( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserSentPrivateMessagesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserSentPrivateMessagesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetUserSentPrivateMessagesRequest = { - username: username, - }; + const input$: operations.GetUserSentPrivateMessagesRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserSentPrivateMessagesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetUserSentPrivateMessagesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/topics/private-messages-sent/{username}.json")(pathParams$); + const path$ = pathToFunc("/topics/private-messages-sent/{username}.json")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { - operationID: "getUserSentPrivateMessages", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "getUserSentPrivateMessages", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetUserSentPrivateMessagesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserSentPrivateMessagesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetUserSentPrivateMessagesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.GetUserSentPrivateMessagesResponseBody$inboundSchema, + ), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/privateMessagesListUserPrivateMessages.ts b/src/funcs/privateMessagesListUserPrivateMessages.ts index 3fde4ff..8636ca1 100644 --- a/src/funcs/privateMessagesListUserPrivateMessages.ts +++ b/src/funcs/privateMessagesListUserPrivateMessages.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,95 +24,97 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of private messages for a user */ export async function privateMessagesListUserPrivateMessages( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListUserPrivateMessagesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListUserPrivateMessagesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListUserPrivateMessagesRequest = { - username: username, - }; + const input$: operations.ListUserPrivateMessagesRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListUserPrivateMessagesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListUserPrivateMessagesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/topics/private-messages/{username}.json")(pathParams$); + const path$ = pathToFunc("/topics/private-messages/{username}.json")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { - operationID: "listUserPrivateMessages", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "listUserPrivateMessages", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListUserPrivateMessagesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListUserPrivateMessagesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListUserPrivateMessagesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListUserPrivateMessagesResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/searchSearch.ts b/src/funcs/searchSearch.ts index e667908..5c1ac79 100644 --- a/src/funcs/searchSearch.ts +++ b/src/funcs/searchSearch.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,92 +24,95 @@ import { Result } from "../sdk/types/fp.js"; * Search for a term */ export async function searchSearch( - client$: SDKCore, - page?: number | undefined, - q?: string | undefined, - options?: RequestOptions + client$: SDKCore, + page?: number | undefined, + q?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SearchResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SearchResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SearchRequest = { - page: page, - q: q, - }; + const input$: operations.SearchRequest = { + page: page, + q: q, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SearchRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SearchRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/search.json")(); + const path$ = pathToFunc("/search.json")(); - const query$ = encodeFormQuery$({ - page: payload$.page, - q: payload$.q, - }); + const query$ = encodeFormQuery$({ + "page": payload$.page, + "q": payload$.q, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "search", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "search", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SearchResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SearchResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SearchResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SearchResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/siteGetSite.ts b/src/funcs/siteGetSite.ts index 92f3989..d67c551 100644 --- a/src/funcs/siteGetSite.ts +++ b/src/funcs/siteGetSite.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -25,67 +25,70 @@ import { Result } from "../sdk/types/fp.js"; * Can be used to fetch all categories and subcategories */ export async function siteGetSite( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.GetSiteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSiteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/site.json")(); + const path$ = pathToFunc("/site.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getSite", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getSite", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetSiteResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetSiteResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetSiteResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSiteResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsCreateTagGroup.ts b/src/funcs/tagsCreateTagGroup.ts index d2a2340..bc99830 100644 --- a/src/funcs/tagsCreateTagGroup.ts +++ b/src/funcs/tagsCreateTagGroup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Creates a tag group */ export async function tagsCreateTagGroup( - client$: SDKCore, - request?: operations.CreateTagGroupRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateTagGroupRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateTagGroupRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateTagGroupRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/tag_groups.json")(); + const path$ = pathToFunc("/tag_groups.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createTagGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createTagGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTagGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTagGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsGetTag.ts b/src/funcs/tagsGetTag.ts index 34b32a5..e33ca08 100644 --- a/src/funcs/tagsGetTag.ts +++ b/src/funcs/tagsGetTag.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get a specific tag */ export async function tagsGetTag( - client$: SDKCore, - name: string, - options?: RequestOptions + client$: SDKCore, + name: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetTagResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTagResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTagRequest = { - name: name, - }; + const input$: operations.GetTagRequest = { + name: name, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTagRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTagRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - name: encodeSimple$("name", payload$.name, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + name: encodeSimple$("name", payload$.name, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/tag/{name}.json")(pathParams$); + const path$ = pathToFunc("/tag/{name}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getTag", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getTag", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetTagResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetTagResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetTagResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTagResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsGetTagGroup.ts b/src/funcs/tagsGetTagGroup.ts index f890b64..32aff4f 100644 --- a/src/funcs/tagsGetTagGroup.ts +++ b/src/funcs/tagsGetTagGroup.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get a single tag group */ export async function tagsGetTagGroup( - client$: SDKCore, - id: string, - options?: RequestOptions + client$: SDKCore, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTagGroupRequest = { - id: id, - }; + const input$: operations.GetTagGroupRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTagGroupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTagGroupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/tag_groups/{id}.json")(pathParams$); + const path$ = pathToFunc("/tag_groups/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getTagGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getTagGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetTagGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTagGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsListTagGroups.ts b/src/funcs/tagsListTagGroups.ts index e44b8a8..a114baa 100644 --- a/src/funcs/tagsListTagGroups.ts +++ b/src/funcs/tagsListTagGroups.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -22,67 +22,70 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of tag groups */ export async function tagsListTagGroups( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.ListTagGroupsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListTagGroupsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/tag_groups.json")(); + const path$ = pathToFunc("/tag_groups.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listTagGroups", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listTagGroups", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListTagGroupsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListTagGroupsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListTagGroupsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTagGroupsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsListTags.ts b/src/funcs/tagsListTags.ts index b2f2f24..918928f 100644 --- a/src/funcs/tagsListTags.ts +++ b/src/funcs/tagsListTags.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -22,67 +22,70 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of tags */ export async function tagsListTags( - client$: SDKCore, - options?: RequestOptions + client$: SDKCore, + options?: RequestOptions, ): Promise< - Result< - operations.ListTagsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListTagsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/tags.json")(); + const path$ = pathToFunc("/tags.json")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listTags", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listTags", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListTagsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListTagsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListTagsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTagsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/tagsUpdateTagGroup.ts b/src/funcs/tagsUpdateTagGroup.ts index 2d99ded..f76829e 100644 --- a/src/funcs/tagsUpdateTagGroup.ts +++ b/src/funcs/tagsUpdateTagGroup.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Update tag group */ export async function tagsUpdateTagGroup( - client$: SDKCore, - id: string, - requestBody?: operations.UpdateTagGroupRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: string, + requestBody?: operations.UpdateTagGroupRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateTagGroupRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateTagGroupRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateTagGroupRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateTagGroupRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/tag_groups/{id}.json")(pathParams$); + const path$ = pathToFunc("/tag_groups/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updateTagGroup", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateTagGroup", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateTagGroupResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateTagGroupResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateTagGroupResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateTagGroupResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsBookmarkTopic.ts b/src/funcs/topicsBookmarkTopic.ts index e0286ae..4f12324 100644 --- a/src/funcs/topicsBookmarkTopic.ts +++ b/src/funcs/topicsBookmarkTopic.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,116 +10,121 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Bookmark topic */ export async function topicsBookmarkTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.BookmarkTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - id: id, - }; + const input$: operations.BookmarkTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.BookmarkTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.BookmarkTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/bookmark.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/bookmark.json")(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "*/*", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "bookmarkTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "bookmarkTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsCreateTopicPostPM.ts b/src/funcs/topicsCreateTopicPostPM.ts index 14e22ea..3cf3a57 100644 --- a/src/funcs/topicsCreateTopicPostPM.ts +++ b/src/funcs/topicsCreateTopicPostPM.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,83 +24,91 @@ import { Result } from "../sdk/types/fp.js"; * Creates a new topic, a new post, or a private message */ export async function topicsCreateTopicPostPM( - client$: SDKCore, - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateTopicPostPMRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/posts.json")(); + const path$ = pathToFunc("/posts.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "createTopicPostPM", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createTopicPostPM", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateTopicPostPMResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateTopicPostPMResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTopicPostPMResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsCreateTopicTimer.ts b/src/funcs/topicsCreateTopicTimer.ts index 12f410f..89defd9 100644 --- a/src/funcs/topicsCreateTopicTimer.ts +++ b/src/funcs/topicsCreateTopicTimer.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Create topic timer */ export async function topicsCreateTopicTimer( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.CreateTopicTimerRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.CreateTopicTimerRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateTopicTimerResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateTopicTimerResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.CreateTopicTimerRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.CreateTopicTimerRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateTopicTimerRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateTopicTimerRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/timer.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/timer.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "createTopicTimer", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createTopicTimer", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateTopicTimerResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateTopicTimerResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateTopicTimerResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateTopicTimerResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsGetTopic.ts b/src/funcs/topicsGetTopic.ts index a1616c6..498885d 100644 --- a/src/funcs/topicsGetTopic.ts +++ b/src/funcs/topicsGetTopic.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,100 +24,106 @@ import { Result } from "../sdk/types/fp.js"; * Get a single topic */ export async function topicsGetTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - id: id, - }; + const input$: operations.GetTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}.json")(pathParams$); + const path$ = pathToFunc("/t/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "getTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetTopicResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTopicResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsGetTopicByExternalId.ts b/src/funcs/topicsGetTopicByExternalId.ts index 03306b7..b14da17 100644 --- a/src/funcs/topicsGetTopicByExternalId.ts +++ b/src/funcs/topicsGetTopicByExternalId.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,107 +10,110 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Get topic by external_id */ export async function topicsGetTopicByExternalId( - client$: SDKCore, - externalId: string, - options?: RequestOptions + client$: SDKCore, + externalId: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTopicByExternalIdRequest = { - externalId: externalId, - }; + const input$: operations.GetTopicByExternalIdRequest = { + externalId: externalId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTopicByExternalIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTopicByExternalIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - external_id: encodeSimple$("external_id", payload$.external_id, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + external_id: encodeSimple$("external_id", payload$.external_id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/external_id/{external_id}.json")(pathParams$); + const path$ = pathToFunc("/t/external_id/{external_id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - }); + const headers$ = new Headers({ + Accept: "*/*", + }); - const context = { operationID: "getTopicByExternalId", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getTopicByExternalId", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(301, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(301, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsInviteToTopic.ts b/src/funcs/topicsInviteToTopic.ts index 9c5403c..e032410 100644 --- a/src/funcs/topicsInviteToTopic.ts +++ b/src/funcs/topicsInviteToTopic.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Invite to topic */ export async function topicsInviteToTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.InviteToTopicRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.InviteToTopicRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.InviteToTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.InviteToTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.InviteToTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.InviteToTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.InviteToTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.InviteToTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/invite.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/invite.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "inviteToTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "inviteToTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.InviteToTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.InviteToTopicResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.InviteToTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.InviteToTopicResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsListLatestTopics.ts b/src/funcs/topicsListLatestTopics.ts index d88a775..07f2c50 100644 --- a/src/funcs/topicsListLatestTopics.ts +++ b/src/funcs/topicsListLatestTopics.ts @@ -4,19 +4,19 @@ import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -27,104 +27,107 @@ import { Result } from "../sdk/types/fp.js"; * Get the latest topics */ export async function topicsListLatestTopics( - client$: SDKCore, - apiKey: string, - apiUsername: string, - ascending?: string | undefined, - order?: string | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + ascending?: string | undefined, + order?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ListLatestTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListLatestTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListLatestTopicsRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - ascending: ascending, - order: order, - }; + const input$: operations.ListLatestTopicsRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + ascending: ascending, + order: order, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListLatestTopicsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListLatestTopicsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/latest.json")(); + const path$ = pathToFunc("/latest.json")(); - const query$ = encodeFormQuery$({ - ascending: payload$.ascending, - order: payload$.order, - }); + const query$ = encodeFormQuery$({ + "ascending": payload$.ascending, + "order": payload$.order, + }); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "listLatestTopics", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listLatestTopics", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListLatestTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListLatestTopicsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListLatestTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListLatestTopicsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsListTopTopics.ts b/src/funcs/topicsListTopTopics.ts index 205dab4..ad6c2dd 100644 --- a/src/funcs/topicsListTopTopics.ts +++ b/src/funcs/topicsListTopTopics.ts @@ -4,19 +4,19 @@ import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -27,101 +27,104 @@ import { Result } from "../sdk/types/fp.js"; * Get the top topics filtered by period */ export async function topicsListTopTopics( - client$: SDKCore, - apiKey: string, - apiUsername: string, - period?: string | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + period?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ListTopTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListTopTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListTopTopicsRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - period: period, - }; + const input$: operations.ListTopTopicsRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + period: period, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListTopTopicsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListTopTopicsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/top.json")(); + const path$ = pathToFunc("/top.json")(); - const query$ = encodeFormQuery$({ - period: payload$.period, - }); + const query$ = encodeFormQuery$({ + "period": payload$.period, + }); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "listTopTopics", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listTopTopics", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListTopTopicsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListTopTopicsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListTopTopicsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTopTopicsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsRemoveTopic.ts b/src/funcs/topicsRemoveTopic.ts index 4154657..10f17de 100644 --- a/src/funcs/topicsRemoveTopic.ts +++ b/src/funcs/topicsRemoveTopic.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -9,116 +10,121 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Remove a topic */ export async function topicsRemoveTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.RemoveTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - id: id, - }; + const input$: operations.RemoveTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.RemoveTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.RemoveTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}.json")(pathParams$); + const path$ = pathToFunc("/t/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "*/*", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "*/*", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "removeTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "removeTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsSetNotificationLevel.ts b/src/funcs/topicsSetNotificationLevel.ts index d554142..090b207 100644 --- a/src/funcs/topicsSetNotificationLevel.ts +++ b/src/funcs/topicsSetNotificationLevel.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,110 @@ import { Result } from "../sdk/types/fp.js"; * Set notification level */ export async function topicsSetNotificationLevel( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.SetNotificationLevelRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.SetNotificationLevelRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SetNotificationLevelResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SetNotificationLevelResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SetNotificationLevelRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.SetNotificationLevelRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SetNotificationLevelRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SetNotificationLevelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/notifications.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/notifications.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "setNotificationLevel", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "setNotificationLevel", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SetNotificationLevelResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SetNotificationLevelResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SetNotificationLevelResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SetNotificationLevelResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsUpdateTopic.ts b/src/funcs/topicsUpdateTopic.ts index 54319b8..0cc64ed 100644 --- a/src/funcs/topicsUpdateTopic.ts +++ b/src/funcs/topicsUpdateTopic.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Update a topic */ export async function topicsUpdateTopic( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateTopicRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateTopicRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateTopicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateTopicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/-/{id}.json")(pathParams$); + const path$ = pathToFunc("/t/-/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "updateTopic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateTopic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateTopicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateTopicResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateTopicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateTopicResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsUpdateTopicStatus.ts b/src/funcs/topicsUpdateTopicStatus.ts index b7f7943..2b058a6 100644 --- a/src/funcs/topicsUpdateTopicStatus.ts +++ b/src/funcs/topicsUpdateTopicStatus.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,110 @@ import { Result } from "../sdk/types/fp.js"; * Update the status of a topic */ export async function topicsUpdateTopicStatus( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicStatusRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicStatusRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateTopicStatusResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateTopicStatusResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateTopicStatusRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateTopicStatusRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateTopicStatusRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UpdateTopicStatusRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/status.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/status.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "updateTopicStatus", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateTopicStatus", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateTopicStatusResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateTopicStatusResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateTopicStatusResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateTopicStatusResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/topicsUpdateTopicTimestamp.ts b/src/funcs/topicsUpdateTopicTimestamp.ts index cc3c6e2..0537101 100644 --- a/src/funcs/topicsUpdateTopicTimestamp.ts +++ b/src/funcs/topicsUpdateTopicTimestamp.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +27,110 @@ import { Result } from "../sdk/types/fp.js"; * Update topic timestamp */ export async function topicsUpdateTopicTimestamp( - client$: SDKCore, - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicTimestampRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicTimestampRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateTopicTimestampResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateTopicTimestampResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateTopicTimestampRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - id: id, - }; + const input$: operations.UpdateTopicTimestampRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateTopicTimestampRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UpdateTopicTimestampRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/t/{id}/change-timestamp.json")(pathParams$); + const path$ = pathToFunc("/t/{id}/change-timestamp.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "updateTopicTimestamp", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateTopicTimestamp", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateTopicTimestampResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateTopicTimestampResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateTopicTimestampResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateTopicTimestampResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsAbortMultipart.ts b/src/funcs/uploadsAbortMultipart.ts index 2911359..18e98a7 100644 --- a/src/funcs/uploadsAbortMultipart.ts +++ b/src/funcs/uploadsAbortMultipart.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -35,87 +35,93 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsAbortMultipart( - client$: SDKCore, - request?: operations.AbortMultipartRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.AbortMultipartRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.AbortMultipartResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AbortMultipartResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AbortMultipartRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.AbortMultipartRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/abort-multipart.json")(); + const path$ = pathToFunc("/uploads/abort-multipart.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "abortMultipart", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "abortMultipart", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AbortMultipartResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AbortMultipartResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AbortMultipartResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AbortMultipartResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsBatchPresignMultipartParts.ts b/src/funcs/uploadsBatchPresignMultipartParts.ts index 4f578d7..25f69e7 100644 --- a/src/funcs/uploadsBatchPresignMultipartParts.ts +++ b/src/funcs/uploadsBatchPresignMultipartParts.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -44,94 +44,95 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsBatchPresignMultipartParts( - client$: SDKCore, - request?: operations.BatchPresignMultipartPartsRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.BatchPresignMultipartPartsRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.BatchPresignMultipartPartsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.BatchPresignMultipartPartsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.BatchPresignMultipartPartsRequestBody$outboundSchema.optional().parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.BatchPresignMultipartPartsRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/batch-presign-multipart-parts.json")(); + const path$ = pathToFunc("/uploads/batch-presign-multipart-parts.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { - operationID: "batchPresignMultipartParts", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "batchPresignMultipartParts", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.BatchPresignMultipartPartsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.BatchPresignMultipartPartsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.BatchPresignMultipartPartsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.BatchPresignMultipartPartsResponseBody$inboundSchema, + ), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsCompleteExternalUpload.ts b/src/funcs/uploadsCompleteExternalUpload.ts index 1082548..1aaa1f1 100644 --- a/src/funcs/uploadsCompleteExternalUpload.ts +++ b/src/funcs/uploadsCompleteExternalUpload.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -40,92 +40,92 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsCompleteExternalUpload( - client$: SDKCore, - request?: operations.CompleteExternalUploadRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CompleteExternalUploadRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CompleteExternalUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CompleteExternalUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CompleteExternalUploadRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CompleteExternalUploadRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/complete-external-upload.json")(); + const path$ = pathToFunc("/uploads/complete-external-upload.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { - operationID: "completeExternalUpload", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "completeExternalUpload", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CompleteExternalUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CompleteExternalUploadResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CompleteExternalUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CompleteExternalUploadResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsCompleteMultipart.ts b/src/funcs/uploadsCompleteMultipart.ts index 74d7ebe..d108760 100644 --- a/src/funcs/uploadsCompleteMultipart.ts +++ b/src/funcs/uploadsCompleteMultipart.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -37,87 +37,93 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsCompleteMultipart( - client$: SDKCore, - request?: operations.CompleteMultipartRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CompleteMultipartRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CompleteMultipartResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CompleteMultipartResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CompleteMultipartRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CompleteMultipartRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/complete-multipart.json")(); + const path$ = pathToFunc("/uploads/complete-multipart.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "completeMultipart", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "completeMultipart", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CompleteMultipartResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CompleteMultipartResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CompleteMultipartResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CompleteMultipartResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsCreateMultipartUpload.ts b/src/funcs/uploadsCreateMultipartUpload.ts index 54ceccf..d604ac4 100644 --- a/src/funcs/uploadsCreateMultipartUpload.ts +++ b/src/funcs/uploadsCreateMultipartUpload.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -34,92 +34,92 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsCreateMultipartUpload( - client$: SDKCore, - request?: operations.CreateMultipartUploadRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateMultipartUploadRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateMultipartUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateMultipartUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.CreateMultipartUploadRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateMultipartUploadRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/create-multipart.json")(); + const path$ = pathToFunc("/uploads/create-multipart.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { - operationID: "createMultipartUpload", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "createMultipartUpload", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateMultipartUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateMultipartUploadResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateMultipartUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateMultipartUploadResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsCreateUpload.ts b/src/funcs/uploadsCreateUpload.ts index f1ac644..109aa8d 100644 --- a/src/funcs/uploadsCreateUpload.ts +++ b/src/funcs/uploadsCreateUpload.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -26,106 +26,116 @@ import { isReadableStream } from "../sdk/types/streams.js"; * Creates an upload */ export async function uploadsCreateUpload( - client$: SDKCore, - request?: operations.CreateUploadRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.CreateUploadRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateUploadRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateUploadRequestBody$outboundSchema.optional().parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = new FormData(); + if (payload$ != null) { + body$.append("type", payload$?.type); + if (payload$?.file !== undefined) { + if (isBlobLike(payload$?.file)) { + body$.append("file", payload$?.file); + } else if (isReadableStream(payload$?.file.content)) { + const buffer = await readableStreamToArrayBuffer( + payload$?.file.content, + ); + const blob = new Blob([buffer], { type: "application/octet-stream" }); + body$.append("file", blob); + } else { + body$.append( + "file", + new Blob([payload$?.file.content], { + type: "application/octet-stream", + }), + payload$?.file.fileName, + ); + } } - const payload$ = parsed$.value; - const body$ = new FormData(); - if (payload$ != null) { - body$.append("type", payload$?.type); - if (payload$?.file !== undefined) { - if (isBlobLike(payload$?.file)) { - body$.append("file", payload$?.file); - } else if (isReadableStream(payload$?.file.content)) { - const buffer = await readableStreamToArrayBuffer(payload$?.file.content); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - body$.append("file", blob); - } else { - body$.append( - "file", - new Blob([payload$?.file.content], { type: "application/octet-stream" }), - payload$?.file.fileName - ); - } - } - if (payload$?.synchronous !== undefined) { - body$.append("synchronous", String(payload$?.synchronous)); - } - if (payload$?.user_id !== undefined) { - body$.append("user_id", String(payload$?.user_id)); - } + if (payload$?.synchronous !== undefined) { + body$.append("synchronous", String(payload$?.synchronous)); } - - const path$ = pathToFunc("/uploads.json")(); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const context = { operationID: "createUpload", oAuth2Scopes: [], securitySource: null }; - - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; + if (payload$?.user_id !== undefined) { + body$.append("user_id", String(payload$?.user_id)); } - const request$ = requestRes.value; + } - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const path$ = pathToFunc("/uploads.json")(); - const [result$] = await m$.match< - operations.CreateUploadResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateUploadResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const headers$ = new Headers({ + Accept: "application/json", + }); + const context = { + operationID: "createUpload", + oAuth2Scopes: [], + securitySource: null, + }; + + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const [result$] = await m$.match< + operations.CreateUploadResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateUploadResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/uploadsGeneratePresignedPut.ts b/src/funcs/uploadsGeneratePresignedPut.ts index 6aada2d..0e940b4 100644 --- a/src/funcs/uploadsGeneratePresignedPut.ts +++ b/src/funcs/uploadsGeneratePresignedPut.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -43,88 +43,92 @@ import { Result } from "../sdk/types/fp.js"; * * An external file store must be set up and `enable_direct_s3_uploads` must * be set to true for this endpoint to function. - * - * */ export async function uploadsGeneratePresignedPut( - client$: SDKCore, - request?: operations.GeneratePresignedPutRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.GeneratePresignedPutRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GeneratePresignedPutResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GeneratePresignedPutResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.GeneratePresignedPutRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GeneratePresignedPutRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/uploads/generate-presigned-put.json")(); + const path$ = pathToFunc("/uploads/generate-presigned-put.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "generatePresignedPut", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "generatePresignedPut", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GeneratePresignedPutResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GeneratePresignedPutResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GeneratePresignedPutResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GeneratePresignedPutResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersActivateUser.ts b/src/funcs/usersActivateUser.ts index 3a0f940..fee7b2d 100644 --- a/src/funcs/usersActivateUser.ts +++ b/src/funcs/usersActivateUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Activate a user */ export async function usersActivateUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.ActivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ActivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ActivateUserRequest = { - id: id, - }; + const input$: operations.ActivateUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ActivateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ActivateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/activate.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/activate.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "activateUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "activateUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ActivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ActivateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ActivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ActivateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersAdminGetUser.ts b/src/funcs/usersAdminGetUser.ts index 910dfe8..c71fbfc 100644 --- a/src/funcs/usersAdminGetUser.ts +++ b/src/funcs/usersAdminGetUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get a user by id */ export async function usersAdminGetUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.AdminGetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AdminGetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AdminGetUserRequest = { - id: id, - }; + const input$: operations.AdminGetUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AdminGetUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AdminGetUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "adminGetUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "adminGetUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AdminGetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AdminGetUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AdminGetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AdminGetUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersAdminListUsers.ts b/src/funcs/usersAdminListUsers.ts index 15a294e..73e457e 100644 --- a/src/funcs/usersAdminListUsers.ts +++ b/src/funcs/usersAdminListUsers.ts @@ -2,123 +2,129 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Get a list of users */ export async function usersAdminListUsers( - client$: SDKCore, - request: operations.AdminListUsersRequest, - options?: RequestOptions + client$: SDKCore, + request: operations.AdminListUsersRequest, + options?: RequestOptions, ): Promise< - Result< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AdminListUsersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AdminListUsersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - flag: encodeSimple$("flag", payload$.flag, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + flag: encodeSimple$("flag", payload$.flag, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/list/{flag}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/list/{flag}.json")(pathParams$); - const query$ = encodeFormQuery$({ - asc: payload$.asc, - email: payload$.email, - ip: payload$.ip, - order: payload$.order, - page: payload$.page, - show_emails: payload$.show_emails, - stats: payload$.stats, - }); + const query$ = encodeFormQuery$({ + "asc": payload$.asc, + "email": payload$.email, + "ip": payload$.ip, + "order": payload$.order, + "page": payload$.page, + "show_emails": payload$.show_emails, + "stats": payload$.stats, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "adminListUsers", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "adminListUsers", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - Array, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, z.array(operations.AdminListUsersResponseBody$inboundSchema)))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + Array, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, z.array(operations.AdminListUsersResponseBody$inboundSchema)), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersAnonymizeUser.ts b/src/funcs/usersAnonymizeUser.ts index 2d50f3f..dacca38 100644 --- a/src/funcs/usersAnonymizeUser.ts +++ b/src/funcs/usersAnonymizeUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Anonymize a user */ export async function usersAnonymizeUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.AnonymizeUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AnonymizeUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AnonymizeUserRequest = { - id: id, - }; + const input$: operations.AnonymizeUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AnonymizeUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.AnonymizeUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/anonymize.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/anonymize.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "anonymizeUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "anonymizeUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.AnonymizeUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.AnonymizeUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.AnonymizeUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AnonymizeUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersChangePassword.ts b/src/funcs/usersChangePassword.ts index 681c149..febe0ac 100644 --- a/src/funcs/usersChangePassword.ts +++ b/src/funcs/usersChangePassword.ts @@ -2,114 +2,123 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Change password */ export async function usersChangePassword( - client$: SDKCore, - token: string, - requestBody?: operations.ChangePasswordRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + token: string, + requestBody?: operations.ChangePasswordRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ChangePasswordRequest = { - requestBody: requestBody, - token: token, - }; + const input$: operations.ChangePasswordRequest = { + requestBody: requestBody, + token: token, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ChangePasswordRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ChangePasswordRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - token: encodeSimple$("token", payload$.token, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + token: encodeSimple$("token", payload$.token, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/users/password-reset/{token}.json")(pathParams$); + const path$ = pathToFunc("/users/password-reset/{token}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const context = { operationID: "changePassword", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "changePassword", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersCreateUser.ts b/src/funcs/usersCreateUser.ts index 7ef8dcb..c9edfd3 100644 --- a/src/funcs/usersCreateUser.ts +++ b/src/funcs/usersCreateUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,97 +27,100 @@ import { Result } from "../sdk/types/fp.js"; * Creates a user */ export async function usersCreateUser( - client$: SDKCore, - apiKey: string, - apiUsername: string, - requestBody?: operations.CreateUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + requestBody?: operations.CreateUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CreateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.CreateUserRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - }; + const input$: operations.CreateUserRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const path$ = pathToFunc("/users.json")(); + const path$ = pathToFunc("/users.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "createUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "createUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.CreateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.CreateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.CreateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersDeactivateUser.ts b/src/funcs/usersDeactivateUser.ts index f813f32..a895562 100644 --- a/src/funcs/usersDeactivateUser.ts +++ b/src/funcs/usersDeactivateUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Deactivate a user */ export async function usersDeactivateUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.DeactivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeactivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeactivateUserRequest = { - id: id, - }; + const input$: operations.DeactivateUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeactivateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeactivateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/deactivate.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/deactivate.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "deactivateUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deactivateUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.DeactivateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeactivateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.DeactivateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeactivateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersDeleteUser.ts b/src/funcs/usersDeleteUser.ts index 0dc3158..f77eba0 100644 --- a/src/funcs/usersDeleteUser.ts +++ b/src/funcs/usersDeleteUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Delete a user */ export async function usersDeleteUser( - client$: SDKCore, - id: number, - requestBody?: operations.DeleteUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.DeleteUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.DeleteUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "deleteUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "deleteUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.DeleteUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.DeleteUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.DeleteUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DeleteUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersGetUser.ts b/src/funcs/usersGetUser.ts index d0ad7a9..e11c9c5 100644 --- a/src/funcs/usersGetUser.ts +++ b/src/funcs/usersGetUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +24,106 @@ import { Result } from "../sdk/types/fp.js"; * Get a single user by username */ export async function usersGetUser( - client$: SDKCore, - apiKey: string, - apiUsername: string, - username: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetUserRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - username: username, - }; + const input$: operations.GetUserRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}.json")(pathParams$); + const path$ = pathToFunc("/u/{username}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "getUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersGetUserEmails.ts b/src/funcs/usersGetUserEmails.ts index 0185084..ae36ce7 100644 --- a/src/funcs/usersGetUserEmails.ts +++ b/src/funcs/usersGetUserEmails.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Get email addresses belonging to a user */ export async function usersGetUserEmails( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserEmailsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserEmailsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetUserEmailsRequest = { - username: username, - }; + const input$: operations.GetUserEmailsRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserEmailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetUserEmailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}/emails.json")(pathParams$); + const path$ = pathToFunc("/u/{username}/emails.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getUserEmails", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getUserEmails", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetUserEmailsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserEmailsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetUserEmailsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUserEmailsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersGetUserExternalId.ts b/src/funcs/usersGetUserExternalId.ts index d378598..06168ad 100644 --- a/src/funcs/usersGetUserExternalId.ts +++ b/src/funcs/usersGetUserExternalId.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,103 +24,107 @@ import { Result } from "../sdk/types/fp.js"; * Get a user by external_id */ export async function usersGetUserExternalId( - client$: SDKCore, - apiKey: string, - apiUsername: string, - externalId: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + externalId: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserExternalIdResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserExternalIdResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetUserExternalIdRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - externalId: externalId, - }; + const input$: operations.GetUserExternalIdRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + externalId: externalId, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserExternalIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetUserExternalIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - external_id: encodeSimple$("external_id", payload$.external_id, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + external_id: encodeSimple$("external_id", payload$.external_id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/by-external/{external_id}.json")(pathParams$); + const path$ = pathToFunc("/u/by-external/{external_id}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "getUserExternalId", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getUserExternalId", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetUserExternalIdResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserExternalIdResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetUserExternalIdResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUserExternalIdResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersGetUserIdentiyProviderExternalId.ts b/src/funcs/usersGetUserIdentiyProviderExternalId.ts index 0acfcd5..8e4e0a0 100644 --- a/src/funcs/usersGetUserIdentiyProviderExternalId.ts +++ b/src/funcs/usersGetUserIdentiyProviderExternalId.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,115 +24,120 @@ import { Result } from "../sdk/types/fp.js"; * Get a user by identity provider external ID */ export async function usersGetUserIdentiyProviderExternalId( - client$: SDKCore, - apiKey: string, - apiUsername: string, - externalId: string, - provider: string, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + externalId: string, + provider: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetUserIdentiyProviderExternalIdResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserIdentiyProviderExternalIdResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetUserIdentiyProviderExternalIdRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - externalId: externalId, - provider: provider, - }; + const input$: operations.GetUserIdentiyProviderExternalIdRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + externalId: externalId, + provider: provider, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserIdentiyProviderExternalIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetUserIdentiyProviderExternalIdRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - external_id: encodeSimple$("external_id", payload$.external_id, { - explode: false, - charEncoding: "percent", - }), - provider: encodeSimple$("provider", payload$.provider, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + external_id: encodeSimple$("external_id", payload$.external_id, { + explode: false, + charEncoding: "percent", + }), + provider: encodeSimple$("provider", payload$.provider, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/by-external/{provider}/{external_id}.json")(pathParams$); + const path$ = pathToFunc("/u/by-external/{provider}/{external_id}.json")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { - operationID: "getUserIdentiyProviderExternalId", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "getUserIdentiyProviderExternalId", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.GetUserIdentiyProviderExternalIdResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.GetUserIdentiyProviderExternalIdResponseBody$inboundSchema))( - response - ); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.GetUserIdentiyProviderExternalIdResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.GetUserIdentiyProviderExternalIdResponseBody$inboundSchema, + ), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersListUserActions.ts b/src/funcs/usersListUserActions.ts index 7a287d2..df659f7 100644 --- a/src/funcs/usersListUserActions.ts +++ b/src/funcs/usersListUserActions.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,95 +24,98 @@ import { Result } from "../sdk/types/fp.js"; * Get a list of user actions */ export async function usersListUserActions( - client$: SDKCore, - filter: string, - offset: number, - username: string, - options?: RequestOptions + client$: SDKCore, + filter: string, + offset: number, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListUserActionsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListUserActionsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListUserActionsRequest = { - filter: filter, - offset: offset, - username: username, - }; + const input$: operations.ListUserActionsRequest = { + filter: filter, + offset: offset, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListUserActionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListUserActionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/user_actions.json")(); + const path$ = pathToFunc("/user_actions.json")(); - const query$ = encodeFormQuery$({ - filter: payload$.filter, - offset: payload$.offset, - username: payload$.username, - }); + const query$ = encodeFormQuery$({ + "filter": payload$.filter, + "offset": payload$.offset, + "username": payload$.username, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listUserActions", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listUserActions", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListUserActionsResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListUserActionsResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListUserActionsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListUserActionsResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersListUserBadges.ts b/src/funcs/usersListUserBadges.ts index 30a57a9..8ab8796 100644 --- a/src/funcs/usersListUserBadges.ts +++ b/src/funcs/usersListUserBadges.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * List badges for a user */ export async function usersListUserBadges( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.ListUserBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListUserBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListUserBadgesRequest = { - username: username, - }; + const input$: operations.ListUserBadgesRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListUserBadgesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListUserBadgesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/user-badges/{username}.json")(pathParams$); + const path$ = pathToFunc("/user-badges/{username}.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listUserBadges", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listUserBadges", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListUserBadgesResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListUserBadgesResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListUserBadgesResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListUserBadgesResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersListUsersPublic.ts b/src/funcs/usersListUsersPublic.ts index fc540f0..cb0a3d4 100644 --- a/src/funcs/usersListUsersPublic.ts +++ b/src/funcs/usersListUsersPublic.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,98 +24,101 @@ import { Result } from "../sdk/types/fp.js"; * Get a public list of users */ export async function usersListUsersPublic( - client$: SDKCore, - order: operations.Order, - period: operations.Period, - asc?: operations.Asc | undefined, - page?: number | undefined, - options?: RequestOptions + client$: SDKCore, + order: operations.Order, + period: operations.Period, + asc?: operations.Asc | undefined, + page?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ListUsersPublicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ListUsersPublicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ListUsersPublicRequest = { - asc: asc, - order: order, - page: page, - period: period, - }; + const input$: operations.ListUsersPublicRequest = { + asc: asc, + order: order, + page: page, + period: period, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListUsersPublicRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListUsersPublicRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/directory_items.json")(); + const path$ = pathToFunc("/directory_items.json")(); - const query$ = encodeFormQuery$({ - asc: payload$.asc, - order: payload$.order, - page: payload$.page, - period: payload$.period, - }); + const query$ = encodeFormQuery$({ + "asc": payload$.asc, + "order": payload$.order, + "page": payload$.page, + "period": payload$.period, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "listUsersPublic", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "listUsersPublic", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.ListUsersPublicResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.ListUsersPublicResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.ListUsersPublicResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListUsersPublicResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersLogOutUser.ts b/src/funcs/usersLogOutUser.ts index 9e78997..8047997 100644 --- a/src/funcs/usersLogOutUser.ts +++ b/src/funcs/usersLogOutUser.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,94 @@ import { Result } from "../sdk/types/fp.js"; * Log a user out */ export async function usersLogOutUser( - client$: SDKCore, - id: number, - options?: RequestOptions + client$: SDKCore, + id: number, + options?: RequestOptions, ): Promise< - Result< - operations.LogOutUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.LogOutUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.LogOutUserRequest = { - id: id, - }; + const input$: operations.LogOutUserRequest = { + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.LogOutUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.LogOutUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/log_out.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/log_out.json")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "logOutUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "logOutUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.LogOutUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.LogOutUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.LogOutUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.LogOutUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersRefreshGravatar.ts b/src/funcs/usersRefreshGravatar.ts index 7a01bc4..7ca36a8 100644 --- a/src/funcs/usersRefreshGravatar.ts +++ b/src/funcs/usersRefreshGravatar.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +24,96 @@ import { Result } from "../sdk/types/fp.js"; * Refresh gravatar */ export async function usersRefreshGravatar( - client$: SDKCore, - username: string, - options?: RequestOptions + client$: SDKCore, + username: string, + options?: RequestOptions, ): Promise< - Result< - operations.RefreshGravatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.RefreshGravatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.RefreshGravatarRequest = { - username: username, - }; + const input$: operations.RefreshGravatarRequest = { + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.RefreshGravatarRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.RefreshGravatarRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/user_avatar/{username}/refresh_gravatar.json")(pathParams$); + const path$ = pathToFunc("/user_avatar/{username}/refresh_gravatar.json")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "refreshGravatar", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "refreshGravatar", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.RefreshGravatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.RefreshGravatarResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.RefreshGravatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.RefreshGravatarResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersSendPasswordResetEmail.ts b/src/funcs/usersSendPasswordResetEmail.ts index 2ffe977..abf0f1b 100644 --- a/src/funcs/usersSendPasswordResetEmail.ts +++ b/src/funcs/usersSendPasswordResetEmail.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,88 +24,90 @@ import { Result } from "../sdk/types/fp.js"; * Send password reset email */ export async function usersSendPasswordResetEmail( - client$: SDKCore, - request?: operations.SendPasswordResetEmailRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + request?: operations.SendPasswordResetEmailRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SendPasswordResetEmailResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SendPasswordResetEmailResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.SendPasswordResetEmailRequestBody$outboundSchema.optional().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$ === undefined ? null : encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.SendPasswordResetEmailRequestBody$outboundSchema.optional() + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); - const path$ = pathToFunc("/session/forgot_password.json")(); + const path$ = pathToFunc("/session/forgot_password.json")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { - operationID: "sendPasswordResetEmail", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "sendPasswordResetEmail", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SendPasswordResetEmailResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SendPasswordResetEmailResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SendPasswordResetEmailResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SendPasswordResetEmailResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersSilenceUser.ts b/src/funcs/usersSilenceUser.ts index 15c586e..57b7536 100644 --- a/src/funcs/usersSilenceUser.ts +++ b/src/funcs/usersSilenceUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Silence a user */ export async function usersSilenceUser( - client$: SDKCore, - id: number, - requestBody?: operations.SilenceUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.SilenceUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SilenceUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SilenceUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SilenceUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.SilenceUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SilenceUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SilenceUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/silence.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/silence.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "silenceUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "silenceUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SilenceUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SilenceUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SilenceUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SilenceUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersSuspendUser.ts b/src/funcs/usersSuspendUser.ts index 851793d..1643d48 100644 --- a/src/funcs/usersSuspendUser.ts +++ b/src/funcs/usersSuspendUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,91 +27,97 @@ import { Result } from "../sdk/types/fp.js"; * Suspend a user */ export async function usersSuspendUser( - client$: SDKCore, - id: number, - requestBody?: operations.SuspendUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + id: number, + requestBody?: operations.SuspendUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.SuspendUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.SuspendUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.SuspendUserRequest = { - requestBody: requestBody, - id: id, - }; + const input$: operations.SuspendUserRequest = { + requestBody: requestBody, + id: id, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SuspendUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SuspendUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/admin/users/{id}/suspend.json")(pathParams$); + const path$ = pathToFunc("/admin/users/{id}/suspend.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "suspendUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "suspendUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.SuspendUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.SuspendUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.SuspendUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.SuspendUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersUpdateAvatar.ts b/src/funcs/usersUpdateAvatar.ts index fb67239..bc9fabd 100644 --- a/src/funcs/usersUpdateAvatar.ts +++ b/src/funcs/usersUpdateAvatar.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,94 +27,99 @@ import { Result } from "../sdk/types/fp.js"; * Update avatar */ export async function usersUpdateAvatar( - client$: SDKCore, - username: string, - requestBody?: operations.UpdateAvatarRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + username: string, + requestBody?: operations.UpdateAvatarRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateAvatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateAvatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateAvatarRequest = { - requestBody: requestBody, - username: username, - }; + const input$: operations.UpdateAvatarRequest = { + requestBody: requestBody, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateAvatarRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateAvatarRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}/preferences/avatar/pick.json")(pathParams$); + const path$ = pathToFunc("/u/{username}/preferences/avatar/pick.json")( + pathParams$, + ); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const context = { operationID: "updateAvatar", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateAvatar", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateAvatarResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateAvatarResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateAvatarResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateAvatarResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersUpdateEmail.ts b/src/funcs/usersUpdateEmail.ts index 7cc61bd..fe60265 100644 --- a/src/funcs/usersUpdateEmail.ts +++ b/src/funcs/usersUpdateEmail.ts @@ -2,117 +2,123 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Update email */ export async function usersUpdateEmail( - client$: SDKCore, - username: string, - requestBody?: operations.UpdateEmailRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + username: string, + requestBody?: operations.UpdateEmailRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateEmailRequest = { - requestBody: requestBody, - username: username, - }; + const input$: operations.UpdateEmailRequest = { + requestBody: requestBody, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateEmailRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateEmailRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}/preferences/email.json")(pathParams$); + const path$ = pathToFunc("/u/{username}/preferences/email.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const context = { operationID: "updateEmail", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateEmail", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersUpdateUser.ts b/src/funcs/usersUpdateUser.ts index a14651a..6bee510 100644 --- a/src/funcs/usersUpdateUser.ts +++ b/src/funcs/usersUpdateUser.ts @@ -3,17 +3,20 @@ */ import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; @@ -24,106 +27,109 @@ import { Result } from "../sdk/types/fp.js"; * Update a user */ export async function usersUpdateUser( - client$: SDKCore, - apiKey: string, - apiUsername: string, - username: string, - requestBody?: operations.UpdateUserRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + apiKey: string, + apiUsername: string, + username: string, + requestBody?: operations.UpdateUserRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateUserRequest = { - apiKey: apiKey, - apiUsername: apiUsername, - requestBody: requestBody, - username: username, - }; + const input$: operations.UpdateUserRequest = { + apiKey: apiKey, + apiUsername: apiUsername, + requestBody: requestBody, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateUserRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateUserRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}.json")(pathParams$); + const path$ = pathToFunc("/u/{username}.json")(pathParams$); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { - explode: false, - charEncoding: "none", - }), - "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { - explode: false, - charEncoding: "none", - }), - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + "Api-Key": encodeSimple$("Api-Key", payload$["Api-Key"], { + explode: false, + charEncoding: "none", + }), + "Api-Username": encodeSimple$("Api-Username", payload$["Api-Username"], { + explode: false, + charEncoding: "none", + }), + }); - const context = { operationID: "updateUser", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateUser", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - operations.UpdateUserResponseBody, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.json(200, operations.UpdateUserResponseBody$inboundSchema))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + operations.UpdateUserResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.UpdateUserResponseBody$inboundSchema), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/usersUpdateUsername.ts b/src/funcs/usersUpdateUsername.ts index 342e280..9d3e4a1 100644 --- a/src/funcs/usersUpdateUsername.ts +++ b/src/funcs/usersUpdateUsername.ts @@ -2,117 +2,125 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { SDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Update username */ export async function usersUpdateUsername( - client$: SDKCore, - username: string, - requestBody?: operations.UpdateUsernameRequestBody | undefined, - options?: RequestOptions + client$: SDKCore, + username: string, + requestBody?: operations.UpdateUsernameRequestBody | undefined, + options?: RequestOptions, ): Promise< - Result< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdateUsernameRequest = { - requestBody: requestBody, - username: username, - }; + const input$: operations.UpdateUsernameRequest = { + requestBody: requestBody, + username: username, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateUsernameRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateUsernameRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); - const pathParams$ = { - username: encodeSimple$("username", payload$.username, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + username: encodeSimple$("username", payload$.username, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/u/{username}/preferences/username.json")(pathParams$); + const path$ = pathToFunc("/u/{username}/preferences/username.json")( + pathParams$, + ); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "*/*", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "*/*", + }); - const context = { operationID: "updateUsername", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "updateUsername", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "PUT", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: [], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const [result$] = await m$.match< - void, - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >(m$.nil(200, z.void()))(response); - if (!result$.ok) { - return result$; - } + const doResult = await client$.do$(request$, { + context, + errorCodes: [], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + const [result$] = await m$.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + )(response); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index a6b6e17..d1b3396 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -4,100 +4,109 @@ import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeRequestContext, - BeforeRequestHook, - BeforeCreateRequestHook, - BeforeCreateRequestContext, - Hooks, - SDKInitHook, - SDKInitOptions, + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, } from "./types.js"; import { initHooks } from "./registration.js"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; - constructor() { - initHooks(this); + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); } - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); + return inp; + } + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); } - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); + return req; + } + + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); } - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; } - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } - - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } - - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); - } - - beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { - let inp = input; - - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); - } - - return inp; - } - - async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); - } - - return req; - } - - async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); - } - - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; - } - - return { response: res, error: err }; - } + return { response: res, error: err }; + } } diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8f0e4db..f60ec7a 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./types.js"; export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 3a31914..656b9e3 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -5,16 +5,16 @@ import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { - operationID: string; - oAuth2Scopes?: string[]; - securitySource?: any | (() => Promise); + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); }; export type Awaitable = T | Promise; export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -27,63 +27,72 @@ export type AfterErrorContext = HookContext & {}; * hook can return a new baseURL and HTTP client to be used by the SDK. */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; } diff --git a/src/index.ts b/src/index.ts index c6fc7f0..5ddc765 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk/sdk.js"; export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/config.ts b/src/lib/config.ts index 0abc2dc..c100715 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -10,57 +10,60 @@ import { Params, pathToFunc } from "./url.js"; /** * Contains the list of servers available to the SDK */ -export const ServerList = ["https://{defaultHost}"] as const; +export const ServerList = [ + "https://{defaultHost}", +] as const; export type SDKOptions = { - httpClient?: HTTPClient; - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number; - /** - * Sets the defaultHost variable for url substitution - */ - defaultHost?: string; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Sets the defaultHost variable for url substitution + */ + defaultHost?: string; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; }; export function serverURLFromOptions(options: SDKOptions): URL | null { - let serverURL = options.serverURL; + let serverURL = options.serverURL; - const serverParams: Params[] = [ - { - defaultHost: options.defaultHost ?? "discourse.example.com", - }, - ]; - let params: Params = {}; + const serverParams: Params[] = [ + { + "defaultHost": options.defaultHost ?? "discourse.example.com", + }, + ]; + let params: Params = {}; - if (!serverURL) { - const serverIdx = options.serverIdx ?? 0; - if (serverIdx < 0 || serverIdx >= ServerList.length) { - throw new Error(`Invalid server index ${serverIdx}`); - } - serverURL = ServerList[serverIdx] || ""; - params = serverParams[serverIdx] || {}; + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); } + serverURL = ServerList[serverIdx] || ""; + params = serverParams[serverIdx] || {}; + } - const u = pathToFunc(serverURL)(params); - return new URL(u); + const u = pathToFunc(serverURL)(params); + return new URL(u); } export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "latest", - sdkVersion: "0.8.2", - genVersion: "2.411.9", - userAgent: "speakeasy-sdk/typescript 0.8.2 2.411.9 latest @lukehagar/discoursejs", + language: "typescript", + openapiDocVersion: "latest", + sdkVersion: "0.9.0", + genVersion: "2.413.0", + userAgent: + "speakeasy-sdk/typescript 0.9.0 2.413.0 latest @lukehagar/discoursejs", } as const; diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 2ccbfb6..bddfff7 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -2,271 +2,285 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { safeParse } from "./schemas.js"; -import { StatusCodePredicate, matchResponse, matchStatusCode } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { Result } from "../sdk/types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; -export type Encoding = "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail"; +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; const DEFAULT_CONTENT_TYPES: Record = { - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", }; type Schema = { parse(raw: unknown): T }; -type MatchOptions = { ctype?: string; hdrs?: boolean; key?: string; sseSentinel?: string }; +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; }; export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; }; export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; + enc: "fail"; + codes: StatusCodePredicate; }; export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; + return { ...options, err: true, enc: "json", codes, schema }; } export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "json", codes, schema }; + return { ...options, enc: "json", codes, schema }; } export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; + return { ...options, err: true, enc: "text", codes, schema }; } export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "text", codes, schema }; + return { ...options, enc: "text", codes, schema }; } export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; + return { ...options, err: true, enc: "bytes", codes, schema }; } export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; + return { ...options, enc: "bytes", codes, schema }; } export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; + return { ...options, err: true, enc: "stream", codes, schema }; } export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; + return { ...options, enc: "stream", codes, schema }; } export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; + return { ...options, err: true, enc: "sse", codes, schema }; } export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; + return { ...options, enc: "sse", codes, schema }; } export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; + return { ...options, err: true, enc: "nil", codes, schema }; } export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; + return { ...options, enc: "nil", codes, schema }; } export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; + return { enc: "fail", codes }; } -export type MatchedValue = Matchers extends Matcher[] ? T : never; -export type MatchedError = Matchers extends Matcher[] ? E : never; +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; export type MatchFunc = ( - response: Response, - options?: { resultKey?: string; extraFields?: Record } + response: Response, + options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( - ...matchers: Array> + ...matchers: Array> ): MatchFunc { - return async function matchFunc( - response: Response, - options?: { resultKey?: string; extraFields?: Record } - ): Promise<[result: Result, raw: unknown]> { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match ? match.ctype : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } - if (!matcher) { - const responseBody = await response.text(); - return [ - { - ok: false, - error: new SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ), - }, - responseBody, - ]; - } + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } - const encoding = matcher.enc; - switch (encoding) { - case "json": - raw = await response.json(); - break; - case "bytes": - raw = await response.arrayBuffer(); - break; - case "stream": - raw = response.body; - break; - case "text": - raw = await response.text(); - break; - case "sse": - raw = response.body; - break; - case "nil": - raw = await discardResponseBody(response); - break; - case "fail": - raw = await response.text(); - break; - default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); - } + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } - if (matcher.enc === "fail") { - return [ - { - ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ), - }, - raw, - ]; - } + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } - const resultKey = matcher.key || options?.resultKey; - let data: unknown; + const resultKey = matcher.key || options?.resultKey; + let data: unknown; - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else if (matcher.hdrs) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else { - data = raw; - } + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else if (matcher.hdrs) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else { + data = raw; + } - if ("err" in matcher) { - const result = safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ), - raw, - ]; - } - }; + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; } const headerValRE = /, */; @@ -275,13 +289,13 @@ const headerValRE = /, */; * entries. Values are represented as an array to account for repeated headers. */ export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; } /** @@ -291,18 +305,18 @@ export function unpackHeaders(headers: Headers): Record { * https://undici.nodejs.org/#/?id=garbage-collection */ export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } + const reader = res.body?.getReader(); + if (reader == null) { + return; + } - try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 3eda511..a2ad30d 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -2,7 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; @@ -11,15 +18,19 @@ import { ERR, OK, Result } from "../sdk/types/fp.js"; * intercepts this error and converts it to an SDKValidationError so as to not * leak Zod implementation details to user code. */ -export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); } + throw err; + } } /** @@ -28,47 +39,48 @@ export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMes * leak Zod implementation details to user code. */ export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, ): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } } export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, >( - obj: ZodObject, - extrasKey: K + obj: ZodObject, + extrasKey: K, ): ZodEffects< - typeof obj, - output> & { - [k in K]: Record>; - } + typeof obj, + & output> + & { + [k in K]: Record>; + } > { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } - const v = val[key]; - if (typeof v === "undefined") { - continue; - } + const v = val[key]; + if (typeof v === "undefined") { + continue; + } - extras[key] = v; - delete val[key]; - } + extras[key] = v; + delete val[key]; + } - return { ...val, [extrasKey]: extras }; - }); + return { ...val, [extrasKey]: extras }; + }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 4a53181..dc42cb9 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,368 +2,383 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { - HTTPClient, - matchContentType, - matchStatusCode, - isAbortError, - isTimeoutError, - isConnectionError, -} from "./http.js"; -import { SecurityState } from "./security.js"; -import { retry, RetryConfig } from "./retries.js"; -import { Logger } from "./logger.js"; -import { encodeForm } from "./encodings.js"; -import { stringToBase64 } from "./base64.js"; -import { SDKOptions, SDK_METADATA, serverURLFromOptions } from "./config.js"; import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; }; type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - timeoutMs?: number; + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = - typeof gt === "object" && - gt != null && - "importScripts" in gt && - typeof gt["importScripts"] === "function"; -const isBrowserLike = - webWorkerLike || - (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - (typeof window === "object" && typeof window.document !== "undefined"); +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { - private readonly httpClient: HTTPClient; - protected readonly baseURL: URL | null; - protected readonly hooks$: SDKHooks; - protected readonly logger?: Logger | undefined; - public readonly options$: SDKOptions & { hooks?: SDKHooks }; + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" && - opt != null && - "hooks" in opt && - opt.hooks instanceof SDKHooks - ) { - this.hooks$ = opt.hooks; - } else { - this.hooks$ = new SDKHooks(); - } - this.options$ = { ...options, hooks: this.hooks$ }; + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } else { + this.hooks$ = new SDKHooks(); + } + this.options$ = { ...options, hooks: this.hooks$ }; - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - const { baseURL, client } = this.hooks$.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + const { baseURL, client } = this.hooks$.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this.baseURL = baseURL; + this.httpClient = client; + this.logger = options.debugLogger; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); } - public createRequest$( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; + let finalQuery = query || ""; - const base = conf.baseURL ?? this.baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } - if (path) { - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } + + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } + + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + fetchOptions.duplex = "half"; + } + } + + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = await this.hooks$.beforeRequest(context, request.clone()); + await logRequest(this.logger, req).catch((e) => + this.logger?.log("Failed to log request:", e) + ); + + let response = await this.httpClient.request(req); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); } - let finalQuery = query || ""; + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } - - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } - - const headers = new Headers(opHeaders); - - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64([username || "", password || ""].join(":")); - headers.set("Authorization", `Basic ${encoded}`); - } - - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } - - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); - - const userHeaders = new Headers(options?.fetchOptions?.headers); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } - - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); - } - - let fetchOptions = options?.fetchOptions; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } - } - - if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } - } - - let input; - try { - input = this.hooks$.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): return ERR( - new UnexpectedClientError("Create request hook failed to execute", { cause: err }) + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), ); } - - return OK(new Request(input.url, input.options)); - } - - public async do$( - request: Request, - options: { - context: HookContext; - errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; - } - ): Promise< - Result< - Response, - RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError - > - > { - const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; - - return retry( - async () => { - const req = await this.hooks$.beforeRequest(context, request.clone()); - await logRequest(this.logger, req).catch((e) => - this.logger?.log("Failed to log request:", e) - ); - - let response = await this.httpClient.request(req); - - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - await logResponse(this.logger, response, req).catch((e) => - this.logger?.log("Failed to log response:", e) - ); - - return response; - }, - { config: retryConfig, statusCodes: retryCodes } - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { cause: err }) - ); - case isTimeoutError(err): - return ERR(new RequestTimeoutError("Request timed out", { cause: err })); - case isConnectionError(err): - return ERR(new ConnectionError("Unable to make request", { cause: err })); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }) - ); - } - } - ); - } + }, + ); + } } const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`> Request: ${req.method} ${req.url}`); - - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); + logger.groupEnd(); } -async function logResponse(logger: Logger | undefined, res: Response, req: Request) { - if (!logger) { - return; +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); - - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") || jsonLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); + logger.groupEnd(); } diff --git a/src/lib/security.ts b/src/lib/security.ts index d529ec7..0e75079 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -3,179 +3,194 @@ */ export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", } export class SecurityError extends Error { - constructor(public code: SecurityErrorCode, message: string) { - super(message); - this.name = "SecurityError"; - } + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation" - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}` - ); - } + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } } export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; }; type SecurityInputBasic = { - type: "http:basic"; - value: { username?: string | undefined; password?: string | undefined } | null | undefined; + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; }; type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; + type: "oauth2"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: { clientID?: string | undefined; clientSecret?: string | undefined } | null | undefined; + type: "oauth2:client_credentials"; + value: + | { clientID?: string | undefined; clientSecret?: string | undefined } + | null + | undefined; }; type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName: string; + type: "http:custom"; + value: any | null | undefined; + fieldName: string; }; export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOIDC - | SecurityInputCustom; + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; -export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { - const state: SecurityState = { - basic: { username: "", password: "" }, - headers: {}, - queryParams: {}, - cookies: {}, - }; +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (o.type === "oauth2:client_credentials") { - return o.value.clientID != null || o.value.clientSecret != null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` - ); - } - }); - }); - if (option == null) { + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { return null; + } else if (o.type === "oauth2:client_credentials") { + return o.value.clientID != null || o.value.clientSecret != null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; } - option.forEach((spec) => { - if (spec.value == null) { - return; - } + const { type } = spec; - const { type } = spec; + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); - } - }); - - return state; + return state; } -function applyBasic(state: SecurityState, spec: SecurityInputBasic) { - if (spec.value == null) { - return; - } +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } - state.basic = spec.value; + state.basic = spec.value; } function applyBearer( - state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, ) { - if (spec.value == null) { - return; - } + if (spec.value == null) { + return; + } - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } - state.headers[spec.fieldName] = value; + state.headers[spec.fieldName] = value; } diff --git a/src/sdk/admin.ts b/src/sdk/admin.ts index 95306ab..52aa751 100644 --- a/src/sdk/admin.ts +++ b/src/sdk/admin.ts @@ -17,106 +17,149 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Admin extends ClientSDK { - /** - * Activate a user - */ - async activateUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminActivateUser(this, id, options)); - } + /** + * Activate a user + */ + async activateUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminActivateUser( + this, + id, + options, + )); + } - /** - * Get a user by id - */ - async adminGetUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminAdminGetUser(this, id, options)); - } + /** + * Get a user by id + */ + async adminGetUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminAdminGetUser( + this, + id, + options, + )); + } - /** - * Get a list of users - */ - async adminListUsers( - request: operations.AdminListUsersRequest, - options?: RequestOptions - ): Promise> { - return unwrapAsync(adminAdminListUsers(this, request, options)); - } + /** + * Get a list of users + */ + async adminListUsers( + request: operations.AdminListUsersRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(adminAdminListUsers( + this, + request, + options, + )); + } - /** - * Anonymize a user - */ - async anonymizeUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminAnonymizeUser(this, id, options)); - } + /** + * Anonymize a user + */ + async anonymizeUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminAnonymizeUser( + this, + id, + options, + )); + } - /** - * Deactivate a user - */ - async deactivateUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminDeactivateUser(this, id, options)); - } + /** + * Deactivate a user + */ + async deactivateUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminDeactivateUser( + this, + id, + options, + )); + } - /** - * Delete a user - */ - async deleteUser( - id: number, - requestBody?: operations.DeleteUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminDeleteUser(this, id, requestBody, options)); - } + /** + * Delete a user + */ + async deleteUser( + id: number, + requestBody?: operations.DeleteUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminDeleteUser( + this, + id, + requestBody, + options, + )); + } - /** - * Log a user out - */ - async logOutUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminLogOutUser(this, id, options)); - } + /** + * Log a user out + */ + async logOutUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminLogOutUser( + this, + id, + options, + )); + } - /** - * Refresh gravatar - */ - async refreshGravatar( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminRefreshGravatar(this, username, options)); - } + /** + * Refresh gravatar + */ + async refreshGravatar( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminRefreshGravatar( + this, + username, + options, + )); + } - /** - * Silence a user - */ - async silenceUser( - id: number, - requestBody?: operations.SilenceUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminSilenceUser(this, id, requestBody, options)); - } + /** + * Silence a user + */ + async silenceUser( + id: number, + requestBody?: operations.SilenceUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminSilenceUser( + this, + id, + requestBody, + options, + )); + } - /** - * Suspend a user - */ - async suspendUser( - id: number, - requestBody?: operations.SuspendUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(adminSuspendUser(this, id, requestBody, options)); - } + /** + * Suspend a user + */ + async suspendUser( + id: number, + requestBody?: operations.SuspendUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(adminSuspendUser( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/backups.ts b/src/sdk/backups.ts index 79f60a0..4758c3c 100644 --- a/src/sdk/backups.ts +++ b/src/sdk/backups.ts @@ -11,34 +11,59 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Backups extends ClientSDK { - /** - * Create backup - */ - async createBackup( - request?: operations.CreateBackupRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(backupsCreateBackup(this, request, options)); - } + /** + * Create backup + */ + async createBackup( + request?: operations.CreateBackupRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupsCreateBackup( + this, + request, + options, + )); + } - /** - * Download backup - */ - async downloadBackup(filename: string, token: string, options?: RequestOptions): Promise { - return unwrapAsync(backupsDownloadBackup(this, filename, token, options)); - } + /** + * Download backup + */ + async downloadBackup( + filename: string, + token: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupsDownloadBackup( + this, + filename, + token, + options, + )); + } - /** - * List backups - */ - async getBackups(options?: RequestOptions): Promise> { - return unwrapAsync(backupsGetBackups(this, options)); - } + /** + * List backups + */ + async getBackups( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(backupsGetBackups( + this, + options, + )); + } - /** - * Send download backup email - */ - async sendDownloadBackupEmail(filename: string, options?: RequestOptions): Promise { - return unwrapAsync(backupsSendDownloadBackupEmail(this, filename, options)); - } + /** + * Send download backup email + */ + async sendDownloadBackupEmail( + filename: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupsSendDownloadBackupEmail( + this, + filename, + options, + )); + } } diff --git a/src/sdk/badges.ts b/src/sdk/badges.ts index 27d58cc..520cb15 100644 --- a/src/sdk/badges.ts +++ b/src/sdk/badges.ts @@ -12,50 +12,73 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Badges extends ClientSDK { - /** - * List badges - */ - async adminListBadges( - options?: RequestOptions - ): Promise { - return unwrapAsync(badgesAdminListBadges(this, options)); - } + /** + * List badges + */ + async adminListBadges( + options?: RequestOptions, + ): Promise { + return unwrapAsync(badgesAdminListBadges( + this, + options, + )); + } - /** - * Create badge - */ - async createBadge( - request?: operations.CreateBadgeRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(badgesCreateBadge(this, request, options)); - } + /** + * Create badge + */ + async createBadge( + request?: operations.CreateBadgeRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(badgesCreateBadge( + this, + request, + options, + )); + } - /** - * Delete badge - */ - async deleteBadge(id: number, options?: RequestOptions): Promise { - return unwrapAsync(badgesDeleteBadge(this, id, options)); - } + /** + * Delete badge + */ + async deleteBadge( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(badgesDeleteBadge( + this, + id, + options, + )); + } - /** - * List badges for a user - */ - async listUserBadges( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(badgesListUserBadges(this, username, options)); - } + /** + * List badges for a user + */ + async listUserBadges( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(badgesListUserBadges( + this, + username, + options, + )); + } - /** - * Update badge - */ - async updateBadge( - id: number, - requestBody?: operations.UpdateBadgeRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(badgesUpdateBadge(this, id, requestBody, options)); - } + /** + * Update badge + */ + async updateBadge( + id: number, + requestBody?: operations.UpdateBadgeRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(badgesUpdateBadge( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/categories.ts b/src/sdk/categories.ts index 8ede30d..2becf9f 100644 --- a/src/sdk/categories.ts +++ b/src/sdk/categories.ts @@ -13,65 +13,92 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Categories extends ClientSDK { - /** - * Creates a category - */ - async createCategory( - request?: operations.CreateCategoryRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(categoriesCreateCategory(this, request, options)); - } + /** + * Creates a category + */ + async createCategory( + request?: operations.CreateCategoryRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesCreateCategory( + this, + request, + options, + )); + } - /** - * Show category - */ - async getCategory( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(categoriesGetCategory(this, id, options)); - } + /** + * Show category + */ + async getCategory( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesGetCategory( + this, + id, + options, + )); + } - /** - * Get site info - * - * @remarks - * Can be used to fetch all categories and subcategories - */ - async getSite(options?: RequestOptions): Promise { - return unwrapAsync(categoriesGetSite(this, options)); - } + /** + * Get site info + * + * @remarks + * Can be used to fetch all categories and subcategories + */ + async getSite( + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesGetSite( + this, + options, + )); + } - /** - * Retrieves a list of categories - */ - async listCategories( - includeSubcategories?: boolean | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(categoriesListCategories(this, includeSubcategories, options)); - } + /** + * Retrieves a list of categories + */ + async listCategories( + includeSubcategories?: boolean | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesListCategories( + this, + includeSubcategories, + options, + )); + } - /** - * List topics - */ - async listCategoryTopics( - id: number, - slug: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(categoriesListCategoryTopics(this, id, slug, options)); - } + /** + * List topics + */ + async listCategoryTopics( + id: number, + slug: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesListCategoryTopics( + this, + id, + slug, + options, + )); + } - /** - * Updates a category - */ - async updateCategory( - id: number, - requestBody?: operations.UpdateCategoryRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(categoriesUpdateCategory(this, id, requestBody, options)); - } + /** + * Updates a category + */ + async updateCategory( + id: number, + requestBody?: operations.UpdateCategoryRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(categoriesUpdateCategory( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/groups.ts b/src/sdk/groups.ts index a404ea6..ebede9f 100644 --- a/src/sdk/groups.ts +++ b/src/sdk/groups.ts @@ -15,80 +15,119 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Groups extends ClientSDK { - /** - * Add group members - */ - async addGroupMembers( - id: number, - requestBody?: operations.AddGroupMembersRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsAddGroupMembers(this, id, requestBody, options)); - } + /** + * Add group members + */ + async addGroupMembers( + id: number, + requestBody?: operations.AddGroupMembersRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsAddGroupMembers( + this, + id, + requestBody, + options, + )); + } - /** - * Create a group - */ - async createGroup( - request?: operations.CreateGroupRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsCreateGroup(this, request, options)); - } + /** + * Create a group + */ + async createGroup( + request?: operations.CreateGroupRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsCreateGroup( + this, + request, + options, + )); + } - /** - * Delete a group - */ - async deleteGroup( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsDeleteGroup(this, id, options)); - } + /** + * Delete a group + */ + async deleteGroup( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsDeleteGroup( + this, + id, + options, + )); + } - /** - * Get a group - */ - async getGroup(id: string, options?: RequestOptions): Promise { - return unwrapAsync(groupsGetGroup(this, id, options)); - } + /** + * Get a group + */ + async getGroup( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsGetGroup( + this, + id, + options, + )); + } - /** - * List group members - */ - async listGroupMembers( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsListGroupMembers(this, id, options)); - } + /** + * List group members + */ + async listGroupMembers( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsListGroupMembers( + this, + id, + options, + )); + } - /** - * List groups - */ - async listGroups(options?: RequestOptions): Promise { - return unwrapAsync(groupsListGroups(this, options)); - } + /** + * List groups + */ + async listGroups( + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsListGroups( + this, + options, + )); + } - /** - * Remove group members - */ - async removeGroupMembers( - id: number, - requestBody?: operations.RemoveGroupMembersRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsRemoveGroupMembers(this, id, requestBody, options)); - } + /** + * Remove group members + */ + async removeGroupMembers( + id: number, + requestBody?: operations.RemoveGroupMembersRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsRemoveGroupMembers( + this, + id, + requestBody, + options, + )); + } - /** - * Update a group - */ - async updateGroup( - id: number, - requestBody?: operations.UpdateGroupRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(groupsUpdateGroup(this, id, requestBody, options)); - } + /** + * Update a group + */ + async updateGroup( + id: number, + requestBody?: operations.UpdateGroupRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsUpdateGroup( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/invites.ts b/src/sdk/invites.ts index ec1d3e8..5f160fa 100644 --- a/src/sdk/invites.ts +++ b/src/sdk/invites.ts @@ -9,30 +9,41 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Invites extends ClientSDK { - /** - * Create an invite - */ - async createInvite( - apiKey: string, - apiUsername: string, - requestBody?: operations.CreateInviteRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(invitesCreateInvite(this, apiKey, apiUsername, requestBody, options)); - } + /** + * Create an invite + */ + async createInvite( + apiKey: string, + apiUsername: string, + requestBody?: operations.CreateInviteRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(invitesCreateInvite( + this, + apiKey, + apiUsername, + requestBody, + options, + )); + } - /** - * Invite to topic - */ - async inviteToTopic( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.InviteToTopicRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - invitesInviteToTopic(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Invite to topic + */ + async inviteToTopic( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.InviteToTopicRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(invitesInviteToTopic( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/models/errors/httpclienterrors.ts b/src/sdk/models/errors/httpclienterrors.ts index cdb2995..b34f612 100644 --- a/src/sdk/models/errors/httpclienterrors.ts +++ b/src/sdk/models/errors/httpclienterrors.ts @@ -6,43 +6,43 @@ * Base class for all HTTP errors. */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } - - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; - } + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; } + + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; + } + } } /** * An error to capture unrecognised or unexpected errors when making HTTP calls. */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + override name = "UnexpectedClientError"; } /** * An error that is raised when any inputs used to create a request are invalid. */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + override name = "InvalidRequestError"; } /** * An error that is raised when a HTTP request was aborted by the client error. */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + override readonly name = "RequestAbortedError"; } /** @@ -50,7 +50,7 @@ export class RequestAbortedError extends HTTPClientError { * signal timeout. */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + override readonly name = "RequestTimeoutError"; } /** @@ -58,5 +58,5 @@ export class RequestTimeoutError extends HTTPClientError { * a server. */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + override readonly name = "ConnectionError"; } diff --git a/src/sdk/models/errors/sdkerror.ts b/src/sdk/models/errors/sdkerror.ts index 80e3aa4..001f465 100644 --- a/src/sdk/models/errors/sdkerror.ts +++ b/src/sdk/models/errors/sdkerror.ts @@ -3,23 +3,25 @@ */ export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; + public readonly statusCode: number; + public readonly contentType: string; - constructor( - message: string, - public readonly rawResponse: Response, - public readonly body: string = "" - ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; - super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`); + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); - this.statusCode = statusCode; - this.contentType = contentType; + this.statusCode = statusCode; + this.contentType = contentType; - this.name = "SDKError"; - } + this.name = "SDKError"; + } } diff --git a/src/sdk/models/operations/abortmultipart.ts b/src/sdk/models/operations/abortmultipart.ts index 1e1dede..465e266 100644 --- a/src/sdk/models/operations/abortmultipart.ts +++ b/src/sdk/models/operations/abortmultipart.ts @@ -2,92 +2,88 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type AbortMultipartRequestBody = { - /** - * The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3. - */ - externalUploadIdentifier: string; + /** + * The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3. + */ + externalUploadIdentifier: string; }; /** * external upload initialized */ export type AbortMultipartResponseBody = { - success: string; + success: string; }; /** @internal */ export const AbortMultipartRequestBody$inboundSchema: z.ZodType< - AbortMultipartRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - external_upload_identifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - external_upload_identifier: "externalUploadIdentifier", - }); - }); + AbortMultipartRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + external_upload_identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "external_upload_identifier": "externalUploadIdentifier", + }); +}); /** @internal */ export type AbortMultipartRequestBody$Outbound = { - external_upload_identifier: string; + external_upload_identifier: string; }; /** @internal */ export const AbortMultipartRequestBody$outboundSchema: z.ZodType< - AbortMultipartRequestBody$Outbound, - z.ZodTypeDef, - AbortMultipartRequestBody -> = z - .object({ - externalUploadIdentifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - externalUploadIdentifier: "external_upload_identifier", - }); - }); + AbortMultipartRequestBody$Outbound, + z.ZodTypeDef, + AbortMultipartRequestBody +> = z.object({ + externalUploadIdentifier: z.string(), +}).transform((v) => { + return remap$(v, { + externalUploadIdentifier: "external_upload_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AbortMultipartRequestBody$ { - /** @deprecated use `AbortMultipartRequestBody$inboundSchema` instead. */ - export const inboundSchema = AbortMultipartRequestBody$inboundSchema; - /** @deprecated use `AbortMultipartRequestBody$outboundSchema` instead. */ - export const outboundSchema = AbortMultipartRequestBody$outboundSchema; - /** @deprecated use `AbortMultipartRequestBody$Outbound` instead. */ - export type Outbound = AbortMultipartRequestBody$Outbound; + /** @deprecated use `AbortMultipartRequestBody$inboundSchema` instead. */ + export const inboundSchema = AbortMultipartRequestBody$inboundSchema; + /** @deprecated use `AbortMultipartRequestBody$outboundSchema` instead. */ + export const outboundSchema = AbortMultipartRequestBody$outboundSchema; + /** @deprecated use `AbortMultipartRequestBody$Outbound` instead. */ + export type Outbound = AbortMultipartRequestBody$Outbound; } /** @internal */ export const AbortMultipartResponseBody$inboundSchema: z.ZodType< - AbortMultipartResponseBody, - z.ZodTypeDef, - unknown + AbortMultipartResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type AbortMultipartResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const AbortMultipartResponseBody$outboundSchema: z.ZodType< - AbortMultipartResponseBody$Outbound, - z.ZodTypeDef, - AbortMultipartResponseBody + AbortMultipartResponseBody$Outbound, + z.ZodTypeDef, + AbortMultipartResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -95,10 +91,10 @@ export const AbortMultipartResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AbortMultipartResponseBody$ { - /** @deprecated use `AbortMultipartResponseBody$inboundSchema` instead. */ - export const inboundSchema = AbortMultipartResponseBody$inboundSchema; - /** @deprecated use `AbortMultipartResponseBody$outboundSchema` instead. */ - export const outboundSchema = AbortMultipartResponseBody$outboundSchema; - /** @deprecated use `AbortMultipartResponseBody$Outbound` instead. */ - export type Outbound = AbortMultipartResponseBody$Outbound; + /** @deprecated use `AbortMultipartResponseBody$inboundSchema` instead. */ + export const inboundSchema = AbortMultipartResponseBody$inboundSchema; + /** @deprecated use `AbortMultipartResponseBody$outboundSchema` instead. */ + export const outboundSchema = AbortMultipartResponseBody$outboundSchema; + /** @deprecated use `AbortMultipartResponseBody$Outbound` instead. */ + export type Outbound = AbortMultipartResponseBody$Outbound; } diff --git a/src/sdk/models/operations/activateuser.ts b/src/sdk/models/operations/activateuser.ts index e98acf8..3e97e68 100644 --- a/src/sdk/models/operations/activateuser.ts +++ b/src/sdk/models/operations/activateuser.ts @@ -5,37 +5,37 @@ import * as z from "zod"; export type ActivateUserRequest = { - id: number; + id: number; }; /** * response */ export type ActivateUserResponseBody = { - success: string; + success: string; }; /** @internal */ export const ActivateUserRequest$inboundSchema: z.ZodType< - ActivateUserRequest, - z.ZodTypeDef, - unknown + ActivateUserRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type ActivateUserRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const ActivateUserRequest$outboundSchema: z.ZodType< - ActivateUserRequest$Outbound, - z.ZodTypeDef, - ActivateUserRequest + ActivateUserRequest$Outbound, + z.ZodTypeDef, + ActivateUserRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -43,35 +43,35 @@ export const ActivateUserRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivateUserRequest$ { - /** @deprecated use `ActivateUserRequest$inboundSchema` instead. */ - export const inboundSchema = ActivateUserRequest$inboundSchema; - /** @deprecated use `ActivateUserRequest$outboundSchema` instead. */ - export const outboundSchema = ActivateUserRequest$outboundSchema; - /** @deprecated use `ActivateUserRequest$Outbound` instead. */ - export type Outbound = ActivateUserRequest$Outbound; + /** @deprecated use `ActivateUserRequest$inboundSchema` instead. */ + export const inboundSchema = ActivateUserRequest$inboundSchema; + /** @deprecated use `ActivateUserRequest$outboundSchema` instead. */ + export const outboundSchema = ActivateUserRequest$outboundSchema; + /** @deprecated use `ActivateUserRequest$Outbound` instead. */ + export type Outbound = ActivateUserRequest$Outbound; } /** @internal */ export const ActivateUserResponseBody$inboundSchema: z.ZodType< - ActivateUserResponseBody, - z.ZodTypeDef, - unknown + ActivateUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type ActivateUserResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const ActivateUserResponseBody$outboundSchema: z.ZodType< - ActivateUserResponseBody$Outbound, - z.ZodTypeDef, - ActivateUserResponseBody + ActivateUserResponseBody$Outbound, + z.ZodTypeDef, + ActivateUserResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -79,10 +79,10 @@ export const ActivateUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActivateUserResponseBody$ { - /** @deprecated use `ActivateUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = ActivateUserResponseBody$inboundSchema; - /** @deprecated use `ActivateUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = ActivateUserResponseBody$outboundSchema; - /** @deprecated use `ActivateUserResponseBody$Outbound` instead. */ - export type Outbound = ActivateUserResponseBody$Outbound; + /** @deprecated use `ActivateUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = ActivateUserResponseBody$inboundSchema; + /** @deprecated use `ActivateUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = ActivateUserResponseBody$outboundSchema; + /** @deprecated use `ActivateUserResponseBody$Outbound` instead. */ + export type Outbound = ActivateUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/addgroupmembers.ts b/src/sdk/models/operations/addgroupmembers.ts index fffffe2..c3379dd 100644 --- a/src/sdk/models/operations/addgroupmembers.ts +++ b/src/sdk/models/operations/addgroupmembers.ts @@ -2,51 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type AddGroupMembersRequestBody = { - /** - * comma separated list - */ - usernames?: string | undefined; + /** + * comma separated list + */ + usernames?: string | undefined; }; export type AddGroupMembersRequest = { - requestBody?: AddGroupMembersRequestBody | undefined; - id: number; + requestBody?: AddGroupMembersRequestBody | undefined; + id: number; }; /** * success response */ export type AddGroupMembersResponseBody = { - emails: Array; - success: string; - usernames: Array; + emails: Array; + success: string; + usernames: Array; }; /** @internal */ export const AddGroupMembersRequestBody$inboundSchema: z.ZodType< - AddGroupMembersRequestBody, - z.ZodTypeDef, - unknown + AddGroupMembersRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - usernames: z.string().optional(), + usernames: z.string().optional(), }); /** @internal */ export type AddGroupMembersRequestBody$Outbound = { - usernames?: string | undefined; + usernames?: string | undefined; }; /** @internal */ export const AddGroupMembersRequestBody$outboundSchema: z.ZodType< - AddGroupMembersRequestBody$Outbound, - z.ZodTypeDef, - AddGroupMembersRequestBody + AddGroupMembersRequestBody$Outbound, + z.ZodTypeDef, + AddGroupMembersRequestBody > = z.object({ - usernames: z.string().optional(), + usernames: z.string().optional(), }); /** @@ -54,92 +54,90 @@ export const AddGroupMembersRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddGroupMembersRequestBody$ { - /** @deprecated use `AddGroupMembersRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddGroupMembersRequestBody$inboundSchema; - /** @deprecated use `AddGroupMembersRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddGroupMembersRequestBody$outboundSchema; - /** @deprecated use `AddGroupMembersRequestBody$Outbound` instead. */ - export type Outbound = AddGroupMembersRequestBody$Outbound; + /** @deprecated use `AddGroupMembersRequestBody$inboundSchema` instead. */ + export const inboundSchema = AddGroupMembersRequestBody$inboundSchema; + /** @deprecated use `AddGroupMembersRequestBody$outboundSchema` instead. */ + export const outboundSchema = AddGroupMembersRequestBody$outboundSchema; + /** @deprecated use `AddGroupMembersRequestBody$Outbound` instead. */ + export type Outbound = AddGroupMembersRequestBody$Outbound; } /** @internal */ export const AddGroupMembersRequest$inboundSchema: z.ZodType< - AddGroupMembersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => AddGroupMembersRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + AddGroupMembersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => AddGroupMembersRequestBody$inboundSchema) + .optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type AddGroupMembersRequest$Outbound = { - RequestBody?: AddGroupMembersRequestBody$Outbound | undefined; - id: number; + RequestBody?: AddGroupMembersRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const AddGroupMembersRequest$outboundSchema: z.ZodType< - AddGroupMembersRequest$Outbound, - z.ZodTypeDef, - AddGroupMembersRequest -> = z - .object({ - requestBody: z.lazy(() => AddGroupMembersRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + AddGroupMembersRequest$Outbound, + z.ZodTypeDef, + AddGroupMembersRequest +> = z.object({ + requestBody: z.lazy(() => AddGroupMembersRequestBody$outboundSchema) + .optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddGroupMembersRequest$ { - /** @deprecated use `AddGroupMembersRequest$inboundSchema` instead. */ - export const inboundSchema = AddGroupMembersRequest$inboundSchema; - /** @deprecated use `AddGroupMembersRequest$outboundSchema` instead. */ - export const outboundSchema = AddGroupMembersRequest$outboundSchema; - /** @deprecated use `AddGroupMembersRequest$Outbound` instead. */ - export type Outbound = AddGroupMembersRequest$Outbound; + /** @deprecated use `AddGroupMembersRequest$inboundSchema` instead. */ + export const inboundSchema = AddGroupMembersRequest$inboundSchema; + /** @deprecated use `AddGroupMembersRequest$outboundSchema` instead. */ + export const outboundSchema = AddGroupMembersRequest$outboundSchema; + /** @deprecated use `AddGroupMembersRequest$Outbound` instead. */ + export type Outbound = AddGroupMembersRequest$Outbound; } /** @internal */ export const AddGroupMembersResponseBody$inboundSchema: z.ZodType< - AddGroupMembersResponseBody, - z.ZodTypeDef, - unknown + AddGroupMembersResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - emails: z.array(z.any()), - success: z.string(), - usernames: z.array(z.any()), + emails: z.array(z.any()), + success: z.string(), + usernames: z.array(z.any()), }); /** @internal */ export type AddGroupMembersResponseBody$Outbound = { - emails: Array; - success: string; - usernames: Array; + emails: Array; + success: string; + usernames: Array; }; /** @internal */ export const AddGroupMembersResponseBody$outboundSchema: z.ZodType< - AddGroupMembersResponseBody$Outbound, - z.ZodTypeDef, - AddGroupMembersResponseBody + AddGroupMembersResponseBody$Outbound, + z.ZodTypeDef, + AddGroupMembersResponseBody > = z.object({ - emails: z.array(z.any()), - success: z.string(), - usernames: z.array(z.any()), + emails: z.array(z.any()), + success: z.string(), + usernames: z.array(z.any()), }); /** @@ -147,10 +145,10 @@ export const AddGroupMembersResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddGroupMembersResponseBody$ { - /** @deprecated use `AddGroupMembersResponseBody$inboundSchema` instead. */ - export const inboundSchema = AddGroupMembersResponseBody$inboundSchema; - /** @deprecated use `AddGroupMembersResponseBody$outboundSchema` instead. */ - export const outboundSchema = AddGroupMembersResponseBody$outboundSchema; - /** @deprecated use `AddGroupMembersResponseBody$Outbound` instead. */ - export type Outbound = AddGroupMembersResponseBody$Outbound; + /** @deprecated use `AddGroupMembersResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddGroupMembersResponseBody$inboundSchema; + /** @deprecated use `AddGroupMembersResponseBody$outboundSchema` instead. */ + export const outboundSchema = AddGroupMembersResponseBody$outboundSchema; + /** @deprecated use `AddGroupMembersResponseBody$Outbound` instead. */ + export type Outbound = AddGroupMembersResponseBody$Outbound; } diff --git a/src/sdk/models/operations/admingetuser.ts b/src/sdk/models/operations/admingetuser.ts index 49b50b4..36da6c9 100644 --- a/src/sdk/models/operations/admingetuser.ts +++ b/src/sdk/models/operations/admingetuser.ts @@ -2,190 +2,190 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type AdminGetUserRequest = { - id: number; + id: number; }; export type ApprovedBy = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type AdminGetUserExternalIds = {}; export type AdminGetUserGroups = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canSeeMembers: boolean; - defaultNotificationLevel: number; - displayName: string; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canSeeMembers: boolean; + defaultNotificationLevel: number; + displayName: string; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; export type PenaltyCounts = { - silenced: number; - suspended: number; + silenced: number; + suspended: number; }; export type AdminGetUserPenaltyCounts = { - silenced: number; - suspended: number; - total: number; + silenced: number; + suspended: number; + total: number; }; export type Tl3Requirements = { - daysVisited: number; - maxFlaggedByUsers: number; - maxFlaggedPosts: number; - minDaysVisited: number; - minLikesGiven: number; - minLikesReceived: number; - minLikesReceivedDays: number; - minLikesReceivedUsers: number; - minPostsRead: number; - minPostsReadAllTime: number; - minTopicsRepliedTo: number; - minTopicsViewed: number; - minTopicsViewedAllTime: number; - numFlaggedByUsers: number; - numFlaggedPosts: number; - numLikesGiven: number; - numLikesReceived: number; - numLikesReceivedDays: number; - numLikesReceivedUsers: number; - numTopicsRepliedTo: number; - onGracePeriod: boolean; - penaltyCounts: AdminGetUserPenaltyCounts; - postsRead: number; - postsReadAllTime: number; - requirementsLost: boolean; - requirementsMet: boolean; - timePeriod: number; - topicsViewed: number; - topicsViewedAllTime: number; - trustLevelLocked: boolean; + daysVisited: number; + maxFlaggedByUsers: number; + maxFlaggedPosts: number; + minDaysVisited: number; + minLikesGiven: number; + minLikesReceived: number; + minLikesReceivedDays: number; + minLikesReceivedUsers: number; + minPostsRead: number; + minPostsReadAllTime: number; + minTopicsRepliedTo: number; + minTopicsViewed: number; + minTopicsViewedAllTime: number; + numFlaggedByUsers: number; + numFlaggedPosts: number; + numLikesGiven: number; + numLikesReceived: number; + numLikesReceivedDays: number; + numLikesReceivedUsers: number; + numTopicsRepliedTo: number; + onGracePeriod: boolean; + penaltyCounts: AdminGetUserPenaltyCounts; + postsRead: number; + postsReadAllTime: number; + requirementsLost: boolean; + requirementsMet: boolean; + timePeriod: number; + topicsViewed: number; + topicsViewedAllTime: number; + trustLevelLocked: boolean; }; /** * response */ export type AdminGetUserResponseBody = { - active: boolean; - admin: boolean; - apiKeyCount: number; - approvedBy: ApprovedBy | null; - associatedAccounts?: Array | undefined; - avatarTemplate: string; - badgeCount: number; - bounceScore: number | null; - canActivate: boolean; - canBeAnonymized: boolean; - canBeDeleted: boolean; - canBeMerged: boolean; - canDeactivate: boolean; - canDeleteAllPosts: boolean; - canDeleteSsoRecord: boolean; - canDisableSecondFactor: boolean; - canGrantAdmin: boolean; - canGrantModeration: boolean; - canImpersonate: boolean; - canRevokeAdmin: boolean; - canRevokeModeration: boolean; - canSendActivationEmail: boolean; - canViewActionLogs: boolean; - createdAt: string; - createdAtAge: number | null; - daysVisited: number; - externalIds: AdminGetUserExternalIds; - flagsGivenCount: number; - flagsReceivedCount: number; - fullSuspendReason: string | null; - groups: Array; - id: number; - ipAddress: string; - lastEmailedAge: number | null; - lastEmailedAt: string | null; - lastSeenAge: number | null; - lastSeenAt: string | null; - likeCount: number; - likeGivenCount: number; - manualLockedTrustLevel: string | null; - moderator: boolean; - name: string | null; - nextPenalty?: string | undefined; - penaltyCounts?: PenaltyCounts | undefined; - postCount: number; - postEditsCount?: number | null | undefined; - postsReadCount: number; - primaryGroupId: string | null; - privateTopicsCount: number; - registrationIpAddress: string | null; - resetBounceScoreAfter: string | null; - silenceReason: string | null; - silencedBy: string | null; - singleSignOnRecord: string | null; - staged: boolean; - suspendedBy: string | null; - timeRead: number; - title: string | null; - tl3Requirements?: Tl3Requirements | undefined; - topicCount: number; - topicsEntered: number; - trustLevel: number; - username: string; - warningsReceivedCount: number; + active: boolean; + admin: boolean; + apiKeyCount: number; + approvedBy: ApprovedBy | null; + associatedAccounts?: Array | undefined; + avatarTemplate: string; + badgeCount: number; + bounceScore: number | null; + canActivate: boolean; + canBeAnonymized: boolean; + canBeDeleted: boolean; + canBeMerged: boolean; + canDeactivate: boolean; + canDeleteAllPosts: boolean; + canDeleteSsoRecord: boolean; + canDisableSecondFactor: boolean; + canGrantAdmin: boolean; + canGrantModeration: boolean; + canImpersonate: boolean; + canRevokeAdmin: boolean; + canRevokeModeration: boolean; + canSendActivationEmail: boolean; + canViewActionLogs: boolean; + createdAt: string; + createdAtAge: number | null; + daysVisited: number; + externalIds: AdminGetUserExternalIds; + flagsGivenCount: number; + flagsReceivedCount: number; + fullSuspendReason: string | null; + groups: Array; + id: number; + ipAddress: string; + lastEmailedAge: number | null; + lastEmailedAt: string | null; + lastSeenAge: number | null; + lastSeenAt: string | null; + likeCount: number; + likeGivenCount: number; + manualLockedTrustLevel: string | null; + moderator: boolean; + name: string | null; + nextPenalty?: string | undefined; + penaltyCounts?: PenaltyCounts | undefined; + postCount: number; + postEditsCount?: number | null | undefined; + postsReadCount: number; + primaryGroupId: string | null; + privateTopicsCount: number; + registrationIpAddress: string | null; + resetBounceScoreAfter: string | null; + silenceReason: string | null; + silencedBy: string | null; + singleSignOnRecord: string | null; + staged: boolean; + suspendedBy: string | null; + timeRead: number; + title: string | null; + tl3Requirements?: Tl3Requirements | undefined; + topicCount: number; + topicsEntered: number; + trustLevel: number; + username: string; + warningsReceivedCount: number; }; /** @internal */ export const AdminGetUserRequest$inboundSchema: z.ZodType< - AdminGetUserRequest, - z.ZodTypeDef, - unknown + AdminGetUserRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type AdminGetUserRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const AdminGetUserRequest$outboundSchema: z.ZodType< - AdminGetUserRequest$Outbound, - z.ZodTypeDef, - AdminGetUserRequest + AdminGetUserRequest$Outbound, + z.ZodTypeDef, + AdminGetUserRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -193,68 +193,72 @@ export const AdminGetUserRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminGetUserRequest$ { - /** @deprecated use `AdminGetUserRequest$inboundSchema` instead. */ - export const inboundSchema = AdminGetUserRequest$inboundSchema; - /** @deprecated use `AdminGetUserRequest$outboundSchema` instead. */ - export const outboundSchema = AdminGetUserRequest$outboundSchema; - /** @deprecated use `AdminGetUserRequest$Outbound` instead. */ - export type Outbound = AdminGetUserRequest$Outbound; + /** @deprecated use `AdminGetUserRequest$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserRequest$inboundSchema; + /** @deprecated use `AdminGetUserRequest$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserRequest$outboundSchema; + /** @deprecated use `AdminGetUserRequest$Outbound` instead. */ + export type Outbound = AdminGetUserRequest$Outbound; } /** @internal */ -export const ApprovedBy$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const ApprovedBy$inboundSchema: z.ZodType< + ApprovedBy, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ApprovedBy$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ -export const ApprovedBy$outboundSchema: z.ZodType = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); +export const ApprovedBy$outboundSchema: z.ZodType< + ApprovedBy$Outbound, + z.ZodTypeDef, + ApprovedBy +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApprovedBy$ { - /** @deprecated use `ApprovedBy$inboundSchema` instead. */ - export const inboundSchema = ApprovedBy$inboundSchema; - /** @deprecated use `ApprovedBy$outboundSchema` instead. */ - export const outboundSchema = ApprovedBy$outboundSchema; - /** @deprecated use `ApprovedBy$Outbound` instead. */ - export type Outbound = ApprovedBy$Outbound; + /** @deprecated use `ApprovedBy$inboundSchema` instead. */ + export const inboundSchema = ApprovedBy$inboundSchema; + /** @deprecated use `ApprovedBy$outboundSchema` instead. */ + export const outboundSchema = ApprovedBy$outboundSchema; + /** @deprecated use `ApprovedBy$Outbound` instead. */ + export type Outbound = ApprovedBy$Outbound; } /** @internal */ export const AdminGetUserExternalIds$inboundSchema: z.ZodType< - AdminGetUserExternalIds, - z.ZodTypeDef, - unknown + AdminGetUserExternalIds, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -262,9 +266,9 @@ export type AdminGetUserExternalIds$Outbound = {}; /** @internal */ export const AdminGetUserExternalIds$outboundSchema: z.ZodType< - AdminGetUserExternalIds$Outbound, - z.ZodTypeDef, - AdminGetUserExternalIds + AdminGetUserExternalIds$Outbound, + z.ZodTypeDef, + AdminGetUserExternalIds > = z.object({}); /** @@ -272,220 +276,219 @@ export const AdminGetUserExternalIds$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminGetUserExternalIds$ { - /** @deprecated use `AdminGetUserExternalIds$inboundSchema` instead. */ - export const inboundSchema = AdminGetUserExternalIds$inboundSchema; - /** @deprecated use `AdminGetUserExternalIds$outboundSchema` instead. */ - export const outboundSchema = AdminGetUserExternalIds$outboundSchema; - /** @deprecated use `AdminGetUserExternalIds$Outbound` instead. */ - export type Outbound = AdminGetUserExternalIds$Outbound; + /** @deprecated use `AdminGetUserExternalIds$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserExternalIds$inboundSchema; + /** @deprecated use `AdminGetUserExternalIds$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserExternalIds$outboundSchema; + /** @deprecated use `AdminGetUserExternalIds$Outbound` instead. */ + export type Outbound = AdminGetUserExternalIds$Outbound; } /** @internal */ export const AdminGetUserGroups$inboundSchema: z.ZodType< - AdminGetUserGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - display_name: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - display_name: "displayName", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); - }); + AdminGetUserGroups, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + display_name: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "display_name": "displayName", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + }); +}); /** @internal */ export type AdminGetUserGroups$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_see_members: boolean; - default_notification_level: number; - display_name: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_see_members: boolean; + default_notification_level: number; + display_name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ export const AdminGetUserGroups$outboundSchema: z.ZodType< - AdminGetUserGroups$Outbound, - z.ZodTypeDef, - AdminGetUserGroups -> = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - displayName: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - displayName: "display_name", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); + AdminGetUserGroups$Outbound, + z.ZodTypeDef, + AdminGetUserGroups +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + displayName: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + displayName: "display_name", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminGetUserGroups$ { - /** @deprecated use `AdminGetUserGroups$inboundSchema` instead. */ - export const inboundSchema = AdminGetUserGroups$inboundSchema; - /** @deprecated use `AdminGetUserGroups$outboundSchema` instead. */ - export const outboundSchema = AdminGetUserGroups$outboundSchema; - /** @deprecated use `AdminGetUserGroups$Outbound` instead. */ - export type Outbound = AdminGetUserGroups$Outbound; + /** @deprecated use `AdminGetUserGroups$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserGroups$inboundSchema; + /** @deprecated use `AdminGetUserGroups$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserGroups$outboundSchema; + /** @deprecated use `AdminGetUserGroups$Outbound` instead. */ + export type Outbound = AdminGetUserGroups$Outbound; } /** @internal */ -export const PenaltyCounts$inboundSchema: z.ZodType = - z.object({ - silenced: z.number().int(), - suspended: z.number().int(), - }); +export const PenaltyCounts$inboundSchema: z.ZodType< + PenaltyCounts, + z.ZodTypeDef, + unknown +> = z.object({ + silenced: z.number().int(), + suspended: z.number().int(), +}); /** @internal */ export type PenaltyCounts$Outbound = { - silenced: number; - suspended: number; + silenced: number; + suspended: number; }; /** @internal */ export const PenaltyCounts$outboundSchema: z.ZodType< - PenaltyCounts$Outbound, - z.ZodTypeDef, - PenaltyCounts + PenaltyCounts$Outbound, + z.ZodTypeDef, + PenaltyCounts > = z.object({ - silenced: z.number().int(), - suspended: z.number().int(), + silenced: z.number().int(), + suspended: z.number().int(), }); /** @@ -493,41 +496,41 @@ export const PenaltyCounts$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PenaltyCounts$ { - /** @deprecated use `PenaltyCounts$inboundSchema` instead. */ - export const inboundSchema = PenaltyCounts$inboundSchema; - /** @deprecated use `PenaltyCounts$outboundSchema` instead. */ - export const outboundSchema = PenaltyCounts$outboundSchema; - /** @deprecated use `PenaltyCounts$Outbound` instead. */ - export type Outbound = PenaltyCounts$Outbound; + /** @deprecated use `PenaltyCounts$inboundSchema` instead. */ + export const inboundSchema = PenaltyCounts$inboundSchema; + /** @deprecated use `PenaltyCounts$outboundSchema` instead. */ + export const outboundSchema = PenaltyCounts$outboundSchema; + /** @deprecated use `PenaltyCounts$Outbound` instead. */ + export type Outbound = PenaltyCounts$Outbound; } /** @internal */ export const AdminGetUserPenaltyCounts$inboundSchema: z.ZodType< - AdminGetUserPenaltyCounts, - z.ZodTypeDef, - unknown + AdminGetUserPenaltyCounts, + z.ZodTypeDef, + unknown > = z.object({ - silenced: z.number().int(), - suspended: z.number().int(), - total: z.number().int(), + silenced: z.number().int(), + suspended: z.number().int(), + total: z.number().int(), }); /** @internal */ export type AdminGetUserPenaltyCounts$Outbound = { - silenced: number; - suspended: number; - total: number; + silenced: number; + suspended: number; + total: number; }; /** @internal */ export const AdminGetUserPenaltyCounts$outboundSchema: z.ZodType< - AdminGetUserPenaltyCounts$Outbound, - z.ZodTypeDef, - AdminGetUserPenaltyCounts + AdminGetUserPenaltyCounts$Outbound, + z.ZodTypeDef, + AdminGetUserPenaltyCounts > = z.object({ - silenced: z.number().int(), - suspended: z.number().int(), - total: z.number().int(), + silenced: z.number().int(), + suspended: z.number().int(), + total: z.number().int(), }); /** @@ -535,544 +538,540 @@ export const AdminGetUserPenaltyCounts$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminGetUserPenaltyCounts$ { - /** @deprecated use `AdminGetUserPenaltyCounts$inboundSchema` instead. */ - export const inboundSchema = AdminGetUserPenaltyCounts$inboundSchema; - /** @deprecated use `AdminGetUserPenaltyCounts$outboundSchema` instead. */ - export const outboundSchema = AdminGetUserPenaltyCounts$outboundSchema; - /** @deprecated use `AdminGetUserPenaltyCounts$Outbound` instead. */ - export type Outbound = AdminGetUserPenaltyCounts$Outbound; + /** @deprecated use `AdminGetUserPenaltyCounts$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserPenaltyCounts$inboundSchema; + /** @deprecated use `AdminGetUserPenaltyCounts$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserPenaltyCounts$outboundSchema; + /** @deprecated use `AdminGetUserPenaltyCounts$Outbound` instead. */ + export type Outbound = AdminGetUserPenaltyCounts$Outbound; } /** @internal */ -export const Tl3Requirements$inboundSchema: z.ZodType = z - .object({ - days_visited: z.number().int(), - max_flagged_by_users: z.number().int(), - max_flagged_posts: z.number().int(), - min_days_visited: z.number().int(), - min_likes_given: z.number().int(), - min_likes_received: z.number().int(), - min_likes_received_days: z.number().int(), - min_likes_received_users: z.number().int(), - min_posts_read: z.number().int(), - min_posts_read_all_time: z.number().int(), - min_topics_replied_to: z.number().int(), - min_topics_viewed: z.number().int(), - min_topics_viewed_all_time: z.number().int(), - num_flagged_by_users: z.number().int(), - num_flagged_posts: z.number().int(), - num_likes_given: z.number().int(), - num_likes_received: z.number().int(), - num_likes_received_days: z.number().int(), - num_likes_received_users: z.number().int(), - num_topics_replied_to: z.number().int(), - on_grace_period: z.boolean(), - penalty_counts: z.lazy(() => AdminGetUserPenaltyCounts$inboundSchema), - posts_read: z.number().int(), - posts_read_all_time: z.number().int(), - requirements_lost: z.boolean(), - requirements_met: z.boolean(), - time_period: z.number().int(), - topics_viewed: z.number().int(), - topics_viewed_all_time: z.number().int(), - trust_level_locked: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - days_visited: "daysVisited", - max_flagged_by_users: "maxFlaggedByUsers", - max_flagged_posts: "maxFlaggedPosts", - min_days_visited: "minDaysVisited", - min_likes_given: "minLikesGiven", - min_likes_received: "minLikesReceived", - min_likes_received_days: "minLikesReceivedDays", - min_likes_received_users: "minLikesReceivedUsers", - min_posts_read: "minPostsRead", - min_posts_read_all_time: "minPostsReadAllTime", - min_topics_replied_to: "minTopicsRepliedTo", - min_topics_viewed: "minTopicsViewed", - min_topics_viewed_all_time: "minTopicsViewedAllTime", - num_flagged_by_users: "numFlaggedByUsers", - num_flagged_posts: "numFlaggedPosts", - num_likes_given: "numLikesGiven", - num_likes_received: "numLikesReceived", - num_likes_received_days: "numLikesReceivedDays", - num_likes_received_users: "numLikesReceivedUsers", - num_topics_replied_to: "numTopicsRepliedTo", - on_grace_period: "onGracePeriod", - penalty_counts: "penaltyCounts", - posts_read: "postsRead", - posts_read_all_time: "postsReadAllTime", - requirements_lost: "requirementsLost", - requirements_met: "requirementsMet", - time_period: "timePeriod", - topics_viewed: "topicsViewed", - topics_viewed_all_time: "topicsViewedAllTime", - trust_level_locked: "trustLevelLocked", - }); - }); +export const Tl3Requirements$inboundSchema: z.ZodType< + Tl3Requirements, + z.ZodTypeDef, + unknown +> = z.object({ + days_visited: z.number().int(), + max_flagged_by_users: z.number().int(), + max_flagged_posts: z.number().int(), + min_days_visited: z.number().int(), + min_likes_given: z.number().int(), + min_likes_received: z.number().int(), + min_likes_received_days: z.number().int(), + min_likes_received_users: z.number().int(), + min_posts_read: z.number().int(), + min_posts_read_all_time: z.number().int(), + min_topics_replied_to: z.number().int(), + min_topics_viewed: z.number().int(), + min_topics_viewed_all_time: z.number().int(), + num_flagged_by_users: z.number().int(), + num_flagged_posts: z.number().int(), + num_likes_given: z.number().int(), + num_likes_received: z.number().int(), + num_likes_received_days: z.number().int(), + num_likes_received_users: z.number().int(), + num_topics_replied_to: z.number().int(), + on_grace_period: z.boolean(), + penalty_counts: z.lazy(() => AdminGetUserPenaltyCounts$inboundSchema), + posts_read: z.number().int(), + posts_read_all_time: z.number().int(), + requirements_lost: z.boolean(), + requirements_met: z.boolean(), + time_period: z.number().int(), + topics_viewed: z.number().int(), + topics_viewed_all_time: z.number().int(), + trust_level_locked: z.boolean(), +}).transform((v) => { + return remap$(v, { + "days_visited": "daysVisited", + "max_flagged_by_users": "maxFlaggedByUsers", + "max_flagged_posts": "maxFlaggedPosts", + "min_days_visited": "minDaysVisited", + "min_likes_given": "minLikesGiven", + "min_likes_received": "minLikesReceived", + "min_likes_received_days": "minLikesReceivedDays", + "min_likes_received_users": "minLikesReceivedUsers", + "min_posts_read": "minPostsRead", + "min_posts_read_all_time": "minPostsReadAllTime", + "min_topics_replied_to": "minTopicsRepliedTo", + "min_topics_viewed": "minTopicsViewed", + "min_topics_viewed_all_time": "minTopicsViewedAllTime", + "num_flagged_by_users": "numFlaggedByUsers", + "num_flagged_posts": "numFlaggedPosts", + "num_likes_given": "numLikesGiven", + "num_likes_received": "numLikesReceived", + "num_likes_received_days": "numLikesReceivedDays", + "num_likes_received_users": "numLikesReceivedUsers", + "num_topics_replied_to": "numTopicsRepliedTo", + "on_grace_period": "onGracePeriod", + "penalty_counts": "penaltyCounts", + "posts_read": "postsRead", + "posts_read_all_time": "postsReadAllTime", + "requirements_lost": "requirementsLost", + "requirements_met": "requirementsMet", + "time_period": "timePeriod", + "topics_viewed": "topicsViewed", + "topics_viewed_all_time": "topicsViewedAllTime", + "trust_level_locked": "trustLevelLocked", + }); +}); /** @internal */ export type Tl3Requirements$Outbound = { - days_visited: number; - max_flagged_by_users: number; - max_flagged_posts: number; - min_days_visited: number; - min_likes_given: number; - min_likes_received: number; - min_likes_received_days: number; - min_likes_received_users: number; - min_posts_read: number; - min_posts_read_all_time: number; - min_topics_replied_to: number; - min_topics_viewed: number; - min_topics_viewed_all_time: number; - num_flagged_by_users: number; - num_flagged_posts: number; - num_likes_given: number; - num_likes_received: number; - num_likes_received_days: number; - num_likes_received_users: number; - num_topics_replied_to: number; - on_grace_period: boolean; - penalty_counts: AdminGetUserPenaltyCounts$Outbound; - posts_read: number; - posts_read_all_time: number; - requirements_lost: boolean; - requirements_met: boolean; - time_period: number; - topics_viewed: number; - topics_viewed_all_time: number; - trust_level_locked: boolean; + days_visited: number; + max_flagged_by_users: number; + max_flagged_posts: number; + min_days_visited: number; + min_likes_given: number; + min_likes_received: number; + min_likes_received_days: number; + min_likes_received_users: number; + min_posts_read: number; + min_posts_read_all_time: number; + min_topics_replied_to: number; + min_topics_viewed: number; + min_topics_viewed_all_time: number; + num_flagged_by_users: number; + num_flagged_posts: number; + num_likes_given: number; + num_likes_received: number; + num_likes_received_days: number; + num_likes_received_users: number; + num_topics_replied_to: number; + on_grace_period: boolean; + penalty_counts: AdminGetUserPenaltyCounts$Outbound; + posts_read: number; + posts_read_all_time: number; + requirements_lost: boolean; + requirements_met: boolean; + time_period: number; + topics_viewed: number; + topics_viewed_all_time: number; + trust_level_locked: boolean; }; /** @internal */ export const Tl3Requirements$outboundSchema: z.ZodType< - Tl3Requirements$Outbound, - z.ZodTypeDef, - Tl3Requirements -> = z - .object({ - daysVisited: z.number().int(), - maxFlaggedByUsers: z.number().int(), - maxFlaggedPosts: z.number().int(), - minDaysVisited: z.number().int(), - minLikesGiven: z.number().int(), - minLikesReceived: z.number().int(), - minLikesReceivedDays: z.number().int(), - minLikesReceivedUsers: z.number().int(), - minPostsRead: z.number().int(), - minPostsReadAllTime: z.number().int(), - minTopicsRepliedTo: z.number().int(), - minTopicsViewed: z.number().int(), - minTopicsViewedAllTime: z.number().int(), - numFlaggedByUsers: z.number().int(), - numFlaggedPosts: z.number().int(), - numLikesGiven: z.number().int(), - numLikesReceived: z.number().int(), - numLikesReceivedDays: z.number().int(), - numLikesReceivedUsers: z.number().int(), - numTopicsRepliedTo: z.number().int(), - onGracePeriod: z.boolean(), - penaltyCounts: z.lazy(() => AdminGetUserPenaltyCounts$outboundSchema), - postsRead: z.number().int(), - postsReadAllTime: z.number().int(), - requirementsLost: z.boolean(), - requirementsMet: z.boolean(), - timePeriod: z.number().int(), - topicsViewed: z.number().int(), - topicsViewedAllTime: z.number().int(), - trustLevelLocked: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - daysVisited: "days_visited", - maxFlaggedByUsers: "max_flagged_by_users", - maxFlaggedPosts: "max_flagged_posts", - minDaysVisited: "min_days_visited", - minLikesGiven: "min_likes_given", - minLikesReceived: "min_likes_received", - minLikesReceivedDays: "min_likes_received_days", - minLikesReceivedUsers: "min_likes_received_users", - minPostsRead: "min_posts_read", - minPostsReadAllTime: "min_posts_read_all_time", - minTopicsRepliedTo: "min_topics_replied_to", - minTopicsViewed: "min_topics_viewed", - minTopicsViewedAllTime: "min_topics_viewed_all_time", - numFlaggedByUsers: "num_flagged_by_users", - numFlaggedPosts: "num_flagged_posts", - numLikesGiven: "num_likes_given", - numLikesReceived: "num_likes_received", - numLikesReceivedDays: "num_likes_received_days", - numLikesReceivedUsers: "num_likes_received_users", - numTopicsRepliedTo: "num_topics_replied_to", - onGracePeriod: "on_grace_period", - penaltyCounts: "penalty_counts", - postsRead: "posts_read", - postsReadAllTime: "posts_read_all_time", - requirementsLost: "requirements_lost", - requirementsMet: "requirements_met", - timePeriod: "time_period", - topicsViewed: "topics_viewed", - topicsViewedAllTime: "topics_viewed_all_time", - trustLevelLocked: "trust_level_locked", - }); - }); + Tl3Requirements$Outbound, + z.ZodTypeDef, + Tl3Requirements +> = z.object({ + daysVisited: z.number().int(), + maxFlaggedByUsers: z.number().int(), + maxFlaggedPosts: z.number().int(), + minDaysVisited: z.number().int(), + minLikesGiven: z.number().int(), + minLikesReceived: z.number().int(), + minLikesReceivedDays: z.number().int(), + minLikesReceivedUsers: z.number().int(), + minPostsRead: z.number().int(), + minPostsReadAllTime: z.number().int(), + minTopicsRepliedTo: z.number().int(), + minTopicsViewed: z.number().int(), + minTopicsViewedAllTime: z.number().int(), + numFlaggedByUsers: z.number().int(), + numFlaggedPosts: z.number().int(), + numLikesGiven: z.number().int(), + numLikesReceived: z.number().int(), + numLikesReceivedDays: z.number().int(), + numLikesReceivedUsers: z.number().int(), + numTopicsRepliedTo: z.number().int(), + onGracePeriod: z.boolean(), + penaltyCounts: z.lazy(() => AdminGetUserPenaltyCounts$outboundSchema), + postsRead: z.number().int(), + postsReadAllTime: z.number().int(), + requirementsLost: z.boolean(), + requirementsMet: z.boolean(), + timePeriod: z.number().int(), + topicsViewed: z.number().int(), + topicsViewedAllTime: z.number().int(), + trustLevelLocked: z.boolean(), +}).transform((v) => { + return remap$(v, { + daysVisited: "days_visited", + maxFlaggedByUsers: "max_flagged_by_users", + maxFlaggedPosts: "max_flagged_posts", + minDaysVisited: "min_days_visited", + minLikesGiven: "min_likes_given", + minLikesReceived: "min_likes_received", + minLikesReceivedDays: "min_likes_received_days", + minLikesReceivedUsers: "min_likes_received_users", + minPostsRead: "min_posts_read", + minPostsReadAllTime: "min_posts_read_all_time", + minTopicsRepliedTo: "min_topics_replied_to", + minTopicsViewed: "min_topics_viewed", + minTopicsViewedAllTime: "min_topics_viewed_all_time", + numFlaggedByUsers: "num_flagged_by_users", + numFlaggedPosts: "num_flagged_posts", + numLikesGiven: "num_likes_given", + numLikesReceived: "num_likes_received", + numLikesReceivedDays: "num_likes_received_days", + numLikesReceivedUsers: "num_likes_received_users", + numTopicsRepliedTo: "num_topics_replied_to", + onGracePeriod: "on_grace_period", + penaltyCounts: "penalty_counts", + postsRead: "posts_read", + postsReadAllTime: "posts_read_all_time", + requirementsLost: "requirements_lost", + requirementsMet: "requirements_met", + timePeriod: "time_period", + topicsViewed: "topics_viewed", + topicsViewedAllTime: "topics_viewed_all_time", + trustLevelLocked: "trust_level_locked", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Tl3Requirements$ { - /** @deprecated use `Tl3Requirements$inboundSchema` instead. */ - export const inboundSchema = Tl3Requirements$inboundSchema; - /** @deprecated use `Tl3Requirements$outboundSchema` instead. */ - export const outboundSchema = Tl3Requirements$outboundSchema; - /** @deprecated use `Tl3Requirements$Outbound` instead. */ - export type Outbound = Tl3Requirements$Outbound; + /** @deprecated use `Tl3Requirements$inboundSchema` instead. */ + export const inboundSchema = Tl3Requirements$inboundSchema; + /** @deprecated use `Tl3Requirements$outboundSchema` instead. */ + export const outboundSchema = Tl3Requirements$outboundSchema; + /** @deprecated use `Tl3Requirements$Outbound` instead. */ + export type Outbound = Tl3Requirements$Outbound; } /** @internal */ export const AdminGetUserResponseBody$inboundSchema: z.ZodType< - AdminGetUserResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - active: z.boolean(), - admin: z.boolean(), - api_key_count: z.number().int(), - approved_by: z.nullable(z.lazy(() => ApprovedBy$inboundSchema)), - associated_accounts: z.array(z.any()).optional(), - avatar_template: z.string(), - badge_count: z.number().int(), - bounce_score: z.nullable(z.number().int()), - can_activate: z.boolean(), - can_be_anonymized: z.boolean(), - can_be_deleted: z.boolean(), - can_be_merged: z.boolean(), - can_deactivate: z.boolean(), - can_delete_all_posts: z.boolean(), - can_delete_sso_record: z.boolean(), - can_disable_second_factor: z.boolean(), - can_grant_admin: z.boolean(), - can_grant_moderation: z.boolean(), - can_impersonate: z.boolean(), - can_revoke_admin: z.boolean(), - can_revoke_moderation: z.boolean(), - can_send_activation_email: z.boolean(), - can_view_action_logs: z.boolean(), - created_at: z.string(), - created_at_age: z.nullable(z.number()), - days_visited: z.number().int(), - external_ids: z.lazy(() => AdminGetUserExternalIds$inboundSchema), - flags_given_count: z.number().int(), - flags_received_count: z.number().int(), - full_suspend_reason: z.nullable(z.string()), - groups: z.array(z.lazy(() => AdminGetUserGroups$inboundSchema)), - id: z.number().int(), - ip_address: z.string(), - last_emailed_age: z.nullable(z.number()), - last_emailed_at: z.nullable(z.string()), - last_seen_age: z.nullable(z.number()), - last_seen_at: z.nullable(z.string()), - like_count: z.number().int(), - like_given_count: z.number().int(), - manual_locked_trust_level: z.nullable(z.string()), - moderator: z.boolean(), - name: z.nullable(z.string()), - next_penalty: z.string().optional(), - penalty_counts: z.lazy(() => PenaltyCounts$inboundSchema).optional(), - post_count: z.number().int(), - post_edits_count: z.nullable(z.number().int()).optional(), - posts_read_count: z.number().int(), - primary_group_id: z.nullable(z.string()), - private_topics_count: z.number().int(), - registration_ip_address: z.nullable(z.string()), - reset_bounce_score_after: z.nullable(z.string()), - silence_reason: z.nullable(z.string()), - silenced_by: z.nullable(z.string()), - single_sign_on_record: z.nullable(z.string()), - staged: z.boolean(), - suspended_by: z.nullable(z.string()), - time_read: z.number().int(), - title: z.nullable(z.string()), - tl3_requirements: z.lazy(() => Tl3Requirements$inboundSchema).optional(), - topic_count: z.number().int(), - topics_entered: z.number().int(), - trust_level: z.number().int(), - username: z.string(), - warnings_received_count: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - api_key_count: "apiKeyCount", - approved_by: "approvedBy", - associated_accounts: "associatedAccounts", - avatar_template: "avatarTemplate", - badge_count: "badgeCount", - bounce_score: "bounceScore", - can_activate: "canActivate", - can_be_anonymized: "canBeAnonymized", - can_be_deleted: "canBeDeleted", - can_be_merged: "canBeMerged", - can_deactivate: "canDeactivate", - can_delete_all_posts: "canDeleteAllPosts", - can_delete_sso_record: "canDeleteSsoRecord", - can_disable_second_factor: "canDisableSecondFactor", - can_grant_admin: "canGrantAdmin", - can_grant_moderation: "canGrantModeration", - can_impersonate: "canImpersonate", - can_revoke_admin: "canRevokeAdmin", - can_revoke_moderation: "canRevokeModeration", - can_send_activation_email: "canSendActivationEmail", - can_view_action_logs: "canViewActionLogs", - created_at: "createdAt", - created_at_age: "createdAtAge", - days_visited: "daysVisited", - external_ids: "externalIds", - flags_given_count: "flagsGivenCount", - flags_received_count: "flagsReceivedCount", - full_suspend_reason: "fullSuspendReason", - ip_address: "ipAddress", - last_emailed_age: "lastEmailedAge", - last_emailed_at: "lastEmailedAt", - last_seen_age: "lastSeenAge", - last_seen_at: "lastSeenAt", - like_count: "likeCount", - like_given_count: "likeGivenCount", - manual_locked_trust_level: "manualLockedTrustLevel", - next_penalty: "nextPenalty", - penalty_counts: "penaltyCounts", - post_count: "postCount", - post_edits_count: "postEditsCount", - posts_read_count: "postsReadCount", - primary_group_id: "primaryGroupId", - private_topics_count: "privateTopicsCount", - registration_ip_address: "registrationIpAddress", - reset_bounce_score_after: "resetBounceScoreAfter", - silence_reason: "silenceReason", - silenced_by: "silencedBy", - single_sign_on_record: "singleSignOnRecord", - suspended_by: "suspendedBy", - time_read: "timeRead", - tl3_requirements: "tl3Requirements", - topic_count: "topicCount", - topics_entered: "topicsEntered", - trust_level: "trustLevel", - warnings_received_count: "warningsReceivedCount", - }); - }); + AdminGetUserResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + active: z.boolean(), + admin: z.boolean(), + api_key_count: z.number().int(), + approved_by: z.nullable(z.lazy(() => ApprovedBy$inboundSchema)), + associated_accounts: z.array(z.any()).optional(), + avatar_template: z.string(), + badge_count: z.number().int(), + bounce_score: z.nullable(z.number().int()), + can_activate: z.boolean(), + can_be_anonymized: z.boolean(), + can_be_deleted: z.boolean(), + can_be_merged: z.boolean(), + can_deactivate: z.boolean(), + can_delete_all_posts: z.boolean(), + can_delete_sso_record: z.boolean(), + can_disable_second_factor: z.boolean(), + can_grant_admin: z.boolean(), + can_grant_moderation: z.boolean(), + can_impersonate: z.boolean(), + can_revoke_admin: z.boolean(), + can_revoke_moderation: z.boolean(), + can_send_activation_email: z.boolean(), + can_view_action_logs: z.boolean(), + created_at: z.string(), + created_at_age: z.nullable(z.number()), + days_visited: z.number().int(), + external_ids: z.lazy(() => AdminGetUserExternalIds$inboundSchema), + flags_given_count: z.number().int(), + flags_received_count: z.number().int(), + full_suspend_reason: z.nullable(z.string()), + groups: z.array(z.lazy(() => AdminGetUserGroups$inboundSchema)), + id: z.number().int(), + ip_address: z.string(), + last_emailed_age: z.nullable(z.number()), + last_emailed_at: z.nullable(z.string()), + last_seen_age: z.nullable(z.number()), + last_seen_at: z.nullable(z.string()), + like_count: z.number().int(), + like_given_count: z.number().int(), + manual_locked_trust_level: z.nullable(z.string()), + moderator: z.boolean(), + name: z.nullable(z.string()), + next_penalty: z.string().optional(), + penalty_counts: z.lazy(() => PenaltyCounts$inboundSchema).optional(), + post_count: z.number().int(), + post_edits_count: z.nullable(z.number().int()).optional(), + posts_read_count: z.number().int(), + primary_group_id: z.nullable(z.string()), + private_topics_count: z.number().int(), + registration_ip_address: z.nullable(z.string()), + reset_bounce_score_after: z.nullable(z.string()), + silence_reason: z.nullable(z.string()), + silenced_by: z.nullable(z.string()), + single_sign_on_record: z.nullable(z.string()), + staged: z.boolean(), + suspended_by: z.nullable(z.string()), + time_read: z.number().int(), + title: z.nullable(z.string()), + tl3_requirements: z.lazy(() => Tl3Requirements$inboundSchema).optional(), + topic_count: z.number().int(), + topics_entered: z.number().int(), + trust_level: z.number().int(), + username: z.string(), + warnings_received_count: z.number().int(), +}).transform((v) => { + return remap$(v, { + "api_key_count": "apiKeyCount", + "approved_by": "approvedBy", + "associated_accounts": "associatedAccounts", + "avatar_template": "avatarTemplate", + "badge_count": "badgeCount", + "bounce_score": "bounceScore", + "can_activate": "canActivate", + "can_be_anonymized": "canBeAnonymized", + "can_be_deleted": "canBeDeleted", + "can_be_merged": "canBeMerged", + "can_deactivate": "canDeactivate", + "can_delete_all_posts": "canDeleteAllPosts", + "can_delete_sso_record": "canDeleteSsoRecord", + "can_disable_second_factor": "canDisableSecondFactor", + "can_grant_admin": "canGrantAdmin", + "can_grant_moderation": "canGrantModeration", + "can_impersonate": "canImpersonate", + "can_revoke_admin": "canRevokeAdmin", + "can_revoke_moderation": "canRevokeModeration", + "can_send_activation_email": "canSendActivationEmail", + "can_view_action_logs": "canViewActionLogs", + "created_at": "createdAt", + "created_at_age": "createdAtAge", + "days_visited": "daysVisited", + "external_ids": "externalIds", + "flags_given_count": "flagsGivenCount", + "flags_received_count": "flagsReceivedCount", + "full_suspend_reason": "fullSuspendReason", + "ip_address": "ipAddress", + "last_emailed_age": "lastEmailedAge", + "last_emailed_at": "lastEmailedAt", + "last_seen_age": "lastSeenAge", + "last_seen_at": "lastSeenAt", + "like_count": "likeCount", + "like_given_count": "likeGivenCount", + "manual_locked_trust_level": "manualLockedTrustLevel", + "next_penalty": "nextPenalty", + "penalty_counts": "penaltyCounts", + "post_count": "postCount", + "post_edits_count": "postEditsCount", + "posts_read_count": "postsReadCount", + "primary_group_id": "primaryGroupId", + "private_topics_count": "privateTopicsCount", + "registration_ip_address": "registrationIpAddress", + "reset_bounce_score_after": "resetBounceScoreAfter", + "silence_reason": "silenceReason", + "silenced_by": "silencedBy", + "single_sign_on_record": "singleSignOnRecord", + "suspended_by": "suspendedBy", + "time_read": "timeRead", + "tl3_requirements": "tl3Requirements", + "topic_count": "topicCount", + "topics_entered": "topicsEntered", + "trust_level": "trustLevel", + "warnings_received_count": "warningsReceivedCount", + }); +}); /** @internal */ export type AdminGetUserResponseBody$Outbound = { - active: boolean; - admin: boolean; - api_key_count: number; - approved_by: ApprovedBy$Outbound | null; - associated_accounts?: Array | undefined; - avatar_template: string; - badge_count: number; - bounce_score: number | null; - can_activate: boolean; - can_be_anonymized: boolean; - can_be_deleted: boolean; - can_be_merged: boolean; - can_deactivate: boolean; - can_delete_all_posts: boolean; - can_delete_sso_record: boolean; - can_disable_second_factor: boolean; - can_grant_admin: boolean; - can_grant_moderation: boolean; - can_impersonate: boolean; - can_revoke_admin: boolean; - can_revoke_moderation: boolean; - can_send_activation_email: boolean; - can_view_action_logs: boolean; - created_at: string; - created_at_age: number | null; - days_visited: number; - external_ids: AdminGetUserExternalIds$Outbound; - flags_given_count: number; - flags_received_count: number; - full_suspend_reason: string | null; - groups: Array; - id: number; - ip_address: string; - last_emailed_age: number | null; - last_emailed_at: string | null; - last_seen_age: number | null; - last_seen_at: string | null; - like_count: number; - like_given_count: number; - manual_locked_trust_level: string | null; - moderator: boolean; - name: string | null; - next_penalty?: string | undefined; - penalty_counts?: PenaltyCounts$Outbound | undefined; - post_count: number; - post_edits_count?: number | null | undefined; - posts_read_count: number; - primary_group_id: string | null; - private_topics_count: number; - registration_ip_address: string | null; - reset_bounce_score_after: string | null; - silence_reason: string | null; - silenced_by: string | null; - single_sign_on_record: string | null; - staged: boolean; - suspended_by: string | null; - time_read: number; - title: string | null; - tl3_requirements?: Tl3Requirements$Outbound | undefined; - topic_count: number; - topics_entered: number; - trust_level: number; - username: string; - warnings_received_count: number; + active: boolean; + admin: boolean; + api_key_count: number; + approved_by: ApprovedBy$Outbound | null; + associated_accounts?: Array | undefined; + avatar_template: string; + badge_count: number; + bounce_score: number | null; + can_activate: boolean; + can_be_anonymized: boolean; + can_be_deleted: boolean; + can_be_merged: boolean; + can_deactivate: boolean; + can_delete_all_posts: boolean; + can_delete_sso_record: boolean; + can_disable_second_factor: boolean; + can_grant_admin: boolean; + can_grant_moderation: boolean; + can_impersonate: boolean; + can_revoke_admin: boolean; + can_revoke_moderation: boolean; + can_send_activation_email: boolean; + can_view_action_logs: boolean; + created_at: string; + created_at_age: number | null; + days_visited: number; + external_ids: AdminGetUserExternalIds$Outbound; + flags_given_count: number; + flags_received_count: number; + full_suspend_reason: string | null; + groups: Array; + id: number; + ip_address: string; + last_emailed_age: number | null; + last_emailed_at: string | null; + last_seen_age: number | null; + last_seen_at: string | null; + like_count: number; + like_given_count: number; + manual_locked_trust_level: string | null; + moderator: boolean; + name: string | null; + next_penalty?: string | undefined; + penalty_counts?: PenaltyCounts$Outbound | undefined; + post_count: number; + post_edits_count?: number | null | undefined; + posts_read_count: number; + primary_group_id: string | null; + private_topics_count: number; + registration_ip_address: string | null; + reset_bounce_score_after: string | null; + silence_reason: string | null; + silenced_by: string | null; + single_sign_on_record: string | null; + staged: boolean; + suspended_by: string | null; + time_read: number; + title: string | null; + tl3_requirements?: Tl3Requirements$Outbound | undefined; + topic_count: number; + topics_entered: number; + trust_level: number; + username: string; + warnings_received_count: number; }; /** @internal */ export const AdminGetUserResponseBody$outboundSchema: z.ZodType< - AdminGetUserResponseBody$Outbound, - z.ZodTypeDef, - AdminGetUserResponseBody -> = z - .object({ - active: z.boolean(), - admin: z.boolean(), - apiKeyCount: z.number().int(), - approvedBy: z.nullable(z.lazy(() => ApprovedBy$outboundSchema)), - associatedAccounts: z.array(z.any()).optional(), - avatarTemplate: z.string(), - badgeCount: z.number().int(), - bounceScore: z.nullable(z.number().int()), - canActivate: z.boolean(), - canBeAnonymized: z.boolean(), - canBeDeleted: z.boolean(), - canBeMerged: z.boolean(), - canDeactivate: z.boolean(), - canDeleteAllPosts: z.boolean(), - canDeleteSsoRecord: z.boolean(), - canDisableSecondFactor: z.boolean(), - canGrantAdmin: z.boolean(), - canGrantModeration: z.boolean(), - canImpersonate: z.boolean(), - canRevokeAdmin: z.boolean(), - canRevokeModeration: z.boolean(), - canSendActivationEmail: z.boolean(), - canViewActionLogs: z.boolean(), - createdAt: z.string(), - createdAtAge: z.nullable(z.number()), - daysVisited: z.number().int(), - externalIds: z.lazy(() => AdminGetUserExternalIds$outboundSchema), - flagsGivenCount: z.number().int(), - flagsReceivedCount: z.number().int(), - fullSuspendReason: z.nullable(z.string()), - groups: z.array(z.lazy(() => AdminGetUserGroups$outboundSchema)), - id: z.number().int(), - ipAddress: z.string(), - lastEmailedAge: z.nullable(z.number()), - lastEmailedAt: z.nullable(z.string()), - lastSeenAge: z.nullable(z.number()), - lastSeenAt: z.nullable(z.string()), - likeCount: z.number().int(), - likeGivenCount: z.number().int(), - manualLockedTrustLevel: z.nullable(z.string()), - moderator: z.boolean(), - name: z.nullable(z.string()), - nextPenalty: z.string().optional(), - penaltyCounts: z.lazy(() => PenaltyCounts$outboundSchema).optional(), - postCount: z.number().int(), - postEditsCount: z.nullable(z.number().int()).optional(), - postsReadCount: z.number().int(), - primaryGroupId: z.nullable(z.string()), - privateTopicsCount: z.number().int(), - registrationIpAddress: z.nullable(z.string()), - resetBounceScoreAfter: z.nullable(z.string()), - silenceReason: z.nullable(z.string()), - silencedBy: z.nullable(z.string()), - singleSignOnRecord: z.nullable(z.string()), - staged: z.boolean(), - suspendedBy: z.nullable(z.string()), - timeRead: z.number().int(), - title: z.nullable(z.string()), - tl3Requirements: z.lazy(() => Tl3Requirements$outboundSchema).optional(), - topicCount: z.number().int(), - topicsEntered: z.number().int(), - trustLevel: z.number().int(), - username: z.string(), - warningsReceivedCount: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - apiKeyCount: "api_key_count", - approvedBy: "approved_by", - associatedAccounts: "associated_accounts", - avatarTemplate: "avatar_template", - badgeCount: "badge_count", - bounceScore: "bounce_score", - canActivate: "can_activate", - canBeAnonymized: "can_be_anonymized", - canBeDeleted: "can_be_deleted", - canBeMerged: "can_be_merged", - canDeactivate: "can_deactivate", - canDeleteAllPosts: "can_delete_all_posts", - canDeleteSsoRecord: "can_delete_sso_record", - canDisableSecondFactor: "can_disable_second_factor", - canGrantAdmin: "can_grant_admin", - canGrantModeration: "can_grant_moderation", - canImpersonate: "can_impersonate", - canRevokeAdmin: "can_revoke_admin", - canRevokeModeration: "can_revoke_moderation", - canSendActivationEmail: "can_send_activation_email", - canViewActionLogs: "can_view_action_logs", - createdAt: "created_at", - createdAtAge: "created_at_age", - daysVisited: "days_visited", - externalIds: "external_ids", - flagsGivenCount: "flags_given_count", - flagsReceivedCount: "flags_received_count", - fullSuspendReason: "full_suspend_reason", - ipAddress: "ip_address", - lastEmailedAge: "last_emailed_age", - lastEmailedAt: "last_emailed_at", - lastSeenAge: "last_seen_age", - lastSeenAt: "last_seen_at", - likeCount: "like_count", - likeGivenCount: "like_given_count", - manualLockedTrustLevel: "manual_locked_trust_level", - nextPenalty: "next_penalty", - penaltyCounts: "penalty_counts", - postCount: "post_count", - postEditsCount: "post_edits_count", - postsReadCount: "posts_read_count", - primaryGroupId: "primary_group_id", - privateTopicsCount: "private_topics_count", - registrationIpAddress: "registration_ip_address", - resetBounceScoreAfter: "reset_bounce_score_after", - silenceReason: "silence_reason", - silencedBy: "silenced_by", - singleSignOnRecord: "single_sign_on_record", - suspendedBy: "suspended_by", - timeRead: "time_read", - tl3Requirements: "tl3_requirements", - topicCount: "topic_count", - topicsEntered: "topics_entered", - trustLevel: "trust_level", - warningsReceivedCount: "warnings_received_count", - }); - }); + AdminGetUserResponseBody$Outbound, + z.ZodTypeDef, + AdminGetUserResponseBody +> = z.object({ + active: z.boolean(), + admin: z.boolean(), + apiKeyCount: z.number().int(), + approvedBy: z.nullable(z.lazy(() => ApprovedBy$outboundSchema)), + associatedAccounts: z.array(z.any()).optional(), + avatarTemplate: z.string(), + badgeCount: z.number().int(), + bounceScore: z.nullable(z.number().int()), + canActivate: z.boolean(), + canBeAnonymized: z.boolean(), + canBeDeleted: z.boolean(), + canBeMerged: z.boolean(), + canDeactivate: z.boolean(), + canDeleteAllPosts: z.boolean(), + canDeleteSsoRecord: z.boolean(), + canDisableSecondFactor: z.boolean(), + canGrantAdmin: z.boolean(), + canGrantModeration: z.boolean(), + canImpersonate: z.boolean(), + canRevokeAdmin: z.boolean(), + canRevokeModeration: z.boolean(), + canSendActivationEmail: z.boolean(), + canViewActionLogs: z.boolean(), + createdAt: z.string(), + createdAtAge: z.nullable(z.number()), + daysVisited: z.number().int(), + externalIds: z.lazy(() => AdminGetUserExternalIds$outboundSchema), + flagsGivenCount: z.number().int(), + flagsReceivedCount: z.number().int(), + fullSuspendReason: z.nullable(z.string()), + groups: z.array(z.lazy(() => AdminGetUserGroups$outboundSchema)), + id: z.number().int(), + ipAddress: z.string(), + lastEmailedAge: z.nullable(z.number()), + lastEmailedAt: z.nullable(z.string()), + lastSeenAge: z.nullable(z.number()), + lastSeenAt: z.nullable(z.string()), + likeCount: z.number().int(), + likeGivenCount: z.number().int(), + manualLockedTrustLevel: z.nullable(z.string()), + moderator: z.boolean(), + name: z.nullable(z.string()), + nextPenalty: z.string().optional(), + penaltyCounts: z.lazy(() => PenaltyCounts$outboundSchema).optional(), + postCount: z.number().int(), + postEditsCount: z.nullable(z.number().int()).optional(), + postsReadCount: z.number().int(), + primaryGroupId: z.nullable(z.string()), + privateTopicsCount: z.number().int(), + registrationIpAddress: z.nullable(z.string()), + resetBounceScoreAfter: z.nullable(z.string()), + silenceReason: z.nullable(z.string()), + silencedBy: z.nullable(z.string()), + singleSignOnRecord: z.nullable(z.string()), + staged: z.boolean(), + suspendedBy: z.nullable(z.string()), + timeRead: z.number().int(), + title: z.nullable(z.string()), + tl3Requirements: z.lazy(() => Tl3Requirements$outboundSchema).optional(), + topicCount: z.number().int(), + topicsEntered: z.number().int(), + trustLevel: z.number().int(), + username: z.string(), + warningsReceivedCount: z.number().int(), +}).transform((v) => { + return remap$(v, { + apiKeyCount: "api_key_count", + approvedBy: "approved_by", + associatedAccounts: "associated_accounts", + avatarTemplate: "avatar_template", + badgeCount: "badge_count", + bounceScore: "bounce_score", + canActivate: "can_activate", + canBeAnonymized: "can_be_anonymized", + canBeDeleted: "can_be_deleted", + canBeMerged: "can_be_merged", + canDeactivate: "can_deactivate", + canDeleteAllPosts: "can_delete_all_posts", + canDeleteSsoRecord: "can_delete_sso_record", + canDisableSecondFactor: "can_disable_second_factor", + canGrantAdmin: "can_grant_admin", + canGrantModeration: "can_grant_moderation", + canImpersonate: "can_impersonate", + canRevokeAdmin: "can_revoke_admin", + canRevokeModeration: "can_revoke_moderation", + canSendActivationEmail: "can_send_activation_email", + canViewActionLogs: "can_view_action_logs", + createdAt: "created_at", + createdAtAge: "created_at_age", + daysVisited: "days_visited", + externalIds: "external_ids", + flagsGivenCount: "flags_given_count", + flagsReceivedCount: "flags_received_count", + fullSuspendReason: "full_suspend_reason", + ipAddress: "ip_address", + lastEmailedAge: "last_emailed_age", + lastEmailedAt: "last_emailed_at", + lastSeenAge: "last_seen_age", + lastSeenAt: "last_seen_at", + likeCount: "like_count", + likeGivenCount: "like_given_count", + manualLockedTrustLevel: "manual_locked_trust_level", + nextPenalty: "next_penalty", + penaltyCounts: "penalty_counts", + postCount: "post_count", + postEditsCount: "post_edits_count", + postsReadCount: "posts_read_count", + primaryGroupId: "primary_group_id", + privateTopicsCount: "private_topics_count", + registrationIpAddress: "registration_ip_address", + resetBounceScoreAfter: "reset_bounce_score_after", + silenceReason: "silence_reason", + silencedBy: "silenced_by", + singleSignOnRecord: "single_sign_on_record", + suspendedBy: "suspended_by", + timeRead: "time_read", + tl3Requirements: "tl3_requirements", + topicCount: "topic_count", + topicsEntered: "topics_entered", + trustLevel: "trust_level", + warningsReceivedCount: "warnings_received_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminGetUserResponseBody$ { - /** @deprecated use `AdminGetUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = AdminGetUserResponseBody$inboundSchema; - /** @deprecated use `AdminGetUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = AdminGetUserResponseBody$outboundSchema; - /** @deprecated use `AdminGetUserResponseBody$Outbound` instead. */ - export type Outbound = AdminGetUserResponseBody$Outbound; + /** @deprecated use `AdminGetUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = AdminGetUserResponseBody$inboundSchema; + /** @deprecated use `AdminGetUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = AdminGetUserResponseBody$outboundSchema; + /** @deprecated use `AdminGetUserResponseBody$Outbound` instead. */ + export type Outbound = AdminGetUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/adminlistbadges.ts b/src/sdk/models/operations/adminlistbadges.ts index 50c75ec..23f2305 100644 --- a/src/sdk/models/operations/adminlistbadges.ts +++ b/src/sdk/models/operations/adminlistbadges.ts @@ -2,224 +2,231 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Triggers = { - none: number; - postAction: number; - postRevision: number; - trustLevelChange: number; - userChange: number; + none: number; + postAction: number; + postRevision: number; + trustLevelChange: number; + userChange: number; }; export type AdminBadges = { - badgeGroupingIds: Array; - badgeIds: Array; - badgeTypeIds: Array; - protectedSystemFields: Array; - triggers: Triggers; + badgeGroupingIds: Array; + badgeIds: Array; + badgeTypeIds: Array; + protectedSystemFields: Array; + triggers: Triggers; }; export type BadgeGroupings = { - description: string | null; - id: number; - name: string; - position: number; - system: boolean; + description: string | null; + id: number; + name: string; + position: number; + system: boolean; }; export type BadgeTypes = { - id: number; - name: string; - sortOrder: number; + id: number; + name: string; + sortOrder: number; }; export type Badges = { - allowTitle: boolean; - autoRevoke: boolean; - badgeGroupingId: number; - badgeTypeId: number; - description: string; - enabled: boolean; - grantCount: number; - i18nName?: string | null | undefined; - icon: string; - id: number; - imageUrl: string | null; - listable: boolean; - longDescription: string; - manuallyGrantable: boolean; - multipleGrant: boolean; - name: string; - query: string | null; - showPosts: boolean; - slug: string; - system: boolean; - targetPosts: boolean; - trigger: number | null; + allowTitle: boolean; + autoRevoke: boolean; + badgeGroupingId: number; + badgeTypeId: number; + description: string; + enabled: boolean; + grantCount: number; + i18nName?: string | null | undefined; + icon: string; + id: number; + imageUrl: string | null; + listable: boolean; + longDescription: string; + manuallyGrantable: boolean; + multipleGrant: boolean; + name: string; + query: string | null; + showPosts: boolean; + slug: string; + system: boolean; + targetPosts: boolean; + trigger: number | null; }; /** * success response */ export type AdminListBadgesResponseBody = { - adminBadges: AdminBadges; - badgeGroupings: Array; - badgeTypes: Array; - badges: Array; + adminBadges: AdminBadges; + badgeGroupings: Array; + badgeTypes: Array; + badges: Array; }; /** @internal */ -export const Triggers$inboundSchema: z.ZodType = z - .object({ - none: z.number().int(), - post_action: z.number().int(), - post_revision: z.number().int(), - trust_level_change: z.number().int(), - user_change: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - post_action: "postAction", - post_revision: "postRevision", - trust_level_change: "trustLevelChange", - user_change: "userChange", - }); - }); +export const Triggers$inboundSchema: z.ZodType< + Triggers, + z.ZodTypeDef, + unknown +> = z.object({ + none: z.number().int(), + post_action: z.number().int(), + post_revision: z.number().int(), + trust_level_change: z.number().int(), + user_change: z.number().int(), +}).transform((v) => { + return remap$(v, { + "post_action": "postAction", + "post_revision": "postRevision", + "trust_level_change": "trustLevelChange", + "user_change": "userChange", + }); +}); /** @internal */ export type Triggers$Outbound = { - none: number; - post_action: number; - post_revision: number; - trust_level_change: number; - user_change: number; + none: number; + post_action: number; + post_revision: number; + trust_level_change: number; + user_change: number; }; /** @internal */ -export const Triggers$outboundSchema: z.ZodType = z - .object({ - none: z.number().int(), - postAction: z.number().int(), - postRevision: z.number().int(), - trustLevelChange: z.number().int(), - userChange: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - postAction: "post_action", - postRevision: "post_revision", - trustLevelChange: "trust_level_change", - userChange: "user_change", - }); - }); +export const Triggers$outboundSchema: z.ZodType< + Triggers$Outbound, + z.ZodTypeDef, + Triggers +> = z.object({ + none: z.number().int(), + postAction: z.number().int(), + postRevision: z.number().int(), + trustLevelChange: z.number().int(), + userChange: z.number().int(), +}).transform((v) => { + return remap$(v, { + postAction: "post_action", + postRevision: "post_revision", + trustLevelChange: "trust_level_change", + userChange: "user_change", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Triggers$ { - /** @deprecated use `Triggers$inboundSchema` instead. */ - export const inboundSchema = Triggers$inboundSchema; - /** @deprecated use `Triggers$outboundSchema` instead. */ - export const outboundSchema = Triggers$outboundSchema; - /** @deprecated use `Triggers$Outbound` instead. */ - export type Outbound = Triggers$Outbound; + /** @deprecated use `Triggers$inboundSchema` instead. */ + export const inboundSchema = Triggers$inboundSchema; + /** @deprecated use `Triggers$outboundSchema` instead. */ + export const outboundSchema = Triggers$outboundSchema; + /** @deprecated use `Triggers$Outbound` instead. */ + export type Outbound = Triggers$Outbound; } /** @internal */ -export const AdminBadges$inboundSchema: z.ZodType = z - .object({ - badge_grouping_ids: z.array(z.any()), - badge_ids: z.array(z.any()), - badge_type_ids: z.array(z.any()), - protected_system_fields: z.array(z.any()), - triggers: z.lazy(() => Triggers$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - badge_grouping_ids: "badgeGroupingIds", - badge_ids: "badgeIds", - badge_type_ids: "badgeTypeIds", - protected_system_fields: "protectedSystemFields", - }); - }); +export const AdminBadges$inboundSchema: z.ZodType< + AdminBadges, + z.ZodTypeDef, + unknown +> = z.object({ + badge_grouping_ids: z.array(z.any()), + badge_ids: z.array(z.any()), + badge_type_ids: z.array(z.any()), + protected_system_fields: z.array(z.any()), + triggers: z.lazy(() => Triggers$inboundSchema), +}).transform((v) => { + return remap$(v, { + "badge_grouping_ids": "badgeGroupingIds", + "badge_ids": "badgeIds", + "badge_type_ids": "badgeTypeIds", + "protected_system_fields": "protectedSystemFields", + }); +}); /** @internal */ export type AdminBadges$Outbound = { - badge_grouping_ids: Array; - badge_ids: Array; - badge_type_ids: Array; - protected_system_fields: Array; - triggers: Triggers$Outbound; + badge_grouping_ids: Array; + badge_ids: Array; + badge_type_ids: Array; + protected_system_fields: Array; + triggers: Triggers$Outbound; }; /** @internal */ export const AdminBadges$outboundSchema: z.ZodType< - AdminBadges$Outbound, - z.ZodTypeDef, - AdminBadges -> = z - .object({ - badgeGroupingIds: z.array(z.any()), - badgeIds: z.array(z.any()), - badgeTypeIds: z.array(z.any()), - protectedSystemFields: z.array(z.any()), - triggers: z.lazy(() => Triggers$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - badgeGroupingIds: "badge_grouping_ids", - badgeIds: "badge_ids", - badgeTypeIds: "badge_type_ids", - protectedSystemFields: "protected_system_fields", - }); - }); + AdminBadges$Outbound, + z.ZodTypeDef, + AdminBadges +> = z.object({ + badgeGroupingIds: z.array(z.any()), + badgeIds: z.array(z.any()), + badgeTypeIds: z.array(z.any()), + protectedSystemFields: z.array(z.any()), + triggers: z.lazy(() => Triggers$outboundSchema), +}).transform((v) => { + return remap$(v, { + badgeGroupingIds: "badge_grouping_ids", + badgeIds: "badge_ids", + badgeTypeIds: "badge_type_ids", + protectedSystemFields: "protected_system_fields", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminBadges$ { - /** @deprecated use `AdminBadges$inboundSchema` instead. */ - export const inboundSchema = AdminBadges$inboundSchema; - /** @deprecated use `AdminBadges$outboundSchema` instead. */ - export const outboundSchema = AdminBadges$outboundSchema; - /** @deprecated use `AdminBadges$Outbound` instead. */ - export type Outbound = AdminBadges$Outbound; + /** @deprecated use `AdminBadges$inboundSchema` instead. */ + export const inboundSchema = AdminBadges$inboundSchema; + /** @deprecated use `AdminBadges$outboundSchema` instead. */ + export const outboundSchema = AdminBadges$outboundSchema; + /** @deprecated use `AdminBadges$Outbound` instead. */ + export type Outbound = AdminBadges$Outbound; } /** @internal */ -export const BadgeGroupings$inboundSchema: z.ZodType = - z.object({ - description: z.nullable(z.string()), - id: z.number().int(), - name: z.string(), - position: z.number().int(), - system: z.boolean(), - }); +export const BadgeGroupings$inboundSchema: z.ZodType< + BadgeGroupings, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()), + id: z.number().int(), + name: z.string(), + position: z.number().int(), + system: z.boolean(), +}); /** @internal */ export type BadgeGroupings$Outbound = { - description: string | null; - id: number; - name: string; - position: number; - system: boolean; + description: string | null; + id: number; + name: string; + position: number; + system: boolean; }; /** @internal */ export const BadgeGroupings$outboundSchema: z.ZodType< - BadgeGroupings$Outbound, - z.ZodTypeDef, - BadgeGroupings + BadgeGroupings$Outbound, + z.ZodTypeDef, + BadgeGroupings > = z.object({ - description: z.nullable(z.string()), - id: z.number().int(), - name: z.string(), - position: z.number().int(), - system: z.boolean(), + description: z.nullable(z.string()), + id: z.number().int(), + name: z.string(), + position: z.number().int(), + system: z.boolean(), }); /** @@ -227,242 +234,243 @@ export const BadgeGroupings$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BadgeGroupings$ { - /** @deprecated use `BadgeGroupings$inboundSchema` instead. */ - export const inboundSchema = BadgeGroupings$inboundSchema; - /** @deprecated use `BadgeGroupings$outboundSchema` instead. */ - export const outboundSchema = BadgeGroupings$outboundSchema; - /** @deprecated use `BadgeGroupings$Outbound` instead. */ - export type Outbound = BadgeGroupings$Outbound; + /** @deprecated use `BadgeGroupings$inboundSchema` instead. */ + export const inboundSchema = BadgeGroupings$inboundSchema; + /** @deprecated use `BadgeGroupings$outboundSchema` instead. */ + export const outboundSchema = BadgeGroupings$outboundSchema; + /** @deprecated use `BadgeGroupings$Outbound` instead. */ + export type Outbound = BadgeGroupings$Outbound; } /** @internal */ -export const BadgeTypes$inboundSchema: z.ZodType = z - .object({ - id: z.number().int(), - name: z.string(), - sort_order: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sort_order: "sortOrder", - }); - }); +export const BadgeTypes$inboundSchema: z.ZodType< + BadgeTypes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + name: z.string(), + sort_order: z.number().int(), +}).transform((v) => { + return remap$(v, { + "sort_order": "sortOrder", + }); +}); /** @internal */ export type BadgeTypes$Outbound = { - id: number; - name: string; - sort_order: number; + id: number; + name: string; + sort_order: number; }; /** @internal */ -export const BadgeTypes$outboundSchema: z.ZodType = z - .object({ - id: z.number().int(), - name: z.string(), - sortOrder: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sortOrder: "sort_order", - }); - }); +export const BadgeTypes$outboundSchema: z.ZodType< + BadgeTypes$Outbound, + z.ZodTypeDef, + BadgeTypes +> = z.object({ + id: z.number().int(), + name: z.string(), + sortOrder: z.number().int(), +}).transform((v) => { + return remap$(v, { + sortOrder: "sort_order", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BadgeTypes$ { - /** @deprecated use `BadgeTypes$inboundSchema` instead. */ - export const inboundSchema = BadgeTypes$inboundSchema; - /** @deprecated use `BadgeTypes$outboundSchema` instead. */ - export const outboundSchema = BadgeTypes$outboundSchema; - /** @deprecated use `BadgeTypes$Outbound` instead. */ - export type Outbound = BadgeTypes$Outbound; + /** @deprecated use `BadgeTypes$inboundSchema` instead. */ + export const inboundSchema = BadgeTypes$inboundSchema; + /** @deprecated use `BadgeTypes$outboundSchema` instead. */ + export const outboundSchema = BadgeTypes$outboundSchema; + /** @deprecated use `BadgeTypes$Outbound` instead. */ + export type Outbound = BadgeTypes$Outbound; } /** @internal */ export const Badges$inboundSchema: z.ZodType = z - .object({ - allow_title: z.boolean(), - auto_revoke: z.boolean(), - badge_grouping_id: z.number().int(), - badge_type_id: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grant_count: z.number().int(), - i18n_name: z.nullable(z.string()).optional(), - icon: z.string(), - id: z.number().int(), - image_url: z.nullable(z.string()), - listable: z.boolean(), - long_description: z.string(), - manually_grantable: z.boolean(), - multiple_grant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - show_posts: z.boolean(), - slug: z.string(), - system: z.boolean(), - target_posts: z.boolean(), - trigger: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - allow_title: "allowTitle", - auto_revoke: "autoRevoke", - badge_grouping_id: "badgeGroupingId", - badge_type_id: "badgeTypeId", - grant_count: "grantCount", - i18n_name: "i18nName", - image_url: "imageUrl", - long_description: "longDescription", - manually_grantable: "manuallyGrantable", - multiple_grant: "multipleGrant", - show_posts: "showPosts", - target_posts: "targetPosts", - }); + .object({ + allow_title: z.boolean(), + auto_revoke: z.boolean(), + badge_grouping_id: z.number().int(), + badge_type_id: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grant_count: z.number().int(), + i18n_name: z.nullable(z.string()).optional(), + icon: z.string(), + id: z.number().int(), + image_url: z.nullable(z.string()), + listable: z.boolean(), + long_description: z.string(), + manually_grantable: z.boolean(), + multiple_grant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + show_posts: z.boolean(), + slug: z.string(), + system: z.boolean(), + target_posts: z.boolean(), + trigger: z.nullable(z.number().int()), + }).transform((v) => { + return remap$(v, { + "allow_title": "allowTitle", + "auto_revoke": "autoRevoke", + "badge_grouping_id": "badgeGroupingId", + "badge_type_id": "badgeTypeId", + "grant_count": "grantCount", + "i18n_name": "i18nName", + "image_url": "imageUrl", + "long_description": "longDescription", + "manually_grantable": "manuallyGrantable", + "multiple_grant": "multipleGrant", + "show_posts": "showPosts", + "target_posts": "targetPosts", }); + }); /** @internal */ export type Badges$Outbound = { - allow_title: boolean; - auto_revoke: boolean; - badge_grouping_id: number; - badge_type_id: number; - description: string; - enabled: boolean; - grant_count: number; - i18n_name?: string | null | undefined; - icon: string; - id: number; - image_url: string | null; - listable: boolean; - long_description: string; - manually_grantable: boolean; - multiple_grant: boolean; - name: string; - query: string | null; - show_posts: boolean; - slug: string; - system: boolean; - target_posts: boolean; - trigger: number | null; + allow_title: boolean; + auto_revoke: boolean; + badge_grouping_id: number; + badge_type_id: number; + description: string; + enabled: boolean; + grant_count: number; + i18n_name?: string | null | undefined; + icon: string; + id: number; + image_url: string | null; + listable: boolean; + long_description: string; + manually_grantable: boolean; + multiple_grant: boolean; + name: string; + query: string | null; + show_posts: boolean; + slug: string; + system: boolean; + target_posts: boolean; + trigger: number | null; }; /** @internal */ -export const Badges$outboundSchema: z.ZodType = z - .object({ - allowTitle: z.boolean(), - autoRevoke: z.boolean(), - badgeGroupingId: z.number().int(), - badgeTypeId: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grantCount: z.number().int(), - i18nName: z.nullable(z.string()).optional(), - icon: z.string(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - listable: z.boolean(), - longDescription: z.string(), - manuallyGrantable: z.boolean(), - multipleGrant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - showPosts: z.boolean(), - slug: z.string(), - system: z.boolean(), - targetPosts: z.boolean(), - trigger: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - allowTitle: "allow_title", - autoRevoke: "auto_revoke", - badgeGroupingId: "badge_grouping_id", - badgeTypeId: "badge_type_id", - grantCount: "grant_count", - i18nName: "i18n_name", - imageUrl: "image_url", - longDescription: "long_description", - manuallyGrantable: "manually_grantable", - multipleGrant: "multiple_grant", - showPosts: "show_posts", - targetPosts: "target_posts", - }); - }); +export const Badges$outboundSchema: z.ZodType< + Badges$Outbound, + z.ZodTypeDef, + Badges +> = z.object({ + allowTitle: z.boolean(), + autoRevoke: z.boolean(), + badgeGroupingId: z.number().int(), + badgeTypeId: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grantCount: z.number().int(), + i18nName: z.nullable(z.string()).optional(), + icon: z.string(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + listable: z.boolean(), + longDescription: z.string(), + manuallyGrantable: z.boolean(), + multipleGrant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + showPosts: z.boolean(), + slug: z.string(), + system: z.boolean(), + targetPosts: z.boolean(), + trigger: z.nullable(z.number().int()), +}).transform((v) => { + return remap$(v, { + allowTitle: "allow_title", + autoRevoke: "auto_revoke", + badgeGroupingId: "badge_grouping_id", + badgeTypeId: "badge_type_id", + grantCount: "grant_count", + i18nName: "i18n_name", + imageUrl: "image_url", + longDescription: "long_description", + manuallyGrantable: "manually_grantable", + multipleGrant: "multiple_grant", + showPosts: "show_posts", + targetPosts: "target_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Badges$ { - /** @deprecated use `Badges$inboundSchema` instead. */ - export const inboundSchema = Badges$inboundSchema; - /** @deprecated use `Badges$outboundSchema` instead. */ - export const outboundSchema = Badges$outboundSchema; - /** @deprecated use `Badges$Outbound` instead. */ - export type Outbound = Badges$Outbound; + /** @deprecated use `Badges$inboundSchema` instead. */ + export const inboundSchema = Badges$inboundSchema; + /** @deprecated use `Badges$outboundSchema` instead. */ + export const outboundSchema = Badges$outboundSchema; + /** @deprecated use `Badges$Outbound` instead. */ + export type Outbound = Badges$Outbound; } /** @internal */ export const AdminListBadgesResponseBody$inboundSchema: z.ZodType< - AdminListBadgesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - admin_badges: z.lazy(() => AdminBadges$inboundSchema), - badge_groupings: z.array(z.lazy(() => BadgeGroupings$inboundSchema)), - badge_types: z.array(z.lazy(() => BadgeTypes$inboundSchema)), - badges: z.array(z.lazy(() => Badges$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - admin_badges: "adminBadges", - badge_groupings: "badgeGroupings", - badge_types: "badgeTypes", - }); - }); + AdminListBadgesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + admin_badges: z.lazy(() => AdminBadges$inboundSchema), + badge_groupings: z.array(z.lazy(() => BadgeGroupings$inboundSchema)), + badge_types: z.array(z.lazy(() => BadgeTypes$inboundSchema)), + badges: z.array(z.lazy(() => Badges$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "admin_badges": "adminBadges", + "badge_groupings": "badgeGroupings", + "badge_types": "badgeTypes", + }); +}); /** @internal */ export type AdminListBadgesResponseBody$Outbound = { - admin_badges: AdminBadges$Outbound; - badge_groupings: Array; - badge_types: Array; - badges: Array; + admin_badges: AdminBadges$Outbound; + badge_groupings: Array; + badge_types: Array; + badges: Array; }; /** @internal */ export const AdminListBadgesResponseBody$outboundSchema: z.ZodType< - AdminListBadgesResponseBody$Outbound, - z.ZodTypeDef, - AdminListBadgesResponseBody -> = z - .object({ - adminBadges: z.lazy(() => AdminBadges$outboundSchema), - badgeGroupings: z.array(z.lazy(() => BadgeGroupings$outboundSchema)), - badgeTypes: z.array(z.lazy(() => BadgeTypes$outboundSchema)), - badges: z.array(z.lazy(() => Badges$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - adminBadges: "admin_badges", - badgeGroupings: "badge_groupings", - badgeTypes: "badge_types", - }); - }); + AdminListBadgesResponseBody$Outbound, + z.ZodTypeDef, + AdminListBadgesResponseBody +> = z.object({ + adminBadges: z.lazy(() => AdminBadges$outboundSchema), + badgeGroupings: z.array(z.lazy(() => BadgeGroupings$outboundSchema)), + badgeTypes: z.array(z.lazy(() => BadgeTypes$outboundSchema)), + badges: z.array(z.lazy(() => Badges$outboundSchema)), +}).transform((v) => { + return remap$(v, { + adminBadges: "admin_badges", + badgeGroupings: "badge_groupings", + badgeTypes: "badge_types", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminListBadgesResponseBody$ { - /** @deprecated use `AdminListBadgesResponseBody$inboundSchema` instead. */ - export const inboundSchema = AdminListBadgesResponseBody$inboundSchema; - /** @deprecated use `AdminListBadgesResponseBody$outboundSchema` instead. */ - export const outboundSchema = AdminListBadgesResponseBody$outboundSchema; - /** @deprecated use `AdminListBadgesResponseBody$Outbound` instead. */ - export type Outbound = AdminListBadgesResponseBody$Outbound; + /** @deprecated use `AdminListBadgesResponseBody$inboundSchema` instead. */ + export const inboundSchema = AdminListBadgesResponseBody$inboundSchema; + /** @deprecated use `AdminListBadgesResponseBody$outboundSchema` instead. */ + export const outboundSchema = AdminListBadgesResponseBody$outboundSchema; + /** @deprecated use `AdminListBadgesResponseBody$Outbound` instead. */ + export type Outbound = AdminListBadgesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/adminlistusers.ts b/src/sdk/models/operations/adminlistusers.ts index c4b5a53..1b8bc96 100644 --- a/src/sdk/models/operations/adminlistusers.ts +++ b/src/sdk/models/operations/adminlistusers.ts @@ -2,355 +2,354 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const QueryParamAsc = { - True: "true", + True: "true", } as const; export type QueryParamAsc = ClosedEnum; export const Flag = { - Active: "active", - New: "new", - Staff: "staff", - Suspended: "suspended", - Blocked: "blocked", - Suspect: "suspect", + Active: "active", + New: "new", + Staff: "staff", + Suspended: "suspended", + Blocked: "blocked", + Suspect: "suspect", } as const; export type Flag = ClosedEnum; export const QueryParamOrder = { - Created: "created", - LastEmailed: "last_emailed", - Seen: "seen", - Username: "username", - Email: "email", - TrustLevel: "trust_level", - DaysVisited: "days_visited", - PostsRead: "posts_read", - TopicsViewed: "topics_viewed", - Posts: "posts", - ReadTime: "read_time", + Created: "created", + LastEmailed: "last_emailed", + Seen: "seen", + Username: "username", + Email: "email", + TrustLevel: "trust_level", + DaysVisited: "days_visited", + PostsRead: "posts_read", + TopicsViewed: "topics_viewed", + Posts: "posts", + ReadTime: "read_time", } as const; export type QueryParamOrder = ClosedEnum; export type AdminListUsersRequest = { - asc?: QueryParamAsc | undefined; - /** - * Filter to the user with this email address - */ - email?: string | undefined; - flag: Flag; - /** - * Filter to users with this IP address - */ - ip?: string | undefined; - order?: QueryParamOrder | undefined; - page?: number | undefined; - /** - * Include user email addresses in response. These requests will be logged in the staff action logs. - */ - showEmails?: boolean | undefined; - /** - * Include user stats information - */ - stats?: boolean | undefined; + asc?: QueryParamAsc | undefined; + /** + * Filter to the user with this email address + */ + email?: string | undefined; + flag: Flag; + /** + * Filter to users with this IP address + */ + ip?: string | undefined; + order?: QueryParamOrder | undefined; + page?: number | undefined; + /** + * Include user email addresses in response. These requests will be logged in the staff action logs. + */ + showEmails?: boolean | undefined; + /** + * Include user stats information + */ + stats?: boolean | undefined; }; export type AdminListUsersResponseBody = { - active: boolean; - admin: boolean; - avatarTemplate: string; - createdAt: string; - createdAtAge: number | null; - daysVisited: number; - email?: string | undefined; - id: number; - lastEmailedAge: number | null; - lastEmailedAt: string | null; - lastSeenAge: number | null; - lastSeenAt: string | null; - manualLockedTrustLevel: string | null; - moderator: boolean; - name: string | null; - postCount: number; - postsReadCount: number; - secondaryEmails?: Array | undefined; - staged: boolean; - timeRead: number; - title: string | null; - topicsEntered: number; - trustLevel: number; - username: string; + active: boolean; + admin: boolean; + avatarTemplate: string; + createdAt: string; + createdAtAge: number | null; + daysVisited: number; + email?: string | undefined; + id: number; + lastEmailedAge: number | null; + lastEmailedAt: string | null; + lastSeenAge: number | null; + lastSeenAt: string | null; + manualLockedTrustLevel: string | null; + moderator: boolean; + name: string | null; + postCount: number; + postsReadCount: number; + secondaryEmails?: Array | undefined; + staged: boolean; + timeRead: number; + title: string | null; + topicsEntered: number; + trustLevel: number; + username: string; }; /** @internal */ -export const QueryParamAsc$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamAsc); +export const QueryParamAsc$inboundSchema: z.ZodNativeEnum< + typeof QueryParamAsc +> = z.nativeEnum(QueryParamAsc); /** @internal */ -export const QueryParamAsc$outboundSchema: z.ZodNativeEnum = - QueryParamAsc$inboundSchema; +export const QueryParamAsc$outboundSchema: z.ZodNativeEnum< + typeof QueryParamAsc +> = QueryParamAsc$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamAsc$ { - /** @deprecated use `QueryParamAsc$inboundSchema` instead. */ - export const inboundSchema = QueryParamAsc$inboundSchema; - /** @deprecated use `QueryParamAsc$outboundSchema` instead. */ - export const outboundSchema = QueryParamAsc$outboundSchema; + /** @deprecated use `QueryParamAsc$inboundSchema` instead. */ + export const inboundSchema = QueryParamAsc$inboundSchema; + /** @deprecated use `QueryParamAsc$outboundSchema` instead. */ + export const outboundSchema = QueryParamAsc$outboundSchema; } /** @internal */ -export const Flag$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Flag); +export const Flag$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Flag, +); /** @internal */ -export const Flag$outboundSchema: z.ZodNativeEnum = Flag$inboundSchema; +export const Flag$outboundSchema: z.ZodNativeEnum = + Flag$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Flag$ { - /** @deprecated use `Flag$inboundSchema` instead. */ - export const inboundSchema = Flag$inboundSchema; - /** @deprecated use `Flag$outboundSchema` instead. */ - export const outboundSchema = Flag$outboundSchema; + /** @deprecated use `Flag$inboundSchema` instead. */ + export const inboundSchema = Flag$inboundSchema; + /** @deprecated use `Flag$outboundSchema` instead. */ + export const outboundSchema = Flag$outboundSchema; } /** @internal */ -export const QueryParamOrder$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamOrder); +export const QueryParamOrder$inboundSchema: z.ZodNativeEnum< + typeof QueryParamOrder +> = z.nativeEnum(QueryParamOrder); /** @internal */ -export const QueryParamOrder$outboundSchema: z.ZodNativeEnum = - QueryParamOrder$inboundSchema; +export const QueryParamOrder$outboundSchema: z.ZodNativeEnum< + typeof QueryParamOrder +> = QueryParamOrder$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamOrder$ { - /** @deprecated use `QueryParamOrder$inboundSchema` instead. */ - export const inboundSchema = QueryParamOrder$inboundSchema; - /** @deprecated use `QueryParamOrder$outboundSchema` instead. */ - export const outboundSchema = QueryParamOrder$outboundSchema; + /** @deprecated use `QueryParamOrder$inboundSchema` instead. */ + export const inboundSchema = QueryParamOrder$inboundSchema; + /** @deprecated use `QueryParamOrder$outboundSchema` instead. */ + export const outboundSchema = QueryParamOrder$outboundSchema; } /** @internal */ export const AdminListUsersRequest$inboundSchema: z.ZodType< - AdminListUsersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - asc: QueryParamAsc$inboundSchema.optional(), - email: z.string().optional(), - flag: Flag$inboundSchema, - ip: z.string().optional(), - order: QueryParamOrder$inboundSchema.optional(), - page: z.number().int().optional(), - show_emails: z.boolean().optional(), - stats: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - show_emails: "showEmails", - }); - }); + AdminListUsersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + asc: QueryParamAsc$inboundSchema.optional(), + email: z.string().optional(), + flag: Flag$inboundSchema, + ip: z.string().optional(), + order: QueryParamOrder$inboundSchema.optional(), + page: z.number().int().optional(), + show_emails: z.boolean().optional(), + stats: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "show_emails": "showEmails", + }); +}); /** @internal */ export type AdminListUsersRequest$Outbound = { - asc?: string | undefined; - email?: string | undefined; - flag: string; - ip?: string | undefined; - order?: string | undefined; - page?: number | undefined; - show_emails?: boolean | undefined; - stats?: boolean | undefined; + asc?: string | undefined; + email?: string | undefined; + flag: string; + ip?: string | undefined; + order?: string | undefined; + page?: number | undefined; + show_emails?: boolean | undefined; + stats?: boolean | undefined; }; /** @internal */ export const AdminListUsersRequest$outboundSchema: z.ZodType< - AdminListUsersRequest$Outbound, - z.ZodTypeDef, - AdminListUsersRequest -> = z - .object({ - asc: QueryParamAsc$outboundSchema.optional(), - email: z.string().optional(), - flag: Flag$outboundSchema, - ip: z.string().optional(), - order: QueryParamOrder$outboundSchema.optional(), - page: z.number().int().optional(), - showEmails: z.boolean().optional(), - stats: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - showEmails: "show_emails", - }); - }); + AdminListUsersRequest$Outbound, + z.ZodTypeDef, + AdminListUsersRequest +> = z.object({ + asc: QueryParamAsc$outboundSchema.optional(), + email: z.string().optional(), + flag: Flag$outboundSchema, + ip: z.string().optional(), + order: QueryParamOrder$outboundSchema.optional(), + page: z.number().int().optional(), + showEmails: z.boolean().optional(), + stats: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + showEmails: "show_emails", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminListUsersRequest$ { - /** @deprecated use `AdminListUsersRequest$inboundSchema` instead. */ - export const inboundSchema = AdminListUsersRequest$inboundSchema; - /** @deprecated use `AdminListUsersRequest$outboundSchema` instead. */ - export const outboundSchema = AdminListUsersRequest$outboundSchema; - /** @deprecated use `AdminListUsersRequest$Outbound` instead. */ - export type Outbound = AdminListUsersRequest$Outbound; + /** @deprecated use `AdminListUsersRequest$inboundSchema` instead. */ + export const inboundSchema = AdminListUsersRequest$inboundSchema; + /** @deprecated use `AdminListUsersRequest$outboundSchema` instead. */ + export const outboundSchema = AdminListUsersRequest$outboundSchema; + /** @deprecated use `AdminListUsersRequest$Outbound` instead. */ + export type Outbound = AdminListUsersRequest$Outbound; } /** @internal */ export const AdminListUsersResponseBody$inboundSchema: z.ZodType< - AdminListUsersResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - active: z.boolean(), - admin: z.boolean(), - avatar_template: z.string(), - created_at: z.string(), - created_at_age: z.nullable(z.number()), - days_visited: z.number().int(), - email: z.string().optional(), - id: z.number().int(), - last_emailed_age: z.nullable(z.number()), - last_emailed_at: z.nullable(z.string()), - last_seen_age: z.nullable(z.number()), - last_seen_at: z.nullable(z.string()), - manual_locked_trust_level: z.nullable(z.string()), - moderator: z.boolean(), - name: z.nullable(z.string()), - post_count: z.number().int(), - posts_read_count: z.number().int(), - secondary_emails: z.array(z.any()).optional(), - staged: z.boolean(), - time_read: z.number().int(), - title: z.nullable(z.string()), - topics_entered: z.number().int(), - trust_level: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - created_at: "createdAt", - created_at_age: "createdAtAge", - days_visited: "daysVisited", - last_emailed_age: "lastEmailedAge", - last_emailed_at: "lastEmailedAt", - last_seen_age: "lastSeenAge", - last_seen_at: "lastSeenAt", - manual_locked_trust_level: "manualLockedTrustLevel", - post_count: "postCount", - posts_read_count: "postsReadCount", - secondary_emails: "secondaryEmails", - time_read: "timeRead", - topics_entered: "topicsEntered", - trust_level: "trustLevel", - }); - }); + AdminListUsersResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + active: z.boolean(), + admin: z.boolean(), + avatar_template: z.string(), + created_at: z.string(), + created_at_age: z.nullable(z.number()), + days_visited: z.number().int(), + email: z.string().optional(), + id: z.number().int(), + last_emailed_age: z.nullable(z.number()), + last_emailed_at: z.nullable(z.string()), + last_seen_age: z.nullable(z.number()), + last_seen_at: z.nullable(z.string()), + manual_locked_trust_level: z.nullable(z.string()), + moderator: z.boolean(), + name: z.nullable(z.string()), + post_count: z.number().int(), + posts_read_count: z.number().int(), + secondary_emails: z.array(z.any()).optional(), + staged: z.boolean(), + time_read: z.number().int(), + title: z.nullable(z.string()), + topics_entered: z.number().int(), + trust_level: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + "created_at": "createdAt", + "created_at_age": "createdAtAge", + "days_visited": "daysVisited", + "last_emailed_age": "lastEmailedAge", + "last_emailed_at": "lastEmailedAt", + "last_seen_age": "lastSeenAge", + "last_seen_at": "lastSeenAt", + "manual_locked_trust_level": "manualLockedTrustLevel", + "post_count": "postCount", + "posts_read_count": "postsReadCount", + "secondary_emails": "secondaryEmails", + "time_read": "timeRead", + "topics_entered": "topicsEntered", + "trust_level": "trustLevel", + }); +}); /** @internal */ export type AdminListUsersResponseBody$Outbound = { - active: boolean; - admin: boolean; - avatar_template: string; - created_at: string; - created_at_age: number | null; - days_visited: number; - email?: string | undefined; - id: number; - last_emailed_age: number | null; - last_emailed_at: string | null; - last_seen_age: number | null; - last_seen_at: string | null; - manual_locked_trust_level: string | null; - moderator: boolean; - name: string | null; - post_count: number; - posts_read_count: number; - secondary_emails?: Array | undefined; - staged: boolean; - time_read: number; - title: string | null; - topics_entered: number; - trust_level: number; - username: string; + active: boolean; + admin: boolean; + avatar_template: string; + created_at: string; + created_at_age: number | null; + days_visited: number; + email?: string | undefined; + id: number; + last_emailed_age: number | null; + last_emailed_at: string | null; + last_seen_age: number | null; + last_seen_at: string | null; + manual_locked_trust_level: string | null; + moderator: boolean; + name: string | null; + post_count: number; + posts_read_count: number; + secondary_emails?: Array | undefined; + staged: boolean; + time_read: number; + title: string | null; + topics_entered: number; + trust_level: number; + username: string; }; /** @internal */ export const AdminListUsersResponseBody$outboundSchema: z.ZodType< - AdminListUsersResponseBody$Outbound, - z.ZodTypeDef, - AdminListUsersResponseBody -> = z - .object({ - active: z.boolean(), - admin: z.boolean(), - avatarTemplate: z.string(), - createdAt: z.string(), - createdAtAge: z.nullable(z.number()), - daysVisited: z.number().int(), - email: z.string().optional(), - id: z.number().int(), - lastEmailedAge: z.nullable(z.number()), - lastEmailedAt: z.nullable(z.string()), - lastSeenAge: z.nullable(z.number()), - lastSeenAt: z.nullable(z.string()), - manualLockedTrustLevel: z.nullable(z.string()), - moderator: z.boolean(), - name: z.nullable(z.string()), - postCount: z.number().int(), - postsReadCount: z.number().int(), - secondaryEmails: z.array(z.any()).optional(), - staged: z.boolean(), - timeRead: z.number().int(), - title: z.nullable(z.string()), - topicsEntered: z.number().int(), - trustLevel: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - createdAt: "created_at", - createdAtAge: "created_at_age", - daysVisited: "days_visited", - lastEmailedAge: "last_emailed_age", - lastEmailedAt: "last_emailed_at", - lastSeenAge: "last_seen_age", - lastSeenAt: "last_seen_at", - manualLockedTrustLevel: "manual_locked_trust_level", - postCount: "post_count", - postsReadCount: "posts_read_count", - secondaryEmails: "secondary_emails", - timeRead: "time_read", - topicsEntered: "topics_entered", - trustLevel: "trust_level", - }); - }); + AdminListUsersResponseBody$Outbound, + z.ZodTypeDef, + AdminListUsersResponseBody +> = z.object({ + active: z.boolean(), + admin: z.boolean(), + avatarTemplate: z.string(), + createdAt: z.string(), + createdAtAge: z.nullable(z.number()), + daysVisited: z.number().int(), + email: z.string().optional(), + id: z.number().int(), + lastEmailedAge: z.nullable(z.number()), + lastEmailedAt: z.nullable(z.string()), + lastSeenAge: z.nullable(z.number()), + lastSeenAt: z.nullable(z.string()), + manualLockedTrustLevel: z.nullable(z.string()), + moderator: z.boolean(), + name: z.nullable(z.string()), + postCount: z.number().int(), + postsReadCount: z.number().int(), + secondaryEmails: z.array(z.any()).optional(), + staged: z.boolean(), + timeRead: z.number().int(), + title: z.nullable(z.string()), + topicsEntered: z.number().int(), + trustLevel: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + createdAt: "created_at", + createdAtAge: "created_at_age", + daysVisited: "days_visited", + lastEmailedAge: "last_emailed_age", + lastEmailedAt: "last_emailed_at", + lastSeenAge: "last_seen_age", + lastSeenAt: "last_seen_at", + manualLockedTrustLevel: "manual_locked_trust_level", + postCount: "post_count", + postsReadCount: "posts_read_count", + secondaryEmails: "secondary_emails", + timeRead: "time_read", + topicsEntered: "topics_entered", + trustLevel: "trust_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AdminListUsersResponseBody$ { - /** @deprecated use `AdminListUsersResponseBody$inboundSchema` instead. */ - export const inboundSchema = AdminListUsersResponseBody$inboundSchema; - /** @deprecated use `AdminListUsersResponseBody$outboundSchema` instead. */ - export const outboundSchema = AdminListUsersResponseBody$outboundSchema; - /** @deprecated use `AdminListUsersResponseBody$Outbound` instead. */ - export type Outbound = AdminListUsersResponseBody$Outbound; + /** @deprecated use `AdminListUsersResponseBody$inboundSchema` instead. */ + export const inboundSchema = AdminListUsersResponseBody$inboundSchema; + /** @deprecated use `AdminListUsersResponseBody$outboundSchema` instead. */ + export const outboundSchema = AdminListUsersResponseBody$outboundSchema; + /** @deprecated use `AdminListUsersResponseBody$Outbound` instead. */ + export type Outbound = AdminListUsersResponseBody$Outbound; } diff --git a/src/sdk/models/operations/anonymizeuser.ts b/src/sdk/models/operations/anonymizeuser.ts index 2fa3c18..9422298 100644 --- a/src/sdk/models/operations/anonymizeuser.ts +++ b/src/sdk/models/operations/anonymizeuser.ts @@ -5,38 +5,38 @@ import * as z from "zod"; export type AnonymizeUserRequest = { - id: number; + id: number; }; /** * response */ export type AnonymizeUserResponseBody = { - success: string; - username: string; + success: string; + username: string; }; /** @internal */ export const AnonymizeUserRequest$inboundSchema: z.ZodType< - AnonymizeUserRequest, - z.ZodTypeDef, - unknown + AnonymizeUserRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type AnonymizeUserRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const AnonymizeUserRequest$outboundSchema: z.ZodType< - AnonymizeUserRequest$Outbound, - z.ZodTypeDef, - AnonymizeUserRequest + AnonymizeUserRequest$Outbound, + z.ZodTypeDef, + AnonymizeUserRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -44,38 +44,38 @@ export const AnonymizeUserRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnonymizeUserRequest$ { - /** @deprecated use `AnonymizeUserRequest$inboundSchema` instead. */ - export const inboundSchema = AnonymizeUserRequest$inboundSchema; - /** @deprecated use `AnonymizeUserRequest$outboundSchema` instead. */ - export const outboundSchema = AnonymizeUserRequest$outboundSchema; - /** @deprecated use `AnonymizeUserRequest$Outbound` instead. */ - export type Outbound = AnonymizeUserRequest$Outbound; + /** @deprecated use `AnonymizeUserRequest$inboundSchema` instead. */ + export const inboundSchema = AnonymizeUserRequest$inboundSchema; + /** @deprecated use `AnonymizeUserRequest$outboundSchema` instead. */ + export const outboundSchema = AnonymizeUserRequest$outboundSchema; + /** @deprecated use `AnonymizeUserRequest$Outbound` instead. */ + export type Outbound = AnonymizeUserRequest$Outbound; } /** @internal */ export const AnonymizeUserResponseBody$inboundSchema: z.ZodType< - AnonymizeUserResponseBody, - z.ZodTypeDef, - unknown + AnonymizeUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), - username: z.string(), + success: z.string(), + username: z.string(), }); /** @internal */ export type AnonymizeUserResponseBody$Outbound = { - success: string; - username: string; + success: string; + username: string; }; /** @internal */ export const AnonymizeUserResponseBody$outboundSchema: z.ZodType< - AnonymizeUserResponseBody$Outbound, - z.ZodTypeDef, - AnonymizeUserResponseBody + AnonymizeUserResponseBody$Outbound, + z.ZodTypeDef, + AnonymizeUserResponseBody > = z.object({ - success: z.string(), - username: z.string(), + success: z.string(), + username: z.string(), }); /** @@ -83,10 +83,10 @@ export const AnonymizeUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnonymizeUserResponseBody$ { - /** @deprecated use `AnonymizeUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = AnonymizeUserResponseBody$inboundSchema; - /** @deprecated use `AnonymizeUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = AnonymizeUserResponseBody$outboundSchema; - /** @deprecated use `AnonymizeUserResponseBody$Outbound` instead. */ - export type Outbound = AnonymizeUserResponseBody$Outbound; + /** @deprecated use `AnonymizeUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = AnonymizeUserResponseBody$inboundSchema; + /** @deprecated use `AnonymizeUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = AnonymizeUserResponseBody$outboundSchema; + /** @deprecated use `AnonymizeUserResponseBody$Outbound` instead. */ + export type Outbound = AnonymizeUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/batchpresignmultipartparts.ts b/src/sdk/models/operations/batchpresignmultipartparts.ts index 76bd2be..1d38c31 100644 --- a/src/sdk/models/operations/batchpresignmultipartparts.ts +++ b/src/sdk/models/operations/batchpresignmultipartparts.ts @@ -2,18 +2,18 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type BatchPresignMultipartPartsRequestBody = { - /** - * The part numbers to generate the presigned URLs for, must be between 1 and 10000. - */ - partNumbers: Array; - /** - * The unique identifier returned in the original /create-multipart request. - */ - uniqueIdentifier: string; + /** + * The part numbers to generate the presigned URLs for, must be between 1 and 10000. + */ + partNumbers: Array; + /** + * The unique identifier returned in the original /create-multipart request. + */ + uniqueIdentifier: string; }; /** @@ -25,77 +25,78 @@ export type PresignedUrls = {}; * external upload initialized */ export type BatchPresignMultipartPartsResponseBody = { - /** - * The presigned URLs for each part number, which has the part numbers as keys. - */ - presignedUrls: PresignedUrls; + /** + * The presigned URLs for each part number, which has the part numbers as keys. + */ + presignedUrls: PresignedUrls; }; /** @internal */ export const BatchPresignMultipartPartsRequestBody$inboundSchema: z.ZodType< - BatchPresignMultipartPartsRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - part_numbers: z.array(z.any()), - unique_identifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - part_numbers: "partNumbers", - unique_identifier: "uniqueIdentifier", - }); - }); + BatchPresignMultipartPartsRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + part_numbers: z.array(z.any()), + unique_identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "part_numbers": "partNumbers", + "unique_identifier": "uniqueIdentifier", + }); +}); /** @internal */ export type BatchPresignMultipartPartsRequestBody$Outbound = { - part_numbers: Array; - unique_identifier: string; + part_numbers: Array; + unique_identifier: string; }; /** @internal */ export const BatchPresignMultipartPartsRequestBody$outboundSchema: z.ZodType< - BatchPresignMultipartPartsRequestBody$Outbound, - z.ZodTypeDef, - BatchPresignMultipartPartsRequestBody -> = z - .object({ - partNumbers: z.array(z.any()), - uniqueIdentifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - partNumbers: "part_numbers", - uniqueIdentifier: "unique_identifier", - }); - }); + BatchPresignMultipartPartsRequestBody$Outbound, + z.ZodTypeDef, + BatchPresignMultipartPartsRequestBody +> = z.object({ + partNumbers: z.array(z.any()), + uniqueIdentifier: z.string(), +}).transform((v) => { + return remap$(v, { + partNumbers: "part_numbers", + uniqueIdentifier: "unique_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BatchPresignMultipartPartsRequestBody$ { - /** @deprecated use `BatchPresignMultipartPartsRequestBody$inboundSchema` instead. */ - export const inboundSchema = BatchPresignMultipartPartsRequestBody$inboundSchema; - /** @deprecated use `BatchPresignMultipartPartsRequestBody$outboundSchema` instead. */ - export const outboundSchema = BatchPresignMultipartPartsRequestBody$outboundSchema; - /** @deprecated use `BatchPresignMultipartPartsRequestBody$Outbound` instead. */ - export type Outbound = BatchPresignMultipartPartsRequestBody$Outbound; + /** @deprecated use `BatchPresignMultipartPartsRequestBody$inboundSchema` instead. */ + export const inboundSchema = + BatchPresignMultipartPartsRequestBody$inboundSchema; + /** @deprecated use `BatchPresignMultipartPartsRequestBody$outboundSchema` instead. */ + export const outboundSchema = + BatchPresignMultipartPartsRequestBody$outboundSchema; + /** @deprecated use `BatchPresignMultipartPartsRequestBody$Outbound` instead. */ + export type Outbound = BatchPresignMultipartPartsRequestBody$Outbound; } /** @internal */ -export const PresignedUrls$inboundSchema: z.ZodType = - z.object({}); +export const PresignedUrls$inboundSchema: z.ZodType< + PresignedUrls, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type PresignedUrls$Outbound = {}; /** @internal */ export const PresignedUrls$outboundSchema: z.ZodType< - PresignedUrls$Outbound, - z.ZodTypeDef, - PresignedUrls + PresignedUrls$Outbound, + z.ZodTypeDef, + PresignedUrls > = z.object({}); /** @@ -103,58 +104,56 @@ export const PresignedUrls$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PresignedUrls$ { - /** @deprecated use `PresignedUrls$inboundSchema` instead. */ - export const inboundSchema = PresignedUrls$inboundSchema; - /** @deprecated use `PresignedUrls$outboundSchema` instead. */ - export const outboundSchema = PresignedUrls$outboundSchema; - /** @deprecated use `PresignedUrls$Outbound` instead. */ - export type Outbound = PresignedUrls$Outbound; + /** @deprecated use `PresignedUrls$inboundSchema` instead. */ + export const inboundSchema = PresignedUrls$inboundSchema; + /** @deprecated use `PresignedUrls$outboundSchema` instead. */ + export const outboundSchema = PresignedUrls$outboundSchema; + /** @deprecated use `PresignedUrls$Outbound` instead. */ + export type Outbound = PresignedUrls$Outbound; } /** @internal */ export const BatchPresignMultipartPartsResponseBody$inboundSchema: z.ZodType< - BatchPresignMultipartPartsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - presigned_urls: z.lazy(() => PresignedUrls$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - presigned_urls: "presignedUrls", - }); - }); + BatchPresignMultipartPartsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + presigned_urls: z.lazy(() => PresignedUrls$inboundSchema), +}).transform((v) => { + return remap$(v, { + "presigned_urls": "presignedUrls", + }); +}); /** @internal */ export type BatchPresignMultipartPartsResponseBody$Outbound = { - presigned_urls: PresignedUrls$Outbound; + presigned_urls: PresignedUrls$Outbound; }; /** @internal */ export const BatchPresignMultipartPartsResponseBody$outboundSchema: z.ZodType< - BatchPresignMultipartPartsResponseBody$Outbound, - z.ZodTypeDef, - BatchPresignMultipartPartsResponseBody -> = z - .object({ - presignedUrls: z.lazy(() => PresignedUrls$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - presignedUrls: "presigned_urls", - }); - }); + BatchPresignMultipartPartsResponseBody$Outbound, + z.ZodTypeDef, + BatchPresignMultipartPartsResponseBody +> = z.object({ + presignedUrls: z.lazy(() => PresignedUrls$outboundSchema), +}).transform((v) => { + return remap$(v, { + presignedUrls: "presigned_urls", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BatchPresignMultipartPartsResponseBody$ { - /** @deprecated use `BatchPresignMultipartPartsResponseBody$inboundSchema` instead. */ - export const inboundSchema = BatchPresignMultipartPartsResponseBody$inboundSchema; - /** @deprecated use `BatchPresignMultipartPartsResponseBody$outboundSchema` instead. */ - export const outboundSchema = BatchPresignMultipartPartsResponseBody$outboundSchema; - /** @deprecated use `BatchPresignMultipartPartsResponseBody$Outbound` instead. */ - export type Outbound = BatchPresignMultipartPartsResponseBody$Outbound; + /** @deprecated use `BatchPresignMultipartPartsResponseBody$inboundSchema` instead. */ + export const inboundSchema = + BatchPresignMultipartPartsResponseBody$inboundSchema; + /** @deprecated use `BatchPresignMultipartPartsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + BatchPresignMultipartPartsResponseBody$outboundSchema; + /** @deprecated use `BatchPresignMultipartPartsResponseBody$Outbound` instead. */ + export type Outbound = BatchPresignMultipartPartsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/bookmarktopic.ts b/src/sdk/models/operations/bookmarktopic.ts index 9cf8c06..b2e0e44 100644 --- a/src/sdk/models/operations/bookmarktopic.ts +++ b/src/sdk/models/operations/bookmarktopic.ts @@ -2,67 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type BookmarkTopicRequest = { - apiKey: string; - apiUsername: string; - id: string; + apiKey: string; + apiUsername: string; + id: string; }; /** @internal */ export const BookmarkTopicRequest$inboundSchema: z.ZodType< - BookmarkTopicRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); + BookmarkTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type BookmarkTopicRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - id: string; + "Api-Key": string; + "Api-Username": string; + id: string; }; /** @internal */ export const BookmarkTopicRequest$outboundSchema: z.ZodType< - BookmarkTopicRequest$Outbound, - z.ZodTypeDef, - BookmarkTopicRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + BookmarkTopicRequest$Outbound, + z.ZodTypeDef, + BookmarkTopicRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BookmarkTopicRequest$ { - /** @deprecated use `BookmarkTopicRequest$inboundSchema` instead. */ - export const inboundSchema = BookmarkTopicRequest$inboundSchema; - /** @deprecated use `BookmarkTopicRequest$outboundSchema` instead. */ - export const outboundSchema = BookmarkTopicRequest$outboundSchema; - /** @deprecated use `BookmarkTopicRequest$Outbound` instead. */ - export type Outbound = BookmarkTopicRequest$Outbound; + /** @deprecated use `BookmarkTopicRequest$inboundSchema` instead. */ + export const inboundSchema = BookmarkTopicRequest$inboundSchema; + /** @deprecated use `BookmarkTopicRequest$outboundSchema` instead. */ + export const outboundSchema = BookmarkTopicRequest$outboundSchema; + /** @deprecated use `BookmarkTopicRequest$Outbound` instead. */ + export type Outbound = BookmarkTopicRequest$Outbound; } diff --git a/src/sdk/models/operations/changepassword.ts b/src/sdk/models/operations/changepassword.ts index f774b72..927be32 100644 --- a/src/sdk/models/operations/changepassword.ts +++ b/src/sdk/models/operations/changepassword.ts @@ -2,43 +2,43 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ChangePasswordRequestBody = { - password: string; - username: string; + password: string; + username: string; }; export type ChangePasswordRequest = { - requestBody?: ChangePasswordRequestBody | undefined; - token: string; + requestBody?: ChangePasswordRequestBody | undefined; + token: string; }; /** @internal */ export const ChangePasswordRequestBody$inboundSchema: z.ZodType< - ChangePasswordRequestBody, - z.ZodTypeDef, - unknown + ChangePasswordRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - password: z.string(), - username: z.string(), + password: z.string(), + username: z.string(), }); /** @internal */ export type ChangePasswordRequestBody$Outbound = { - password: string; - username: string; + password: string; + username: string; }; /** @internal */ export const ChangePasswordRequestBody$outboundSchema: z.ZodType< - ChangePasswordRequestBody$Outbound, - z.ZodTypeDef, - ChangePasswordRequestBody + ChangePasswordRequestBody$Outbound, + z.ZodTypeDef, + ChangePasswordRequestBody > = z.object({ - password: z.string(), - username: z.string(), + password: z.string(), + username: z.string(), }); /** @@ -46,61 +46,58 @@ export const ChangePasswordRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChangePasswordRequestBody$ { - /** @deprecated use `ChangePasswordRequestBody$inboundSchema` instead. */ - export const inboundSchema = ChangePasswordRequestBody$inboundSchema; - /** @deprecated use `ChangePasswordRequestBody$outboundSchema` instead. */ - export const outboundSchema = ChangePasswordRequestBody$outboundSchema; - /** @deprecated use `ChangePasswordRequestBody$Outbound` instead. */ - export type Outbound = ChangePasswordRequestBody$Outbound; + /** @deprecated use `ChangePasswordRequestBody$inboundSchema` instead. */ + export const inboundSchema = ChangePasswordRequestBody$inboundSchema; + /** @deprecated use `ChangePasswordRequestBody$outboundSchema` instead. */ + export const outboundSchema = ChangePasswordRequestBody$outboundSchema; + /** @deprecated use `ChangePasswordRequestBody$Outbound` instead. */ + export type Outbound = ChangePasswordRequestBody$Outbound; } /** @internal */ export const ChangePasswordRequest$inboundSchema: z.ZodType< - ChangePasswordRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => ChangePasswordRequestBody$inboundSchema).optional(), - token: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + ChangePasswordRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => ChangePasswordRequestBody$inboundSchema).optional(), + token: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type ChangePasswordRequest$Outbound = { - RequestBody?: ChangePasswordRequestBody$Outbound | undefined; - token: string; + RequestBody?: ChangePasswordRequestBody$Outbound | undefined; + token: string; }; /** @internal */ export const ChangePasswordRequest$outboundSchema: z.ZodType< - ChangePasswordRequest$Outbound, - z.ZodTypeDef, - ChangePasswordRequest -> = z - .object({ - requestBody: z.lazy(() => ChangePasswordRequestBody$outboundSchema).optional(), - token: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + ChangePasswordRequest$Outbound, + z.ZodTypeDef, + ChangePasswordRequest +> = z.object({ + requestBody: z.lazy(() => ChangePasswordRequestBody$outboundSchema) + .optional(), + token: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChangePasswordRequest$ { - /** @deprecated use `ChangePasswordRequest$inboundSchema` instead. */ - export const inboundSchema = ChangePasswordRequest$inboundSchema; - /** @deprecated use `ChangePasswordRequest$outboundSchema` instead. */ - export const outboundSchema = ChangePasswordRequest$outboundSchema; - /** @deprecated use `ChangePasswordRequest$Outbound` instead. */ - export type Outbound = ChangePasswordRequest$Outbound; + /** @deprecated use `ChangePasswordRequest$inboundSchema` instead. */ + export const inboundSchema = ChangePasswordRequest$inboundSchema; + /** @deprecated use `ChangePasswordRequest$outboundSchema` instead. */ + export const outboundSchema = ChangePasswordRequest$outboundSchema; + /** @deprecated use `ChangePasswordRequest$Outbound` instead. */ + export type Outbound = ChangePasswordRequest$Outbound; } diff --git a/src/sdk/models/operations/completeexternalupload.ts b/src/sdk/models/operations/completeexternalupload.ts index 3c5fd2c..7be57ea 100644 --- a/src/sdk/models/operations/completeexternalupload.ts +++ b/src/sdk/models/operations/completeexternalupload.ts @@ -2,206 +2,200 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CompleteExternalUploadRequestBody = { - /** - * Optionally set this to true if the upload is for a private message. - */ - forPrivateMessage?: string | undefined; - /** - * Optionally set this to true if the upload is for a site setting. - */ - forSiteSetting?: string | undefined; - /** - * Optionally set this to true if the upload was pasted into the upload area. This will convert PNG files to JPEG. - */ - pasted?: string | undefined; - /** - * The unique identifier returned in the original /generate-presigned-put request. - */ - uniqueIdentifier: string; + /** + * Optionally set this to true if the upload is for a private message. + */ + forPrivateMessage?: string | undefined; + /** + * Optionally set this to true if the upload is for a site setting. + */ + forSiteSetting?: string | undefined; + /** + * Optionally set this to true if the upload was pasted into the upload area. This will convert PNG files to JPEG. + */ + pasted?: string | undefined; + /** + * The unique identifier returned in the original /generate-presigned-put request. + */ + uniqueIdentifier: string; }; /** * external upload initialized */ export type CompleteExternalUploadResponseBody = { - dominantColor?: string | null | undefined; - extension: string; - filesize: number; - height: number; - humanFilesize: string; - id: number; - originalFilename: string; - retainHours: string | null; - shortPath: string; - shortUrl: string; - thumbnailHeight: number; - thumbnailWidth: number; - url: string; - width: number; + dominantColor?: string | null | undefined; + extension: string; + filesize: number; + height: number; + humanFilesize: string; + id: number; + originalFilename: string; + retainHours: string | null; + shortPath: string; + shortUrl: string; + thumbnailHeight: number; + thumbnailWidth: number; + url: string; + width: number; }; /** @internal */ export const CompleteExternalUploadRequestBody$inboundSchema: z.ZodType< - CompleteExternalUploadRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - for_private_message: z.string().optional(), - for_site_setting: z.string().optional(), - pasted: z.string().optional(), - unique_identifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - for_private_message: "forPrivateMessage", - for_site_setting: "forSiteSetting", - unique_identifier: "uniqueIdentifier", - }); - }); + CompleteExternalUploadRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + for_private_message: z.string().optional(), + for_site_setting: z.string().optional(), + pasted: z.string().optional(), + unique_identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "for_private_message": "forPrivateMessage", + "for_site_setting": "forSiteSetting", + "unique_identifier": "uniqueIdentifier", + }); +}); /** @internal */ export type CompleteExternalUploadRequestBody$Outbound = { - for_private_message?: string | undefined; - for_site_setting?: string | undefined; - pasted?: string | undefined; - unique_identifier: string; + for_private_message?: string | undefined; + for_site_setting?: string | undefined; + pasted?: string | undefined; + unique_identifier: string; }; /** @internal */ export const CompleteExternalUploadRequestBody$outboundSchema: z.ZodType< - CompleteExternalUploadRequestBody$Outbound, - z.ZodTypeDef, - CompleteExternalUploadRequestBody -> = z - .object({ - forPrivateMessage: z.string().optional(), - forSiteSetting: z.string().optional(), - pasted: z.string().optional(), - uniqueIdentifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - forPrivateMessage: "for_private_message", - forSiteSetting: "for_site_setting", - uniqueIdentifier: "unique_identifier", - }); - }); + CompleteExternalUploadRequestBody$Outbound, + z.ZodTypeDef, + CompleteExternalUploadRequestBody +> = z.object({ + forPrivateMessage: z.string().optional(), + forSiteSetting: z.string().optional(), + pasted: z.string().optional(), + uniqueIdentifier: z.string(), +}).transform((v) => { + return remap$(v, { + forPrivateMessage: "for_private_message", + forSiteSetting: "for_site_setting", + uniqueIdentifier: "unique_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompleteExternalUploadRequestBody$ { - /** @deprecated use `CompleteExternalUploadRequestBody$inboundSchema` instead. */ - export const inboundSchema = CompleteExternalUploadRequestBody$inboundSchema; - /** @deprecated use `CompleteExternalUploadRequestBody$outboundSchema` instead. */ - export const outboundSchema = CompleteExternalUploadRequestBody$outboundSchema; - /** @deprecated use `CompleteExternalUploadRequestBody$Outbound` instead. */ - export type Outbound = CompleteExternalUploadRequestBody$Outbound; + /** @deprecated use `CompleteExternalUploadRequestBody$inboundSchema` instead. */ + export const inboundSchema = CompleteExternalUploadRequestBody$inboundSchema; + /** @deprecated use `CompleteExternalUploadRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CompleteExternalUploadRequestBody$outboundSchema; + /** @deprecated use `CompleteExternalUploadRequestBody$Outbound` instead. */ + export type Outbound = CompleteExternalUploadRequestBody$Outbound; } /** @internal */ export const CompleteExternalUploadResponseBody$inboundSchema: z.ZodType< - CompleteExternalUploadResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - dominant_color: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - human_filesize: z.string(), - id: z.number().int(), - original_filename: z.string(), - retain_hours: z.nullable(z.string()), - short_path: z.string(), - short_url: z.string(), - thumbnail_height: z.number().int(), - thumbnail_width: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominant_color: "dominantColor", - human_filesize: "humanFilesize", - original_filename: "originalFilename", - retain_hours: "retainHours", - short_path: "shortPath", - short_url: "shortUrl", - thumbnail_height: "thumbnailHeight", - thumbnail_width: "thumbnailWidth", - }); - }); + CompleteExternalUploadResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + dominant_color: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + human_filesize: z.string(), + id: z.number().int(), + original_filename: z.string(), + retain_hours: z.nullable(z.string()), + short_path: z.string(), + short_url: z.string(), + thumbnail_height: z.number().int(), + thumbnail_width: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + "dominant_color": "dominantColor", + "human_filesize": "humanFilesize", + "original_filename": "originalFilename", + "retain_hours": "retainHours", + "short_path": "shortPath", + "short_url": "shortUrl", + "thumbnail_height": "thumbnailHeight", + "thumbnail_width": "thumbnailWidth", + }); +}); /** @internal */ export type CompleteExternalUploadResponseBody$Outbound = { - dominant_color?: string | null | undefined; - extension: string; - filesize: number; - height: number; - human_filesize: string; - id: number; - original_filename: string; - retain_hours: string | null; - short_path: string; - short_url: string; - thumbnail_height: number; - thumbnail_width: number; - url: string; - width: number; + dominant_color?: string | null | undefined; + extension: string; + filesize: number; + height: number; + human_filesize: string; + id: number; + original_filename: string; + retain_hours: string | null; + short_path: string; + short_url: string; + thumbnail_height: number; + thumbnail_width: number; + url: string; + width: number; }; /** @internal */ export const CompleteExternalUploadResponseBody$outboundSchema: z.ZodType< - CompleteExternalUploadResponseBody$Outbound, - z.ZodTypeDef, - CompleteExternalUploadResponseBody -> = z - .object({ - dominantColor: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - humanFilesize: z.string(), - id: z.number().int(), - originalFilename: z.string(), - retainHours: z.nullable(z.string()), - shortPath: z.string(), - shortUrl: z.string(), - thumbnailHeight: z.number().int(), - thumbnailWidth: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominantColor: "dominant_color", - humanFilesize: "human_filesize", - originalFilename: "original_filename", - retainHours: "retain_hours", - shortPath: "short_path", - shortUrl: "short_url", - thumbnailHeight: "thumbnail_height", - thumbnailWidth: "thumbnail_width", - }); - }); + CompleteExternalUploadResponseBody$Outbound, + z.ZodTypeDef, + CompleteExternalUploadResponseBody +> = z.object({ + dominantColor: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + humanFilesize: z.string(), + id: z.number().int(), + originalFilename: z.string(), + retainHours: z.nullable(z.string()), + shortPath: z.string(), + shortUrl: z.string(), + thumbnailHeight: z.number().int(), + thumbnailWidth: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + dominantColor: "dominant_color", + humanFilesize: "human_filesize", + originalFilename: "original_filename", + retainHours: "retain_hours", + shortPath: "short_path", + shortUrl: "short_url", + thumbnailHeight: "thumbnail_height", + thumbnailWidth: "thumbnail_width", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompleteExternalUploadResponseBody$ { - /** @deprecated use `CompleteExternalUploadResponseBody$inboundSchema` instead. */ - export const inboundSchema = CompleteExternalUploadResponseBody$inboundSchema; - /** @deprecated use `CompleteExternalUploadResponseBody$outboundSchema` instead. */ - export const outboundSchema = CompleteExternalUploadResponseBody$outboundSchema; - /** @deprecated use `CompleteExternalUploadResponseBody$Outbound` instead. */ - export type Outbound = CompleteExternalUploadResponseBody$Outbound; + /** @deprecated use `CompleteExternalUploadResponseBody$inboundSchema` instead. */ + export const inboundSchema = CompleteExternalUploadResponseBody$inboundSchema; + /** @deprecated use `CompleteExternalUploadResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CompleteExternalUploadResponseBody$outboundSchema; + /** @deprecated use `CompleteExternalUploadResponseBody$Outbound` instead. */ + export type Outbound = CompleteExternalUploadResponseBody$Outbound; } diff --git a/src/sdk/models/operations/completemultipart.ts b/src/sdk/models/operations/completemultipart.ts index 18aeae1..183fa57 100644 --- a/src/sdk/models/operations/completemultipart.ts +++ b/src/sdk/models/operations/completemultipart.ts @@ -2,188 +2,180 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CompleteMultipartRequestBody = { - /** - * All of the part numbers and their corresponding ETags that have been uploaded must be provided. - */ - parts: Array; - /** - * The unique identifier returned in the original /create-multipart request. - */ - uniqueIdentifier: string; + /** + * All of the part numbers and their corresponding ETags that have been uploaded must be provided. + */ + parts: Array; + /** + * The unique identifier returned in the original /create-multipart request. + */ + uniqueIdentifier: string; }; /** * external upload initialized */ export type CompleteMultipartResponseBody = { - dominantColor?: string | null | undefined; - extension: string; - filesize: number; - height: number; - humanFilesize: string; - id: number; - originalFilename: string; - retainHours: string | null; - shortPath: string; - shortUrl: string; - thumbnailHeight: number; - thumbnailWidth: number; - url: string; - width: number; + dominantColor?: string | null | undefined; + extension: string; + filesize: number; + height: number; + humanFilesize: string; + id: number; + originalFilename: string; + retainHours: string | null; + shortPath: string; + shortUrl: string; + thumbnailHeight: number; + thumbnailWidth: number; + url: string; + width: number; }; /** @internal */ export const CompleteMultipartRequestBody$inboundSchema: z.ZodType< - CompleteMultipartRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - parts: z.array(z.any()), - unique_identifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - unique_identifier: "uniqueIdentifier", - }); - }); + CompleteMultipartRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + parts: z.array(z.any()), + unique_identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "unique_identifier": "uniqueIdentifier", + }); +}); /** @internal */ export type CompleteMultipartRequestBody$Outbound = { - parts: Array; - unique_identifier: string; + parts: Array; + unique_identifier: string; }; /** @internal */ export const CompleteMultipartRequestBody$outboundSchema: z.ZodType< - CompleteMultipartRequestBody$Outbound, - z.ZodTypeDef, - CompleteMultipartRequestBody -> = z - .object({ - parts: z.array(z.any()), - uniqueIdentifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - uniqueIdentifier: "unique_identifier", - }); - }); + CompleteMultipartRequestBody$Outbound, + z.ZodTypeDef, + CompleteMultipartRequestBody +> = z.object({ + parts: z.array(z.any()), + uniqueIdentifier: z.string(), +}).transform((v) => { + return remap$(v, { + uniqueIdentifier: "unique_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompleteMultipartRequestBody$ { - /** @deprecated use `CompleteMultipartRequestBody$inboundSchema` instead. */ - export const inboundSchema = CompleteMultipartRequestBody$inboundSchema; - /** @deprecated use `CompleteMultipartRequestBody$outboundSchema` instead. */ - export const outboundSchema = CompleteMultipartRequestBody$outboundSchema; - /** @deprecated use `CompleteMultipartRequestBody$Outbound` instead. */ - export type Outbound = CompleteMultipartRequestBody$Outbound; + /** @deprecated use `CompleteMultipartRequestBody$inboundSchema` instead. */ + export const inboundSchema = CompleteMultipartRequestBody$inboundSchema; + /** @deprecated use `CompleteMultipartRequestBody$outboundSchema` instead. */ + export const outboundSchema = CompleteMultipartRequestBody$outboundSchema; + /** @deprecated use `CompleteMultipartRequestBody$Outbound` instead. */ + export type Outbound = CompleteMultipartRequestBody$Outbound; } /** @internal */ export const CompleteMultipartResponseBody$inboundSchema: z.ZodType< - CompleteMultipartResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - dominant_color: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - human_filesize: z.string(), - id: z.number().int(), - original_filename: z.string(), - retain_hours: z.nullable(z.string()), - short_path: z.string(), - short_url: z.string(), - thumbnail_height: z.number().int(), - thumbnail_width: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominant_color: "dominantColor", - human_filesize: "humanFilesize", - original_filename: "originalFilename", - retain_hours: "retainHours", - short_path: "shortPath", - short_url: "shortUrl", - thumbnail_height: "thumbnailHeight", - thumbnail_width: "thumbnailWidth", - }); - }); + CompleteMultipartResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + dominant_color: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + human_filesize: z.string(), + id: z.number().int(), + original_filename: z.string(), + retain_hours: z.nullable(z.string()), + short_path: z.string(), + short_url: z.string(), + thumbnail_height: z.number().int(), + thumbnail_width: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + "dominant_color": "dominantColor", + "human_filesize": "humanFilesize", + "original_filename": "originalFilename", + "retain_hours": "retainHours", + "short_path": "shortPath", + "short_url": "shortUrl", + "thumbnail_height": "thumbnailHeight", + "thumbnail_width": "thumbnailWidth", + }); +}); /** @internal */ export type CompleteMultipartResponseBody$Outbound = { - dominant_color?: string | null | undefined; - extension: string; - filesize: number; - height: number; - human_filesize: string; - id: number; - original_filename: string; - retain_hours: string | null; - short_path: string; - short_url: string; - thumbnail_height: number; - thumbnail_width: number; - url: string; - width: number; + dominant_color?: string | null | undefined; + extension: string; + filesize: number; + height: number; + human_filesize: string; + id: number; + original_filename: string; + retain_hours: string | null; + short_path: string; + short_url: string; + thumbnail_height: number; + thumbnail_width: number; + url: string; + width: number; }; /** @internal */ export const CompleteMultipartResponseBody$outboundSchema: z.ZodType< - CompleteMultipartResponseBody$Outbound, - z.ZodTypeDef, - CompleteMultipartResponseBody -> = z - .object({ - dominantColor: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - humanFilesize: z.string(), - id: z.number().int(), - originalFilename: z.string(), - retainHours: z.nullable(z.string()), - shortPath: z.string(), - shortUrl: z.string(), - thumbnailHeight: z.number().int(), - thumbnailWidth: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominantColor: "dominant_color", - humanFilesize: "human_filesize", - originalFilename: "original_filename", - retainHours: "retain_hours", - shortPath: "short_path", - shortUrl: "short_url", - thumbnailHeight: "thumbnail_height", - thumbnailWidth: "thumbnail_width", - }); - }); + CompleteMultipartResponseBody$Outbound, + z.ZodTypeDef, + CompleteMultipartResponseBody +> = z.object({ + dominantColor: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + humanFilesize: z.string(), + id: z.number().int(), + originalFilename: z.string(), + retainHours: z.nullable(z.string()), + shortPath: z.string(), + shortUrl: z.string(), + thumbnailHeight: z.number().int(), + thumbnailWidth: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + dominantColor: "dominant_color", + humanFilesize: "human_filesize", + originalFilename: "original_filename", + retainHours: "retain_hours", + shortPath: "short_path", + shortUrl: "short_url", + thumbnailHeight: "thumbnail_height", + thumbnailWidth: "thumbnail_width", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompleteMultipartResponseBody$ { - /** @deprecated use `CompleteMultipartResponseBody$inboundSchema` instead. */ - export const inboundSchema = CompleteMultipartResponseBody$inboundSchema; - /** @deprecated use `CompleteMultipartResponseBody$outboundSchema` instead. */ - export const outboundSchema = CompleteMultipartResponseBody$outboundSchema; - /** @deprecated use `CompleteMultipartResponseBody$Outbound` instead. */ - export type Outbound = CompleteMultipartResponseBody$Outbound; + /** @deprecated use `CompleteMultipartResponseBody$inboundSchema` instead. */ + export const inboundSchema = CompleteMultipartResponseBody$inboundSchema; + /** @deprecated use `CompleteMultipartResponseBody$outboundSchema` instead. */ + export const outboundSchema = CompleteMultipartResponseBody$outboundSchema; + /** @deprecated use `CompleteMultipartResponseBody$Outbound` instead. */ + export type Outbound = CompleteMultipartResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createbackup.ts b/src/sdk/models/operations/createbackup.ts index cc5a12b..5139768 100644 --- a/src/sdk/models/operations/createbackup.ts +++ b/src/sdk/models/operations/createbackup.ts @@ -2,89 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateBackupRequestBody = { - withUploads: boolean; + withUploads: boolean; }; /** * success response */ export type CreateBackupResponseBody = { - success: string; + success: string; }; /** @internal */ export const CreateBackupRequestBody$inboundSchema: z.ZodType< - CreateBackupRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - with_uploads: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - with_uploads: "withUploads", - }); - }); + CreateBackupRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + with_uploads: z.boolean(), +}).transform((v) => { + return remap$(v, { + "with_uploads": "withUploads", + }); +}); /** @internal */ export type CreateBackupRequestBody$Outbound = { - with_uploads: boolean; + with_uploads: boolean; }; /** @internal */ export const CreateBackupRequestBody$outboundSchema: z.ZodType< - CreateBackupRequestBody$Outbound, - z.ZodTypeDef, - CreateBackupRequestBody -> = z - .object({ - withUploads: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - withUploads: "with_uploads", - }); - }); + CreateBackupRequestBody$Outbound, + z.ZodTypeDef, + CreateBackupRequestBody +> = z.object({ + withUploads: z.boolean(), +}).transform((v) => { + return remap$(v, { + withUploads: "with_uploads", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateBackupRequestBody$ { - /** @deprecated use `CreateBackupRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateBackupRequestBody$inboundSchema; - /** @deprecated use `CreateBackupRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateBackupRequestBody$outboundSchema; - /** @deprecated use `CreateBackupRequestBody$Outbound` instead. */ - export type Outbound = CreateBackupRequestBody$Outbound; + /** @deprecated use `CreateBackupRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateBackupRequestBody$inboundSchema; + /** @deprecated use `CreateBackupRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateBackupRequestBody$outboundSchema; + /** @deprecated use `CreateBackupRequestBody$Outbound` instead. */ + export type Outbound = CreateBackupRequestBody$Outbound; } /** @internal */ export const CreateBackupResponseBody$inboundSchema: z.ZodType< - CreateBackupResponseBody, - z.ZodTypeDef, - unknown + CreateBackupResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type CreateBackupResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const CreateBackupResponseBody$outboundSchema: z.ZodType< - CreateBackupResponseBody$Outbound, - z.ZodTypeDef, - CreateBackupResponseBody + CreateBackupResponseBody$Outbound, + z.ZodTypeDef, + CreateBackupResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -92,10 +88,10 @@ export const CreateBackupResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateBackupResponseBody$ { - /** @deprecated use `CreateBackupResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateBackupResponseBody$inboundSchema; - /** @deprecated use `CreateBackupResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateBackupResponseBody$outboundSchema; - /** @deprecated use `CreateBackupResponseBody$Outbound` instead. */ - export type Outbound = CreateBackupResponseBody$Outbound; + /** @deprecated use `CreateBackupResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateBackupResponseBody$inboundSchema; + /** @deprecated use `CreateBackupResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateBackupResponseBody$outboundSchema; + /** @deprecated use `CreateBackupResponseBody$Outbound` instead. */ + export type Outbound = CreateBackupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createbadge.ts b/src/sdk/models/operations/createbadge.ts index d9b3344..166b66b 100644 --- a/src/sdk/models/operations/createbadge.ts +++ b/src/sdk/models/operations/createbadge.ts @@ -2,330 +2,319 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateBadgeRequestBody = { - /** - * The ID for the badge type. 1 for Gold, 2 for Silver, 3 for Bronze. - */ - badgeTypeId: number; - /** - * The name for the new badge. - */ - name: string; + /** + * The ID for the badge type. 1 for Gold, 2 for Silver, 3 for Bronze. + */ + badgeTypeId: number; + /** + * The name for the new badge. + */ + name: string; }; export type Badge = { - allowTitle: boolean; - autoRevoke: boolean; - badgeGroupingId: number; - badgeTypeId: number; - description: string; - enabled: boolean; - grantCount: number; - icon: string; - id: number; - imageUrl: string | null; - listable: boolean; - longDescription: string; - manuallyGrantable: boolean; - multipleGrant: boolean; - name: string; - query: string | null; - showPosts: boolean; - slug: string; - system: boolean; - targetPosts: boolean; - trigger: string | null; + allowTitle: boolean; + autoRevoke: boolean; + badgeGroupingId: number; + badgeTypeId: number; + description: string; + enabled: boolean; + grantCount: number; + icon: string; + id: number; + imageUrl: string | null; + listable: boolean; + longDescription: string; + manuallyGrantable: boolean; + multipleGrant: boolean; + name: string; + query: string | null; + showPosts: boolean; + slug: string; + system: boolean; + targetPosts: boolean; + trigger: string | null; }; export type CreateBadgeBadgeTypes = { - id: number; - name: string; - sortOrder: number; + id: number; + name: string; + sortOrder: number; }; /** * success response */ export type CreateBadgeResponseBody = { - badge: Badge; - badgeTypes: Array; + badge: Badge; + badgeTypes: Array; }; /** @internal */ export const CreateBadgeRequestBody$inboundSchema: z.ZodType< - CreateBadgeRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - badge_type_id: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - badge_type_id: "badgeTypeId", - }); - }); + CreateBadgeRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + badge_type_id: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "badge_type_id": "badgeTypeId", + }); +}); /** @internal */ export type CreateBadgeRequestBody$Outbound = { - badge_type_id: number; - name: string; + badge_type_id: number; + name: string; }; /** @internal */ export const CreateBadgeRequestBody$outboundSchema: z.ZodType< - CreateBadgeRequestBody$Outbound, - z.ZodTypeDef, - CreateBadgeRequestBody -> = z - .object({ - badgeTypeId: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - badgeTypeId: "badge_type_id", - }); - }); + CreateBadgeRequestBody$Outbound, + z.ZodTypeDef, + CreateBadgeRequestBody +> = z.object({ + badgeTypeId: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + badgeTypeId: "badge_type_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateBadgeRequestBody$ { - /** @deprecated use `CreateBadgeRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateBadgeRequestBody$inboundSchema; - /** @deprecated use `CreateBadgeRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateBadgeRequestBody$outboundSchema; - /** @deprecated use `CreateBadgeRequestBody$Outbound` instead. */ - export type Outbound = CreateBadgeRequestBody$Outbound; + /** @deprecated use `CreateBadgeRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateBadgeRequestBody$inboundSchema; + /** @deprecated use `CreateBadgeRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateBadgeRequestBody$outboundSchema; + /** @deprecated use `CreateBadgeRequestBody$Outbound` instead. */ + export type Outbound = CreateBadgeRequestBody$Outbound; } /** @internal */ export const Badge$inboundSchema: z.ZodType = z - .object({ - allow_title: z.boolean(), - auto_revoke: z.boolean(), - badge_grouping_id: z.number().int(), - badge_type_id: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grant_count: z.number().int(), - icon: z.string(), - id: z.number().int(), - image_url: z.nullable(z.string()), - listable: z.boolean(), - long_description: z.string(), - manually_grantable: z.boolean(), - multiple_grant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - show_posts: z.boolean(), - slug: z.string(), - system: z.boolean(), - target_posts: z.boolean(), - trigger: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allow_title: "allowTitle", - auto_revoke: "autoRevoke", - badge_grouping_id: "badgeGroupingId", - badge_type_id: "badgeTypeId", - grant_count: "grantCount", - image_url: "imageUrl", - long_description: "longDescription", - manually_grantable: "manuallyGrantable", - multiple_grant: "multipleGrant", - show_posts: "showPosts", - target_posts: "targetPosts", - }); + .object({ + allow_title: z.boolean(), + auto_revoke: z.boolean(), + badge_grouping_id: z.number().int(), + badge_type_id: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grant_count: z.number().int(), + icon: z.string(), + id: z.number().int(), + image_url: z.nullable(z.string()), + listable: z.boolean(), + long_description: z.string(), + manually_grantable: z.boolean(), + multiple_grant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + show_posts: z.boolean(), + slug: z.string(), + system: z.boolean(), + target_posts: z.boolean(), + trigger: z.nullable(z.string()), + }).transform((v) => { + return remap$(v, { + "allow_title": "allowTitle", + "auto_revoke": "autoRevoke", + "badge_grouping_id": "badgeGroupingId", + "badge_type_id": "badgeTypeId", + "grant_count": "grantCount", + "image_url": "imageUrl", + "long_description": "longDescription", + "manually_grantable": "manuallyGrantable", + "multiple_grant": "multipleGrant", + "show_posts": "showPosts", + "target_posts": "targetPosts", }); + }); /** @internal */ export type Badge$Outbound = { - allow_title: boolean; - auto_revoke: boolean; - badge_grouping_id: number; - badge_type_id: number; - description: string; - enabled: boolean; - grant_count: number; - icon: string; - id: number; - image_url: string | null; - listable: boolean; - long_description: string; - manually_grantable: boolean; - multiple_grant: boolean; - name: string; - query: string | null; - show_posts: boolean; - slug: string; - system: boolean; - target_posts: boolean; - trigger: string | null; + allow_title: boolean; + auto_revoke: boolean; + badge_grouping_id: number; + badge_type_id: number; + description: string; + enabled: boolean; + grant_count: number; + icon: string; + id: number; + image_url: string | null; + listable: boolean; + long_description: string; + manually_grantable: boolean; + multiple_grant: boolean; + name: string; + query: string | null; + show_posts: boolean; + slug: string; + system: boolean; + target_posts: boolean; + trigger: string | null; }; /** @internal */ -export const Badge$outboundSchema: z.ZodType = z - .object({ - allowTitle: z.boolean(), - autoRevoke: z.boolean(), - badgeGroupingId: z.number().int(), - badgeTypeId: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grantCount: z.number().int(), - icon: z.string(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - listable: z.boolean(), - longDescription: z.string(), - manuallyGrantable: z.boolean(), - multipleGrant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - showPosts: z.boolean(), - slug: z.string(), - system: z.boolean(), - targetPosts: z.boolean(), - trigger: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allowTitle: "allow_title", - autoRevoke: "auto_revoke", - badgeGroupingId: "badge_grouping_id", - badgeTypeId: "badge_type_id", - grantCount: "grant_count", - imageUrl: "image_url", - longDescription: "long_description", - manuallyGrantable: "manually_grantable", - multipleGrant: "multiple_grant", - showPosts: "show_posts", - targetPosts: "target_posts", - }); - }); +export const Badge$outboundSchema: z.ZodType< + Badge$Outbound, + z.ZodTypeDef, + Badge +> = z.object({ + allowTitle: z.boolean(), + autoRevoke: z.boolean(), + badgeGroupingId: z.number().int(), + badgeTypeId: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grantCount: z.number().int(), + icon: z.string(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + listable: z.boolean(), + longDescription: z.string(), + manuallyGrantable: z.boolean(), + multipleGrant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + showPosts: z.boolean(), + slug: z.string(), + system: z.boolean(), + targetPosts: z.boolean(), + trigger: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allowTitle: "allow_title", + autoRevoke: "auto_revoke", + badgeGroupingId: "badge_grouping_id", + badgeTypeId: "badge_type_id", + grantCount: "grant_count", + imageUrl: "image_url", + longDescription: "long_description", + manuallyGrantable: "manually_grantable", + multipleGrant: "multiple_grant", + showPosts: "show_posts", + targetPosts: "target_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Badge$ { - /** @deprecated use `Badge$inboundSchema` instead. */ - export const inboundSchema = Badge$inboundSchema; - /** @deprecated use `Badge$outboundSchema` instead. */ - export const outboundSchema = Badge$outboundSchema; - /** @deprecated use `Badge$Outbound` instead. */ - export type Outbound = Badge$Outbound; + /** @deprecated use `Badge$inboundSchema` instead. */ + export const inboundSchema = Badge$inboundSchema; + /** @deprecated use `Badge$outboundSchema` instead. */ + export const outboundSchema = Badge$outboundSchema; + /** @deprecated use `Badge$Outbound` instead. */ + export type Outbound = Badge$Outbound; } /** @internal */ export const CreateBadgeBadgeTypes$inboundSchema: z.ZodType< - CreateBadgeBadgeTypes, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int(), - name: z.string(), - sort_order: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sort_order: "sortOrder", - }); - }); + CreateBadgeBadgeTypes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + name: z.string(), + sort_order: z.number().int(), +}).transform((v) => { + return remap$(v, { + "sort_order": "sortOrder", + }); +}); /** @internal */ export type CreateBadgeBadgeTypes$Outbound = { - id: number; - name: string; - sort_order: number; + id: number; + name: string; + sort_order: number; }; /** @internal */ export const CreateBadgeBadgeTypes$outboundSchema: z.ZodType< - CreateBadgeBadgeTypes$Outbound, - z.ZodTypeDef, - CreateBadgeBadgeTypes -> = z - .object({ - id: z.number().int(), - name: z.string(), - sortOrder: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sortOrder: "sort_order", - }); - }); + CreateBadgeBadgeTypes$Outbound, + z.ZodTypeDef, + CreateBadgeBadgeTypes +> = z.object({ + id: z.number().int(), + name: z.string(), + sortOrder: z.number().int(), +}).transform((v) => { + return remap$(v, { + sortOrder: "sort_order", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateBadgeBadgeTypes$ { - /** @deprecated use `CreateBadgeBadgeTypes$inboundSchema` instead. */ - export const inboundSchema = CreateBadgeBadgeTypes$inboundSchema; - /** @deprecated use `CreateBadgeBadgeTypes$outboundSchema` instead. */ - export const outboundSchema = CreateBadgeBadgeTypes$outboundSchema; - /** @deprecated use `CreateBadgeBadgeTypes$Outbound` instead. */ - export type Outbound = CreateBadgeBadgeTypes$Outbound; + /** @deprecated use `CreateBadgeBadgeTypes$inboundSchema` instead. */ + export const inboundSchema = CreateBadgeBadgeTypes$inboundSchema; + /** @deprecated use `CreateBadgeBadgeTypes$outboundSchema` instead. */ + export const outboundSchema = CreateBadgeBadgeTypes$outboundSchema; + /** @deprecated use `CreateBadgeBadgeTypes$Outbound` instead. */ + export type Outbound = CreateBadgeBadgeTypes$Outbound; } /** @internal */ export const CreateBadgeResponseBody$inboundSchema: z.ZodType< - CreateBadgeResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - badge: z.lazy(() => Badge$inboundSchema), - badge_types: z.array(z.lazy(() => CreateBadgeBadgeTypes$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badge_types: "badgeTypes", - }); - }); + CreateBadgeResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + badge: z.lazy(() => Badge$inboundSchema), + badge_types: z.array(z.lazy(() => CreateBadgeBadgeTypes$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "badge_types": "badgeTypes", + }); +}); /** @internal */ export type CreateBadgeResponseBody$Outbound = { - badge: Badge$Outbound; - badge_types: Array; + badge: Badge$Outbound; + badge_types: Array; }; /** @internal */ export const CreateBadgeResponseBody$outboundSchema: z.ZodType< - CreateBadgeResponseBody$Outbound, - z.ZodTypeDef, - CreateBadgeResponseBody -> = z - .object({ - badge: z.lazy(() => Badge$outboundSchema), - badgeTypes: z.array(z.lazy(() => CreateBadgeBadgeTypes$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badgeTypes: "badge_types", - }); - }); + CreateBadgeResponseBody$Outbound, + z.ZodTypeDef, + CreateBadgeResponseBody +> = z.object({ + badge: z.lazy(() => Badge$outboundSchema), + badgeTypes: z.array(z.lazy(() => CreateBadgeBadgeTypes$outboundSchema)), +}).transform((v) => { + return remap$(v, { + badgeTypes: "badge_types", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateBadgeResponseBody$ { - /** @deprecated use `CreateBadgeResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateBadgeResponseBody$inboundSchema; - /** @deprecated use `CreateBadgeResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateBadgeResponseBody$outboundSchema; - /** @deprecated use `CreateBadgeResponseBody$Outbound` instead. */ - export type Outbound = CreateBadgeResponseBody$Outbound; + /** @deprecated use `CreateBadgeResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateBadgeResponseBody$inboundSchema; + /** @deprecated use `CreateBadgeResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateBadgeResponseBody$outboundSchema; + /** @deprecated use `CreateBadgeResponseBody$Outbound` instead. */ + export type Outbound = CreateBadgeResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createcategory.ts b/src/sdk/models/operations/createcategory.ts index b14b7ff..cd07530 100644 --- a/src/sdk/models/operations/createcategory.ts +++ b/src/sdk/models/operations/createcategory.ts @@ -2,256 +2,253 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../../lib/schemas.js"; -import * as z from "zod"; export type Permissions = { - everyone?: number | undefined; - staff?: number | undefined; - additionalProperties: { [k: string]: any }; + everyone?: number | undefined; + staff?: number | undefined; + additionalProperties: { [k: string]: any }; }; export type CreateCategoryRequestBody = { - allowBadges?: boolean | undefined; - color?: string | undefined; - formTemplateIds?: Array | undefined; - name: string; - parentCategoryId?: number | undefined; - permissions?: Permissions | undefined; - searchPriority?: number | undefined; - slug?: string | undefined; - textColor?: string | undefined; - topicFeaturedLinksAllowed?: boolean | undefined; + allowBadges?: boolean | undefined; + color?: string | undefined; + formTemplateIds?: Array | undefined; + name: string; + parentCategoryId?: number | undefined; + permissions?: Permissions | undefined; + searchPriority?: number | undefined; + slug?: string | undefined; + textColor?: string | undefined; + topicFeaturedLinksAllowed?: boolean | undefined; }; export type CustomFields = {}; export type GroupPermissions = { - groupName: string; - permissionType: number; + groupName: string; + permissionType: number; }; export type RequiredTagGroups = { - minCount: number; - name: string; + minCount: number; + name: string; }; export type Category = { - allTopicsWiki: boolean; - allowBadges: boolean; - allowGlobalTags?: boolean | undefined; - allowUnlimitedOwnerEditsOnFirstPost: boolean; - allowedTagGroups?: Array | undefined; - allowedTags?: Array | undefined; - autoCloseBasedOnLastPost: boolean; - autoCloseHours: string | null; - availableGroups: Array; - canDelete: boolean; - canEdit: boolean; - categorySetting?: any | undefined; - color: string; - customFields: CustomFields; - defaultListFilter: string; - defaultSlowModeSeconds: string | null; - defaultTopPeriod: string; - defaultView: string | null; - description: string | null; - descriptionExcerpt: string | null; - descriptionText: string | null; - emailIn: string | null; - emailInAllowStrangers: boolean; - formTemplateIds?: Array | undefined; - groupPermissions: Array; - hasChildren: boolean | null; - id: number; - mailinglistMirror: boolean; - minimumRequiredTags: number; - name: string; - navigateToFirstPostAfterRead: boolean; - notificationLevel: number; - numFeaturedTopics: number; - permission: number | null; - position: number; - postCount: number; - readOnlyBanner: string | null; - readRestricted: boolean; - requiredTagGroups: Array; - searchPriority: number; - showSubcategoryList: boolean; - slug: string; - sortAscending: string | null; - sortOrder: string | null; - subcategoryListStyle: string; - textColor: string; - topicCount: number; - topicFeaturedLinkAllowed: boolean; - topicTemplate: string | null; - topicUrl: string | null; - uploadedBackground: string | null; - uploadedBackgroundDark: string | null; - uploadedLogo: string | null; - uploadedLogoDark: string | null; + allTopicsWiki: boolean; + allowBadges: boolean; + allowGlobalTags?: boolean | undefined; + allowUnlimitedOwnerEditsOnFirstPost: boolean; + allowedTagGroups?: Array | undefined; + allowedTags?: Array | undefined; + autoCloseBasedOnLastPost: boolean; + autoCloseHours: string | null; + availableGroups: Array; + canDelete: boolean; + canEdit: boolean; + categorySetting?: any | undefined; + color: string; + customFields: CustomFields; + defaultListFilter: string; + defaultSlowModeSeconds: string | null; + defaultTopPeriod: string; + defaultView: string | null; + description: string | null; + descriptionExcerpt: string | null; + descriptionText: string | null; + emailIn: string | null; + emailInAllowStrangers: boolean; + formTemplateIds?: Array | undefined; + groupPermissions: Array; + hasChildren: boolean | null; + id: number; + mailinglistMirror: boolean; + minimumRequiredTags: number; + name: string; + navigateToFirstPostAfterRead: boolean; + notificationLevel: number; + numFeaturedTopics: number; + permission: number | null; + position: number; + postCount: number; + readOnlyBanner: string | null; + readRestricted: boolean; + requiredTagGroups: Array; + searchPriority: number; + showSubcategoryList: boolean; + slug: string; + sortAscending: string | null; + sortOrder: string | null; + subcategoryListStyle: string; + textColor: string; + topicCount: number; + topicFeaturedLinkAllowed: boolean; + topicTemplate: string | null; + topicUrl: string | null; + uploadedBackground: string | null; + uploadedBackgroundDark: string | null; + uploadedLogo: string | null; + uploadedLogoDark: string | null; }; /** * success response */ export type CreateCategoryResponseBody = { - category: Category; + category: Category; }; /** @internal */ -export const Permissions$inboundSchema: z.ZodType = - collectExtraKeys$( - z - .object({ - everyone: z.number().int().optional(), - staff: z.number().int().optional(), - }) - .catchall(z.any()), - "additionalProperties" - ); +export const Permissions$inboundSchema: z.ZodType< + Permissions, + z.ZodTypeDef, + unknown +> = collectExtraKeys$( + z.object({ + everyone: z.number().int().optional(), + staff: z.number().int().optional(), + }).catchall(z.any()), + "additionalProperties", +); /** @internal */ export type Permissions$Outbound = { - everyone?: number | undefined; - staff?: number | undefined; - [additionalProperties: string]: unknown; + everyone?: number | undefined; + staff?: number | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const Permissions$outboundSchema: z.ZodType< - Permissions$Outbound, - z.ZodTypeDef, - Permissions -> = z - .object({ - additionalProperties: z.record(z.any()), + Permissions$Outbound, + z.ZodTypeDef, + Permissions +> = z.object({ + additionalProperties: z.record(z.any()), - everyone: z.number().int().optional(), - staff: z.number().int().optional(), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + everyone: z.number().int().optional(), + staff: z.number().int().optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Permissions$ { - /** @deprecated use `Permissions$inboundSchema` instead. */ - export const inboundSchema = Permissions$inboundSchema; - /** @deprecated use `Permissions$outboundSchema` instead. */ - export const outboundSchema = Permissions$outboundSchema; - /** @deprecated use `Permissions$Outbound` instead. */ - export type Outbound = Permissions$Outbound; + /** @deprecated use `Permissions$inboundSchema` instead. */ + export const inboundSchema = Permissions$inboundSchema; + /** @deprecated use `Permissions$outboundSchema` instead. */ + export const outboundSchema = Permissions$outboundSchema; + /** @deprecated use `Permissions$Outbound` instead. */ + export type Outbound = Permissions$Outbound; } /** @internal */ export const CreateCategoryRequestBody$inboundSchema: z.ZodType< - CreateCategoryRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_badges: z.boolean().optional(), - color: z.string().optional(), - form_template_ids: z.array(z.any()).optional(), - name: z.string(), - parent_category_id: z.number().int().optional(), - permissions: z.lazy(() => Permissions$inboundSchema).optional(), - search_priority: z.number().int().optional(), - slug: z.string().optional(), - text_color: z.string().optional(), - topic_featured_links_allowed: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allow_badges: "allowBadges", - form_template_ids: "formTemplateIds", - parent_category_id: "parentCategoryId", - search_priority: "searchPriority", - text_color: "textColor", - topic_featured_links_allowed: "topicFeaturedLinksAllowed", - }); - }); + CreateCategoryRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + allow_badges: z.boolean().optional(), + color: z.string().optional(), + form_template_ids: z.array(z.any()).optional(), + name: z.string(), + parent_category_id: z.number().int().optional(), + permissions: z.lazy(() => Permissions$inboundSchema).optional(), + search_priority: z.number().int().optional(), + slug: z.string().optional(), + text_color: z.string().optional(), + topic_featured_links_allowed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "allow_badges": "allowBadges", + "form_template_ids": "formTemplateIds", + "parent_category_id": "parentCategoryId", + "search_priority": "searchPriority", + "text_color": "textColor", + "topic_featured_links_allowed": "topicFeaturedLinksAllowed", + }); +}); /** @internal */ export type CreateCategoryRequestBody$Outbound = { - allow_badges?: boolean | undefined; - color?: string | undefined; - form_template_ids?: Array | undefined; - name: string; - parent_category_id?: number | undefined; - permissions?: Permissions$Outbound | undefined; - search_priority?: number | undefined; - slug?: string | undefined; - text_color?: string | undefined; - topic_featured_links_allowed?: boolean | undefined; + allow_badges?: boolean | undefined; + color?: string | undefined; + form_template_ids?: Array | undefined; + name: string; + parent_category_id?: number | undefined; + permissions?: Permissions$Outbound | undefined; + search_priority?: number | undefined; + slug?: string | undefined; + text_color?: string | undefined; + topic_featured_links_allowed?: boolean | undefined; }; /** @internal */ export const CreateCategoryRequestBody$outboundSchema: z.ZodType< - CreateCategoryRequestBody$Outbound, - z.ZodTypeDef, - CreateCategoryRequestBody -> = z - .object({ - allowBadges: z.boolean().optional(), - color: z.string().optional(), - formTemplateIds: z.array(z.any()).optional(), - name: z.string(), - parentCategoryId: z.number().int().optional(), - permissions: z.lazy(() => Permissions$outboundSchema).optional(), - searchPriority: z.number().int().optional(), - slug: z.string().optional(), - textColor: z.string().optional(), - topicFeaturedLinksAllowed: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowBadges: "allow_badges", - formTemplateIds: "form_template_ids", - parentCategoryId: "parent_category_id", - searchPriority: "search_priority", - textColor: "text_color", - topicFeaturedLinksAllowed: "topic_featured_links_allowed", - }); - }); + CreateCategoryRequestBody$Outbound, + z.ZodTypeDef, + CreateCategoryRequestBody +> = z.object({ + allowBadges: z.boolean().optional(), + color: z.string().optional(), + formTemplateIds: z.array(z.any()).optional(), + name: z.string(), + parentCategoryId: z.number().int().optional(), + permissions: z.lazy(() => Permissions$outboundSchema).optional(), + searchPriority: z.number().int().optional(), + slug: z.string().optional(), + textColor: z.string().optional(), + topicFeaturedLinksAllowed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + allowBadges: "allow_badges", + formTemplateIds: "form_template_ids", + parentCategoryId: "parent_category_id", + searchPriority: "search_priority", + textColor: "text_color", + topicFeaturedLinksAllowed: "topic_featured_links_allowed", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateCategoryRequestBody$ { - /** @deprecated use `CreateCategoryRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateCategoryRequestBody$inboundSchema; - /** @deprecated use `CreateCategoryRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateCategoryRequestBody$outboundSchema; - /** @deprecated use `CreateCategoryRequestBody$Outbound` instead. */ - export type Outbound = CreateCategoryRequestBody$Outbound; + /** @deprecated use `CreateCategoryRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateCategoryRequestBody$inboundSchema; + /** @deprecated use `CreateCategoryRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateCategoryRequestBody$outboundSchema; + /** @deprecated use `CreateCategoryRequestBody$Outbound` instead. */ + export type Outbound = CreateCategoryRequestBody$Outbound; } /** @internal */ -export const CustomFields$inboundSchema: z.ZodType = z.object( - {} -); +export const CustomFields$inboundSchema: z.ZodType< + CustomFields, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type CustomFields$Outbound = {}; /** @internal */ export const CustomFields$outboundSchema: z.ZodType< - CustomFields$Outbound, - z.ZodTypeDef, - CustomFields + CustomFields$Outbound, + z.ZodTypeDef, + CustomFields > = z.object({}); /** @@ -259,423 +256,428 @@ export const CustomFields$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomFields$ { - /** @deprecated use `CustomFields$inboundSchema` instead. */ - export const inboundSchema = CustomFields$inboundSchema; - /** @deprecated use `CustomFields$outboundSchema` instead. */ - export const outboundSchema = CustomFields$outboundSchema; - /** @deprecated use `CustomFields$Outbound` instead. */ - export type Outbound = CustomFields$Outbound; + /** @deprecated use `CustomFields$inboundSchema` instead. */ + export const inboundSchema = CustomFields$inboundSchema; + /** @deprecated use `CustomFields$outboundSchema` instead. */ + export const outboundSchema = CustomFields$outboundSchema; + /** @deprecated use `CustomFields$Outbound` instead. */ + export type Outbound = CustomFields$Outbound; } /** @internal */ -export const GroupPermissions$inboundSchema: z.ZodType = z - .object({ - group_name: z.string(), - permission_type: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_name: "groupName", - permission_type: "permissionType", - }); - }); +export const GroupPermissions$inboundSchema: z.ZodType< + GroupPermissions, + z.ZodTypeDef, + unknown +> = z.object({ + group_name: z.string(), + permission_type: z.number().int(), +}).transform((v) => { + return remap$(v, { + "group_name": "groupName", + "permission_type": "permissionType", + }); +}); /** @internal */ export type GroupPermissions$Outbound = { - group_name: string; - permission_type: number; + group_name: string; + permission_type: number; }; /** @internal */ export const GroupPermissions$outboundSchema: z.ZodType< - GroupPermissions$Outbound, - z.ZodTypeDef, - GroupPermissions -> = z - .object({ - groupName: z.string(), - permissionType: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupName: "group_name", - permissionType: "permission_type", - }); - }); + GroupPermissions$Outbound, + z.ZodTypeDef, + GroupPermissions +> = z.object({ + groupName: z.string(), + permissionType: z.number().int(), +}).transform((v) => { + return remap$(v, { + groupName: "group_name", + permissionType: "permission_type", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GroupPermissions$ { - /** @deprecated use `GroupPermissions$inboundSchema` instead. */ - export const inboundSchema = GroupPermissions$inboundSchema; - /** @deprecated use `GroupPermissions$outboundSchema` instead. */ - export const outboundSchema = GroupPermissions$outboundSchema; - /** @deprecated use `GroupPermissions$Outbound` instead. */ - export type Outbound = GroupPermissions$Outbound; + /** @deprecated use `GroupPermissions$inboundSchema` instead. */ + export const inboundSchema = GroupPermissions$inboundSchema; + /** @deprecated use `GroupPermissions$outboundSchema` instead. */ + export const outboundSchema = GroupPermissions$outboundSchema; + /** @deprecated use `GroupPermissions$Outbound` instead. */ + export type Outbound = GroupPermissions$Outbound; } /** @internal */ -export const RequiredTagGroups$inboundSchema: z.ZodType = - z - .object({ - min_count: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - min_count: "minCount", - }); - }); +export const RequiredTagGroups$inboundSchema: z.ZodType< + RequiredTagGroups, + z.ZodTypeDef, + unknown +> = z.object({ + min_count: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "min_count": "minCount", + }); +}); /** @internal */ export type RequiredTagGroups$Outbound = { - min_count: number; - name: string; + min_count: number; + name: string; }; /** @internal */ export const RequiredTagGroups$outboundSchema: z.ZodType< - RequiredTagGroups$Outbound, - z.ZodTypeDef, - RequiredTagGroups -> = z - .object({ - minCount: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - minCount: "min_count", - }); - }); + RequiredTagGroups$Outbound, + z.ZodTypeDef, + RequiredTagGroups +> = z.object({ + minCount: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + minCount: "min_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RequiredTagGroups$ { - /** @deprecated use `RequiredTagGroups$inboundSchema` instead. */ - export const inboundSchema = RequiredTagGroups$inboundSchema; - /** @deprecated use `RequiredTagGroups$outboundSchema` instead. */ - export const outboundSchema = RequiredTagGroups$outboundSchema; - /** @deprecated use `RequiredTagGroups$Outbound` instead. */ - export type Outbound = RequiredTagGroups$Outbound; + /** @deprecated use `RequiredTagGroups$inboundSchema` instead. */ + export const inboundSchema = RequiredTagGroups$inboundSchema; + /** @deprecated use `RequiredTagGroups$outboundSchema` instead. */ + export const outboundSchema = RequiredTagGroups$outboundSchema; + /** @deprecated use `RequiredTagGroups$Outbound` instead. */ + export type Outbound = RequiredTagGroups$Outbound; } /** @internal */ -export const Category$inboundSchema: z.ZodType = z - .object({ - all_topics_wiki: z.boolean(), - allow_badges: z.boolean(), - allow_global_tags: z.boolean().optional(), - allow_unlimited_owner_edits_on_first_post: z.boolean(), - allowed_tag_groups: z.array(z.any()).optional(), - allowed_tags: z.array(z.any()).optional(), - auto_close_based_on_last_post: z.boolean(), - auto_close_hours: z.nullable(z.string()), - available_groups: z.array(z.any()), - can_delete: z.boolean(), - can_edit: z.boolean(), - category_setting: z.any().optional(), - color: z.string(), - custom_fields: z.lazy(() => CustomFields$inboundSchema), - default_list_filter: z.string(), - default_slow_mode_seconds: z.nullable(z.string()), - default_top_period: z.string(), - default_view: z.nullable(z.string()), - description: z.nullable(z.string()), - description_excerpt: z.nullable(z.string()), - description_text: z.nullable(z.string()), - email_in: z.nullable(z.string()), - email_in_allow_strangers: z.boolean(), - form_template_ids: z.array(z.any()).optional(), - group_permissions: z.array(z.lazy(() => GroupPermissions$inboundSchema)), - has_children: z.nullable(z.boolean()), - id: z.number().int(), - mailinglist_mirror: z.boolean(), - minimum_required_tags: z.number().int(), - name: z.string(), - navigate_to_first_post_after_read: z.boolean(), - notification_level: z.number().int(), - num_featured_topics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - post_count: z.number().int(), - read_only_banner: z.nullable(z.string()), - read_restricted: z.boolean(), - required_tag_groups: z.array(z.lazy(() => RequiredTagGroups$inboundSchema)), - search_priority: z.number().int(), - show_subcategory_list: z.boolean(), - slug: z.string(), - sort_ascending: z.nullable(z.string()), - sort_order: z.nullable(z.string()), - subcategory_list_style: z.string(), - text_color: z.string(), - topic_count: z.number().int(), - topic_featured_link_allowed: z.boolean(), - topic_template: z.nullable(z.string()), - topic_url: z.nullable(z.string()), - uploaded_background: z.nullable(z.string()), - uploaded_background_dark: z.nullable(z.string()), - uploaded_logo: z.nullable(z.string()), - uploaded_logo_dark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - all_topics_wiki: "allTopicsWiki", - allow_badges: "allowBadges", - allow_global_tags: "allowGlobalTags", - allow_unlimited_owner_edits_on_first_post: "allowUnlimitedOwnerEditsOnFirstPost", - allowed_tag_groups: "allowedTagGroups", - allowed_tags: "allowedTags", - auto_close_based_on_last_post: "autoCloseBasedOnLastPost", - auto_close_hours: "autoCloseHours", - available_groups: "availableGroups", - can_delete: "canDelete", - can_edit: "canEdit", - category_setting: "categorySetting", - custom_fields: "customFields", - default_list_filter: "defaultListFilter", - default_slow_mode_seconds: "defaultSlowModeSeconds", - default_top_period: "defaultTopPeriod", - default_view: "defaultView", - description_excerpt: "descriptionExcerpt", - description_text: "descriptionText", - email_in: "emailIn", - email_in_allow_strangers: "emailInAllowStrangers", - form_template_ids: "formTemplateIds", - group_permissions: "groupPermissions", - has_children: "hasChildren", - mailinglist_mirror: "mailinglistMirror", - minimum_required_tags: "minimumRequiredTags", - navigate_to_first_post_after_read: "navigateToFirstPostAfterRead", - notification_level: "notificationLevel", - num_featured_topics: "numFeaturedTopics", - post_count: "postCount", - read_only_banner: "readOnlyBanner", - read_restricted: "readRestricted", - required_tag_groups: "requiredTagGroups", - search_priority: "searchPriority", - show_subcategory_list: "showSubcategoryList", - sort_ascending: "sortAscending", - sort_order: "sortOrder", - subcategory_list_style: "subcategoryListStyle", - text_color: "textColor", - topic_count: "topicCount", - topic_featured_link_allowed: "topicFeaturedLinkAllowed", - topic_template: "topicTemplate", - topic_url: "topicUrl", - uploaded_background: "uploadedBackground", - uploaded_background_dark: "uploadedBackgroundDark", - uploaded_logo: "uploadedLogo", - uploaded_logo_dark: "uploadedLogoDark", - }); - }); +export const Category$inboundSchema: z.ZodType< + Category, + z.ZodTypeDef, + unknown +> = z.object({ + all_topics_wiki: z.boolean(), + allow_badges: z.boolean(), + allow_global_tags: z.boolean().optional(), + allow_unlimited_owner_edits_on_first_post: z.boolean(), + allowed_tag_groups: z.array(z.any()).optional(), + allowed_tags: z.array(z.any()).optional(), + auto_close_based_on_last_post: z.boolean(), + auto_close_hours: z.nullable(z.string()), + available_groups: z.array(z.any()), + can_delete: z.boolean(), + can_edit: z.boolean(), + category_setting: z.any().optional(), + color: z.string(), + custom_fields: z.lazy(() => CustomFields$inboundSchema), + default_list_filter: z.string(), + default_slow_mode_seconds: z.nullable(z.string()), + default_top_period: z.string(), + default_view: z.nullable(z.string()), + description: z.nullable(z.string()), + description_excerpt: z.nullable(z.string()), + description_text: z.nullable(z.string()), + email_in: z.nullable(z.string()), + email_in_allow_strangers: z.boolean(), + form_template_ids: z.array(z.any()).optional(), + group_permissions: z.array(z.lazy(() => GroupPermissions$inboundSchema)), + has_children: z.nullable(z.boolean()), + id: z.number().int(), + mailinglist_mirror: z.boolean(), + minimum_required_tags: z.number().int(), + name: z.string(), + navigate_to_first_post_after_read: z.boolean(), + notification_level: z.number().int(), + num_featured_topics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + post_count: z.number().int(), + read_only_banner: z.nullable(z.string()), + read_restricted: z.boolean(), + required_tag_groups: z.array(z.lazy(() => RequiredTagGroups$inboundSchema)), + search_priority: z.number().int(), + show_subcategory_list: z.boolean(), + slug: z.string(), + sort_ascending: z.nullable(z.string()), + sort_order: z.nullable(z.string()), + subcategory_list_style: z.string(), + text_color: z.string(), + topic_count: z.number().int(), + topic_featured_link_allowed: z.boolean(), + topic_template: z.nullable(z.string()), + topic_url: z.nullable(z.string()), + uploaded_background: z.nullable(z.string()), + uploaded_background_dark: z.nullable(z.string()), + uploaded_logo: z.nullable(z.string()), + uploaded_logo_dark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "all_topics_wiki": "allTopicsWiki", + "allow_badges": "allowBadges", + "allow_global_tags": "allowGlobalTags", + "allow_unlimited_owner_edits_on_first_post": + "allowUnlimitedOwnerEditsOnFirstPost", + "allowed_tag_groups": "allowedTagGroups", + "allowed_tags": "allowedTags", + "auto_close_based_on_last_post": "autoCloseBasedOnLastPost", + "auto_close_hours": "autoCloseHours", + "available_groups": "availableGroups", + "can_delete": "canDelete", + "can_edit": "canEdit", + "category_setting": "categorySetting", + "custom_fields": "customFields", + "default_list_filter": "defaultListFilter", + "default_slow_mode_seconds": "defaultSlowModeSeconds", + "default_top_period": "defaultTopPeriod", + "default_view": "defaultView", + "description_excerpt": "descriptionExcerpt", + "description_text": "descriptionText", + "email_in": "emailIn", + "email_in_allow_strangers": "emailInAllowStrangers", + "form_template_ids": "formTemplateIds", + "group_permissions": "groupPermissions", + "has_children": "hasChildren", + "mailinglist_mirror": "mailinglistMirror", + "minimum_required_tags": "minimumRequiredTags", + "navigate_to_first_post_after_read": "navigateToFirstPostAfterRead", + "notification_level": "notificationLevel", + "num_featured_topics": "numFeaturedTopics", + "post_count": "postCount", + "read_only_banner": "readOnlyBanner", + "read_restricted": "readRestricted", + "required_tag_groups": "requiredTagGroups", + "search_priority": "searchPriority", + "show_subcategory_list": "showSubcategoryList", + "sort_ascending": "sortAscending", + "sort_order": "sortOrder", + "subcategory_list_style": "subcategoryListStyle", + "text_color": "textColor", + "topic_count": "topicCount", + "topic_featured_link_allowed": "topicFeaturedLinkAllowed", + "topic_template": "topicTemplate", + "topic_url": "topicUrl", + "uploaded_background": "uploadedBackground", + "uploaded_background_dark": "uploadedBackgroundDark", + "uploaded_logo": "uploadedLogo", + "uploaded_logo_dark": "uploadedLogoDark", + }); +}); /** @internal */ export type Category$Outbound = { - all_topics_wiki: boolean; - allow_badges: boolean; - allow_global_tags?: boolean | undefined; - allow_unlimited_owner_edits_on_first_post: boolean; - allowed_tag_groups?: Array | undefined; - allowed_tags?: Array | undefined; - auto_close_based_on_last_post: boolean; - auto_close_hours: string | null; - available_groups: Array; - can_delete: boolean; - can_edit: boolean; - category_setting?: any | undefined; - color: string; - custom_fields: CustomFields$Outbound; - default_list_filter: string; - default_slow_mode_seconds: string | null; - default_top_period: string; - default_view: string | null; - description: string | null; - description_excerpt: string | null; - description_text: string | null; - email_in: string | null; - email_in_allow_strangers: boolean; - form_template_ids?: Array | undefined; - group_permissions: Array; - has_children: boolean | null; - id: number; - mailinglist_mirror: boolean; - minimum_required_tags: number; - name: string; - navigate_to_first_post_after_read: boolean; - notification_level: number; - num_featured_topics: number; - permission: number | null; - position: number; - post_count: number; - read_only_banner: string | null; - read_restricted: boolean; - required_tag_groups: Array; - search_priority: number; - show_subcategory_list: boolean; - slug: string; - sort_ascending: string | null; - sort_order: string | null; - subcategory_list_style: string; - text_color: string; - topic_count: number; - topic_featured_link_allowed: boolean; - topic_template: string | null; - topic_url: string | null; - uploaded_background: string | null; - uploaded_background_dark: string | null; - uploaded_logo: string | null; - uploaded_logo_dark: string | null; + all_topics_wiki: boolean; + allow_badges: boolean; + allow_global_tags?: boolean | undefined; + allow_unlimited_owner_edits_on_first_post: boolean; + allowed_tag_groups?: Array | undefined; + allowed_tags?: Array | undefined; + auto_close_based_on_last_post: boolean; + auto_close_hours: string | null; + available_groups: Array; + can_delete: boolean; + can_edit: boolean; + category_setting?: any | undefined; + color: string; + custom_fields: CustomFields$Outbound; + default_list_filter: string; + default_slow_mode_seconds: string | null; + default_top_period: string; + default_view: string | null; + description: string | null; + description_excerpt: string | null; + description_text: string | null; + email_in: string | null; + email_in_allow_strangers: boolean; + form_template_ids?: Array | undefined; + group_permissions: Array; + has_children: boolean | null; + id: number; + mailinglist_mirror: boolean; + minimum_required_tags: number; + name: string; + navigate_to_first_post_after_read: boolean; + notification_level: number; + num_featured_topics: number; + permission: number | null; + position: number; + post_count: number; + read_only_banner: string | null; + read_restricted: boolean; + required_tag_groups: Array; + search_priority: number; + show_subcategory_list: boolean; + slug: string; + sort_ascending: string | null; + sort_order: string | null; + subcategory_list_style: string; + text_color: string; + topic_count: number; + topic_featured_link_allowed: boolean; + topic_template: string | null; + topic_url: string | null; + uploaded_background: string | null; + uploaded_background_dark: string | null; + uploaded_logo: string | null; + uploaded_logo_dark: string | null; }; /** @internal */ -export const Category$outboundSchema: z.ZodType = z - .object({ - allTopicsWiki: z.boolean(), - allowBadges: z.boolean(), - allowGlobalTags: z.boolean().optional(), - allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), - allowedTagGroups: z.array(z.any()).optional(), - allowedTags: z.array(z.any()).optional(), - autoCloseBasedOnLastPost: z.boolean(), - autoCloseHours: z.nullable(z.string()), - availableGroups: z.array(z.any()), - canDelete: z.boolean(), - canEdit: z.boolean(), - categorySetting: z.any().optional(), - color: z.string(), - customFields: z.lazy(() => CustomFields$outboundSchema), - defaultListFilter: z.string(), - defaultSlowModeSeconds: z.nullable(z.string()), - defaultTopPeriod: z.string(), - defaultView: z.nullable(z.string()), - description: z.nullable(z.string()), - descriptionExcerpt: z.nullable(z.string()), - descriptionText: z.nullable(z.string()), - emailIn: z.nullable(z.string()), - emailInAllowStrangers: z.boolean(), - formTemplateIds: z.array(z.any()).optional(), - groupPermissions: z.array(z.lazy(() => GroupPermissions$outboundSchema)), - hasChildren: z.nullable(z.boolean()), - id: z.number().int(), - mailinglistMirror: z.boolean(), - minimumRequiredTags: z.number().int(), - name: z.string(), - navigateToFirstPostAfterRead: z.boolean(), - notificationLevel: z.number().int(), - numFeaturedTopics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - postCount: z.number().int(), - readOnlyBanner: z.nullable(z.string()), - readRestricted: z.boolean(), - requiredTagGroups: z.array(z.lazy(() => RequiredTagGroups$outboundSchema)), - searchPriority: z.number().int(), - showSubcategoryList: z.boolean(), - slug: z.string(), - sortAscending: z.nullable(z.string()), - sortOrder: z.nullable(z.string()), - subcategoryListStyle: z.string(), - textColor: z.string(), - topicCount: z.number().int(), - topicFeaturedLinkAllowed: z.boolean(), - topicTemplate: z.nullable(z.string()), - topicUrl: z.nullable(z.string()), - uploadedBackground: z.nullable(z.string()), - uploadedBackgroundDark: z.nullable(z.string()), - uploadedLogo: z.nullable(z.string()), - uploadedLogoDark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allTopicsWiki: "all_topics_wiki", - allowBadges: "allow_badges", - allowGlobalTags: "allow_global_tags", - allowUnlimitedOwnerEditsOnFirstPost: "allow_unlimited_owner_edits_on_first_post", - allowedTagGroups: "allowed_tag_groups", - allowedTags: "allowed_tags", - autoCloseBasedOnLastPost: "auto_close_based_on_last_post", - autoCloseHours: "auto_close_hours", - availableGroups: "available_groups", - canDelete: "can_delete", - canEdit: "can_edit", - categorySetting: "category_setting", - customFields: "custom_fields", - defaultListFilter: "default_list_filter", - defaultSlowModeSeconds: "default_slow_mode_seconds", - defaultTopPeriod: "default_top_period", - defaultView: "default_view", - descriptionExcerpt: "description_excerpt", - descriptionText: "description_text", - emailIn: "email_in", - emailInAllowStrangers: "email_in_allow_strangers", - formTemplateIds: "form_template_ids", - groupPermissions: "group_permissions", - hasChildren: "has_children", - mailinglistMirror: "mailinglist_mirror", - minimumRequiredTags: "minimum_required_tags", - navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", - notificationLevel: "notification_level", - numFeaturedTopics: "num_featured_topics", - postCount: "post_count", - readOnlyBanner: "read_only_banner", - readRestricted: "read_restricted", - requiredTagGroups: "required_tag_groups", - searchPriority: "search_priority", - showSubcategoryList: "show_subcategory_list", - sortAscending: "sort_ascending", - sortOrder: "sort_order", - subcategoryListStyle: "subcategory_list_style", - textColor: "text_color", - topicCount: "topic_count", - topicFeaturedLinkAllowed: "topic_featured_link_allowed", - topicTemplate: "topic_template", - topicUrl: "topic_url", - uploadedBackground: "uploaded_background", - uploadedBackgroundDark: "uploaded_background_dark", - uploadedLogo: "uploaded_logo", - uploadedLogoDark: "uploaded_logo_dark", - }); - }); +export const Category$outboundSchema: z.ZodType< + Category$Outbound, + z.ZodTypeDef, + Category +> = z.object({ + allTopicsWiki: z.boolean(), + allowBadges: z.boolean(), + allowGlobalTags: z.boolean().optional(), + allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), + allowedTagGroups: z.array(z.any()).optional(), + allowedTags: z.array(z.any()).optional(), + autoCloseBasedOnLastPost: z.boolean(), + autoCloseHours: z.nullable(z.string()), + availableGroups: z.array(z.any()), + canDelete: z.boolean(), + canEdit: z.boolean(), + categorySetting: z.any().optional(), + color: z.string(), + customFields: z.lazy(() => CustomFields$outboundSchema), + defaultListFilter: z.string(), + defaultSlowModeSeconds: z.nullable(z.string()), + defaultTopPeriod: z.string(), + defaultView: z.nullable(z.string()), + description: z.nullable(z.string()), + descriptionExcerpt: z.nullable(z.string()), + descriptionText: z.nullable(z.string()), + emailIn: z.nullable(z.string()), + emailInAllowStrangers: z.boolean(), + formTemplateIds: z.array(z.any()).optional(), + groupPermissions: z.array(z.lazy(() => GroupPermissions$outboundSchema)), + hasChildren: z.nullable(z.boolean()), + id: z.number().int(), + mailinglistMirror: z.boolean(), + minimumRequiredTags: z.number().int(), + name: z.string(), + navigateToFirstPostAfterRead: z.boolean(), + notificationLevel: z.number().int(), + numFeaturedTopics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + postCount: z.number().int(), + readOnlyBanner: z.nullable(z.string()), + readRestricted: z.boolean(), + requiredTagGroups: z.array(z.lazy(() => RequiredTagGroups$outboundSchema)), + searchPriority: z.number().int(), + showSubcategoryList: z.boolean(), + slug: z.string(), + sortAscending: z.nullable(z.string()), + sortOrder: z.nullable(z.string()), + subcategoryListStyle: z.string(), + textColor: z.string(), + topicCount: z.number().int(), + topicFeaturedLinkAllowed: z.boolean(), + topicTemplate: z.nullable(z.string()), + topicUrl: z.nullable(z.string()), + uploadedBackground: z.nullable(z.string()), + uploadedBackgroundDark: z.nullable(z.string()), + uploadedLogo: z.nullable(z.string()), + uploadedLogoDark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allTopicsWiki: "all_topics_wiki", + allowBadges: "allow_badges", + allowGlobalTags: "allow_global_tags", + allowUnlimitedOwnerEditsOnFirstPost: + "allow_unlimited_owner_edits_on_first_post", + allowedTagGroups: "allowed_tag_groups", + allowedTags: "allowed_tags", + autoCloseBasedOnLastPost: "auto_close_based_on_last_post", + autoCloseHours: "auto_close_hours", + availableGroups: "available_groups", + canDelete: "can_delete", + canEdit: "can_edit", + categorySetting: "category_setting", + customFields: "custom_fields", + defaultListFilter: "default_list_filter", + defaultSlowModeSeconds: "default_slow_mode_seconds", + defaultTopPeriod: "default_top_period", + defaultView: "default_view", + descriptionExcerpt: "description_excerpt", + descriptionText: "description_text", + emailIn: "email_in", + emailInAllowStrangers: "email_in_allow_strangers", + formTemplateIds: "form_template_ids", + groupPermissions: "group_permissions", + hasChildren: "has_children", + mailinglistMirror: "mailinglist_mirror", + minimumRequiredTags: "minimum_required_tags", + navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", + notificationLevel: "notification_level", + numFeaturedTopics: "num_featured_topics", + postCount: "post_count", + readOnlyBanner: "read_only_banner", + readRestricted: "read_restricted", + requiredTagGroups: "required_tag_groups", + searchPriority: "search_priority", + showSubcategoryList: "show_subcategory_list", + sortAscending: "sort_ascending", + sortOrder: "sort_order", + subcategoryListStyle: "subcategory_list_style", + textColor: "text_color", + topicCount: "topic_count", + topicFeaturedLinkAllowed: "topic_featured_link_allowed", + topicTemplate: "topic_template", + topicUrl: "topic_url", + uploadedBackground: "uploaded_background", + uploadedBackgroundDark: "uploaded_background_dark", + uploadedLogo: "uploaded_logo", + uploadedLogoDark: "uploaded_logo_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Category$ { - /** @deprecated use `Category$inboundSchema` instead. */ - export const inboundSchema = Category$inboundSchema; - /** @deprecated use `Category$outboundSchema` instead. */ - export const outboundSchema = Category$outboundSchema; - /** @deprecated use `Category$Outbound` instead. */ - export type Outbound = Category$Outbound; + /** @deprecated use `Category$inboundSchema` instead. */ + export const inboundSchema = Category$inboundSchema; + /** @deprecated use `Category$outboundSchema` instead. */ + export const outboundSchema = Category$outboundSchema; + /** @deprecated use `Category$Outbound` instead. */ + export type Outbound = Category$Outbound; } /** @internal */ export const CreateCategoryResponseBody$inboundSchema: z.ZodType< - CreateCategoryResponseBody, - z.ZodTypeDef, - unknown + CreateCategoryResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - category: z.lazy(() => Category$inboundSchema), + category: z.lazy(() => Category$inboundSchema), }); /** @internal */ export type CreateCategoryResponseBody$Outbound = { - category: Category$Outbound; + category: Category$Outbound; }; /** @internal */ export const CreateCategoryResponseBody$outboundSchema: z.ZodType< - CreateCategoryResponseBody$Outbound, - z.ZodTypeDef, - CreateCategoryResponseBody + CreateCategoryResponseBody$Outbound, + z.ZodTypeDef, + CreateCategoryResponseBody > = z.object({ - category: z.lazy(() => Category$outboundSchema), + category: z.lazy(() => Category$outboundSchema), }); /** @@ -683,10 +685,10 @@ export const CreateCategoryResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateCategoryResponseBody$ { - /** @deprecated use `CreateCategoryResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateCategoryResponseBody$inboundSchema; - /** @deprecated use `CreateCategoryResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateCategoryResponseBody$outboundSchema; - /** @deprecated use `CreateCategoryResponseBody$Outbound` instead. */ - export type Outbound = CreateCategoryResponseBody$Outbound; + /** @deprecated use `CreateCategoryResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateCategoryResponseBody$inboundSchema; + /** @deprecated use `CreateCategoryResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateCategoryResponseBody$outboundSchema; + /** @deprecated use `CreateCategoryResponseBody$Outbound` instead. */ + export type Outbound = CreateCategoryResponseBody$Outbound; } diff --git a/src/sdk/models/operations/creategroup.ts b/src/sdk/models/operations/creategroup.ts index 86354dd..c5528a4 100644 --- a/src/sdk/models/operations/creategroup.ts +++ b/src/sdk/models/operations/creategroup.ts @@ -2,233 +2,234 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Group = { - /** - * pipe|separated - */ - automaticMembershipEmailDomains?: string | undefined; - /** - * About Group - */ - bioRaw?: string | undefined; - defaultNotificationLevel?: number | undefined; - flairBgColor?: string | undefined; - flairIcon?: string | undefined; - flairUploadId?: number | undefined; - fullName?: string | undefined; - mutedCategoryIds?: Array | undefined; - name: string; - /** - * comma,separated - */ - ownerUsernames?: string | undefined; - primaryGroup?: boolean | undefined; - publicAdmission?: boolean | undefined; - publicExit?: boolean | undefined; - regularCategoryIds?: Array | undefined; - trackingCategoryIds?: Array | undefined; - /** - * comma,separated - */ - usernames?: string | undefined; - visibilityLevel?: number | undefined; - watchingCategoryIds?: Array | undefined; - watchingFirstPostCategoryIds?: Array | undefined; + /** + * pipe|separated + */ + automaticMembershipEmailDomains?: string | undefined; + /** + * About Group + */ + bioRaw?: string | undefined; + defaultNotificationLevel?: number | undefined; + flairBgColor?: string | undefined; + flairIcon?: string | undefined; + flairUploadId?: number | undefined; + fullName?: string | undefined; + mutedCategoryIds?: Array | undefined; + name: string; + /** + * comma,separated + */ + ownerUsernames?: string | undefined; + primaryGroup?: boolean | undefined; + publicAdmission?: boolean | undefined; + publicExit?: boolean | undefined; + regularCategoryIds?: Array | undefined; + trackingCategoryIds?: Array | undefined; + /** + * comma,separated + */ + usernames?: string | undefined; + visibilityLevel?: number | undefined; + watchingCategoryIds?: Array | undefined; + watchingFirstPostCategoryIds?: Array | undefined; }; export type CreateGroupRequestBody = { - group: Group; + group: Group; }; export type BasicGroup = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canEditGroup?: boolean | undefined; - canSeeMembers: boolean; - defaultNotificationLevel: number; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canEditGroup?: boolean | undefined; + canSeeMembers: boolean; + defaultNotificationLevel: number; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; /** * group created */ export type CreateGroupResponseBody = { - basicGroup: BasicGroup; + basicGroup: BasicGroup; }; /** @internal */ export const Group$inboundSchema: z.ZodType = z - .object({ - automatic_membership_email_domains: z.string().optional(), - bio_raw: z.string().optional(), - default_notification_level: z.number().int().optional(), - flair_bg_color: z.string().optional(), - flair_icon: z.string().optional(), - flair_upload_id: z.number().int().optional(), - full_name: z.string().optional(), - muted_category_ids: z.array(z.number().int()).optional(), - name: z.string(), - owner_usernames: z.string().optional(), - primary_group: z.boolean().optional(), - public_admission: z.boolean().optional(), - public_exit: z.boolean().optional(), - regular_category_ids: z.array(z.number().int()).optional(), - tracking_category_ids: z.array(z.number().int()).optional(), - usernames: z.string().optional(), - visibility_level: z.number().int().optional(), - watching_category_ids: z.array(z.number().int()).optional(), - watching_first_post_category_ids: z.array(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - automatic_membership_email_domains: "automaticMembershipEmailDomains", - bio_raw: "bioRaw", - default_notification_level: "defaultNotificationLevel", - flair_bg_color: "flairBgColor", - flair_icon: "flairIcon", - flair_upload_id: "flairUploadId", - full_name: "fullName", - muted_category_ids: "mutedCategoryIds", - owner_usernames: "ownerUsernames", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - regular_category_ids: "regularCategoryIds", - tracking_category_ids: "trackingCategoryIds", - visibility_level: "visibilityLevel", - watching_category_ids: "watchingCategoryIds", - watching_first_post_category_ids: "watchingFirstPostCategoryIds", - }); + .object({ + automatic_membership_email_domains: z.string().optional(), + bio_raw: z.string().optional(), + default_notification_level: z.number().int().optional(), + flair_bg_color: z.string().optional(), + flair_icon: z.string().optional(), + flair_upload_id: z.number().int().optional(), + full_name: z.string().optional(), + muted_category_ids: z.array(z.number().int()).optional(), + name: z.string(), + owner_usernames: z.string().optional(), + primary_group: z.boolean().optional(), + public_admission: z.boolean().optional(), + public_exit: z.boolean().optional(), + regular_category_ids: z.array(z.number().int()).optional(), + tracking_category_ids: z.array(z.number().int()).optional(), + usernames: z.string().optional(), + visibility_level: z.number().int().optional(), + watching_category_ids: z.array(z.number().int()).optional(), + watching_first_post_category_ids: z.array(z.number().int()).optional(), + }).transform((v) => { + return remap$(v, { + "automatic_membership_email_domains": "automaticMembershipEmailDomains", + "bio_raw": "bioRaw", + "default_notification_level": "defaultNotificationLevel", + "flair_bg_color": "flairBgColor", + "flair_icon": "flairIcon", + "flair_upload_id": "flairUploadId", + "full_name": "fullName", + "muted_category_ids": "mutedCategoryIds", + "owner_usernames": "ownerUsernames", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "regular_category_ids": "regularCategoryIds", + "tracking_category_ids": "trackingCategoryIds", + "visibility_level": "visibilityLevel", + "watching_category_ids": "watchingCategoryIds", + "watching_first_post_category_ids": "watchingFirstPostCategoryIds", }); + }); /** @internal */ export type Group$Outbound = { - automatic_membership_email_domains?: string | undefined; - bio_raw?: string | undefined; - default_notification_level?: number | undefined; - flair_bg_color?: string | undefined; - flair_icon?: string | undefined; - flair_upload_id?: number | undefined; - full_name?: string | undefined; - muted_category_ids?: Array | undefined; - name: string; - owner_usernames?: string | undefined; - primary_group?: boolean | undefined; - public_admission?: boolean | undefined; - public_exit?: boolean | undefined; - regular_category_ids?: Array | undefined; - tracking_category_ids?: Array | undefined; - usernames?: string | undefined; - visibility_level?: number | undefined; - watching_category_ids?: Array | undefined; - watching_first_post_category_ids?: Array | undefined; + automatic_membership_email_domains?: string | undefined; + bio_raw?: string | undefined; + default_notification_level?: number | undefined; + flair_bg_color?: string | undefined; + flair_icon?: string | undefined; + flair_upload_id?: number | undefined; + full_name?: string | undefined; + muted_category_ids?: Array | undefined; + name: string; + owner_usernames?: string | undefined; + primary_group?: boolean | undefined; + public_admission?: boolean | undefined; + public_exit?: boolean | undefined; + regular_category_ids?: Array | undefined; + tracking_category_ids?: Array | undefined; + usernames?: string | undefined; + visibility_level?: number | undefined; + watching_category_ids?: Array | undefined; + watching_first_post_category_ids?: Array | undefined; }; /** @internal */ -export const Group$outboundSchema: z.ZodType = z - .object({ - automaticMembershipEmailDomains: z.string().optional(), - bioRaw: z.string().optional(), - defaultNotificationLevel: z.number().int().optional(), - flairBgColor: z.string().optional(), - flairIcon: z.string().optional(), - flairUploadId: z.number().int().optional(), - fullName: z.string().optional(), - mutedCategoryIds: z.array(z.number().int()).optional(), - name: z.string(), - ownerUsernames: z.string().optional(), - primaryGroup: z.boolean().optional(), - publicAdmission: z.boolean().optional(), - publicExit: z.boolean().optional(), - regularCategoryIds: z.array(z.number().int()).optional(), - trackingCategoryIds: z.array(z.number().int()).optional(), - usernames: z.string().optional(), - visibilityLevel: z.number().int().optional(), - watchingCategoryIds: z.array(z.number().int()).optional(), - watchingFirstPostCategoryIds: z.array(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - automaticMembershipEmailDomains: "automatic_membership_email_domains", - bioRaw: "bio_raw", - defaultNotificationLevel: "default_notification_level", - flairBgColor: "flair_bg_color", - flairIcon: "flair_icon", - flairUploadId: "flair_upload_id", - fullName: "full_name", - mutedCategoryIds: "muted_category_ids", - ownerUsernames: "owner_usernames", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - regularCategoryIds: "regular_category_ids", - trackingCategoryIds: "tracking_category_ids", - visibilityLevel: "visibility_level", - watchingCategoryIds: "watching_category_ids", - watchingFirstPostCategoryIds: "watching_first_post_category_ids", - }); - }); +export const Group$outboundSchema: z.ZodType< + Group$Outbound, + z.ZodTypeDef, + Group +> = z.object({ + automaticMembershipEmailDomains: z.string().optional(), + bioRaw: z.string().optional(), + defaultNotificationLevel: z.number().int().optional(), + flairBgColor: z.string().optional(), + flairIcon: z.string().optional(), + flairUploadId: z.number().int().optional(), + fullName: z.string().optional(), + mutedCategoryIds: z.array(z.number().int()).optional(), + name: z.string(), + ownerUsernames: z.string().optional(), + primaryGroup: z.boolean().optional(), + publicAdmission: z.boolean().optional(), + publicExit: z.boolean().optional(), + regularCategoryIds: z.array(z.number().int()).optional(), + trackingCategoryIds: z.array(z.number().int()).optional(), + usernames: z.string().optional(), + visibilityLevel: z.number().int().optional(), + watchingCategoryIds: z.array(z.number().int()).optional(), + watchingFirstPostCategoryIds: z.array(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + automaticMembershipEmailDomains: "automatic_membership_email_domains", + bioRaw: "bio_raw", + defaultNotificationLevel: "default_notification_level", + flairBgColor: "flair_bg_color", + flairIcon: "flair_icon", + flairUploadId: "flair_upload_id", + fullName: "full_name", + mutedCategoryIds: "muted_category_ids", + ownerUsernames: "owner_usernames", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + regularCategoryIds: "regular_category_ids", + trackingCategoryIds: "tracking_category_ids", + visibilityLevel: "visibility_level", + watchingCategoryIds: "watching_category_ids", + watchingFirstPostCategoryIds: "watching_first_post_category_ids", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Group$ { - /** @deprecated use `Group$inboundSchema` instead. */ - export const inboundSchema = Group$inboundSchema; - /** @deprecated use `Group$outboundSchema` instead. */ - export const outboundSchema = Group$outboundSchema; - /** @deprecated use `Group$Outbound` instead. */ - export type Outbound = Group$Outbound; + /** @deprecated use `Group$inboundSchema` instead. */ + export const inboundSchema = Group$inboundSchema; + /** @deprecated use `Group$outboundSchema` instead. */ + export const outboundSchema = Group$outboundSchema; + /** @deprecated use `Group$Outbound` instead. */ + export type Outbound = Group$Outbound; } /** @internal */ export const CreateGroupRequestBody$inboundSchema: z.ZodType< - CreateGroupRequestBody, - z.ZodTypeDef, - unknown + CreateGroupRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - group: z.lazy(() => Group$inboundSchema), + group: z.lazy(() => Group$inboundSchema), }); /** @internal */ export type CreateGroupRequestBody$Outbound = { - group: Group$Outbound; + group: Group$Outbound; }; /** @internal */ export const CreateGroupRequestBody$outboundSchema: z.ZodType< - CreateGroupRequestBody$Outbound, - z.ZodTypeDef, - CreateGroupRequestBody + CreateGroupRequestBody$Outbound, + z.ZodTypeDef, + CreateGroupRequestBody > = z.object({ - group: z.lazy(() => Group$outboundSchema), + group: z.lazy(() => Group$outboundSchema), }); /** @@ -236,230 +237,230 @@ export const CreateGroupRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateGroupRequestBody$ { - /** @deprecated use `CreateGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateGroupRequestBody$inboundSchema; - /** @deprecated use `CreateGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateGroupRequestBody$outboundSchema; - /** @deprecated use `CreateGroupRequestBody$Outbound` instead. */ - export type Outbound = CreateGroupRequestBody$Outbound; + /** @deprecated use `CreateGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateGroupRequestBody$inboundSchema; + /** @deprecated use `CreateGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateGroupRequestBody$outboundSchema; + /** @deprecated use `CreateGroupRequestBody$Outbound` instead. */ + export type Outbound = CreateGroupRequestBody$Outbound; } /** @internal */ -export const BasicGroup$inboundSchema: z.ZodType = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_edit_group: z.boolean().optional(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_edit_group: "canEditGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); - }); +export const BasicGroup$inboundSchema: z.ZodType< + BasicGroup, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_edit_group: z.boolean().optional(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_edit_group": "canEditGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + }); +}); /** @internal */ export type BasicGroup$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_edit_group?: boolean | undefined; - can_see_members: boolean; - default_notification_level: number; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_edit_group?: boolean | undefined; + can_see_members: boolean; + default_notification_level: number; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ -export const BasicGroup$outboundSchema: z.ZodType = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canEditGroup: z.boolean().optional(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canEditGroup: "can_edit_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); +export const BasicGroup$outboundSchema: z.ZodType< + BasicGroup$Outbound, + z.ZodTypeDef, + BasicGroup +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canEditGroup: z.boolean().optional(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canEditGroup: "can_edit_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BasicGroup$ { - /** @deprecated use `BasicGroup$inboundSchema` instead. */ - export const inboundSchema = BasicGroup$inboundSchema; - /** @deprecated use `BasicGroup$outboundSchema` instead. */ - export const outboundSchema = BasicGroup$outboundSchema; - /** @deprecated use `BasicGroup$Outbound` instead. */ - export type Outbound = BasicGroup$Outbound; + /** @deprecated use `BasicGroup$inboundSchema` instead. */ + export const inboundSchema = BasicGroup$inboundSchema; + /** @deprecated use `BasicGroup$outboundSchema` instead. */ + export const outboundSchema = BasicGroup$outboundSchema; + /** @deprecated use `BasicGroup$Outbound` instead. */ + export type Outbound = BasicGroup$Outbound; } /** @internal */ export const CreateGroupResponseBody$inboundSchema: z.ZodType< - CreateGroupResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - basic_group: z.lazy(() => BasicGroup$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - basic_group: "basicGroup", - }); - }); + CreateGroupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + basic_group: z.lazy(() => BasicGroup$inboundSchema), +}).transform((v) => { + return remap$(v, { + "basic_group": "basicGroup", + }); +}); /** @internal */ export type CreateGroupResponseBody$Outbound = { - basic_group: BasicGroup$Outbound; + basic_group: BasicGroup$Outbound; }; /** @internal */ export const CreateGroupResponseBody$outboundSchema: z.ZodType< - CreateGroupResponseBody$Outbound, - z.ZodTypeDef, - CreateGroupResponseBody -> = z - .object({ - basicGroup: z.lazy(() => BasicGroup$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - basicGroup: "basic_group", - }); - }); + CreateGroupResponseBody$Outbound, + z.ZodTypeDef, + CreateGroupResponseBody +> = z.object({ + basicGroup: z.lazy(() => BasicGroup$outboundSchema), +}).transform((v) => { + return remap$(v, { + basicGroup: "basic_group", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateGroupResponseBody$ { - /** @deprecated use `CreateGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateGroupResponseBody$inboundSchema; - /** @deprecated use `CreateGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateGroupResponseBody$outboundSchema; - /** @deprecated use `CreateGroupResponseBody$Outbound` instead. */ - export type Outbound = CreateGroupResponseBody$Outbound; + /** @deprecated use `CreateGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateGroupResponseBody$inboundSchema; + /** @deprecated use `CreateGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateGroupResponseBody$outboundSchema; + /** @deprecated use `CreateGroupResponseBody$Outbound` instead. */ + export type Outbound = CreateGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createinvite.ts b/src/sdk/models/operations/createinvite.ts index e1aa05a..e5644df 100644 --- a/src/sdk/models/operations/createinvite.ts +++ b/src/sdk/models/operations/createinvite.ts @@ -2,280 +2,268 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateInviteRequestBody = { - /** - * optional, for email invites - */ - customMessage?: string | undefined; - /** - * required for email invites only - */ - email?: string | undefined; - /** - * optional, if not supplied, the invite_expiry_days site setting is used - */ - expiresAt?: string | undefined; - /** - * Optional, either this or `group_names`. Comma separated list for multiple ids. - */ - groupIds?: string | undefined; - /** - * Optional, either this or `group_ids`. Comma separated list for multiple names. - */ - groupNames?: string | undefined; - /** - * optional, for link invites - */ - maxRedemptionsAllowed?: number | undefined; - skipEmail?: boolean | undefined; - topicId?: number | undefined; + /** + * optional, for email invites + */ + customMessage?: string | undefined; + /** + * required for email invites only + */ + email?: string | undefined; + /** + * optional, if not supplied, the invite_expiry_days site setting is used + */ + expiresAt?: string | undefined; + /** + * Optional, either this or `group_names`. Comma separated list for multiple ids. + */ + groupIds?: string | undefined; + /** + * Optional, either this or `group_ids`. Comma separated list for multiple names. + */ + groupNames?: string | undefined; + /** + * optional, for link invites + */ + maxRedemptionsAllowed?: number | undefined; + skipEmail?: boolean | undefined; + topicId?: number | undefined; }; export type CreateInviteRequest = { - apiKey: string; - apiUsername: string; - requestBody?: CreateInviteRequestBody | undefined; + apiKey: string; + apiUsername: string; + requestBody?: CreateInviteRequestBody | undefined; }; /** * success response */ export type CreateInviteResponseBody = { - createdAt?: string | undefined; - customMessage?: string | null | undefined; - email?: string | undefined; - emailed?: boolean | undefined; - expired?: boolean | undefined; - expiresAt?: string | undefined; - groups?: Array | undefined; - id?: number | undefined; - link?: string | undefined; - topics?: Array | undefined; - updatedAt?: string | undefined; + createdAt?: string | undefined; + customMessage?: string | null | undefined; + email?: string | undefined; + emailed?: boolean | undefined; + expired?: boolean | undefined; + expiresAt?: string | undefined; + groups?: Array | undefined; + id?: number | undefined; + link?: string | undefined; + topics?: Array | undefined; + updatedAt?: string | undefined; }; /** @internal */ export const CreateInviteRequestBody$inboundSchema: z.ZodType< - CreateInviteRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - custom_message: z.string().optional(), - email: z.string().optional(), - expires_at: z.string().optional(), - group_ids: z.string().optional(), - group_names: z.string().optional(), - max_redemptions_allowed: z.number().int().default(1), - skip_email: z.boolean().default(false), - topic_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - custom_message: "customMessage", - expires_at: "expiresAt", - group_ids: "groupIds", - group_names: "groupNames", - max_redemptions_allowed: "maxRedemptionsAllowed", - skip_email: "skipEmail", - topic_id: "topicId", - }); - }); + CreateInviteRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + custom_message: z.string().optional(), + email: z.string().optional(), + expires_at: z.string().optional(), + group_ids: z.string().optional(), + group_names: z.string().optional(), + max_redemptions_allowed: z.number().int().default(1), + skip_email: z.boolean().default(false), + topic_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "custom_message": "customMessage", + "expires_at": "expiresAt", + "group_ids": "groupIds", + "group_names": "groupNames", + "max_redemptions_allowed": "maxRedemptionsAllowed", + "skip_email": "skipEmail", + "topic_id": "topicId", + }); +}); /** @internal */ export type CreateInviteRequestBody$Outbound = { - custom_message?: string | undefined; - email?: string | undefined; - expires_at?: string | undefined; - group_ids?: string | undefined; - group_names?: string | undefined; - max_redemptions_allowed: number; - skip_email: boolean; - topic_id?: number | undefined; + custom_message?: string | undefined; + email?: string | undefined; + expires_at?: string | undefined; + group_ids?: string | undefined; + group_names?: string | undefined; + max_redemptions_allowed: number; + skip_email: boolean; + topic_id?: number | undefined; }; /** @internal */ export const CreateInviteRequestBody$outboundSchema: z.ZodType< - CreateInviteRequestBody$Outbound, - z.ZodTypeDef, - CreateInviteRequestBody -> = z - .object({ - customMessage: z.string().optional(), - email: z.string().optional(), - expiresAt: z.string().optional(), - groupIds: z.string().optional(), - groupNames: z.string().optional(), - maxRedemptionsAllowed: z.number().int().default(1), - skipEmail: z.boolean().default(false), - topicId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - customMessage: "custom_message", - expiresAt: "expires_at", - groupIds: "group_ids", - groupNames: "group_names", - maxRedemptionsAllowed: "max_redemptions_allowed", - skipEmail: "skip_email", - topicId: "topic_id", - }); - }); + CreateInviteRequestBody$Outbound, + z.ZodTypeDef, + CreateInviteRequestBody +> = z.object({ + customMessage: z.string().optional(), + email: z.string().optional(), + expiresAt: z.string().optional(), + groupIds: z.string().optional(), + groupNames: z.string().optional(), + maxRedemptionsAllowed: z.number().int().default(1), + skipEmail: z.boolean().default(false), + topicId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + customMessage: "custom_message", + expiresAt: "expires_at", + groupIds: "group_ids", + groupNames: "group_names", + maxRedemptionsAllowed: "max_redemptions_allowed", + skipEmail: "skip_email", + topicId: "topic_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateInviteRequestBody$ { - /** @deprecated use `CreateInviteRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateInviteRequestBody$inboundSchema; - /** @deprecated use `CreateInviteRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateInviteRequestBody$outboundSchema; - /** @deprecated use `CreateInviteRequestBody$Outbound` instead. */ - export type Outbound = CreateInviteRequestBody$Outbound; + /** @deprecated use `CreateInviteRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateInviteRequestBody$inboundSchema; + /** @deprecated use `CreateInviteRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateInviteRequestBody$outboundSchema; + /** @deprecated use `CreateInviteRequestBody$Outbound` instead. */ + export type Outbound = CreateInviteRequestBody$Outbound; } /** @internal */ export const CreateInviteRequest$inboundSchema: z.ZodType< - CreateInviteRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => CreateInviteRequestBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + CreateInviteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => CreateInviteRequestBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type CreateInviteRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: CreateInviteRequestBody$Outbound | undefined; + "Api-Key": string; + "Api-Username": string; + RequestBody?: CreateInviteRequestBody$Outbound | undefined; }; /** @internal */ export const CreateInviteRequest$outboundSchema: z.ZodType< - CreateInviteRequest$Outbound, - z.ZodTypeDef, - CreateInviteRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => CreateInviteRequestBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + CreateInviteRequest$Outbound, + z.ZodTypeDef, + CreateInviteRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => CreateInviteRequestBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateInviteRequest$ { - /** @deprecated use `CreateInviteRequest$inboundSchema` instead. */ - export const inboundSchema = CreateInviteRequest$inboundSchema; - /** @deprecated use `CreateInviteRequest$outboundSchema` instead. */ - export const outboundSchema = CreateInviteRequest$outboundSchema; - /** @deprecated use `CreateInviteRequest$Outbound` instead. */ - export type Outbound = CreateInviteRequest$Outbound; + /** @deprecated use `CreateInviteRequest$inboundSchema` instead. */ + export const inboundSchema = CreateInviteRequest$inboundSchema; + /** @deprecated use `CreateInviteRequest$outboundSchema` instead. */ + export const outboundSchema = CreateInviteRequest$outboundSchema; + /** @deprecated use `CreateInviteRequest$Outbound` instead. */ + export type Outbound = CreateInviteRequest$Outbound; } /** @internal */ export const CreateInviteResponseBody$inboundSchema: z.ZodType< - CreateInviteResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - created_at: z.string().optional(), - custom_message: z.nullable(z.string()).optional(), - email: z.string().optional(), - emailed: z.boolean().optional(), - expired: z.boolean().optional(), - expires_at: z.string().optional(), - groups: z.array(z.any()).optional(), - id: z.number().int().optional(), - link: z.string().optional(), - topics: z.array(z.any()).optional(), - updated_at: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - created_at: "createdAt", - custom_message: "customMessage", - expires_at: "expiresAt", - updated_at: "updatedAt", - }); - }); + CreateInviteResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().optional(), + custom_message: z.nullable(z.string()).optional(), + email: z.string().optional(), + emailed: z.boolean().optional(), + expired: z.boolean().optional(), + expires_at: z.string().optional(), + groups: z.array(z.any()).optional(), + id: z.number().int().optional(), + link: z.string().optional(), + topics: z.array(z.any()).optional(), + updated_at: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "custom_message": "customMessage", + "expires_at": "expiresAt", + "updated_at": "updatedAt", + }); +}); /** @internal */ export type CreateInviteResponseBody$Outbound = { - created_at?: string | undefined; - custom_message?: string | null | undefined; - email?: string | undefined; - emailed?: boolean | undefined; - expired?: boolean | undefined; - expires_at?: string | undefined; - groups?: Array | undefined; - id?: number | undefined; - link?: string | undefined; - topics?: Array | undefined; - updated_at?: string | undefined; + created_at?: string | undefined; + custom_message?: string | null | undefined; + email?: string | undefined; + emailed?: boolean | undefined; + expired?: boolean | undefined; + expires_at?: string | undefined; + groups?: Array | undefined; + id?: number | undefined; + link?: string | undefined; + topics?: Array | undefined; + updated_at?: string | undefined; }; /** @internal */ export const CreateInviteResponseBody$outboundSchema: z.ZodType< - CreateInviteResponseBody$Outbound, - z.ZodTypeDef, - CreateInviteResponseBody -> = z - .object({ - createdAt: z.string().optional(), - customMessage: z.nullable(z.string()).optional(), - email: z.string().optional(), - emailed: z.boolean().optional(), - expired: z.boolean().optional(), - expiresAt: z.string().optional(), - groups: z.array(z.any()).optional(), - id: z.number().int().optional(), - link: z.string().optional(), - topics: z.array(z.any()).optional(), - updatedAt: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - createdAt: "created_at", - customMessage: "custom_message", - expiresAt: "expires_at", - updatedAt: "updated_at", - }); - }); + CreateInviteResponseBody$Outbound, + z.ZodTypeDef, + CreateInviteResponseBody +> = z.object({ + createdAt: z.string().optional(), + customMessage: z.nullable(z.string()).optional(), + email: z.string().optional(), + emailed: z.boolean().optional(), + expired: z.boolean().optional(), + expiresAt: z.string().optional(), + groups: z.array(z.any()).optional(), + id: z.number().int().optional(), + link: z.string().optional(), + topics: z.array(z.any()).optional(), + updatedAt: z.string().optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + customMessage: "custom_message", + expiresAt: "expires_at", + updatedAt: "updated_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateInviteResponseBody$ { - /** @deprecated use `CreateInviteResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateInviteResponseBody$inboundSchema; - /** @deprecated use `CreateInviteResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateInviteResponseBody$outboundSchema; - /** @deprecated use `CreateInviteResponseBody$Outbound` instead. */ - export type Outbound = CreateInviteResponseBody$Outbound; + /** @deprecated use `CreateInviteResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateInviteResponseBody$inboundSchema; + /** @deprecated use `CreateInviteResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateInviteResponseBody$outboundSchema; + /** @deprecated use `CreateInviteResponseBody$Outbound` instead. */ + export type Outbound = CreateInviteResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createmultipartupload.ts b/src/sdk/models/operations/createmultipartupload.ts index 5f2a786..82164a2 100644 --- a/src/sdk/models/operations/createmultipartupload.ts +++ b/src/sdk/models/operations/createmultipartupload.ts @@ -2,226 +2,223 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export type Metadata = { - /** - * The SHA1 checksum of the upload binary blob. Optionally be provided and serves as an additional security check when later processing the file in complete-external-upload endpoint. - */ - sha1Checksum?: string | undefined; + /** + * The SHA1 checksum of the upload binary blob. Optionally be provided and serves as an additional security check when later processing the file in complete-external-upload endpoint. + */ + sha1Checksum?: string | undefined; }; export const UploadType = { - Avatar: "avatar", - ProfileBackground: "profile_background", - CardBackground: "card_background", - CustomEmoji: "custom_emoji", - Composer: "composer", + Avatar: "avatar", + ProfileBackground: "profile_background", + CardBackground: "card_background", + CustomEmoji: "custom_emoji", + Composer: "composer", } as const; export type UploadType = ClosedEnum; export type CreateMultipartUploadRequestBody = { - fileName: string; - /** - * File size should be represented in bytes. - */ - fileSize: number; - metadata?: Metadata | undefined; - uploadType: UploadType; + fileName: string; + /** + * File size should be represented in bytes. + */ + fileSize: number; + metadata?: Metadata | undefined; + uploadType: UploadType; }; /** * external upload initialized */ export type CreateMultipartUploadResponseBody = { - /** - * The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3. - */ - externalUploadIdentifier: string; - /** - * The path of the temporary file on the external storage service. - */ - key: string; - /** - * A unique string that identifies the external upload. This must be stored and then sent in the /complete-multipart and /batch-presign-multipart-parts endpoints. - */ - uniqueIdentifier: string; + /** + * The identifier of the multipart upload in the external storage provider. This is the multipart upload_id in AWS S3. + */ + externalUploadIdentifier: string; + /** + * The path of the temporary file on the external storage service. + */ + key: string; + /** + * A unique string that identifies the external upload. This must be stored and then sent in the /complete-multipart and /batch-presign-multipart-parts endpoints. + */ + uniqueIdentifier: string; }; /** @internal */ -export const Metadata$inboundSchema: z.ZodType = z - .object({ - "sha1-checksum": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "sha1-checksum": "sha1Checksum", - }); - }); +export const Metadata$inboundSchema: z.ZodType< + Metadata, + z.ZodTypeDef, + unknown +> = z.object({ + "sha1-checksum": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "sha1-checksum": "sha1Checksum", + }); +}); /** @internal */ export type Metadata$Outbound = { - "sha1-checksum"?: string | undefined; + "sha1-checksum"?: string | undefined; }; /** @internal */ -export const Metadata$outboundSchema: z.ZodType = z - .object({ - sha1Checksum: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - sha1Checksum: "sha1-checksum", - }); - }); +export const Metadata$outboundSchema: z.ZodType< + Metadata$Outbound, + z.ZodTypeDef, + Metadata +> = z.object({ + sha1Checksum: z.string().optional(), +}).transform((v) => { + return remap$(v, { + sha1Checksum: "sha1-checksum", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; + /** @deprecated use `Metadata$inboundSchema` instead. */ + export const inboundSchema = Metadata$inboundSchema; + /** @deprecated use `Metadata$outboundSchema` instead. */ + export const outboundSchema = Metadata$outboundSchema; + /** @deprecated use `Metadata$Outbound` instead. */ + export type Outbound = Metadata$Outbound; } /** @internal */ -export const UploadType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(UploadType); +export const UploadType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(UploadType); /** @internal */ export const UploadType$outboundSchema: z.ZodNativeEnum = - UploadType$inboundSchema; + UploadType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadType$ { - /** @deprecated use `UploadType$inboundSchema` instead. */ - export const inboundSchema = UploadType$inboundSchema; - /** @deprecated use `UploadType$outboundSchema` instead. */ - export const outboundSchema = UploadType$outboundSchema; + /** @deprecated use `UploadType$inboundSchema` instead. */ + export const inboundSchema = UploadType$inboundSchema; + /** @deprecated use `UploadType$outboundSchema` instead. */ + export const outboundSchema = UploadType$outboundSchema; } /** @internal */ export const CreateMultipartUploadRequestBody$inboundSchema: z.ZodType< - CreateMultipartUploadRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - file_name: z.string(), - file_size: z.number().int(), - metadata: z.lazy(() => Metadata$inboundSchema).optional(), - upload_type: UploadType$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - file_name: "fileName", - file_size: "fileSize", - upload_type: "uploadType", - }); - }); + CreateMultipartUploadRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + file_name: z.string(), + file_size: z.number().int(), + metadata: z.lazy(() => Metadata$inboundSchema).optional(), + upload_type: UploadType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "file_name": "fileName", + "file_size": "fileSize", + "upload_type": "uploadType", + }); +}); /** @internal */ export type CreateMultipartUploadRequestBody$Outbound = { - file_name: string; - file_size: number; - metadata?: Metadata$Outbound | undefined; - upload_type: string; + file_name: string; + file_size: number; + metadata?: Metadata$Outbound | undefined; + upload_type: string; }; /** @internal */ export const CreateMultipartUploadRequestBody$outboundSchema: z.ZodType< - CreateMultipartUploadRequestBody$Outbound, - z.ZodTypeDef, - CreateMultipartUploadRequestBody -> = z - .object({ - fileName: z.string(), - fileSize: z.number().int(), - metadata: z.lazy(() => Metadata$outboundSchema).optional(), - uploadType: UploadType$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - fileName: "file_name", - fileSize: "file_size", - uploadType: "upload_type", - }); - }); + CreateMultipartUploadRequestBody$Outbound, + z.ZodTypeDef, + CreateMultipartUploadRequestBody +> = z.object({ + fileName: z.string(), + fileSize: z.number().int(), + metadata: z.lazy(() => Metadata$outboundSchema).optional(), + uploadType: UploadType$outboundSchema, +}).transform((v) => { + return remap$(v, { + fileName: "file_name", + fileSize: "file_size", + uploadType: "upload_type", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateMultipartUploadRequestBody$ { - /** @deprecated use `CreateMultipartUploadRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateMultipartUploadRequestBody$inboundSchema; - /** @deprecated use `CreateMultipartUploadRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateMultipartUploadRequestBody$outboundSchema; - /** @deprecated use `CreateMultipartUploadRequestBody$Outbound` instead. */ - export type Outbound = CreateMultipartUploadRequestBody$Outbound; + /** @deprecated use `CreateMultipartUploadRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateMultipartUploadRequestBody$inboundSchema; + /** @deprecated use `CreateMultipartUploadRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateMultipartUploadRequestBody$outboundSchema; + /** @deprecated use `CreateMultipartUploadRequestBody$Outbound` instead. */ + export type Outbound = CreateMultipartUploadRequestBody$Outbound; } /** @internal */ export const CreateMultipartUploadResponseBody$inboundSchema: z.ZodType< - CreateMultipartUploadResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - external_upload_identifier: z.string(), - key: z.string(), - unique_identifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - external_upload_identifier: "externalUploadIdentifier", - unique_identifier: "uniqueIdentifier", - }); - }); + CreateMultipartUploadResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + external_upload_identifier: z.string(), + key: z.string(), + unique_identifier: z.string(), +}).transform((v) => { + return remap$(v, { + "external_upload_identifier": "externalUploadIdentifier", + "unique_identifier": "uniqueIdentifier", + }); +}); /** @internal */ export type CreateMultipartUploadResponseBody$Outbound = { - external_upload_identifier: string; - key: string; - unique_identifier: string; + external_upload_identifier: string; + key: string; + unique_identifier: string; }; /** @internal */ export const CreateMultipartUploadResponseBody$outboundSchema: z.ZodType< - CreateMultipartUploadResponseBody$Outbound, - z.ZodTypeDef, - CreateMultipartUploadResponseBody -> = z - .object({ - externalUploadIdentifier: z.string(), - key: z.string(), - uniqueIdentifier: z.string(), - }) - .transform((v) => { - return remap$(v, { - externalUploadIdentifier: "external_upload_identifier", - uniqueIdentifier: "unique_identifier", - }); - }); + CreateMultipartUploadResponseBody$Outbound, + z.ZodTypeDef, + CreateMultipartUploadResponseBody +> = z.object({ + externalUploadIdentifier: z.string(), + key: z.string(), + uniqueIdentifier: z.string(), +}).transform((v) => { + return remap$(v, { + externalUploadIdentifier: "external_upload_identifier", + uniqueIdentifier: "unique_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateMultipartUploadResponseBody$ { - /** @deprecated use `CreateMultipartUploadResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateMultipartUploadResponseBody$inboundSchema; - /** @deprecated use `CreateMultipartUploadResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateMultipartUploadResponseBody$outboundSchema; - /** @deprecated use `CreateMultipartUploadResponseBody$Outbound` instead. */ - export type Outbound = CreateMultipartUploadResponseBody$Outbound; + /** @deprecated use `CreateMultipartUploadResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateMultipartUploadResponseBody$inboundSchema; + /** @deprecated use `CreateMultipartUploadResponseBody$outboundSchema` instead. */ + export const outboundSchema = + CreateMultipartUploadResponseBody$outboundSchema; + /** @deprecated use `CreateMultipartUploadResponseBody$Outbound` instead. */ + export type Outbound = CreateMultipartUploadResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createtaggroup.ts b/src/sdk/models/operations/createtaggroup.ts index ad2c6c8..053870b 100644 --- a/src/sdk/models/operations/createtaggroup.ts +++ b/src/sdk/models/operations/createtaggroup.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateTagGroupRequestBody = { - name: string; + name: string; }; export type CreateTagGroupPermissions = {}; export type TagGroup = { - id: number; - name: string; - onePerTopic: boolean; - parentTagName: Array; - permissions: CreateTagGroupPermissions; - tagNames: Array; + id: number; + name: string; + onePerTopic: boolean; + parentTagName: Array; + permissions: CreateTagGroupPermissions; + tagNames: Array; }; /** * tag group created */ export type CreateTagGroupResponseBody = { - tagGroup: TagGroup; + tagGroup: TagGroup; }; /** @internal */ export const CreateTagGroupRequestBody$inboundSchema: z.ZodType< - CreateTagGroupRequestBody, - z.ZodTypeDef, - unknown + CreateTagGroupRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string(), + name: z.string(), }); /** @internal */ export type CreateTagGroupRequestBody$Outbound = { - name: string; + name: string; }; /** @internal */ export const CreateTagGroupRequestBody$outboundSchema: z.ZodType< - CreateTagGroupRequestBody$Outbound, - z.ZodTypeDef, - CreateTagGroupRequestBody + CreateTagGroupRequestBody$Outbound, + z.ZodTypeDef, + CreateTagGroupRequestBody > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -55,19 +55,19 @@ export const CreateTagGroupRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTagGroupRequestBody$ { - /** @deprecated use `CreateTagGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateTagGroupRequestBody$inboundSchema; - /** @deprecated use `CreateTagGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateTagGroupRequestBody$outboundSchema; - /** @deprecated use `CreateTagGroupRequestBody$Outbound` instead. */ - export type Outbound = CreateTagGroupRequestBody$Outbound; + /** @deprecated use `CreateTagGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateTagGroupRequestBody$inboundSchema; + /** @deprecated use `CreateTagGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateTagGroupRequestBody$outboundSchema; + /** @deprecated use `CreateTagGroupRequestBody$Outbound` instead. */ + export type Outbound = CreateTagGroupRequestBody$Outbound; } /** @internal */ export const CreateTagGroupPermissions$inboundSchema: z.ZodType< - CreateTagGroupPermissions, - z.ZodTypeDef, - unknown + CreateTagGroupPermissions, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -75,9 +75,9 @@ export type CreateTagGroupPermissions$Outbound = {}; /** @internal */ export const CreateTagGroupPermissions$outboundSchema: z.ZodType< - CreateTagGroupPermissions$Outbound, - z.ZodTypeDef, - CreateTagGroupPermissions + CreateTagGroupPermissions$Outbound, + z.ZodTypeDef, + CreateTagGroupPermissions > = z.object({}); /** @@ -85,117 +85,117 @@ export const CreateTagGroupPermissions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTagGroupPermissions$ { - /** @deprecated use `CreateTagGroupPermissions$inboundSchema` instead. */ - export const inboundSchema = CreateTagGroupPermissions$inboundSchema; - /** @deprecated use `CreateTagGroupPermissions$outboundSchema` instead. */ - export const outboundSchema = CreateTagGroupPermissions$outboundSchema; - /** @deprecated use `CreateTagGroupPermissions$Outbound` instead. */ - export type Outbound = CreateTagGroupPermissions$Outbound; + /** @deprecated use `CreateTagGroupPermissions$inboundSchema` instead. */ + export const inboundSchema = CreateTagGroupPermissions$inboundSchema; + /** @deprecated use `CreateTagGroupPermissions$outboundSchema` instead. */ + export const outboundSchema = CreateTagGroupPermissions$outboundSchema; + /** @deprecated use `CreateTagGroupPermissions$Outbound` instead. */ + export type Outbound = CreateTagGroupPermissions$Outbound; } /** @internal */ -export const TagGroup$inboundSchema: z.ZodType = z - .object({ - id: z.number().int(), - name: z.string(), - one_per_topic: z.boolean(), - parent_tag_name: z.array(z.any()), - permissions: z.lazy(() => CreateTagGroupPermissions$inboundSchema), - tag_names: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - one_per_topic: "onePerTopic", - parent_tag_name: "parentTagName", - tag_names: "tagNames", - }); - }); +export const TagGroup$inboundSchema: z.ZodType< + TagGroup, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + name: z.string(), + one_per_topic: z.boolean(), + parent_tag_name: z.array(z.any()), + permissions: z.lazy(() => CreateTagGroupPermissions$inboundSchema), + tag_names: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "one_per_topic": "onePerTopic", + "parent_tag_name": "parentTagName", + "tag_names": "tagNames", + }); +}); /** @internal */ export type TagGroup$Outbound = { - id: number; - name: string; - one_per_topic: boolean; - parent_tag_name: Array; - permissions: CreateTagGroupPermissions$Outbound; - tag_names: Array; + id: number; + name: string; + one_per_topic: boolean; + parent_tag_name: Array; + permissions: CreateTagGroupPermissions$Outbound; + tag_names: Array; }; /** @internal */ -export const TagGroup$outboundSchema: z.ZodType = z - .object({ - id: z.number().int(), - name: z.string(), - onePerTopic: z.boolean(), - parentTagName: z.array(z.any()), - permissions: z.lazy(() => CreateTagGroupPermissions$outboundSchema), - tagNames: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - onePerTopic: "one_per_topic", - parentTagName: "parent_tag_name", - tagNames: "tag_names", - }); - }); +export const TagGroup$outboundSchema: z.ZodType< + TagGroup$Outbound, + z.ZodTypeDef, + TagGroup +> = z.object({ + id: z.number().int(), + name: z.string(), + onePerTopic: z.boolean(), + parentTagName: z.array(z.any()), + permissions: z.lazy(() => CreateTagGroupPermissions$outboundSchema), + tagNames: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + onePerTopic: "one_per_topic", + parentTagName: "parent_tag_name", + tagNames: "tag_names", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TagGroup$ { - /** @deprecated use `TagGroup$inboundSchema` instead. */ - export const inboundSchema = TagGroup$inboundSchema; - /** @deprecated use `TagGroup$outboundSchema` instead. */ - export const outboundSchema = TagGroup$outboundSchema; - /** @deprecated use `TagGroup$Outbound` instead. */ - export type Outbound = TagGroup$Outbound; + /** @deprecated use `TagGroup$inboundSchema` instead. */ + export const inboundSchema = TagGroup$inboundSchema; + /** @deprecated use `TagGroup$outboundSchema` instead. */ + export const outboundSchema = TagGroup$outboundSchema; + /** @deprecated use `TagGroup$Outbound` instead. */ + export type Outbound = TagGroup$Outbound; } /** @internal */ export const CreateTagGroupResponseBody$inboundSchema: z.ZodType< - CreateTagGroupResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - tag_group: z.lazy(() => TagGroup$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - tag_group: "tagGroup", - }); - }); + CreateTagGroupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + tag_group: z.lazy(() => TagGroup$inboundSchema), +}).transform((v) => { + return remap$(v, { + "tag_group": "tagGroup", + }); +}); /** @internal */ export type CreateTagGroupResponseBody$Outbound = { - tag_group: TagGroup$Outbound; + tag_group: TagGroup$Outbound; }; /** @internal */ export const CreateTagGroupResponseBody$outboundSchema: z.ZodType< - CreateTagGroupResponseBody$Outbound, - z.ZodTypeDef, - CreateTagGroupResponseBody -> = z - .object({ - tagGroup: z.lazy(() => TagGroup$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - tagGroup: "tag_group", - }); - }); + CreateTagGroupResponseBody$Outbound, + z.ZodTypeDef, + CreateTagGroupResponseBody +> = z.object({ + tagGroup: z.lazy(() => TagGroup$outboundSchema), +}).transform((v) => { + return remap$(v, { + tagGroup: "tag_group", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTagGroupResponseBody$ { - /** @deprecated use `CreateTagGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateTagGroupResponseBody$inboundSchema; - /** @deprecated use `CreateTagGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateTagGroupResponseBody$outboundSchema; - /** @deprecated use `CreateTagGroupResponseBody$Outbound` instead. */ - export type Outbound = CreateTagGroupResponseBody$Outbound; + /** @deprecated use `CreateTagGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateTagGroupResponseBody$inboundSchema; + /** @deprecated use `CreateTagGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateTagGroupResponseBody$outboundSchema; + /** @deprecated use `CreateTagGroupResponseBody$Outbound` instead. */ + export type Outbound = CreateTagGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createtopicpostpm.ts b/src/sdk/models/operations/createtopicpostpm.ts index fc776a4..33f15fa 100644 --- a/src/sdk/models/operations/createtopicpostpm.ts +++ b/src/sdk/models/operations/createtopicpostpm.ts @@ -2,525 +2,517 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateTopicPostPMRequestBody = { - /** - * Required for new private message. - */ - archetype?: string | undefined; - /** - * Optional if creating a new topic, and ignored if creating a new post. - */ - category?: number | undefined; - createdAt?: string | undefined; - /** - * Provide a URL from a remote system to associate a forum topic with that URL, typically for using Discourse as a comments system for an external blog. - */ - embedUrl?: string | undefined; - /** - * Provide an external_id from a remote system to associate a forum topic with that id. - */ - externalId?: string | undefined; - raw: string; - /** - * Optional, the post number to reply to inside a topic. - */ - replyToPostNumber?: number | undefined; - /** - * Required for private message, comma separated. - */ - targetRecipients?: string | undefined; - /** - * Deprecated. Use target_recipients instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - targetUsernames?: string | undefined; - /** - * Required if creating a new topic or new private message. - */ - title?: string | undefined; - /** - * Required if creating a new post. - */ - topicId?: number | undefined; + /** + * Required for new private message. + */ + archetype?: string | undefined; + /** + * Optional if creating a new topic, and ignored if creating a new post. + */ + category?: number | undefined; + createdAt?: string | undefined; + /** + * Provide a URL from a remote system to associate a forum topic with that URL, typically for using Discourse as a comments system for an external blog. + */ + embedUrl?: string | undefined; + /** + * Provide an external_id from a remote system to associate a forum topic with that id. + */ + externalId?: string | undefined; + raw: string; + /** + * Optional, the post number to reply to inside a topic. + */ + replyToPostNumber?: number | undefined; + /** + * Required for private message, comma separated. + */ + targetRecipients?: string | undefined; + /** + * Deprecated. Use target_recipients instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + targetUsernames?: string | undefined; + /** + * Required if creating a new topic or new private message. + */ + title?: string | undefined; + /** + * Required if creating a new post. + */ + topicId?: number | undefined; }; export type CreateTopicPostPMActionsSummary = { - canAct: boolean; - id: number; + canAct: boolean; + id: number; }; /** * post created */ export type CreateTopicPostPMResponseBody = { - actionsSummary: Array; - admin: boolean; - avatarTemplate: string; - bookmarked: boolean; - canDelete: boolean; - canEdit: boolean; - canRecover: boolean; - canSeeHiddenPost?: boolean | undefined; - canViewEditHistory: boolean; - canWiki: boolean; - cooked: string; - createdAt: string; - deletedAt: string | null; - displayUsername: string | null; - draftSequence: number; - editReason: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairName: string | null; - flairUrl: string | null; - hidden: boolean; - id: number; - incomingLinkCount: number; - mentionedUsers?: Array | undefined; - moderator: boolean; - name: string | null; - postNumber: number; - postType: number; - primaryGroupName: string | null; - quoteCount: number; - raw?: string | undefined; - readersCount: number; - reads: number; - replyCount: number; - replyToPostNumber: string | null; - reviewableId: string | null; - reviewableScoreCount: number; - reviewableScorePendingCount: number; - score: number; - staff: boolean; - topicId: number; - topicSlug: string; - trustLevel: number; - updatedAt: string; - userDeleted: boolean; - userId: number; - userTitle: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actionsSummary: Array; + admin: boolean; + avatarTemplate: string; + bookmarked: boolean; + canDelete: boolean; + canEdit: boolean; + canRecover: boolean; + canSeeHiddenPost?: boolean | undefined; + canViewEditHistory: boolean; + canWiki: boolean; + cooked: string; + createdAt: string; + deletedAt: string | null; + displayUsername: string | null; + draftSequence: number; + editReason: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairName: string | null; + flairUrl: string | null; + hidden: boolean; + id: number; + incomingLinkCount: number; + mentionedUsers?: Array | undefined; + moderator: boolean; + name: string | null; + postNumber: number; + postType: number; + primaryGroupName: string | null; + quoteCount: number; + raw?: string | undefined; + readersCount: number; + reads: number; + replyCount: number; + replyToPostNumber: string | null; + reviewableId: string | null; + reviewableScoreCount: number; + reviewableScorePendingCount: number; + score: number; + staff: boolean; + topicId: number; + topicSlug: string; + trustLevel: number; + updatedAt: string; + userDeleted: boolean; + userId: number; + userTitle: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ export const CreateTopicPostPMRequestBody$inboundSchema: z.ZodType< - CreateTopicPostPMRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - archetype: z.string().optional(), - category: z.number().int().optional(), - created_at: z.string().optional(), - embed_url: z.string().optional(), - external_id: z.string().optional(), - raw: z.string(), - reply_to_post_number: z.number().int().optional(), - target_recipients: z.string().optional(), - target_usernames: z.string().optional(), - title: z.string().optional(), - topic_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - created_at: "createdAt", - embed_url: "embedUrl", - external_id: "externalId", - reply_to_post_number: "replyToPostNumber", - target_recipients: "targetRecipients", - target_usernames: "targetUsernames", - topic_id: "topicId", - }); - }); + CreateTopicPostPMRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + archetype: z.string().optional(), + category: z.number().int().optional(), + created_at: z.string().optional(), + embed_url: z.string().optional(), + external_id: z.string().optional(), + raw: z.string(), + reply_to_post_number: z.number().int().optional(), + target_recipients: z.string().optional(), + target_usernames: z.string().optional(), + title: z.string().optional(), + topic_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "embed_url": "embedUrl", + "external_id": "externalId", + "reply_to_post_number": "replyToPostNumber", + "target_recipients": "targetRecipients", + "target_usernames": "targetUsernames", + "topic_id": "topicId", + }); +}); /** @internal */ export type CreateTopicPostPMRequestBody$Outbound = { - archetype?: string | undefined; - category?: number | undefined; - created_at?: string | undefined; - embed_url?: string | undefined; - external_id?: string | undefined; - raw: string; - reply_to_post_number?: number | undefined; - target_recipients?: string | undefined; - target_usernames?: string | undefined; - title?: string | undefined; - topic_id?: number | undefined; + archetype?: string | undefined; + category?: number | undefined; + created_at?: string | undefined; + embed_url?: string | undefined; + external_id?: string | undefined; + raw: string; + reply_to_post_number?: number | undefined; + target_recipients?: string | undefined; + target_usernames?: string | undefined; + title?: string | undefined; + topic_id?: number | undefined; }; /** @internal */ export const CreateTopicPostPMRequestBody$outboundSchema: z.ZodType< - CreateTopicPostPMRequestBody$Outbound, - z.ZodTypeDef, - CreateTopicPostPMRequestBody -> = z - .object({ - archetype: z.string().optional(), - category: z.number().int().optional(), - createdAt: z.string().optional(), - embedUrl: z.string().optional(), - externalId: z.string().optional(), - raw: z.string(), - replyToPostNumber: z.number().int().optional(), - targetRecipients: z.string().optional(), - targetUsernames: z.string().optional(), - title: z.string().optional(), - topicId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - createdAt: "created_at", - embedUrl: "embed_url", - externalId: "external_id", - replyToPostNumber: "reply_to_post_number", - targetRecipients: "target_recipients", - targetUsernames: "target_usernames", - topicId: "topic_id", - }); - }); + CreateTopicPostPMRequestBody$Outbound, + z.ZodTypeDef, + CreateTopicPostPMRequestBody +> = z.object({ + archetype: z.string().optional(), + category: z.number().int().optional(), + createdAt: z.string().optional(), + embedUrl: z.string().optional(), + externalId: z.string().optional(), + raw: z.string(), + replyToPostNumber: z.number().int().optional(), + targetRecipients: z.string().optional(), + targetUsernames: z.string().optional(), + title: z.string().optional(), + topicId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + embedUrl: "embed_url", + externalId: "external_id", + replyToPostNumber: "reply_to_post_number", + targetRecipients: "target_recipients", + targetUsernames: "target_usernames", + topicId: "topic_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicPostPMRequestBody$ { - /** @deprecated use `CreateTopicPostPMRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateTopicPostPMRequestBody$inboundSchema; - /** @deprecated use `CreateTopicPostPMRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateTopicPostPMRequestBody$outboundSchema; - /** @deprecated use `CreateTopicPostPMRequestBody$Outbound` instead. */ - export type Outbound = CreateTopicPostPMRequestBody$Outbound; + /** @deprecated use `CreateTopicPostPMRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateTopicPostPMRequestBody$inboundSchema; + /** @deprecated use `CreateTopicPostPMRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateTopicPostPMRequestBody$outboundSchema; + /** @deprecated use `CreateTopicPostPMRequestBody$Outbound` instead. */ + export type Outbound = CreateTopicPostPMRequestBody$Outbound; } /** @internal */ export const CreateTopicPostPMActionsSummary$inboundSchema: z.ZodType< - CreateTopicPostPMActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + CreateTopicPostPMActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type CreateTopicPostPMActionsSummary$Outbound = { - can_act: boolean; - id: number; + can_act: boolean; + id: number; }; /** @internal */ export const CreateTopicPostPMActionsSummary$outboundSchema: z.ZodType< - CreateTopicPostPMActionsSummary$Outbound, - z.ZodTypeDef, - CreateTopicPostPMActionsSummary -> = z - .object({ - canAct: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + CreateTopicPostPMActionsSummary$Outbound, + z.ZodTypeDef, + CreateTopicPostPMActionsSummary +> = z.object({ + canAct: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicPostPMActionsSummary$ { - /** @deprecated use `CreateTopicPostPMActionsSummary$inboundSchema` instead. */ - export const inboundSchema = CreateTopicPostPMActionsSummary$inboundSchema; - /** @deprecated use `CreateTopicPostPMActionsSummary$outboundSchema` instead. */ - export const outboundSchema = CreateTopicPostPMActionsSummary$outboundSchema; - /** @deprecated use `CreateTopicPostPMActionsSummary$Outbound` instead. */ - export type Outbound = CreateTopicPostPMActionsSummary$Outbound; + /** @deprecated use `CreateTopicPostPMActionsSummary$inboundSchema` instead. */ + export const inboundSchema = CreateTopicPostPMActionsSummary$inboundSchema; + /** @deprecated use `CreateTopicPostPMActionsSummary$outboundSchema` instead. */ + export const outboundSchema = CreateTopicPostPMActionsSummary$outboundSchema; + /** @deprecated use `CreateTopicPostPMActionsSummary$Outbound` instead. */ + export type Outbound = CreateTopicPostPMActionsSummary$Outbound; } /** @internal */ export const CreateTopicPostPMResponseBody$inboundSchema: z.ZodType< - CreateTopicPostPMResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - actions_summary: z.array(z.lazy(() => CreateTopicPostPMActionsSummary$inboundSchema)), - admin: z.boolean(), - avatar_template: z.string(), - bookmarked: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_recover: z.boolean(), - can_see_hidden_post: z.boolean().optional(), - can_view_edit_history: z.boolean(), - can_wiki: z.boolean(), - cooked: z.string(), - created_at: z.string(), - deleted_at: z.nullable(z.string()), - display_username: z.nullable(z.string()), - draft_sequence: z.number().int(), - edit_reason: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incoming_link_count: z.number().int(), - mentioned_users: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()), - post_number: z.number().int(), - post_type: z.number().int(), - primary_group_name: z.nullable(z.string()), - quote_count: z.number().int(), - raw: z.string().optional(), - readers_count: z.number().int(), - reads: z.number().int(), - reply_count: z.number().int(), - reply_to_post_number: z.nullable(z.string()), - reviewable_id: z.nullable(z.string()), - reviewable_score_count: z.number().int(), - reviewable_score_pending_count: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topic_id: z.number().int(), - topic_slug: z.string(), - trust_level: z.number().int(), - updated_at: z.string(), - user_deleted: z.boolean(), - user_id: z.number().int(), - user_title: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - draft_sequence: "draftSequence", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - mentioned_users: "mentionedUsers", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); - }); + CreateTopicPostPMResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array( + z.lazy(() => CreateTopicPostPMActionsSummary$inboundSchema), + ), + admin: z.boolean(), + avatar_template: z.string(), + bookmarked: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_recover: z.boolean(), + can_see_hidden_post: z.boolean().optional(), + can_view_edit_history: z.boolean(), + can_wiki: z.boolean(), + cooked: z.string(), + created_at: z.string(), + deleted_at: z.nullable(z.string()), + display_username: z.nullable(z.string()), + draft_sequence: z.number().int(), + edit_reason: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incoming_link_count: z.number().int(), + mentioned_users: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()), + post_number: z.number().int(), + post_type: z.number().int(), + primary_group_name: z.nullable(z.string()), + quote_count: z.number().int(), + raw: z.string().optional(), + readers_count: z.number().int(), + reads: z.number().int(), + reply_count: z.number().int(), + reply_to_post_number: z.nullable(z.string()), + reviewable_id: z.nullable(z.string()), + reviewable_score_count: z.number().int(), + reviewable_score_pending_count: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topic_id: z.number().int(), + topic_slug: z.string(), + trust_level: z.number().int(), + updated_at: z.string(), + user_deleted: z.boolean(), + user_id: z.number().int(), + user_title: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "draft_sequence": "draftSequence", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "mentioned_users": "mentionedUsers", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); +}); /** @internal */ export type CreateTopicPostPMResponseBody$Outbound = { - actions_summary: Array; - admin: boolean; - avatar_template: string; - bookmarked: boolean; - can_delete: boolean; - can_edit: boolean; - can_recover: boolean; - can_see_hidden_post?: boolean | undefined; - can_view_edit_history: boolean; - can_wiki: boolean; - cooked: string; - created_at: string; - deleted_at: string | null; - display_username: string | null; - draft_sequence: number; - edit_reason: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_name: string | null; - flair_url: string | null; - hidden: boolean; - id: number; - incoming_link_count: number; - mentioned_users?: Array | undefined; - moderator: boolean; - name: string | null; - post_number: number; - post_type: number; - primary_group_name: string | null; - quote_count: number; - raw?: string | undefined; - readers_count: number; - reads: number; - reply_count: number; - reply_to_post_number: string | null; - reviewable_id: string | null; - reviewable_score_count: number; - reviewable_score_pending_count: number; - score: number; - staff: boolean; - topic_id: number; - topic_slug: string; - trust_level: number; - updated_at: string; - user_deleted: boolean; - user_id: number; - user_title: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actions_summary: Array; + admin: boolean; + avatar_template: string; + bookmarked: boolean; + can_delete: boolean; + can_edit: boolean; + can_recover: boolean; + can_see_hidden_post?: boolean | undefined; + can_view_edit_history: boolean; + can_wiki: boolean; + cooked: string; + created_at: string; + deleted_at: string | null; + display_username: string | null; + draft_sequence: number; + edit_reason: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_name: string | null; + flair_url: string | null; + hidden: boolean; + id: number; + incoming_link_count: number; + mentioned_users?: Array | undefined; + moderator: boolean; + name: string | null; + post_number: number; + post_type: number; + primary_group_name: string | null; + quote_count: number; + raw?: string | undefined; + readers_count: number; + reads: number; + reply_count: number; + reply_to_post_number: string | null; + reviewable_id: string | null; + reviewable_score_count: number; + reviewable_score_pending_count: number; + score: number; + staff: boolean; + topic_id: number; + topic_slug: string; + trust_level: number; + updated_at: string; + user_deleted: boolean; + user_id: number; + user_title: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ export const CreateTopicPostPMResponseBody$outboundSchema: z.ZodType< - CreateTopicPostPMResponseBody$Outbound, - z.ZodTypeDef, - CreateTopicPostPMResponseBody -> = z - .object({ - actionsSummary: z.array(z.lazy(() => CreateTopicPostPMActionsSummary$outboundSchema)), - admin: z.boolean(), - avatarTemplate: z.string(), - bookmarked: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canRecover: z.boolean(), - canSeeHiddenPost: z.boolean().optional(), - canViewEditHistory: z.boolean(), - canWiki: z.boolean(), - cooked: z.string(), - createdAt: z.string(), - deletedAt: z.nullable(z.string()), - displayUsername: z.nullable(z.string()), - draftSequence: z.number().int(), - editReason: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incomingLinkCount: z.number().int(), - mentionedUsers: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()), - postNumber: z.number().int(), - postType: z.number().int(), - primaryGroupName: z.nullable(z.string()), - quoteCount: z.number().int(), - raw: z.string().optional(), - readersCount: z.number().int(), - reads: z.number().int(), - replyCount: z.number().int(), - replyToPostNumber: z.nullable(z.string()), - reviewableId: z.nullable(z.string()), - reviewableScoreCount: z.number().int(), - reviewableScorePendingCount: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topicId: z.number().int(), - topicSlug: z.string(), - trustLevel: z.number().int(), - updatedAt: z.string(), - userDeleted: z.boolean(), - userId: z.number().int(), - userTitle: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - draftSequence: "draft_sequence", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - mentionedUsers: "mentioned_users", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); + CreateTopicPostPMResponseBody$Outbound, + z.ZodTypeDef, + CreateTopicPostPMResponseBody +> = z.object({ + actionsSummary: z.array( + z.lazy(() => CreateTopicPostPMActionsSummary$outboundSchema), + ), + admin: z.boolean(), + avatarTemplate: z.string(), + bookmarked: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canRecover: z.boolean(), + canSeeHiddenPost: z.boolean().optional(), + canViewEditHistory: z.boolean(), + canWiki: z.boolean(), + cooked: z.string(), + createdAt: z.string(), + deletedAt: z.nullable(z.string()), + displayUsername: z.nullable(z.string()), + draftSequence: z.number().int(), + editReason: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incomingLinkCount: z.number().int(), + mentionedUsers: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()), + postNumber: z.number().int(), + postType: z.number().int(), + primaryGroupName: z.nullable(z.string()), + quoteCount: z.number().int(), + raw: z.string().optional(), + readersCount: z.number().int(), + reads: z.number().int(), + replyCount: z.number().int(), + replyToPostNumber: z.nullable(z.string()), + reviewableId: z.nullable(z.string()), + reviewableScoreCount: z.number().int(), + reviewableScorePendingCount: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topicId: z.number().int(), + topicSlug: z.string(), + trustLevel: z.number().int(), + updatedAt: z.string(), + userDeleted: z.boolean(), + userId: z.number().int(), + userTitle: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + draftSequence: "draft_sequence", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + mentionedUsers: "mentioned_users", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicPostPMResponseBody$ { - /** @deprecated use `CreateTopicPostPMResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateTopicPostPMResponseBody$inboundSchema; - /** @deprecated use `CreateTopicPostPMResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateTopicPostPMResponseBody$outboundSchema; - /** @deprecated use `CreateTopicPostPMResponseBody$Outbound` instead. */ - export type Outbound = CreateTopicPostPMResponseBody$Outbound; + /** @deprecated use `CreateTopicPostPMResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateTopicPostPMResponseBody$inboundSchema; + /** @deprecated use `CreateTopicPostPMResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateTopicPostPMResponseBody$outboundSchema; + /** @deprecated use `CreateTopicPostPMResponseBody$Outbound` instead. */ + export type Outbound = CreateTopicPostPMResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createtopictimer.ts b/src/sdk/models/operations/createtopictimer.ts index f460b02..e831ec8 100644 --- a/src/sdk/models/operations/createtopictimer.ts +++ b/src/sdk/models/operations/createtopictimer.ts @@ -2,220 +2,210 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreateTopicTimerRequestBody = { - basedOnLastPost?: boolean | undefined; - categoryId?: number | undefined; - statusType?: string | undefined; - time?: string | undefined; + basedOnLastPost?: boolean | undefined; + categoryId?: number | undefined; + statusType?: string | undefined; + time?: string | undefined; }; export type CreateTopicTimerRequest = { - apiKey: string; - apiUsername: string; - requestBody?: CreateTopicTimerRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: CreateTopicTimerRequestBody | undefined; + id: string; }; /** * topic updated */ export type CreateTopicTimerResponseBody = { - basedOnLastPost?: boolean | undefined; - categoryId?: string | null | undefined; - closed?: boolean | undefined; - duration?: string | null | undefined; - executeAt?: string | undefined; - success?: string | undefined; + basedOnLastPost?: boolean | undefined; + categoryId?: string | null | undefined; + closed?: boolean | undefined; + duration?: string | null | undefined; + executeAt?: string | undefined; + success?: string | undefined; }; /** @internal */ export const CreateTopicTimerRequestBody$inboundSchema: z.ZodType< - CreateTopicTimerRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - based_on_last_post: z.boolean().optional(), - category_id: z.number().int().optional(), - status_type: z.string().optional(), - time: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - based_on_last_post: "basedOnLastPost", - category_id: "categoryId", - status_type: "statusType", - }); - }); + CreateTopicTimerRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + based_on_last_post: z.boolean().optional(), + category_id: z.number().int().optional(), + status_type: z.string().optional(), + time: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "based_on_last_post": "basedOnLastPost", + "category_id": "categoryId", + "status_type": "statusType", + }); +}); /** @internal */ export type CreateTopicTimerRequestBody$Outbound = { - based_on_last_post?: boolean | undefined; - category_id?: number | undefined; - status_type?: string | undefined; - time?: string | undefined; + based_on_last_post?: boolean | undefined; + category_id?: number | undefined; + status_type?: string | undefined; + time?: string | undefined; }; /** @internal */ export const CreateTopicTimerRequestBody$outboundSchema: z.ZodType< - CreateTopicTimerRequestBody$Outbound, - z.ZodTypeDef, - CreateTopicTimerRequestBody -> = z - .object({ - basedOnLastPost: z.boolean().optional(), - categoryId: z.number().int().optional(), - statusType: z.string().optional(), - time: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - basedOnLastPost: "based_on_last_post", - categoryId: "category_id", - statusType: "status_type", - }); - }); + CreateTopicTimerRequestBody$Outbound, + z.ZodTypeDef, + CreateTopicTimerRequestBody +> = z.object({ + basedOnLastPost: z.boolean().optional(), + categoryId: z.number().int().optional(), + statusType: z.string().optional(), + time: z.string().optional(), +}).transform((v) => { + return remap$(v, { + basedOnLastPost: "based_on_last_post", + categoryId: "category_id", + statusType: "status_type", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerRequestBody$ { - /** @deprecated use `CreateTopicTimerRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateTopicTimerRequestBody$inboundSchema; - /** @deprecated use `CreateTopicTimerRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateTopicTimerRequestBody$outboundSchema; - /** @deprecated use `CreateTopicTimerRequestBody$Outbound` instead. */ - export type Outbound = CreateTopicTimerRequestBody$Outbound; + /** @deprecated use `CreateTopicTimerRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateTopicTimerRequestBody$inboundSchema; + /** @deprecated use `CreateTopicTimerRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateTopicTimerRequestBody$outboundSchema; + /** @deprecated use `CreateTopicTimerRequestBody$Outbound` instead. */ + export type Outbound = CreateTopicTimerRequestBody$Outbound; } /** @internal */ export const CreateTopicTimerRequest$inboundSchema: z.ZodType< - CreateTopicTimerRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => CreateTopicTimerRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + CreateTopicTimerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => CreateTopicTimerRequestBody$inboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type CreateTopicTimerRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: CreateTopicTimerRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: CreateTopicTimerRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const CreateTopicTimerRequest$outboundSchema: z.ZodType< - CreateTopicTimerRequest$Outbound, - z.ZodTypeDef, - CreateTopicTimerRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => CreateTopicTimerRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + CreateTopicTimerRequest$Outbound, + z.ZodTypeDef, + CreateTopicTimerRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => CreateTopicTimerRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerRequest$ { - /** @deprecated use `CreateTopicTimerRequest$inboundSchema` instead. */ - export const inboundSchema = CreateTopicTimerRequest$inboundSchema; - /** @deprecated use `CreateTopicTimerRequest$outboundSchema` instead. */ - export const outboundSchema = CreateTopicTimerRequest$outboundSchema; - /** @deprecated use `CreateTopicTimerRequest$Outbound` instead. */ - export type Outbound = CreateTopicTimerRequest$Outbound; + /** @deprecated use `CreateTopicTimerRequest$inboundSchema` instead. */ + export const inboundSchema = CreateTopicTimerRequest$inboundSchema; + /** @deprecated use `CreateTopicTimerRequest$outboundSchema` instead. */ + export const outboundSchema = CreateTopicTimerRequest$outboundSchema; + /** @deprecated use `CreateTopicTimerRequest$Outbound` instead. */ + export type Outbound = CreateTopicTimerRequest$Outbound; } /** @internal */ export const CreateTopicTimerResponseBody$inboundSchema: z.ZodType< - CreateTopicTimerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - based_on_last_post: z.boolean().optional(), - category_id: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - duration: z.nullable(z.string()).optional(), - execute_at: z.string().optional(), - success: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - based_on_last_post: "basedOnLastPost", - category_id: "categoryId", - execute_at: "executeAt", - }); - }); + CreateTopicTimerResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + based_on_last_post: z.boolean().optional(), + category_id: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + duration: z.nullable(z.string()).optional(), + execute_at: z.string().optional(), + success: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "based_on_last_post": "basedOnLastPost", + "category_id": "categoryId", + "execute_at": "executeAt", + }); +}); /** @internal */ export type CreateTopicTimerResponseBody$Outbound = { - based_on_last_post?: boolean | undefined; - category_id?: string | null | undefined; - closed?: boolean | undefined; - duration?: string | null | undefined; - execute_at?: string | undefined; - success?: string | undefined; + based_on_last_post?: boolean | undefined; + category_id?: string | null | undefined; + closed?: boolean | undefined; + duration?: string | null | undefined; + execute_at?: string | undefined; + success?: string | undefined; }; /** @internal */ export const CreateTopicTimerResponseBody$outboundSchema: z.ZodType< - CreateTopicTimerResponseBody$Outbound, - z.ZodTypeDef, - CreateTopicTimerResponseBody -> = z - .object({ - basedOnLastPost: z.boolean().optional(), - categoryId: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - duration: z.nullable(z.string()).optional(), - executeAt: z.string().optional(), - success: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - basedOnLastPost: "based_on_last_post", - categoryId: "category_id", - executeAt: "execute_at", - }); - }); + CreateTopicTimerResponseBody$Outbound, + z.ZodTypeDef, + CreateTopicTimerResponseBody +> = z.object({ + basedOnLastPost: z.boolean().optional(), + categoryId: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + duration: z.nullable(z.string()).optional(), + executeAt: z.string().optional(), + success: z.string().optional(), +}).transform((v) => { + return remap$(v, { + basedOnLastPost: "based_on_last_post", + categoryId: "category_id", + executeAt: "execute_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerResponseBody$ { - /** @deprecated use `CreateTopicTimerResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateTopicTimerResponseBody$inboundSchema; - /** @deprecated use `CreateTopicTimerResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateTopicTimerResponseBody$outboundSchema; - /** @deprecated use `CreateTopicTimerResponseBody$Outbound` instead. */ - export type Outbound = CreateTopicTimerResponseBody$Outbound; + /** @deprecated use `CreateTopicTimerResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateTopicTimerResponseBody$inboundSchema; + /** @deprecated use `CreateTopicTimerResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateTopicTimerResponseBody$outboundSchema; + /** @deprecated use `CreateTopicTimerResponseBody$Outbound` instead. */ + export type Outbound = CreateTopicTimerResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createupload.ts b/src/sdk/models/operations/createupload.ts index 1a61319..71fc52e 100644 --- a/src/sdk/models/operations/createupload.ts +++ b/src/sdk/models/operations/createupload.ts @@ -2,84 +2,89 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { blobLikeSchema } from "../../types/blobs.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export type FileT = { - content: ReadableStream | Blob | ArrayBuffer | Buffer; - fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Buffer; + fileName: string; }; export const Type = { - Avatar: "avatar", - ProfileBackground: "profile_background", - CardBackground: "card_background", - CustomEmoji: "custom_emoji", - Composer: "composer", + Avatar: "avatar", + ProfileBackground: "profile_background", + CardBackground: "card_background", + CustomEmoji: "custom_emoji", + Composer: "composer", } as const; export type Type = ClosedEnum; export type CreateUploadRequestBody = { - type: Type; - file?: FileT | Blob | undefined; - /** - * Use this flag to return an id and url - */ - synchronous?: boolean | undefined; - /** - * required if uploading an avatar - */ - userId?: number | undefined; + type: Type; + file?: FileT | Blob | undefined; + /** + * Use this flag to return an id and url + */ + synchronous?: boolean | undefined; + /** + * required if uploading an avatar + */ + userId?: number | undefined; }; /** * file uploaded */ export type CreateUploadResponseBody = { - dominantColor?: string | null | undefined; - extension: string; - filesize: number; - height: number; - humanFilesize: string; - id: number; - originalFilename: string; - retainHours: string | null; - shortPath: string; - shortUrl: string; - thumbnailHeight: number; - thumbnailWidth: number; - url: string; - width: number; + dominantColor?: string | null | undefined; + extension: string; + filesize: number; + height: number; + humanFilesize: string; + id: number; + originalFilename: string; + retainHours: string | null; + shortPath: string; + shortUrl: string; + thumbnailHeight: number; + thumbnailWidth: number; + url: string; + width: number; }; /** @internal */ -export const FileT$inboundSchema: z.ZodType = z.object({ +export const FileT$inboundSchema: z.ZodType = z + .object({ content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Buffer), + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Buffer), ]), fileName: z.string(), -}); + }); /** @internal */ export type FileT$Outbound = { - content: ReadableStream | Blob | ArrayBuffer | Buffer; - fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Buffer; + fileName: string; }; /** @internal */ -export const FileT$outboundSchema: z.ZodType = z.object({ - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Buffer), - ]), - fileName: z.string(), +export const FileT$outboundSchema: z.ZodType< + FileT$Outbound, + z.ZodTypeDef, + FileT +> = z.object({ + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Buffer), + ]), + fileName: z.string(), }); /** @@ -87,188 +92,180 @@ export const FileT$outboundSchema: z.ZodType = z.nativeEnum(Type); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = Type$inboundSchema; +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; } /** @internal */ export const CreateUploadRequestBody$inboundSchema: z.ZodType< - CreateUploadRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - type: Type$inboundSchema, - file: z.lazy(() => FileT$inboundSchema).optional(), - synchronous: z.boolean().optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - user_id: "userId", - }); - }); + CreateUploadRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + type: Type$inboundSchema, + file: z.lazy(() => FileT$inboundSchema).optional(), + synchronous: z.boolean().optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + }); +}); /** @internal */ export type CreateUploadRequestBody$Outbound = { - type: string; - file?: FileT$Outbound | Blob | undefined; - synchronous?: boolean | undefined; - user_id?: number | undefined; + type: string; + file?: FileT$Outbound | Blob | undefined; + synchronous?: boolean | undefined; + user_id?: number | undefined; }; /** @internal */ export const CreateUploadRequestBody$outboundSchema: z.ZodType< - CreateUploadRequestBody$Outbound, - z.ZodTypeDef, - CreateUploadRequestBody -> = z - .object({ - type: Type$outboundSchema, - file: z - .lazy(() => FileT$outboundSchema) - .or(blobLikeSchema) - .optional(), - synchronous: z.boolean().optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }); + CreateUploadRequestBody$Outbound, + z.ZodTypeDef, + CreateUploadRequestBody +> = z.object({ + type: Type$outboundSchema, + file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema).optional(), + synchronous: z.boolean().optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUploadRequestBody$ { - /** @deprecated use `CreateUploadRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateUploadRequestBody$inboundSchema; - /** @deprecated use `CreateUploadRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateUploadRequestBody$outboundSchema; - /** @deprecated use `CreateUploadRequestBody$Outbound` instead. */ - export type Outbound = CreateUploadRequestBody$Outbound; + /** @deprecated use `CreateUploadRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateUploadRequestBody$inboundSchema; + /** @deprecated use `CreateUploadRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateUploadRequestBody$outboundSchema; + /** @deprecated use `CreateUploadRequestBody$Outbound` instead. */ + export type Outbound = CreateUploadRequestBody$Outbound; } /** @internal */ export const CreateUploadResponseBody$inboundSchema: z.ZodType< - CreateUploadResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - dominant_color: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - human_filesize: z.string(), - id: z.number().int(), - original_filename: z.string(), - retain_hours: z.nullable(z.string()), - short_path: z.string(), - short_url: z.string(), - thumbnail_height: z.number().int(), - thumbnail_width: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominant_color: "dominantColor", - human_filesize: "humanFilesize", - original_filename: "originalFilename", - retain_hours: "retainHours", - short_path: "shortPath", - short_url: "shortUrl", - thumbnail_height: "thumbnailHeight", - thumbnail_width: "thumbnailWidth", - }); - }); + CreateUploadResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + dominant_color: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + human_filesize: z.string(), + id: z.number().int(), + original_filename: z.string(), + retain_hours: z.nullable(z.string()), + short_path: z.string(), + short_url: z.string(), + thumbnail_height: z.number().int(), + thumbnail_width: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + "dominant_color": "dominantColor", + "human_filesize": "humanFilesize", + "original_filename": "originalFilename", + "retain_hours": "retainHours", + "short_path": "shortPath", + "short_url": "shortUrl", + "thumbnail_height": "thumbnailHeight", + "thumbnail_width": "thumbnailWidth", + }); +}); /** @internal */ export type CreateUploadResponseBody$Outbound = { - dominant_color?: string | null | undefined; - extension: string; - filesize: number; - height: number; - human_filesize: string; - id: number; - original_filename: string; - retain_hours: string | null; - short_path: string; - short_url: string; - thumbnail_height: number; - thumbnail_width: number; - url: string; - width: number; + dominant_color?: string | null | undefined; + extension: string; + filesize: number; + height: number; + human_filesize: string; + id: number; + original_filename: string; + retain_hours: string | null; + short_path: string; + short_url: string; + thumbnail_height: number; + thumbnail_width: number; + url: string; + width: number; }; /** @internal */ export const CreateUploadResponseBody$outboundSchema: z.ZodType< - CreateUploadResponseBody$Outbound, - z.ZodTypeDef, - CreateUploadResponseBody -> = z - .object({ - dominantColor: z.nullable(z.string()).optional(), - extension: z.string(), - filesize: z.number().int(), - height: z.number().int(), - humanFilesize: z.string(), - id: z.number().int(), - originalFilename: z.string(), - retainHours: z.nullable(z.string()), - shortPath: z.string(), - shortUrl: z.string(), - thumbnailHeight: z.number().int(), - thumbnailWidth: z.number().int(), - url: z.string(), - width: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - dominantColor: "dominant_color", - humanFilesize: "human_filesize", - originalFilename: "original_filename", - retainHours: "retain_hours", - shortPath: "short_path", - shortUrl: "short_url", - thumbnailHeight: "thumbnail_height", - thumbnailWidth: "thumbnail_width", - }); - }); + CreateUploadResponseBody$Outbound, + z.ZodTypeDef, + CreateUploadResponseBody +> = z.object({ + dominantColor: z.nullable(z.string()).optional(), + extension: z.string(), + filesize: z.number().int(), + height: z.number().int(), + humanFilesize: z.string(), + id: z.number().int(), + originalFilename: z.string(), + retainHours: z.nullable(z.string()), + shortPath: z.string(), + shortUrl: z.string(), + thumbnailHeight: z.number().int(), + thumbnailWidth: z.number().int(), + url: z.string(), + width: z.number().int(), +}).transform((v) => { + return remap$(v, { + dominantColor: "dominant_color", + humanFilesize: "human_filesize", + originalFilename: "original_filename", + retainHours: "retain_hours", + shortPath: "short_path", + shortUrl: "short_url", + thumbnailHeight: "thumbnail_height", + thumbnailWidth: "thumbnail_width", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUploadResponseBody$ { - /** @deprecated use `CreateUploadResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateUploadResponseBody$inboundSchema; - /** @deprecated use `CreateUploadResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateUploadResponseBody$outboundSchema; - /** @deprecated use `CreateUploadResponseBody$Outbound` instead. */ - export type Outbound = CreateUploadResponseBody$Outbound; + /** @deprecated use `CreateUploadResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateUploadResponseBody$inboundSchema; + /** @deprecated use `CreateUploadResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateUploadResponseBody$outboundSchema; + /** @deprecated use `CreateUploadResponseBody$Outbound` instead. */ + export type Outbound = CreateUploadResponseBody$Outbound; } diff --git a/src/sdk/models/operations/createuser.ts b/src/sdk/models/operations/createuser.ts index 69464f6..1b805c8 100644 --- a/src/sdk/models/operations/createuser.ts +++ b/src/sdk/models/operations/createuser.ts @@ -2,54 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ExternalIds = {}; export type CreateUserRequestBody = { - /** - * This param requires an api key in the request header or it will be ignored - */ - active?: boolean | undefined; - approved?: boolean | undefined; - email: string; - externalIds?: ExternalIds | undefined; - name: string; - password: string; - userFields1?: boolean | undefined; - username: string; + /** + * This param requires an api key in the request header or it will be ignored + */ + active?: boolean | undefined; + approved?: boolean | undefined; + email: string; + externalIds?: ExternalIds | undefined; + name: string; + password: string; + userFields1?: boolean | undefined; + username: string; }; export type CreateUserRequest = { - apiKey: string; - apiUsername: string; - requestBody?: CreateUserRequestBody | undefined; + apiKey: string; + apiUsername: string; + requestBody?: CreateUserRequestBody | undefined; }; /** * user created */ export type CreateUserResponseBody = { - active: boolean; - message: string; - success: boolean; - userId?: number | undefined; + active: boolean; + message: string; + success: boolean; + userId?: number | undefined; }; /** @internal */ -export const ExternalIds$inboundSchema: z.ZodType = z.object( - {} -); +export const ExternalIds$inboundSchema: z.ZodType< + ExternalIds, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type ExternalIds$Outbound = {}; /** @internal */ export const ExternalIds$outboundSchema: z.ZodType< - ExternalIds$Outbound, - z.ZodTypeDef, - ExternalIds + ExternalIds$Outbound, + z.ZodTypeDef, + ExternalIds > = z.object({}); /** @@ -57,193 +59,184 @@ export const ExternalIds$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalIds$ { - /** @deprecated use `ExternalIds$inboundSchema` instead. */ - export const inboundSchema = ExternalIds$inboundSchema; - /** @deprecated use `ExternalIds$outboundSchema` instead. */ - export const outboundSchema = ExternalIds$outboundSchema; - /** @deprecated use `ExternalIds$Outbound` instead. */ - export type Outbound = ExternalIds$Outbound; + /** @deprecated use `ExternalIds$inboundSchema` instead. */ + export const inboundSchema = ExternalIds$inboundSchema; + /** @deprecated use `ExternalIds$outboundSchema` instead. */ + export const outboundSchema = ExternalIds$outboundSchema; + /** @deprecated use `ExternalIds$Outbound` instead. */ + export type Outbound = ExternalIds$Outbound; } /** @internal */ export const CreateUserRequestBody$inboundSchema: z.ZodType< - CreateUserRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - active: z.boolean().optional(), - approved: z.boolean().optional(), - email: z.string(), - external_ids: z.lazy(() => ExternalIds$inboundSchema).optional(), - name: z.string(), - password: z.string(), - "user_fields[1]": z.boolean().optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - external_ids: "externalIds", - "user_fields[1]": "userFields1", - }); - }); + CreateUserRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + active: z.boolean().optional(), + approved: z.boolean().optional(), + email: z.string(), + external_ids: z.lazy(() => ExternalIds$inboundSchema).optional(), + name: z.string(), + password: z.string(), + "user_fields[1]": z.boolean().optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "external_ids": "externalIds", + "user_fields[1]": "userFields1", + }); +}); /** @internal */ export type CreateUserRequestBody$Outbound = { - active?: boolean | undefined; - approved?: boolean | undefined; - email: string; - external_ids?: ExternalIds$Outbound | undefined; - name: string; - password: string; - "user_fields[1]"?: boolean | undefined; - username: string; + active?: boolean | undefined; + approved?: boolean | undefined; + email: string; + external_ids?: ExternalIds$Outbound | undefined; + name: string; + password: string; + "user_fields[1]"?: boolean | undefined; + username: string; }; /** @internal */ export const CreateUserRequestBody$outboundSchema: z.ZodType< - CreateUserRequestBody$Outbound, - z.ZodTypeDef, - CreateUserRequestBody -> = z - .object({ - active: z.boolean().optional(), - approved: z.boolean().optional(), - email: z.string(), - externalIds: z.lazy(() => ExternalIds$outboundSchema).optional(), - name: z.string(), - password: z.string(), - userFields1: z.boolean().optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - externalIds: "external_ids", - userFields1: "user_fields[1]", - }); - }); + CreateUserRequestBody$Outbound, + z.ZodTypeDef, + CreateUserRequestBody +> = z.object({ + active: z.boolean().optional(), + approved: z.boolean().optional(), + email: z.string(), + externalIds: z.lazy(() => ExternalIds$outboundSchema).optional(), + name: z.string(), + password: z.string(), + userFields1: z.boolean().optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + externalIds: "external_ids", + userFields1: "user_fields[1]", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUserRequestBody$ { - /** @deprecated use `CreateUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateUserRequestBody$inboundSchema; - /** @deprecated use `CreateUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateUserRequestBody$outboundSchema; - /** @deprecated use `CreateUserRequestBody$Outbound` instead. */ - export type Outbound = CreateUserRequestBody$Outbound; + /** @deprecated use `CreateUserRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateUserRequestBody$inboundSchema; + /** @deprecated use `CreateUserRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateUserRequestBody$outboundSchema; + /** @deprecated use `CreateUserRequestBody$Outbound` instead. */ + export type Outbound = CreateUserRequestBody$Outbound; } /** @internal */ -export const CreateUserRequest$inboundSchema: z.ZodType = - z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => CreateUserRequestBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); +export const CreateUserRequest$inboundSchema: z.ZodType< + CreateUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => CreateUserRequestBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type CreateUserRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: CreateUserRequestBody$Outbound | undefined; + "Api-Key": string; + "Api-Username": string; + RequestBody?: CreateUserRequestBody$Outbound | undefined; }; /** @internal */ export const CreateUserRequest$outboundSchema: z.ZodType< - CreateUserRequest$Outbound, - z.ZodTypeDef, - CreateUserRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => CreateUserRequestBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + CreateUserRequest$Outbound, + z.ZodTypeDef, + CreateUserRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => CreateUserRequestBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUserRequest$ { - /** @deprecated use `CreateUserRequest$inboundSchema` instead. */ - export const inboundSchema = CreateUserRequest$inboundSchema; - /** @deprecated use `CreateUserRequest$outboundSchema` instead. */ - export const outboundSchema = CreateUserRequest$outboundSchema; - /** @deprecated use `CreateUserRequest$Outbound` instead. */ - export type Outbound = CreateUserRequest$Outbound; + /** @deprecated use `CreateUserRequest$inboundSchema` instead. */ + export const inboundSchema = CreateUserRequest$inboundSchema; + /** @deprecated use `CreateUserRequest$outboundSchema` instead. */ + export const outboundSchema = CreateUserRequest$outboundSchema; + /** @deprecated use `CreateUserRequest$Outbound` instead. */ + export type Outbound = CreateUserRequest$Outbound; } /** @internal */ export const CreateUserResponseBody$inboundSchema: z.ZodType< - CreateUserResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - active: z.boolean(), - message: z.string(), - success: z.boolean(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - user_id: "userId", - }); - }); + CreateUserResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + active: z.boolean(), + message: z.string(), + success: z.boolean(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + }); +}); /** @internal */ export type CreateUserResponseBody$Outbound = { - active: boolean; - message: string; - success: boolean; - user_id?: number | undefined; + active: boolean; + message: string; + success: boolean; + user_id?: number | undefined; }; /** @internal */ export const CreateUserResponseBody$outboundSchema: z.ZodType< - CreateUserResponseBody$Outbound, - z.ZodTypeDef, - CreateUserResponseBody -> = z - .object({ - active: z.boolean(), - message: z.string(), - success: z.boolean(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }); + CreateUserResponseBody$Outbound, + z.ZodTypeDef, + CreateUserResponseBody +> = z.object({ + active: z.boolean(), + message: z.string(), + success: z.boolean(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateUserResponseBody$ { - /** @deprecated use `CreateUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateUserResponseBody$inboundSchema; - /** @deprecated use `CreateUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateUserResponseBody$outboundSchema; - /** @deprecated use `CreateUserResponseBody$Outbound` instead. */ - export type Outbound = CreateUserResponseBody$Outbound; + /** @deprecated use `CreateUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateUserResponseBody$inboundSchema; + /** @deprecated use `CreateUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateUserResponseBody$outboundSchema; + /** @deprecated use `CreateUserResponseBody$Outbound` instead. */ + export type Outbound = CreateUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/deactivateuser.ts b/src/sdk/models/operations/deactivateuser.ts index 88cddfb..b53de72 100644 --- a/src/sdk/models/operations/deactivateuser.ts +++ b/src/sdk/models/operations/deactivateuser.ts @@ -5,37 +5,37 @@ import * as z from "zod"; export type DeactivateUserRequest = { - id: number; + id: number; }; /** * response */ export type DeactivateUserResponseBody = { - success: string; + success: string; }; /** @internal */ export const DeactivateUserRequest$inboundSchema: z.ZodType< - DeactivateUserRequest, - z.ZodTypeDef, - unknown + DeactivateUserRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type DeactivateUserRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const DeactivateUserRequest$outboundSchema: z.ZodType< - DeactivateUserRequest$Outbound, - z.ZodTypeDef, - DeactivateUserRequest + DeactivateUserRequest$Outbound, + z.ZodTypeDef, + DeactivateUserRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -43,35 +43,35 @@ export const DeactivateUserRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeactivateUserRequest$ { - /** @deprecated use `DeactivateUserRequest$inboundSchema` instead. */ - export const inboundSchema = DeactivateUserRequest$inboundSchema; - /** @deprecated use `DeactivateUserRequest$outboundSchema` instead. */ - export const outboundSchema = DeactivateUserRequest$outboundSchema; - /** @deprecated use `DeactivateUserRequest$Outbound` instead. */ - export type Outbound = DeactivateUserRequest$Outbound; + /** @deprecated use `DeactivateUserRequest$inboundSchema` instead. */ + export const inboundSchema = DeactivateUserRequest$inboundSchema; + /** @deprecated use `DeactivateUserRequest$outboundSchema` instead. */ + export const outboundSchema = DeactivateUserRequest$outboundSchema; + /** @deprecated use `DeactivateUserRequest$Outbound` instead. */ + export type Outbound = DeactivateUserRequest$Outbound; } /** @internal */ export const DeactivateUserResponseBody$inboundSchema: z.ZodType< - DeactivateUserResponseBody, - z.ZodTypeDef, - unknown + DeactivateUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type DeactivateUserResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const DeactivateUserResponseBody$outboundSchema: z.ZodType< - DeactivateUserResponseBody$Outbound, - z.ZodTypeDef, - DeactivateUserResponseBody + DeactivateUserResponseBody$Outbound, + z.ZodTypeDef, + DeactivateUserResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -79,10 +79,10 @@ export const DeactivateUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeactivateUserResponseBody$ { - /** @deprecated use `DeactivateUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeactivateUserResponseBody$inboundSchema; - /** @deprecated use `DeactivateUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeactivateUserResponseBody$outboundSchema; - /** @deprecated use `DeactivateUserResponseBody$Outbound` instead. */ - export type Outbound = DeactivateUserResponseBody$Outbound; + /** @deprecated use `DeactivateUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeactivateUserResponseBody$inboundSchema; + /** @deprecated use `DeactivateUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeactivateUserResponseBody$outboundSchema; + /** @deprecated use `DeactivateUserResponseBody$Outbound` instead. */ + export type Outbound = DeactivateUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/deletebadge.ts b/src/sdk/models/operations/deletebadge.ts index 45c34bf..9bba068 100644 --- a/src/sdk/models/operations/deletebadge.ts +++ b/src/sdk/models/operations/deletebadge.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type DeleteBadgeRequest = { - id: number; + id: number; }; /** @internal */ export const DeleteBadgeRequest$inboundSchema: z.ZodType< - DeleteBadgeRequest, - z.ZodTypeDef, - unknown + DeleteBadgeRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type DeleteBadgeRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const DeleteBadgeRequest$outboundSchema: z.ZodType< - DeleteBadgeRequest$Outbound, - z.ZodTypeDef, - DeleteBadgeRequest + DeleteBadgeRequest$Outbound, + z.ZodTypeDef, + DeleteBadgeRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -36,10 +36,10 @@ export const DeleteBadgeRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteBadgeRequest$ { - /** @deprecated use `DeleteBadgeRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteBadgeRequest$inboundSchema; - /** @deprecated use `DeleteBadgeRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteBadgeRequest$outboundSchema; - /** @deprecated use `DeleteBadgeRequest$Outbound` instead. */ - export type Outbound = DeleteBadgeRequest$Outbound; + /** @deprecated use `DeleteBadgeRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteBadgeRequest$inboundSchema; + /** @deprecated use `DeleteBadgeRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteBadgeRequest$outboundSchema; + /** @deprecated use `DeleteBadgeRequest$Outbound` instead. */ + export type Outbound = DeleteBadgeRequest$Outbound; } diff --git a/src/sdk/models/operations/deletegroup.ts b/src/sdk/models/operations/deletegroup.ts index 4790082..3013e8f 100644 --- a/src/sdk/models/operations/deletegroup.ts +++ b/src/sdk/models/operations/deletegroup.ts @@ -5,37 +5,37 @@ import * as z from "zod"; export type DeleteGroupRequest = { - id: number; + id: number; }; /** * response */ export type DeleteGroupResponseBody = { - success: string; + success: string; }; /** @internal */ export const DeleteGroupRequest$inboundSchema: z.ZodType< - DeleteGroupRequest, - z.ZodTypeDef, - unknown + DeleteGroupRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type DeleteGroupRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const DeleteGroupRequest$outboundSchema: z.ZodType< - DeleteGroupRequest$Outbound, - z.ZodTypeDef, - DeleteGroupRequest + DeleteGroupRequest$Outbound, + z.ZodTypeDef, + DeleteGroupRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -43,35 +43,35 @@ export const DeleteGroupRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteGroupRequest$ { - /** @deprecated use `DeleteGroupRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteGroupRequest$inboundSchema; - /** @deprecated use `DeleteGroupRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteGroupRequest$outboundSchema; - /** @deprecated use `DeleteGroupRequest$Outbound` instead. */ - export type Outbound = DeleteGroupRequest$Outbound; + /** @deprecated use `DeleteGroupRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteGroupRequest$inboundSchema; + /** @deprecated use `DeleteGroupRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteGroupRequest$outboundSchema; + /** @deprecated use `DeleteGroupRequest$Outbound` instead. */ + export type Outbound = DeleteGroupRequest$Outbound; } /** @internal */ export const DeleteGroupResponseBody$inboundSchema: z.ZodType< - DeleteGroupResponseBody, - z.ZodTypeDef, - unknown + DeleteGroupResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type DeleteGroupResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const DeleteGroupResponseBody$outboundSchema: z.ZodType< - DeleteGroupResponseBody$Outbound, - z.ZodTypeDef, - DeleteGroupResponseBody + DeleteGroupResponseBody$Outbound, + z.ZodTypeDef, + DeleteGroupResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -79,10 +79,10 @@ export const DeleteGroupResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteGroupResponseBody$ { - /** @deprecated use `DeleteGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteGroupResponseBody$inboundSchema; - /** @deprecated use `DeleteGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteGroupResponseBody$outboundSchema; - /** @deprecated use `DeleteGroupResponseBody$Outbound` instead. */ - export type Outbound = DeleteGroupResponseBody$Outbound; + /** @deprecated use `DeleteGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteGroupResponseBody$inboundSchema; + /** @deprecated use `DeleteGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteGroupResponseBody$outboundSchema; + /** @deprecated use `DeleteGroupResponseBody$Outbound` instead. */ + export type Outbound = DeleteGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/deletepost.ts b/src/sdk/models/operations/deletepost.ts index 886d33a..1e99118 100644 --- a/src/sdk/models/operations/deletepost.ts +++ b/src/sdk/models/operations/deletepost.ts @@ -2,113 +2,108 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeletePostRequestBody = { - /** - * The `SiteSetting.can_permanently_delete` needs to be enabled first before this param can be used. Also this endpoint needs to be called first without `force_destroy` and then followed up with a second call 5 minutes later with `force_destroy` to permanently delete. - */ - forceDestroy?: boolean | undefined; + /** + * The `SiteSetting.can_permanently_delete` needs to be enabled first before this param can be used. Also this endpoint needs to be called first without `force_destroy` and then followed up with a second call 5 minutes later with `force_destroy` to permanently delete. + */ + forceDestroy?: boolean | undefined; }; export type DeletePostRequest = { - requestBody?: DeletePostRequestBody | undefined; - id: number; + requestBody?: DeletePostRequestBody | undefined; + id: number; }; /** @internal */ export const DeletePostRequestBody$inboundSchema: z.ZodType< - DeletePostRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - force_destroy: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - force_destroy: "forceDestroy", - }); - }); + DeletePostRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + force_destroy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "force_destroy": "forceDestroy", + }); +}); /** @internal */ export type DeletePostRequestBody$Outbound = { - force_destroy?: boolean | undefined; + force_destroy?: boolean | undefined; }; /** @internal */ export const DeletePostRequestBody$outboundSchema: z.ZodType< - DeletePostRequestBody$Outbound, - z.ZodTypeDef, - DeletePostRequestBody -> = z - .object({ - forceDestroy: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - forceDestroy: "force_destroy", - }); - }); + DeletePostRequestBody$Outbound, + z.ZodTypeDef, + DeletePostRequestBody +> = z.object({ + forceDestroy: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + forceDestroy: "force_destroy", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePostRequestBody$ { - /** @deprecated use `DeletePostRequestBody$inboundSchema` instead. */ - export const inboundSchema = DeletePostRequestBody$inboundSchema; - /** @deprecated use `DeletePostRequestBody$outboundSchema` instead. */ - export const outboundSchema = DeletePostRequestBody$outboundSchema; - /** @deprecated use `DeletePostRequestBody$Outbound` instead. */ - export type Outbound = DeletePostRequestBody$Outbound; + /** @deprecated use `DeletePostRequestBody$inboundSchema` instead. */ + export const inboundSchema = DeletePostRequestBody$inboundSchema; + /** @deprecated use `DeletePostRequestBody$outboundSchema` instead. */ + export const outboundSchema = DeletePostRequestBody$outboundSchema; + /** @deprecated use `DeletePostRequestBody$Outbound` instead. */ + export type Outbound = DeletePostRequestBody$Outbound; } /** @internal */ -export const DeletePostRequest$inboundSchema: z.ZodType = - z - .object({ - RequestBody: z.lazy(() => DeletePostRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); +export const DeletePostRequest$inboundSchema: z.ZodType< + DeletePostRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => DeletePostRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type DeletePostRequest$Outbound = { - RequestBody?: DeletePostRequestBody$Outbound | undefined; - id: number; + RequestBody?: DeletePostRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const DeletePostRequest$outboundSchema: z.ZodType< - DeletePostRequest$Outbound, - z.ZodTypeDef, - DeletePostRequest -> = z - .object({ - requestBody: z.lazy(() => DeletePostRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + DeletePostRequest$Outbound, + z.ZodTypeDef, + DeletePostRequest +> = z.object({ + requestBody: z.lazy(() => DeletePostRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePostRequest$ { - /** @deprecated use `DeletePostRequest$inboundSchema` instead. */ - export const inboundSchema = DeletePostRequest$inboundSchema; - /** @deprecated use `DeletePostRequest$outboundSchema` instead. */ - export const outboundSchema = DeletePostRequest$outboundSchema; - /** @deprecated use `DeletePostRequest$Outbound` instead. */ - export type Outbound = DeletePostRequest$Outbound; + /** @deprecated use `DeletePostRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePostRequest$inboundSchema; + /** @deprecated use `DeletePostRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePostRequest$outboundSchema; + /** @deprecated use `DeletePostRequest$Outbound` instead. */ + export type Outbound = DeletePostRequest$Outbound; } diff --git a/src/sdk/models/operations/deleteuser.ts b/src/sdk/models/operations/deleteuser.ts index 0ac3d83..19da090 100644 --- a/src/sdk/models/operations/deleteuser.ts +++ b/src/sdk/models/operations/deleteuser.ts @@ -2,160 +2,155 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteUserRequestBody = { - blockEmail?: boolean | undefined; - blockIp?: boolean | undefined; - blockUrls?: boolean | undefined; - deletePosts?: boolean | undefined; + blockEmail?: boolean | undefined; + blockIp?: boolean | undefined; + blockUrls?: boolean | undefined; + deletePosts?: boolean | undefined; }; export type DeleteUserRequest = { - requestBody?: DeleteUserRequestBody | undefined; - id: number; + requestBody?: DeleteUserRequestBody | undefined; + id: number; }; /** * response */ export type DeleteUserResponseBody = { - deleted: boolean; + deleted: boolean; }; /** @internal */ export const DeleteUserRequestBody$inboundSchema: z.ZodType< - DeleteUserRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - block_email: z.boolean().optional(), - block_ip: z.boolean().optional(), - block_urls: z.boolean().optional(), - delete_posts: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - block_email: "blockEmail", - block_ip: "blockIp", - block_urls: "blockUrls", - delete_posts: "deletePosts", - }); - }); + DeleteUserRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + block_email: z.boolean().optional(), + block_ip: z.boolean().optional(), + block_urls: z.boolean().optional(), + delete_posts: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "block_email": "blockEmail", + "block_ip": "blockIp", + "block_urls": "blockUrls", + "delete_posts": "deletePosts", + }); +}); /** @internal */ export type DeleteUserRequestBody$Outbound = { - block_email?: boolean | undefined; - block_ip?: boolean | undefined; - block_urls?: boolean | undefined; - delete_posts?: boolean | undefined; + block_email?: boolean | undefined; + block_ip?: boolean | undefined; + block_urls?: boolean | undefined; + delete_posts?: boolean | undefined; }; /** @internal */ export const DeleteUserRequestBody$outboundSchema: z.ZodType< - DeleteUserRequestBody$Outbound, - z.ZodTypeDef, - DeleteUserRequestBody -> = z - .object({ - blockEmail: z.boolean().optional(), - blockIp: z.boolean().optional(), - blockUrls: z.boolean().optional(), - deletePosts: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - blockEmail: "block_email", - blockIp: "block_ip", - blockUrls: "block_urls", - deletePosts: "delete_posts", - }); - }); + DeleteUserRequestBody$Outbound, + z.ZodTypeDef, + DeleteUserRequestBody +> = z.object({ + blockEmail: z.boolean().optional(), + blockIp: z.boolean().optional(), + blockUrls: z.boolean().optional(), + deletePosts: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + blockEmail: "block_email", + blockIp: "block_ip", + blockUrls: "block_urls", + deletePosts: "delete_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteUserRequestBody$ { - /** @deprecated use `DeleteUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = DeleteUserRequestBody$inboundSchema; - /** @deprecated use `DeleteUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = DeleteUserRequestBody$outboundSchema; - /** @deprecated use `DeleteUserRequestBody$Outbound` instead. */ - export type Outbound = DeleteUserRequestBody$Outbound; + /** @deprecated use `DeleteUserRequestBody$inboundSchema` instead. */ + export const inboundSchema = DeleteUserRequestBody$inboundSchema; + /** @deprecated use `DeleteUserRequestBody$outboundSchema` instead. */ + export const outboundSchema = DeleteUserRequestBody$outboundSchema; + /** @deprecated use `DeleteUserRequestBody$Outbound` instead. */ + export type Outbound = DeleteUserRequestBody$Outbound; } /** @internal */ -export const DeleteUserRequest$inboundSchema: z.ZodType = - z - .object({ - RequestBody: z.lazy(() => DeleteUserRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); +export const DeleteUserRequest$inboundSchema: z.ZodType< + DeleteUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => DeleteUserRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type DeleteUserRequest$Outbound = { - RequestBody?: DeleteUserRequestBody$Outbound | undefined; - id: number; + RequestBody?: DeleteUserRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const DeleteUserRequest$outboundSchema: z.ZodType< - DeleteUserRequest$Outbound, - z.ZodTypeDef, - DeleteUserRequest -> = z - .object({ - requestBody: z.lazy(() => DeleteUserRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + DeleteUserRequest$Outbound, + z.ZodTypeDef, + DeleteUserRequest +> = z.object({ + requestBody: z.lazy(() => DeleteUserRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteUserRequest$ { - /** @deprecated use `DeleteUserRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteUserRequest$inboundSchema; - /** @deprecated use `DeleteUserRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteUserRequest$outboundSchema; - /** @deprecated use `DeleteUserRequest$Outbound` instead. */ - export type Outbound = DeleteUserRequest$Outbound; + /** @deprecated use `DeleteUserRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteUserRequest$inboundSchema; + /** @deprecated use `DeleteUserRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteUserRequest$outboundSchema; + /** @deprecated use `DeleteUserRequest$Outbound` instead. */ + export type Outbound = DeleteUserRequest$Outbound; } /** @internal */ export const DeleteUserResponseBody$inboundSchema: z.ZodType< - DeleteUserResponseBody, - z.ZodTypeDef, - unknown + DeleteUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - deleted: z.boolean(), + deleted: z.boolean(), }); /** @internal */ export type DeleteUserResponseBody$Outbound = { - deleted: boolean; + deleted: boolean; }; /** @internal */ export const DeleteUserResponseBody$outboundSchema: z.ZodType< - DeleteUserResponseBody$Outbound, - z.ZodTypeDef, - DeleteUserResponseBody + DeleteUserResponseBody$Outbound, + z.ZodTypeDef, + DeleteUserResponseBody > = z.object({ - deleted: z.boolean(), + deleted: z.boolean(), }); /** @@ -163,10 +158,10 @@ export const DeleteUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteUserResponseBody$ { - /** @deprecated use `DeleteUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteUserResponseBody$inboundSchema; - /** @deprecated use `DeleteUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteUserResponseBody$outboundSchema; - /** @deprecated use `DeleteUserResponseBody$Outbound` instead. */ - export type Outbound = DeleteUserResponseBody$Outbound; + /** @deprecated use `DeleteUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = DeleteUserResponseBody$inboundSchema; + /** @deprecated use `DeleteUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = DeleteUserResponseBody$outboundSchema; + /** @deprecated use `DeleteUserResponseBody$Outbound` instead. */ + export type Outbound = DeleteUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/downloadbackup.ts b/src/sdk/models/operations/downloadbackup.ts index 2870316..2d74780 100644 --- a/src/sdk/models/operations/downloadbackup.ts +++ b/src/sdk/models/operations/downloadbackup.ts @@ -5,34 +5,34 @@ import * as z from "zod"; export type DownloadBackupRequest = { - filename: string; - token: string; + filename: string; + token: string; }; /** @internal */ export const DownloadBackupRequest$inboundSchema: z.ZodType< - DownloadBackupRequest, - z.ZodTypeDef, - unknown + DownloadBackupRequest, + z.ZodTypeDef, + unknown > = z.object({ - filename: z.string(), - token: z.string(), + filename: z.string(), + token: z.string(), }); /** @internal */ export type DownloadBackupRequest$Outbound = { - filename: string; - token: string; + filename: string; + token: string; }; /** @internal */ export const DownloadBackupRequest$outboundSchema: z.ZodType< - DownloadBackupRequest$Outbound, - z.ZodTypeDef, - DownloadBackupRequest + DownloadBackupRequest$Outbound, + z.ZodTypeDef, + DownloadBackupRequest > = z.object({ - filename: z.string(), - token: z.string(), + filename: z.string(), + token: z.string(), }); /** @@ -40,10 +40,10 @@ export const DownloadBackupRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DownloadBackupRequest$ { - /** @deprecated use `DownloadBackupRequest$inboundSchema` instead. */ - export const inboundSchema = DownloadBackupRequest$inboundSchema; - /** @deprecated use `DownloadBackupRequest$outboundSchema` instead. */ - export const outboundSchema = DownloadBackupRequest$outboundSchema; - /** @deprecated use `DownloadBackupRequest$Outbound` instead. */ - export type Outbound = DownloadBackupRequest$Outbound; + /** @deprecated use `DownloadBackupRequest$inboundSchema` instead. */ + export const inboundSchema = DownloadBackupRequest$inboundSchema; + /** @deprecated use `DownloadBackupRequest$outboundSchema` instead. */ + export const outboundSchema = DownloadBackupRequest$outboundSchema; + /** @deprecated use `DownloadBackupRequest$Outbound` instead. */ + export type Outbound = DownloadBackupRequest$Outbound; } diff --git a/src/sdk/models/operations/generatepresignedput.ts b/src/sdk/models/operations/generatepresignedput.ts index 8727916..2eb947f 100644 --- a/src/sdk/models/operations/generatepresignedput.ts +++ b/src/sdk/models/operations/generatepresignedput.ts @@ -2,34 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export type GeneratePresignedPutMetadata = { - /** - * The SHA1 checksum of the upload binary blob. Optionally be provided and serves as an additional security check when later processing the file in complete-external-upload endpoint. - */ - sha1Checksum?: string | undefined; + /** + * The SHA1 checksum of the upload binary blob. Optionally be provided and serves as an additional security check when later processing the file in complete-external-upload endpoint. + */ + sha1Checksum?: string | undefined; }; export const GeneratePresignedPutType = { - Avatar: "avatar", - ProfileBackground: "profile_background", - CardBackground: "card_background", - CustomEmoji: "custom_emoji", - Composer: "composer", + Avatar: "avatar", + ProfileBackground: "profile_background", + CardBackground: "card_background", + CustomEmoji: "custom_emoji", + Composer: "composer", } as const; -export type GeneratePresignedPutType = ClosedEnum; +export type GeneratePresignedPutType = ClosedEnum< + typeof GeneratePresignedPutType +>; export type GeneratePresignedPutRequestBody = { - fileName: string; - /** - * File size should be represented in bytes. - */ - fileSize: number; - metadata?: GeneratePresignedPutMetadata | undefined; - type: GeneratePresignedPutType; + fileName: string; + /** + * File size should be represented in bytes. + */ + fileSize: number; + metadata?: GeneratePresignedPutMetadata | undefined; + type: GeneratePresignedPutType; }; /** @@ -41,80 +43,76 @@ export type SignedHeaders = {}; * external upload initialized */ export type GeneratePresignedPutResponseBody = { - /** - * The path of the temporary file on the external storage service. - */ - key?: string | undefined; - /** - * A map of headers that must be sent with the PUT request. - */ - signedHeaders?: SignedHeaders | undefined; - /** - * A unique string that identifies the external upload. This must be stored and then sent in the /complete-external-upload endpoint to complete the direct upload. - */ - uniqueIdentifier?: string | undefined; - /** - * A presigned PUT URL which must be used to upload the file binary blob to. - */ - url?: string | undefined; + /** + * The path of the temporary file on the external storage service. + */ + key?: string | undefined; + /** + * A map of headers that must be sent with the PUT request. + */ + signedHeaders?: SignedHeaders | undefined; + /** + * A unique string that identifies the external upload. This must be stored and then sent in the /complete-external-upload endpoint to complete the direct upload. + */ + uniqueIdentifier?: string | undefined; + /** + * A presigned PUT URL which must be used to upload the file binary blob to. + */ + url?: string | undefined; }; /** @internal */ export const GeneratePresignedPutMetadata$inboundSchema: z.ZodType< - GeneratePresignedPutMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - "sha1-checksum": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "sha1-checksum": "sha1Checksum", - }); - }); + GeneratePresignedPutMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + "sha1-checksum": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "sha1-checksum": "sha1Checksum", + }); +}); /** @internal */ export type GeneratePresignedPutMetadata$Outbound = { - "sha1-checksum"?: string | undefined; + "sha1-checksum"?: string | undefined; }; /** @internal */ export const GeneratePresignedPutMetadata$outboundSchema: z.ZodType< - GeneratePresignedPutMetadata$Outbound, - z.ZodTypeDef, - GeneratePresignedPutMetadata -> = z - .object({ - sha1Checksum: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - sha1Checksum: "sha1-checksum", - }); - }); + GeneratePresignedPutMetadata$Outbound, + z.ZodTypeDef, + GeneratePresignedPutMetadata +> = z.object({ + sha1Checksum: z.string().optional(), +}).transform((v) => { + return remap$(v, { + sha1Checksum: "sha1-checksum", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratePresignedPutMetadata$ { - /** @deprecated use `GeneratePresignedPutMetadata$inboundSchema` instead. */ - export const inboundSchema = GeneratePresignedPutMetadata$inboundSchema; - /** @deprecated use `GeneratePresignedPutMetadata$outboundSchema` instead. */ - export const outboundSchema = GeneratePresignedPutMetadata$outboundSchema; - /** @deprecated use `GeneratePresignedPutMetadata$Outbound` instead. */ - export type Outbound = GeneratePresignedPutMetadata$Outbound; + /** @deprecated use `GeneratePresignedPutMetadata$inboundSchema` instead. */ + export const inboundSchema = GeneratePresignedPutMetadata$inboundSchema; + /** @deprecated use `GeneratePresignedPutMetadata$outboundSchema` instead. */ + export const outboundSchema = GeneratePresignedPutMetadata$outboundSchema; + /** @deprecated use `GeneratePresignedPutMetadata$Outbound` instead. */ + export type Outbound = GeneratePresignedPutMetadata$Outbound; } /** @internal */ export const GeneratePresignedPutType$inboundSchema: z.ZodNativeEnum< - typeof GeneratePresignedPutType + typeof GeneratePresignedPutType > = z.nativeEnum(GeneratePresignedPutType); /** @internal */ export const GeneratePresignedPutType$outboundSchema: z.ZodNativeEnum< - typeof GeneratePresignedPutType + typeof GeneratePresignedPutType > = GeneratePresignedPutType$inboundSchema; /** @@ -122,83 +120,83 @@ export const GeneratePresignedPutType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratePresignedPutType$ { - /** @deprecated use `GeneratePresignedPutType$inboundSchema` instead. */ - export const inboundSchema = GeneratePresignedPutType$inboundSchema; - /** @deprecated use `GeneratePresignedPutType$outboundSchema` instead. */ - export const outboundSchema = GeneratePresignedPutType$outboundSchema; + /** @deprecated use `GeneratePresignedPutType$inboundSchema` instead. */ + export const inboundSchema = GeneratePresignedPutType$inboundSchema; + /** @deprecated use `GeneratePresignedPutType$outboundSchema` instead. */ + export const outboundSchema = GeneratePresignedPutType$outboundSchema; } /** @internal */ export const GeneratePresignedPutRequestBody$inboundSchema: z.ZodType< - GeneratePresignedPutRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - file_name: z.string(), - file_size: z.number().int(), - metadata: z.lazy(() => GeneratePresignedPutMetadata$inboundSchema).optional(), - type: GeneratePresignedPutType$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - file_name: "fileName", - file_size: "fileSize", - }); - }); + GeneratePresignedPutRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + file_name: z.string(), + file_size: z.number().int(), + metadata: z.lazy(() => GeneratePresignedPutMetadata$inboundSchema).optional(), + type: GeneratePresignedPutType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "file_name": "fileName", + "file_size": "fileSize", + }); +}); /** @internal */ export type GeneratePresignedPutRequestBody$Outbound = { - file_name: string; - file_size: number; - metadata?: GeneratePresignedPutMetadata$Outbound | undefined; - type: string; + file_name: string; + file_size: number; + metadata?: GeneratePresignedPutMetadata$Outbound | undefined; + type: string; }; /** @internal */ export const GeneratePresignedPutRequestBody$outboundSchema: z.ZodType< - GeneratePresignedPutRequestBody$Outbound, - z.ZodTypeDef, - GeneratePresignedPutRequestBody -> = z - .object({ - fileName: z.string(), - fileSize: z.number().int(), - metadata: z.lazy(() => GeneratePresignedPutMetadata$outboundSchema).optional(), - type: GeneratePresignedPutType$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - fileName: "file_name", - fileSize: "file_size", - }); - }); + GeneratePresignedPutRequestBody$Outbound, + z.ZodTypeDef, + GeneratePresignedPutRequestBody +> = z.object({ + fileName: z.string(), + fileSize: z.number().int(), + metadata: z.lazy(() => GeneratePresignedPutMetadata$outboundSchema) + .optional(), + type: GeneratePresignedPutType$outboundSchema, +}).transform((v) => { + return remap$(v, { + fileName: "file_name", + fileSize: "file_size", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratePresignedPutRequestBody$ { - /** @deprecated use `GeneratePresignedPutRequestBody$inboundSchema` instead. */ - export const inboundSchema = GeneratePresignedPutRequestBody$inboundSchema; - /** @deprecated use `GeneratePresignedPutRequestBody$outboundSchema` instead. */ - export const outboundSchema = GeneratePresignedPutRequestBody$outboundSchema; - /** @deprecated use `GeneratePresignedPutRequestBody$Outbound` instead. */ - export type Outbound = GeneratePresignedPutRequestBody$Outbound; + /** @deprecated use `GeneratePresignedPutRequestBody$inboundSchema` instead. */ + export const inboundSchema = GeneratePresignedPutRequestBody$inboundSchema; + /** @deprecated use `GeneratePresignedPutRequestBody$outboundSchema` instead. */ + export const outboundSchema = GeneratePresignedPutRequestBody$outboundSchema; + /** @deprecated use `GeneratePresignedPutRequestBody$Outbound` instead. */ + export type Outbound = GeneratePresignedPutRequestBody$Outbound; } /** @internal */ -export const SignedHeaders$inboundSchema: z.ZodType = - z.object({}); +export const SignedHeaders$inboundSchema: z.ZodType< + SignedHeaders, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type SignedHeaders$Outbound = {}; /** @internal */ export const SignedHeaders$outboundSchema: z.ZodType< - SignedHeaders$Outbound, - z.ZodTypeDef, - SignedHeaders + SignedHeaders$Outbound, + z.ZodTypeDef, + SignedHeaders > = z.object({}); /** @@ -206,69 +204,65 @@ export const SignedHeaders$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SignedHeaders$ { - /** @deprecated use `SignedHeaders$inboundSchema` instead. */ - export const inboundSchema = SignedHeaders$inboundSchema; - /** @deprecated use `SignedHeaders$outboundSchema` instead. */ - export const outboundSchema = SignedHeaders$outboundSchema; - /** @deprecated use `SignedHeaders$Outbound` instead. */ - export type Outbound = SignedHeaders$Outbound; + /** @deprecated use `SignedHeaders$inboundSchema` instead. */ + export const inboundSchema = SignedHeaders$inboundSchema; + /** @deprecated use `SignedHeaders$outboundSchema` instead. */ + export const outboundSchema = SignedHeaders$outboundSchema; + /** @deprecated use `SignedHeaders$Outbound` instead. */ + export type Outbound = SignedHeaders$Outbound; } /** @internal */ export const GeneratePresignedPutResponseBody$inboundSchema: z.ZodType< - GeneratePresignedPutResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - key: z.string().optional(), - signed_headers: z.lazy(() => SignedHeaders$inboundSchema).optional(), - unique_identifier: z.string().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - signed_headers: "signedHeaders", - unique_identifier: "uniqueIdentifier", - }); - }); + GeneratePresignedPutResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + signed_headers: z.lazy(() => SignedHeaders$inboundSchema).optional(), + unique_identifier: z.string().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "signed_headers": "signedHeaders", + "unique_identifier": "uniqueIdentifier", + }); +}); /** @internal */ export type GeneratePresignedPutResponseBody$Outbound = { - key?: string | undefined; - signed_headers?: SignedHeaders$Outbound | undefined; - unique_identifier?: string | undefined; - url?: string | undefined; + key?: string | undefined; + signed_headers?: SignedHeaders$Outbound | undefined; + unique_identifier?: string | undefined; + url?: string | undefined; }; /** @internal */ export const GeneratePresignedPutResponseBody$outboundSchema: z.ZodType< - GeneratePresignedPutResponseBody$Outbound, - z.ZodTypeDef, - GeneratePresignedPutResponseBody -> = z - .object({ - key: z.string().optional(), - signedHeaders: z.lazy(() => SignedHeaders$outboundSchema).optional(), - uniqueIdentifier: z.string().optional(), - url: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - signedHeaders: "signed_headers", - uniqueIdentifier: "unique_identifier", - }); - }); + GeneratePresignedPutResponseBody$Outbound, + z.ZodTypeDef, + GeneratePresignedPutResponseBody +> = z.object({ + key: z.string().optional(), + signedHeaders: z.lazy(() => SignedHeaders$outboundSchema).optional(), + uniqueIdentifier: z.string().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + signedHeaders: "signed_headers", + uniqueIdentifier: "unique_identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeneratePresignedPutResponseBody$ { - /** @deprecated use `GeneratePresignedPutResponseBody$inboundSchema` instead. */ - export const inboundSchema = GeneratePresignedPutResponseBody$inboundSchema; - /** @deprecated use `GeneratePresignedPutResponseBody$outboundSchema` instead. */ - export const outboundSchema = GeneratePresignedPutResponseBody$outboundSchema; - /** @deprecated use `GeneratePresignedPutResponseBody$Outbound` instead. */ - export type Outbound = GeneratePresignedPutResponseBody$Outbound; + /** @deprecated use `GeneratePresignedPutResponseBody$inboundSchema` instead. */ + export const inboundSchema = GeneratePresignedPutResponseBody$inboundSchema; + /** @deprecated use `GeneratePresignedPutResponseBody$outboundSchema` instead. */ + export const outboundSchema = GeneratePresignedPutResponseBody$outboundSchema; + /** @deprecated use `GeneratePresignedPutResponseBody$Outbound` instead. */ + export type Outbound = GeneratePresignedPutResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getbackups.ts b/src/sdk/models/operations/getbackups.ts index 2e16239..29e9157 100644 --- a/src/sdk/models/operations/getbackups.ts +++ b/src/sdk/models/operations/getbackups.ts @@ -2,61 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ResponseBody = { - filename: string; - lastModified: string; - size: number; + filename: string; + lastModified: string; + size: number; }; /** @internal */ -export const ResponseBody$inboundSchema: z.ZodType = z - .object({ - filename: z.string(), - last_modified: z.string(), - size: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - last_modified: "lastModified", - }); - }); +export const ResponseBody$inboundSchema: z.ZodType< + ResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + filename: z.string(), + last_modified: z.string(), + size: z.number().int(), +}).transform((v) => { + return remap$(v, { + "last_modified": "lastModified", + }); +}); /** @internal */ export type ResponseBody$Outbound = { - filename: string; - last_modified: string; - size: number; + filename: string; + last_modified: string; + size: number; }; /** @internal */ export const ResponseBody$outboundSchema: z.ZodType< - ResponseBody$Outbound, - z.ZodTypeDef, - ResponseBody -> = z - .object({ - filename: z.string(), - lastModified: z.string(), - size: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - lastModified: "last_modified", - }); - }); + ResponseBody$Outbound, + z.ZodTypeDef, + ResponseBody +> = z.object({ + filename: z.string(), + lastModified: z.string(), + size: z.number().int(), +}).transform((v) => { + return remap$(v, { + lastModified: "last_modified", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ResponseBody$ { - /** @deprecated use `ResponseBody$inboundSchema` instead. */ - export const inboundSchema = ResponseBody$inboundSchema; - /** @deprecated use `ResponseBody$outboundSchema` instead. */ - export const outboundSchema = ResponseBody$outboundSchema; - /** @deprecated use `ResponseBody$Outbound` instead. */ - export type Outbound = ResponseBody$Outbound; + /** @deprecated use `ResponseBody$inboundSchema` instead. */ + export const inboundSchema = ResponseBody$inboundSchema; + /** @deprecated use `ResponseBody$outboundSchema` instead. */ + export const outboundSchema = ResponseBody$outboundSchema; + /** @deprecated use `ResponseBody$Outbound` instead. */ + export type Outbound = ResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getcategory.ts b/src/sdk/models/operations/getcategory.ts index 7ba49c4..d49111b 100644 --- a/src/sdk/models/operations/getcategory.ts +++ b/src/sdk/models/operations/getcategory.ts @@ -2,110 +2,110 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetCategoryRequest = { - id: number; + id: number; }; export type GetCategoryCustomFields = {}; export type GetCategoryGroupPermissions = { - groupName: string; - permissionType: number; + groupName: string; + permissionType: number; }; export type GetCategoryRequiredTagGroups = { - minCount: number; - name: string; + minCount: number; + name: string; }; export type GetCategoryCategory = { - allTopicsWiki: boolean; - allowBadges: boolean; - allowGlobalTags?: boolean | undefined; - allowUnlimitedOwnerEditsOnFirstPost: boolean; - allowedTagGroups?: Array | undefined; - allowedTags?: Array | undefined; - autoCloseBasedOnLastPost: boolean; - autoCloseHours: string | null; - availableGroups: Array; - canDelete: boolean; - canEdit: boolean; - categorySetting?: any | undefined; - color: string; - customFields: GetCategoryCustomFields; - defaultListFilter: string; - defaultSlowModeSeconds: string | null; - defaultTopPeriod: string; - defaultView: string | null; - description: string | null; - descriptionExcerpt: string | null; - descriptionText: string | null; - emailIn: string | null; - emailInAllowStrangers: boolean; - formTemplateIds?: Array | undefined; - groupPermissions: Array; - hasChildren: boolean | null; - id: number; - mailinglistMirror: boolean; - minimumRequiredTags: number; - name: string; - navigateToFirstPostAfterRead: boolean; - notificationLevel: number; - numFeaturedTopics: number; - permission: number | null; - position: number; - postCount: number; - readOnlyBanner: string | null; - readRestricted: boolean; - requiredTagGroups: Array; - searchPriority: number; - showSubcategoryList: boolean; - slug: string; - sortAscending: string | null; - sortOrder: string | null; - subcategoryListStyle: string; - textColor: string; - topicCount: number; - topicFeaturedLinkAllowed: boolean; - topicTemplate: string | null; - topicUrl: string | null; - uploadedBackground: string | null; - uploadedBackgroundDark: string | null; - uploadedLogo: string | null; - uploadedLogoDark: string | null; + allTopicsWiki: boolean; + allowBadges: boolean; + allowGlobalTags?: boolean | undefined; + allowUnlimitedOwnerEditsOnFirstPost: boolean; + allowedTagGroups?: Array | undefined; + allowedTags?: Array | undefined; + autoCloseBasedOnLastPost: boolean; + autoCloseHours: string | null; + availableGroups: Array; + canDelete: boolean; + canEdit: boolean; + categorySetting?: any | undefined; + color: string; + customFields: GetCategoryCustomFields; + defaultListFilter: string; + defaultSlowModeSeconds: string | null; + defaultTopPeriod: string; + defaultView: string | null; + description: string | null; + descriptionExcerpt: string | null; + descriptionText: string | null; + emailIn: string | null; + emailInAllowStrangers: boolean; + formTemplateIds?: Array | undefined; + groupPermissions: Array; + hasChildren: boolean | null; + id: number; + mailinglistMirror: boolean; + minimumRequiredTags: number; + name: string; + navigateToFirstPostAfterRead: boolean; + notificationLevel: number; + numFeaturedTopics: number; + permission: number | null; + position: number; + postCount: number; + readOnlyBanner: string | null; + readRestricted: boolean; + requiredTagGroups: Array; + searchPriority: number; + showSubcategoryList: boolean; + slug: string; + sortAscending: string | null; + sortOrder: string | null; + subcategoryListStyle: string; + textColor: string; + topicCount: number; + topicFeaturedLinkAllowed: boolean; + topicTemplate: string | null; + topicUrl: string | null; + uploadedBackground: string | null; + uploadedBackgroundDark: string | null; + uploadedLogo: string | null; + uploadedLogoDark: string | null; }; /** * response */ export type GetCategoryResponseBody = { - category: GetCategoryCategory; + category: GetCategoryCategory; }; /** @internal */ export const GetCategoryRequest$inboundSchema: z.ZodType< - GetCategoryRequest, - z.ZodTypeDef, - unknown + GetCategoryRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @internal */ export type GetCategoryRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const GetCategoryRequest$outboundSchema: z.ZodType< - GetCategoryRequest$Outbound, - z.ZodTypeDef, - GetCategoryRequest + GetCategoryRequest$Outbound, + z.ZodTypeDef, + GetCategoryRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -113,19 +113,19 @@ export const GetCategoryRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryRequest$ { - /** @deprecated use `GetCategoryRequest$inboundSchema` instead. */ - export const inboundSchema = GetCategoryRequest$inboundSchema; - /** @deprecated use `GetCategoryRequest$outboundSchema` instead. */ - export const outboundSchema = GetCategoryRequest$outboundSchema; - /** @deprecated use `GetCategoryRequest$Outbound` instead. */ - export type Outbound = GetCategoryRequest$Outbound; + /** @deprecated use `GetCategoryRequest$inboundSchema` instead. */ + export const inboundSchema = GetCategoryRequest$inboundSchema; + /** @deprecated use `GetCategoryRequest$outboundSchema` instead. */ + export const outboundSchema = GetCategoryRequest$outboundSchema; + /** @deprecated use `GetCategoryRequest$Outbound` instead. */ + export type Outbound = GetCategoryRequest$Outbound; } /** @internal */ export const GetCategoryCustomFields$inboundSchema: z.ZodType< - GetCategoryCustomFields, - z.ZodTypeDef, - unknown + GetCategoryCustomFields, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -133,9 +133,9 @@ export type GetCategoryCustomFields$Outbound = {}; /** @internal */ export const GetCategoryCustomFields$outboundSchema: z.ZodType< - GetCategoryCustomFields$Outbound, - z.ZodTypeDef, - GetCategoryCustomFields + GetCategoryCustomFields$Outbound, + z.ZodTypeDef, + GetCategoryCustomFields > = z.object({}); /** @@ -143,438 +143,436 @@ export const GetCategoryCustomFields$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryCustomFields$ { - /** @deprecated use `GetCategoryCustomFields$inboundSchema` instead. */ - export const inboundSchema = GetCategoryCustomFields$inboundSchema; - /** @deprecated use `GetCategoryCustomFields$outboundSchema` instead. */ - export const outboundSchema = GetCategoryCustomFields$outboundSchema; - /** @deprecated use `GetCategoryCustomFields$Outbound` instead. */ - export type Outbound = GetCategoryCustomFields$Outbound; + /** @deprecated use `GetCategoryCustomFields$inboundSchema` instead. */ + export const inboundSchema = GetCategoryCustomFields$inboundSchema; + /** @deprecated use `GetCategoryCustomFields$outboundSchema` instead. */ + export const outboundSchema = GetCategoryCustomFields$outboundSchema; + /** @deprecated use `GetCategoryCustomFields$Outbound` instead. */ + export type Outbound = GetCategoryCustomFields$Outbound; } /** @internal */ export const GetCategoryGroupPermissions$inboundSchema: z.ZodType< - GetCategoryGroupPermissions, - z.ZodTypeDef, - unknown -> = z - .object({ - group_name: z.string(), - permission_type: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_name: "groupName", - permission_type: "permissionType", - }); - }); + GetCategoryGroupPermissions, + z.ZodTypeDef, + unknown +> = z.object({ + group_name: z.string(), + permission_type: z.number().int(), +}).transform((v) => { + return remap$(v, { + "group_name": "groupName", + "permission_type": "permissionType", + }); +}); /** @internal */ export type GetCategoryGroupPermissions$Outbound = { - group_name: string; - permission_type: number; + group_name: string; + permission_type: number; }; /** @internal */ export const GetCategoryGroupPermissions$outboundSchema: z.ZodType< - GetCategoryGroupPermissions$Outbound, - z.ZodTypeDef, - GetCategoryGroupPermissions -> = z - .object({ - groupName: z.string(), - permissionType: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupName: "group_name", - permissionType: "permission_type", - }); - }); + GetCategoryGroupPermissions$Outbound, + z.ZodTypeDef, + GetCategoryGroupPermissions +> = z.object({ + groupName: z.string(), + permissionType: z.number().int(), +}).transform((v) => { + return remap$(v, { + groupName: "group_name", + permissionType: "permission_type", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryGroupPermissions$ { - /** @deprecated use `GetCategoryGroupPermissions$inboundSchema` instead. */ - export const inboundSchema = GetCategoryGroupPermissions$inboundSchema; - /** @deprecated use `GetCategoryGroupPermissions$outboundSchema` instead. */ - export const outboundSchema = GetCategoryGroupPermissions$outboundSchema; - /** @deprecated use `GetCategoryGroupPermissions$Outbound` instead. */ - export type Outbound = GetCategoryGroupPermissions$Outbound; + /** @deprecated use `GetCategoryGroupPermissions$inboundSchema` instead. */ + export const inboundSchema = GetCategoryGroupPermissions$inboundSchema; + /** @deprecated use `GetCategoryGroupPermissions$outboundSchema` instead. */ + export const outboundSchema = GetCategoryGroupPermissions$outboundSchema; + /** @deprecated use `GetCategoryGroupPermissions$Outbound` instead. */ + export type Outbound = GetCategoryGroupPermissions$Outbound; } /** @internal */ export const GetCategoryRequiredTagGroups$inboundSchema: z.ZodType< - GetCategoryRequiredTagGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - min_count: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - min_count: "minCount", - }); - }); + GetCategoryRequiredTagGroups, + z.ZodTypeDef, + unknown +> = z.object({ + min_count: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "min_count": "minCount", + }); +}); /** @internal */ export type GetCategoryRequiredTagGroups$Outbound = { - min_count: number; - name: string; + min_count: number; + name: string; }; /** @internal */ export const GetCategoryRequiredTagGroups$outboundSchema: z.ZodType< - GetCategoryRequiredTagGroups$Outbound, - z.ZodTypeDef, - GetCategoryRequiredTagGroups -> = z - .object({ - minCount: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - minCount: "min_count", - }); - }); + GetCategoryRequiredTagGroups$Outbound, + z.ZodTypeDef, + GetCategoryRequiredTagGroups +> = z.object({ + minCount: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + minCount: "min_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryRequiredTagGroups$ { - /** @deprecated use `GetCategoryRequiredTagGroups$inboundSchema` instead. */ - export const inboundSchema = GetCategoryRequiredTagGroups$inboundSchema; - /** @deprecated use `GetCategoryRequiredTagGroups$outboundSchema` instead. */ - export const outboundSchema = GetCategoryRequiredTagGroups$outboundSchema; - /** @deprecated use `GetCategoryRequiredTagGroups$Outbound` instead. */ - export type Outbound = GetCategoryRequiredTagGroups$Outbound; + /** @deprecated use `GetCategoryRequiredTagGroups$inboundSchema` instead. */ + export const inboundSchema = GetCategoryRequiredTagGroups$inboundSchema; + /** @deprecated use `GetCategoryRequiredTagGroups$outboundSchema` instead. */ + export const outboundSchema = GetCategoryRequiredTagGroups$outboundSchema; + /** @deprecated use `GetCategoryRequiredTagGroups$Outbound` instead. */ + export type Outbound = GetCategoryRequiredTagGroups$Outbound; } /** @internal */ export const GetCategoryCategory$inboundSchema: z.ZodType< - GetCategoryCategory, - z.ZodTypeDef, - unknown -> = z - .object({ - all_topics_wiki: z.boolean(), - allow_badges: z.boolean(), - allow_global_tags: z.boolean().optional(), - allow_unlimited_owner_edits_on_first_post: z.boolean(), - allowed_tag_groups: z.array(z.any()).optional(), - allowed_tags: z.array(z.any()).optional(), - auto_close_based_on_last_post: z.boolean(), - auto_close_hours: z.nullable(z.string()), - available_groups: z.array(z.any()), - can_delete: z.boolean(), - can_edit: z.boolean(), - category_setting: z.any().optional(), - color: z.string(), - custom_fields: z.lazy(() => GetCategoryCustomFields$inboundSchema), - default_list_filter: z.string(), - default_slow_mode_seconds: z.nullable(z.string()), - default_top_period: z.string(), - default_view: z.nullable(z.string()), - description: z.nullable(z.string()), - description_excerpt: z.nullable(z.string()), - description_text: z.nullable(z.string()), - email_in: z.nullable(z.string()), - email_in_allow_strangers: z.boolean(), - form_template_ids: z.array(z.any()).optional(), - group_permissions: z.array(z.lazy(() => GetCategoryGroupPermissions$inboundSchema)), - has_children: z.nullable(z.boolean()), - id: z.number().int(), - mailinglist_mirror: z.boolean(), - minimum_required_tags: z.number().int(), - name: z.string(), - navigate_to_first_post_after_read: z.boolean(), - notification_level: z.number().int(), - num_featured_topics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - post_count: z.number().int(), - read_only_banner: z.nullable(z.string()), - read_restricted: z.boolean(), - required_tag_groups: z.array(z.lazy(() => GetCategoryRequiredTagGroups$inboundSchema)), - search_priority: z.number().int(), - show_subcategory_list: z.boolean(), - slug: z.string(), - sort_ascending: z.nullable(z.string()), - sort_order: z.nullable(z.string()), - subcategory_list_style: z.string(), - text_color: z.string(), - topic_count: z.number().int(), - topic_featured_link_allowed: z.boolean(), - topic_template: z.nullable(z.string()), - topic_url: z.nullable(z.string()), - uploaded_background: z.nullable(z.string()), - uploaded_background_dark: z.nullable(z.string()), - uploaded_logo: z.nullable(z.string()), - uploaded_logo_dark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - all_topics_wiki: "allTopicsWiki", - allow_badges: "allowBadges", - allow_global_tags: "allowGlobalTags", - allow_unlimited_owner_edits_on_first_post: "allowUnlimitedOwnerEditsOnFirstPost", - allowed_tag_groups: "allowedTagGroups", - allowed_tags: "allowedTags", - auto_close_based_on_last_post: "autoCloseBasedOnLastPost", - auto_close_hours: "autoCloseHours", - available_groups: "availableGroups", - can_delete: "canDelete", - can_edit: "canEdit", - category_setting: "categorySetting", - custom_fields: "customFields", - default_list_filter: "defaultListFilter", - default_slow_mode_seconds: "defaultSlowModeSeconds", - default_top_period: "defaultTopPeriod", - default_view: "defaultView", - description_excerpt: "descriptionExcerpt", - description_text: "descriptionText", - email_in: "emailIn", - email_in_allow_strangers: "emailInAllowStrangers", - form_template_ids: "formTemplateIds", - group_permissions: "groupPermissions", - has_children: "hasChildren", - mailinglist_mirror: "mailinglistMirror", - minimum_required_tags: "minimumRequiredTags", - navigate_to_first_post_after_read: "navigateToFirstPostAfterRead", - notification_level: "notificationLevel", - num_featured_topics: "numFeaturedTopics", - post_count: "postCount", - read_only_banner: "readOnlyBanner", - read_restricted: "readRestricted", - required_tag_groups: "requiredTagGroups", - search_priority: "searchPriority", - show_subcategory_list: "showSubcategoryList", - sort_ascending: "sortAscending", - sort_order: "sortOrder", - subcategory_list_style: "subcategoryListStyle", - text_color: "textColor", - topic_count: "topicCount", - topic_featured_link_allowed: "topicFeaturedLinkAllowed", - topic_template: "topicTemplate", - topic_url: "topicUrl", - uploaded_background: "uploadedBackground", - uploaded_background_dark: "uploadedBackgroundDark", - uploaded_logo: "uploadedLogo", - uploaded_logo_dark: "uploadedLogoDark", - }); - }); + GetCategoryCategory, + z.ZodTypeDef, + unknown +> = z.object({ + all_topics_wiki: z.boolean(), + allow_badges: z.boolean(), + allow_global_tags: z.boolean().optional(), + allow_unlimited_owner_edits_on_first_post: z.boolean(), + allowed_tag_groups: z.array(z.any()).optional(), + allowed_tags: z.array(z.any()).optional(), + auto_close_based_on_last_post: z.boolean(), + auto_close_hours: z.nullable(z.string()), + available_groups: z.array(z.any()), + can_delete: z.boolean(), + can_edit: z.boolean(), + category_setting: z.any().optional(), + color: z.string(), + custom_fields: z.lazy(() => GetCategoryCustomFields$inboundSchema), + default_list_filter: z.string(), + default_slow_mode_seconds: z.nullable(z.string()), + default_top_period: z.string(), + default_view: z.nullable(z.string()), + description: z.nullable(z.string()), + description_excerpt: z.nullable(z.string()), + description_text: z.nullable(z.string()), + email_in: z.nullable(z.string()), + email_in_allow_strangers: z.boolean(), + form_template_ids: z.array(z.any()).optional(), + group_permissions: z.array( + z.lazy(() => GetCategoryGroupPermissions$inboundSchema), + ), + has_children: z.nullable(z.boolean()), + id: z.number().int(), + mailinglist_mirror: z.boolean(), + minimum_required_tags: z.number().int(), + name: z.string(), + navigate_to_first_post_after_read: z.boolean(), + notification_level: z.number().int(), + num_featured_topics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + post_count: z.number().int(), + read_only_banner: z.nullable(z.string()), + read_restricted: z.boolean(), + required_tag_groups: z.array( + z.lazy(() => GetCategoryRequiredTagGroups$inboundSchema), + ), + search_priority: z.number().int(), + show_subcategory_list: z.boolean(), + slug: z.string(), + sort_ascending: z.nullable(z.string()), + sort_order: z.nullable(z.string()), + subcategory_list_style: z.string(), + text_color: z.string(), + topic_count: z.number().int(), + topic_featured_link_allowed: z.boolean(), + topic_template: z.nullable(z.string()), + topic_url: z.nullable(z.string()), + uploaded_background: z.nullable(z.string()), + uploaded_background_dark: z.nullable(z.string()), + uploaded_logo: z.nullable(z.string()), + uploaded_logo_dark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "all_topics_wiki": "allTopicsWiki", + "allow_badges": "allowBadges", + "allow_global_tags": "allowGlobalTags", + "allow_unlimited_owner_edits_on_first_post": + "allowUnlimitedOwnerEditsOnFirstPost", + "allowed_tag_groups": "allowedTagGroups", + "allowed_tags": "allowedTags", + "auto_close_based_on_last_post": "autoCloseBasedOnLastPost", + "auto_close_hours": "autoCloseHours", + "available_groups": "availableGroups", + "can_delete": "canDelete", + "can_edit": "canEdit", + "category_setting": "categorySetting", + "custom_fields": "customFields", + "default_list_filter": "defaultListFilter", + "default_slow_mode_seconds": "defaultSlowModeSeconds", + "default_top_period": "defaultTopPeriod", + "default_view": "defaultView", + "description_excerpt": "descriptionExcerpt", + "description_text": "descriptionText", + "email_in": "emailIn", + "email_in_allow_strangers": "emailInAllowStrangers", + "form_template_ids": "formTemplateIds", + "group_permissions": "groupPermissions", + "has_children": "hasChildren", + "mailinglist_mirror": "mailinglistMirror", + "minimum_required_tags": "minimumRequiredTags", + "navigate_to_first_post_after_read": "navigateToFirstPostAfterRead", + "notification_level": "notificationLevel", + "num_featured_topics": "numFeaturedTopics", + "post_count": "postCount", + "read_only_banner": "readOnlyBanner", + "read_restricted": "readRestricted", + "required_tag_groups": "requiredTagGroups", + "search_priority": "searchPriority", + "show_subcategory_list": "showSubcategoryList", + "sort_ascending": "sortAscending", + "sort_order": "sortOrder", + "subcategory_list_style": "subcategoryListStyle", + "text_color": "textColor", + "topic_count": "topicCount", + "topic_featured_link_allowed": "topicFeaturedLinkAllowed", + "topic_template": "topicTemplate", + "topic_url": "topicUrl", + "uploaded_background": "uploadedBackground", + "uploaded_background_dark": "uploadedBackgroundDark", + "uploaded_logo": "uploadedLogo", + "uploaded_logo_dark": "uploadedLogoDark", + }); +}); /** @internal */ export type GetCategoryCategory$Outbound = { - all_topics_wiki: boolean; - allow_badges: boolean; - allow_global_tags?: boolean | undefined; - allow_unlimited_owner_edits_on_first_post: boolean; - allowed_tag_groups?: Array | undefined; - allowed_tags?: Array | undefined; - auto_close_based_on_last_post: boolean; - auto_close_hours: string | null; - available_groups: Array; - can_delete: boolean; - can_edit: boolean; - category_setting?: any | undefined; - color: string; - custom_fields: GetCategoryCustomFields$Outbound; - default_list_filter: string; - default_slow_mode_seconds: string | null; - default_top_period: string; - default_view: string | null; - description: string | null; - description_excerpt: string | null; - description_text: string | null; - email_in: string | null; - email_in_allow_strangers: boolean; - form_template_ids?: Array | undefined; - group_permissions: Array; - has_children: boolean | null; - id: number; - mailinglist_mirror: boolean; - minimum_required_tags: number; - name: string; - navigate_to_first_post_after_read: boolean; - notification_level: number; - num_featured_topics: number; - permission: number | null; - position: number; - post_count: number; - read_only_banner: string | null; - read_restricted: boolean; - required_tag_groups: Array; - search_priority: number; - show_subcategory_list: boolean; - slug: string; - sort_ascending: string | null; - sort_order: string | null; - subcategory_list_style: string; - text_color: string; - topic_count: number; - topic_featured_link_allowed: boolean; - topic_template: string | null; - topic_url: string | null; - uploaded_background: string | null; - uploaded_background_dark: string | null; - uploaded_logo: string | null; - uploaded_logo_dark: string | null; + all_topics_wiki: boolean; + allow_badges: boolean; + allow_global_tags?: boolean | undefined; + allow_unlimited_owner_edits_on_first_post: boolean; + allowed_tag_groups?: Array | undefined; + allowed_tags?: Array | undefined; + auto_close_based_on_last_post: boolean; + auto_close_hours: string | null; + available_groups: Array; + can_delete: boolean; + can_edit: boolean; + category_setting?: any | undefined; + color: string; + custom_fields: GetCategoryCustomFields$Outbound; + default_list_filter: string; + default_slow_mode_seconds: string | null; + default_top_period: string; + default_view: string | null; + description: string | null; + description_excerpt: string | null; + description_text: string | null; + email_in: string | null; + email_in_allow_strangers: boolean; + form_template_ids?: Array | undefined; + group_permissions: Array; + has_children: boolean | null; + id: number; + mailinglist_mirror: boolean; + minimum_required_tags: number; + name: string; + navigate_to_first_post_after_read: boolean; + notification_level: number; + num_featured_topics: number; + permission: number | null; + position: number; + post_count: number; + read_only_banner: string | null; + read_restricted: boolean; + required_tag_groups: Array; + search_priority: number; + show_subcategory_list: boolean; + slug: string; + sort_ascending: string | null; + sort_order: string | null; + subcategory_list_style: string; + text_color: string; + topic_count: number; + topic_featured_link_allowed: boolean; + topic_template: string | null; + topic_url: string | null; + uploaded_background: string | null; + uploaded_background_dark: string | null; + uploaded_logo: string | null; + uploaded_logo_dark: string | null; }; /** @internal */ export const GetCategoryCategory$outboundSchema: z.ZodType< - GetCategoryCategory$Outbound, - z.ZodTypeDef, - GetCategoryCategory -> = z - .object({ - allTopicsWiki: z.boolean(), - allowBadges: z.boolean(), - allowGlobalTags: z.boolean().optional(), - allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), - allowedTagGroups: z.array(z.any()).optional(), - allowedTags: z.array(z.any()).optional(), - autoCloseBasedOnLastPost: z.boolean(), - autoCloseHours: z.nullable(z.string()), - availableGroups: z.array(z.any()), - canDelete: z.boolean(), - canEdit: z.boolean(), - categorySetting: z.any().optional(), - color: z.string(), - customFields: z.lazy(() => GetCategoryCustomFields$outboundSchema), - defaultListFilter: z.string(), - defaultSlowModeSeconds: z.nullable(z.string()), - defaultTopPeriod: z.string(), - defaultView: z.nullable(z.string()), - description: z.nullable(z.string()), - descriptionExcerpt: z.nullable(z.string()), - descriptionText: z.nullable(z.string()), - emailIn: z.nullable(z.string()), - emailInAllowStrangers: z.boolean(), - formTemplateIds: z.array(z.any()).optional(), - groupPermissions: z.array(z.lazy(() => GetCategoryGroupPermissions$outboundSchema)), - hasChildren: z.nullable(z.boolean()), - id: z.number().int(), - mailinglistMirror: z.boolean(), - minimumRequiredTags: z.number().int(), - name: z.string(), - navigateToFirstPostAfterRead: z.boolean(), - notificationLevel: z.number().int(), - numFeaturedTopics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - postCount: z.number().int(), - readOnlyBanner: z.nullable(z.string()), - readRestricted: z.boolean(), - requiredTagGroups: z.array(z.lazy(() => GetCategoryRequiredTagGroups$outboundSchema)), - searchPriority: z.number().int(), - showSubcategoryList: z.boolean(), - slug: z.string(), - sortAscending: z.nullable(z.string()), - sortOrder: z.nullable(z.string()), - subcategoryListStyle: z.string(), - textColor: z.string(), - topicCount: z.number().int(), - topicFeaturedLinkAllowed: z.boolean(), - topicTemplate: z.nullable(z.string()), - topicUrl: z.nullable(z.string()), - uploadedBackground: z.nullable(z.string()), - uploadedBackgroundDark: z.nullable(z.string()), - uploadedLogo: z.nullable(z.string()), - uploadedLogoDark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allTopicsWiki: "all_topics_wiki", - allowBadges: "allow_badges", - allowGlobalTags: "allow_global_tags", - allowUnlimitedOwnerEditsOnFirstPost: "allow_unlimited_owner_edits_on_first_post", - allowedTagGroups: "allowed_tag_groups", - allowedTags: "allowed_tags", - autoCloseBasedOnLastPost: "auto_close_based_on_last_post", - autoCloseHours: "auto_close_hours", - availableGroups: "available_groups", - canDelete: "can_delete", - canEdit: "can_edit", - categorySetting: "category_setting", - customFields: "custom_fields", - defaultListFilter: "default_list_filter", - defaultSlowModeSeconds: "default_slow_mode_seconds", - defaultTopPeriod: "default_top_period", - defaultView: "default_view", - descriptionExcerpt: "description_excerpt", - descriptionText: "description_text", - emailIn: "email_in", - emailInAllowStrangers: "email_in_allow_strangers", - formTemplateIds: "form_template_ids", - groupPermissions: "group_permissions", - hasChildren: "has_children", - mailinglistMirror: "mailinglist_mirror", - minimumRequiredTags: "minimum_required_tags", - navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", - notificationLevel: "notification_level", - numFeaturedTopics: "num_featured_topics", - postCount: "post_count", - readOnlyBanner: "read_only_banner", - readRestricted: "read_restricted", - requiredTagGroups: "required_tag_groups", - searchPriority: "search_priority", - showSubcategoryList: "show_subcategory_list", - sortAscending: "sort_ascending", - sortOrder: "sort_order", - subcategoryListStyle: "subcategory_list_style", - textColor: "text_color", - topicCount: "topic_count", - topicFeaturedLinkAllowed: "topic_featured_link_allowed", - topicTemplate: "topic_template", - topicUrl: "topic_url", - uploadedBackground: "uploaded_background", - uploadedBackgroundDark: "uploaded_background_dark", - uploadedLogo: "uploaded_logo", - uploadedLogoDark: "uploaded_logo_dark", - }); - }); + GetCategoryCategory$Outbound, + z.ZodTypeDef, + GetCategoryCategory +> = z.object({ + allTopicsWiki: z.boolean(), + allowBadges: z.boolean(), + allowGlobalTags: z.boolean().optional(), + allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), + allowedTagGroups: z.array(z.any()).optional(), + allowedTags: z.array(z.any()).optional(), + autoCloseBasedOnLastPost: z.boolean(), + autoCloseHours: z.nullable(z.string()), + availableGroups: z.array(z.any()), + canDelete: z.boolean(), + canEdit: z.boolean(), + categorySetting: z.any().optional(), + color: z.string(), + customFields: z.lazy(() => GetCategoryCustomFields$outboundSchema), + defaultListFilter: z.string(), + defaultSlowModeSeconds: z.nullable(z.string()), + defaultTopPeriod: z.string(), + defaultView: z.nullable(z.string()), + description: z.nullable(z.string()), + descriptionExcerpt: z.nullable(z.string()), + descriptionText: z.nullable(z.string()), + emailIn: z.nullable(z.string()), + emailInAllowStrangers: z.boolean(), + formTemplateIds: z.array(z.any()).optional(), + groupPermissions: z.array( + z.lazy(() => GetCategoryGroupPermissions$outboundSchema), + ), + hasChildren: z.nullable(z.boolean()), + id: z.number().int(), + mailinglistMirror: z.boolean(), + minimumRequiredTags: z.number().int(), + name: z.string(), + navigateToFirstPostAfterRead: z.boolean(), + notificationLevel: z.number().int(), + numFeaturedTopics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + postCount: z.number().int(), + readOnlyBanner: z.nullable(z.string()), + readRestricted: z.boolean(), + requiredTagGroups: z.array( + z.lazy(() => GetCategoryRequiredTagGroups$outboundSchema), + ), + searchPriority: z.number().int(), + showSubcategoryList: z.boolean(), + slug: z.string(), + sortAscending: z.nullable(z.string()), + sortOrder: z.nullable(z.string()), + subcategoryListStyle: z.string(), + textColor: z.string(), + topicCount: z.number().int(), + topicFeaturedLinkAllowed: z.boolean(), + topicTemplate: z.nullable(z.string()), + topicUrl: z.nullable(z.string()), + uploadedBackground: z.nullable(z.string()), + uploadedBackgroundDark: z.nullable(z.string()), + uploadedLogo: z.nullable(z.string()), + uploadedLogoDark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allTopicsWiki: "all_topics_wiki", + allowBadges: "allow_badges", + allowGlobalTags: "allow_global_tags", + allowUnlimitedOwnerEditsOnFirstPost: + "allow_unlimited_owner_edits_on_first_post", + allowedTagGroups: "allowed_tag_groups", + allowedTags: "allowed_tags", + autoCloseBasedOnLastPost: "auto_close_based_on_last_post", + autoCloseHours: "auto_close_hours", + availableGroups: "available_groups", + canDelete: "can_delete", + canEdit: "can_edit", + categorySetting: "category_setting", + customFields: "custom_fields", + defaultListFilter: "default_list_filter", + defaultSlowModeSeconds: "default_slow_mode_seconds", + defaultTopPeriod: "default_top_period", + defaultView: "default_view", + descriptionExcerpt: "description_excerpt", + descriptionText: "description_text", + emailIn: "email_in", + emailInAllowStrangers: "email_in_allow_strangers", + formTemplateIds: "form_template_ids", + groupPermissions: "group_permissions", + hasChildren: "has_children", + mailinglistMirror: "mailinglist_mirror", + minimumRequiredTags: "minimum_required_tags", + navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", + notificationLevel: "notification_level", + numFeaturedTopics: "num_featured_topics", + postCount: "post_count", + readOnlyBanner: "read_only_banner", + readRestricted: "read_restricted", + requiredTagGroups: "required_tag_groups", + searchPriority: "search_priority", + showSubcategoryList: "show_subcategory_list", + sortAscending: "sort_ascending", + sortOrder: "sort_order", + subcategoryListStyle: "subcategory_list_style", + textColor: "text_color", + topicCount: "topic_count", + topicFeaturedLinkAllowed: "topic_featured_link_allowed", + topicTemplate: "topic_template", + topicUrl: "topic_url", + uploadedBackground: "uploaded_background", + uploadedBackgroundDark: "uploaded_background_dark", + uploadedLogo: "uploaded_logo", + uploadedLogoDark: "uploaded_logo_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryCategory$ { - /** @deprecated use `GetCategoryCategory$inboundSchema` instead. */ - export const inboundSchema = GetCategoryCategory$inboundSchema; - /** @deprecated use `GetCategoryCategory$outboundSchema` instead. */ - export const outboundSchema = GetCategoryCategory$outboundSchema; - /** @deprecated use `GetCategoryCategory$Outbound` instead. */ - export type Outbound = GetCategoryCategory$Outbound; + /** @deprecated use `GetCategoryCategory$inboundSchema` instead. */ + export const inboundSchema = GetCategoryCategory$inboundSchema; + /** @deprecated use `GetCategoryCategory$outboundSchema` instead. */ + export const outboundSchema = GetCategoryCategory$outboundSchema; + /** @deprecated use `GetCategoryCategory$Outbound` instead. */ + export type Outbound = GetCategoryCategory$Outbound; } /** @internal */ export const GetCategoryResponseBody$inboundSchema: z.ZodType< - GetCategoryResponseBody, - z.ZodTypeDef, - unknown + GetCategoryResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - category: z.lazy(() => GetCategoryCategory$inboundSchema), + category: z.lazy(() => GetCategoryCategory$inboundSchema), }); /** @internal */ export type GetCategoryResponseBody$Outbound = { - category: GetCategoryCategory$Outbound; + category: GetCategoryCategory$Outbound; }; /** @internal */ export const GetCategoryResponseBody$outboundSchema: z.ZodType< - GetCategoryResponseBody$Outbound, - z.ZodTypeDef, - GetCategoryResponseBody + GetCategoryResponseBody$Outbound, + z.ZodTypeDef, + GetCategoryResponseBody > = z.object({ - category: z.lazy(() => GetCategoryCategory$outboundSchema), + category: z.lazy(() => GetCategoryCategory$outboundSchema), }); /** @@ -582,10 +580,10 @@ export const GetCategoryResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCategoryResponseBody$ { - /** @deprecated use `GetCategoryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetCategoryResponseBody$inboundSchema; - /** @deprecated use `GetCategoryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetCategoryResponseBody$outboundSchema; - /** @deprecated use `GetCategoryResponseBody$Outbound` instead. */ - export type Outbound = GetCategoryResponseBody$Outbound; + /** @deprecated use `GetCategoryResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetCategoryResponseBody$inboundSchema; + /** @deprecated use `GetCategoryResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetCategoryResponseBody$outboundSchema; + /** @deprecated use `GetCategoryResponseBody$Outbound` instead. */ + export type Outbound = GetCategoryResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getgroup.ts b/src/sdk/models/operations/getgroup.ts index a76a56a..1677486 100644 --- a/src/sdk/models/operations/getgroup.ts +++ b/src/sdk/models/operations/getgroup.ts @@ -2,18 +2,18 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetGroupRequest = { - /** - * Use group name instead of id - */ - id: string; + /** + * Use group name instead of id + */ + id: string; }; export type Extras = { - visibleGroupNames: Array; + visibleGroupNames: Array; }; export type ImapUpdatedBy = {}; @@ -21,101 +21,104 @@ export type ImapUpdatedBy = {}; export type SmtpUpdatedBy = {}; export type GetGroupGroup = { - allowMembershipRequests: boolean; - allowUnknownSenderTopicReplies: boolean; - associatedGroupIds?: Array | undefined; - automatic: boolean; - automaticMembershipEmailDomains: string | null; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canEditGroup?: boolean | undefined; - canSeeMembers: boolean; - defaultNotificationLevel: number; - emailFromAlias?: string | null | undefined; - emailPassword: string | null; - emailUsername: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - imapEnabled?: boolean | undefined; - imapLastError: string | null; - imapMailboxName: string; - imapMailboxes: Array; - imapNewEmails: string | null; - imapOldEmails: string | null; - imapPort: string | null; - imapServer: string | null; - imapSsl: string | null; - imapUpdatedAt?: string | null | undefined; - imapUpdatedBy?: ImapUpdatedBy | null | undefined; - incomingEmail: string | null; - isGroupOwnerDisplay: boolean; - isGroupUser: boolean; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionable: boolean; - mentionableLevel: number; - messageCount: number; - messageable: boolean; - messageableLevel: number; - mutedCategoryIds: Array; - mutedTags?: Array | undefined; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - regularCategoryIds: Array; - regularTags?: Array | undefined; - smtpEnabled?: boolean | undefined; - smtpPort: string | null; - smtpServer: string | null; - smtpSsl: string | null; - smtpUpdatedAt?: string | null | undefined; - smtpUpdatedBy?: SmtpUpdatedBy | null | undefined; - title: string | null; - trackingCategoryIds: Array; - trackingTags?: Array | undefined; - userCount: number; - visibilityLevel: number; - watchingCategoryIds: Array; - watchingFirstPostCategoryIds: Array; - watchingFirstPostTags?: Array | undefined; - watchingTags?: Array | undefined; + allowMembershipRequests: boolean; + allowUnknownSenderTopicReplies: boolean; + associatedGroupIds?: Array | undefined; + automatic: boolean; + automaticMembershipEmailDomains: string | null; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canEditGroup?: boolean | undefined; + canSeeMembers: boolean; + defaultNotificationLevel: number; + emailFromAlias?: string | null | undefined; + emailPassword: string | null; + emailUsername: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + imapEnabled?: boolean | undefined; + imapLastError: string | null; + imapMailboxName: string; + imapMailboxes: Array; + imapNewEmails: string | null; + imapOldEmails: string | null; + imapPort: string | null; + imapServer: string | null; + imapSsl: string | null; + imapUpdatedAt?: string | null | undefined; + imapUpdatedBy?: ImapUpdatedBy | null | undefined; + incomingEmail: string | null; + isGroupOwnerDisplay: boolean; + isGroupUser: boolean; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionable: boolean; + mentionableLevel: number; + messageCount: number; + messageable: boolean; + messageableLevel: number; + mutedCategoryIds: Array; + mutedTags?: Array | undefined; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + regularCategoryIds: Array; + regularTags?: Array | undefined; + smtpEnabled?: boolean | undefined; + smtpPort: string | null; + smtpServer: string | null; + smtpSsl: string | null; + smtpUpdatedAt?: string | null | undefined; + smtpUpdatedBy?: SmtpUpdatedBy | null | undefined; + title: string | null; + trackingCategoryIds: Array; + trackingTags?: Array | undefined; + userCount: number; + visibilityLevel: number; + watchingCategoryIds: Array; + watchingFirstPostCategoryIds: Array; + watchingFirstPostTags?: Array | undefined; + watchingTags?: Array | undefined; }; /** * success response */ export type GetGroupResponseBody = { - extras: Extras; - group: GetGroupGroup; + extras: Extras; + group: GetGroupGroup; }; /** @internal */ -export const GetGroupRequest$inboundSchema: z.ZodType = - z.object({ - id: z.string(), - }); +export const GetGroupRequest$inboundSchema: z.ZodType< + GetGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); /** @internal */ export type GetGroupRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetGroupRequest$outboundSchema: z.ZodType< - GetGroupRequest$Outbound, - z.ZodTypeDef, - GetGroupRequest + GetGroupRequest$Outbound, + z.ZodTypeDef, + GetGroupRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -123,66 +126,70 @@ export const GetGroupRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupRequest$ { - /** @deprecated use `GetGroupRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupRequest$inboundSchema; - /** @deprecated use `GetGroupRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupRequest$outboundSchema; - /** @deprecated use `GetGroupRequest$Outbound` instead. */ - export type Outbound = GetGroupRequest$Outbound; + /** @deprecated use `GetGroupRequest$inboundSchema` instead. */ + export const inboundSchema = GetGroupRequest$inboundSchema; + /** @deprecated use `GetGroupRequest$outboundSchema` instead. */ + export const outboundSchema = GetGroupRequest$outboundSchema; + /** @deprecated use `GetGroupRequest$Outbound` instead. */ + export type Outbound = GetGroupRequest$Outbound; } /** @internal */ export const Extras$inboundSchema: z.ZodType = z - .object({ - visible_group_names: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - visible_group_names: "visibleGroupNames", - }); + .object({ + visible_group_names: z.array(z.any()), + }).transform((v) => { + return remap$(v, { + "visible_group_names": "visibleGroupNames", }); + }); /** @internal */ export type Extras$Outbound = { - visible_group_names: Array; + visible_group_names: Array; }; /** @internal */ -export const Extras$outboundSchema: z.ZodType = z - .object({ - visibleGroupNames: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - visibleGroupNames: "visible_group_names", - }); - }); +export const Extras$outboundSchema: z.ZodType< + Extras$Outbound, + z.ZodTypeDef, + Extras +> = z.object({ + visibleGroupNames: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + visibleGroupNames: "visible_group_names", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Extras$ { - /** @deprecated use `Extras$inboundSchema` instead. */ - export const inboundSchema = Extras$inboundSchema; - /** @deprecated use `Extras$outboundSchema` instead. */ - export const outboundSchema = Extras$outboundSchema; - /** @deprecated use `Extras$Outbound` instead. */ - export type Outbound = Extras$Outbound; + /** @deprecated use `Extras$inboundSchema` instead. */ + export const inboundSchema = Extras$inboundSchema; + /** @deprecated use `Extras$outboundSchema` instead. */ + export const outboundSchema = Extras$outboundSchema; + /** @deprecated use `Extras$Outbound` instead. */ + export type Outbound = Extras$Outbound; } /** @internal */ -export const ImapUpdatedBy$inboundSchema: z.ZodType = - z.object({}); +export const ImapUpdatedBy$inboundSchema: z.ZodType< + ImapUpdatedBy, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type ImapUpdatedBy$Outbound = {}; /** @internal */ export const ImapUpdatedBy$outboundSchema: z.ZodType< - ImapUpdatedBy$Outbound, - z.ZodTypeDef, - ImapUpdatedBy + ImapUpdatedBy$Outbound, + z.ZodTypeDef, + ImapUpdatedBy > = z.object({}); /** @@ -190,26 +197,29 @@ export const ImapUpdatedBy$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ImapUpdatedBy$ { - /** @deprecated use `ImapUpdatedBy$inboundSchema` instead. */ - export const inboundSchema = ImapUpdatedBy$inboundSchema; - /** @deprecated use `ImapUpdatedBy$outboundSchema` instead. */ - export const outboundSchema = ImapUpdatedBy$outboundSchema; - /** @deprecated use `ImapUpdatedBy$Outbound` instead. */ - export type Outbound = ImapUpdatedBy$Outbound; + /** @deprecated use `ImapUpdatedBy$inboundSchema` instead. */ + export const inboundSchema = ImapUpdatedBy$inboundSchema; + /** @deprecated use `ImapUpdatedBy$outboundSchema` instead. */ + export const outboundSchema = ImapUpdatedBy$outboundSchema; + /** @deprecated use `ImapUpdatedBy$Outbound` instead. */ + export type Outbound = ImapUpdatedBy$Outbound; } /** @internal */ -export const SmtpUpdatedBy$inboundSchema: z.ZodType = - z.object({}); +export const SmtpUpdatedBy$inboundSchema: z.ZodType< + SmtpUpdatedBy, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type SmtpUpdatedBy$Outbound = {}; /** @internal */ export const SmtpUpdatedBy$outboundSchema: z.ZodType< - SmtpUpdatedBy$Outbound, - z.ZodTypeDef, - SmtpUpdatedBy + SmtpUpdatedBy$Outbound, + z.ZodTypeDef, + SmtpUpdatedBy > = z.object({}); /** @@ -217,400 +227,404 @@ export const SmtpUpdatedBy$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SmtpUpdatedBy$ { - /** @deprecated use `SmtpUpdatedBy$inboundSchema` instead. */ - export const inboundSchema = SmtpUpdatedBy$inboundSchema; - /** @deprecated use `SmtpUpdatedBy$outboundSchema` instead. */ - export const outboundSchema = SmtpUpdatedBy$outboundSchema; - /** @deprecated use `SmtpUpdatedBy$Outbound` instead. */ - export type Outbound = SmtpUpdatedBy$Outbound; + /** @deprecated use `SmtpUpdatedBy$inboundSchema` instead. */ + export const inboundSchema = SmtpUpdatedBy$inboundSchema; + /** @deprecated use `SmtpUpdatedBy$outboundSchema` instead. */ + export const outboundSchema = SmtpUpdatedBy$outboundSchema; + /** @deprecated use `SmtpUpdatedBy$Outbound` instead. */ + export type Outbound = SmtpUpdatedBy$Outbound; } /** @internal */ -export const GetGroupGroup$inboundSchema: z.ZodType = z - .object({ - allow_membership_requests: z.boolean(), - allow_unknown_sender_topic_replies: z.boolean(), - associated_group_ids: z.array(z.any()).optional(), - automatic: z.boolean(), - automatic_membership_email_domains: z.nullable(z.string()), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_edit_group: z.boolean().optional(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - email_from_alias: z.nullable(z.string()).optional(), - email_password: z.nullable(z.string()), - email_username: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - imap_enabled: z.boolean().optional(), - imap_last_error: z.nullable(z.string()), - imap_mailbox_name: z.string(), - imap_mailboxes: z.array(z.any()), - imap_new_emails: z.nullable(z.string()), - imap_old_emails: z.nullable(z.string()), - imap_port: z.nullable(z.string()), - imap_server: z.nullable(z.string()), - imap_ssl: z.nullable(z.string()), - imap_updated_at: z.nullable(z.string()).optional(), - imap_updated_by: z.nullable(z.lazy(() => ImapUpdatedBy$inboundSchema)).optional(), - incoming_email: z.nullable(z.string()), - is_group_owner_display: z.boolean(), - is_group_user: z.boolean(), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable: z.boolean(), - mentionable_level: z.number().int(), - message_count: z.number().int(), - messageable: z.boolean(), - messageable_level: z.number().int(), - muted_category_ids: z.array(z.any()), - muted_tags: z.array(z.any()).optional(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - regular_category_ids: z.array(z.any()), - regular_tags: z.array(z.any()).optional(), - smtp_enabled: z.boolean().optional(), - smtp_port: z.nullable(z.string()), - smtp_server: z.nullable(z.string()), - smtp_ssl: z.nullable(z.string()), - smtp_updated_at: z.nullable(z.string()).optional(), - smtp_updated_by: z.nullable(z.lazy(() => SmtpUpdatedBy$inboundSchema)).optional(), - title: z.nullable(z.string()), - tracking_category_ids: z.array(z.any()), - tracking_tags: z.array(z.any()).optional(), - user_count: z.number().int(), - visibility_level: z.number().int(), - watching_category_ids: z.array(z.any()), - watching_first_post_category_ids: z.array(z.any()), - watching_first_post_tags: z.array(z.any()).optional(), - watching_tags: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - allow_unknown_sender_topic_replies: "allowUnknownSenderTopicReplies", - associated_group_ids: "associatedGroupIds", - automatic_membership_email_domains: "automaticMembershipEmailDomains", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_edit_group: "canEditGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - email_from_alias: "emailFromAlias", - email_password: "emailPassword", - email_username: "emailUsername", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - imap_enabled: "imapEnabled", - imap_last_error: "imapLastError", - imap_mailbox_name: "imapMailboxName", - imap_mailboxes: "imapMailboxes", - imap_new_emails: "imapNewEmails", - imap_old_emails: "imapOldEmails", - imap_port: "imapPort", - imap_server: "imapServer", - imap_ssl: "imapSsl", - imap_updated_at: "imapUpdatedAt", - imap_updated_by: "imapUpdatedBy", - incoming_email: "incomingEmail", - is_group_owner_display: "isGroupOwnerDisplay", - is_group_user: "isGroupUser", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - message_count: "messageCount", - messageable_level: "messageableLevel", - muted_category_ids: "mutedCategoryIds", - muted_tags: "mutedTags", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - regular_category_ids: "regularCategoryIds", - regular_tags: "regularTags", - smtp_enabled: "smtpEnabled", - smtp_port: "smtpPort", - smtp_server: "smtpServer", - smtp_ssl: "smtpSsl", - smtp_updated_at: "smtpUpdatedAt", - smtp_updated_by: "smtpUpdatedBy", - tracking_category_ids: "trackingCategoryIds", - tracking_tags: "trackingTags", - user_count: "userCount", - visibility_level: "visibilityLevel", - watching_category_ids: "watchingCategoryIds", - watching_first_post_category_ids: "watchingFirstPostCategoryIds", - watching_first_post_tags: "watchingFirstPostTags", - watching_tags: "watchingTags", - }); - }); +export const GetGroupGroup$inboundSchema: z.ZodType< + GetGroupGroup, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + allow_unknown_sender_topic_replies: z.boolean(), + associated_group_ids: z.array(z.any()).optional(), + automatic: z.boolean(), + automatic_membership_email_domains: z.nullable(z.string()), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_edit_group: z.boolean().optional(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + email_from_alias: z.nullable(z.string()).optional(), + email_password: z.nullable(z.string()), + email_username: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + imap_enabled: z.boolean().optional(), + imap_last_error: z.nullable(z.string()), + imap_mailbox_name: z.string(), + imap_mailboxes: z.array(z.any()), + imap_new_emails: z.nullable(z.string()), + imap_old_emails: z.nullable(z.string()), + imap_port: z.nullable(z.string()), + imap_server: z.nullable(z.string()), + imap_ssl: z.nullable(z.string()), + imap_updated_at: z.nullable(z.string()).optional(), + imap_updated_by: z.nullable(z.lazy(() => ImapUpdatedBy$inboundSchema)) + .optional(), + incoming_email: z.nullable(z.string()), + is_group_owner_display: z.boolean(), + is_group_user: z.boolean(), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable: z.boolean(), + mentionable_level: z.number().int(), + message_count: z.number().int(), + messageable: z.boolean(), + messageable_level: z.number().int(), + muted_category_ids: z.array(z.any()), + muted_tags: z.array(z.any()).optional(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + regular_category_ids: z.array(z.any()), + regular_tags: z.array(z.any()).optional(), + smtp_enabled: z.boolean().optional(), + smtp_port: z.nullable(z.string()), + smtp_server: z.nullable(z.string()), + smtp_ssl: z.nullable(z.string()), + smtp_updated_at: z.nullable(z.string()).optional(), + smtp_updated_by: z.nullable(z.lazy(() => SmtpUpdatedBy$inboundSchema)) + .optional(), + title: z.nullable(z.string()), + tracking_category_ids: z.array(z.any()), + tracking_tags: z.array(z.any()).optional(), + user_count: z.number().int(), + visibility_level: z.number().int(), + watching_category_ids: z.array(z.any()), + watching_first_post_category_ids: z.array(z.any()), + watching_first_post_tags: z.array(z.any()).optional(), + watching_tags: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "allow_unknown_sender_topic_replies": "allowUnknownSenderTopicReplies", + "associated_group_ids": "associatedGroupIds", + "automatic_membership_email_domains": "automaticMembershipEmailDomains", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_edit_group": "canEditGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "email_from_alias": "emailFromAlias", + "email_password": "emailPassword", + "email_username": "emailUsername", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "imap_enabled": "imapEnabled", + "imap_last_error": "imapLastError", + "imap_mailbox_name": "imapMailboxName", + "imap_mailboxes": "imapMailboxes", + "imap_new_emails": "imapNewEmails", + "imap_old_emails": "imapOldEmails", + "imap_port": "imapPort", + "imap_server": "imapServer", + "imap_ssl": "imapSsl", + "imap_updated_at": "imapUpdatedAt", + "imap_updated_by": "imapUpdatedBy", + "incoming_email": "incomingEmail", + "is_group_owner_display": "isGroupOwnerDisplay", + "is_group_user": "isGroupUser", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "message_count": "messageCount", + "messageable_level": "messageableLevel", + "muted_category_ids": "mutedCategoryIds", + "muted_tags": "mutedTags", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "regular_category_ids": "regularCategoryIds", + "regular_tags": "regularTags", + "smtp_enabled": "smtpEnabled", + "smtp_port": "smtpPort", + "smtp_server": "smtpServer", + "smtp_ssl": "smtpSsl", + "smtp_updated_at": "smtpUpdatedAt", + "smtp_updated_by": "smtpUpdatedBy", + "tracking_category_ids": "trackingCategoryIds", + "tracking_tags": "trackingTags", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + "watching_category_ids": "watchingCategoryIds", + "watching_first_post_category_ids": "watchingFirstPostCategoryIds", + "watching_first_post_tags": "watchingFirstPostTags", + "watching_tags": "watchingTags", + }); +}); /** @internal */ export type GetGroupGroup$Outbound = { - allow_membership_requests: boolean; - allow_unknown_sender_topic_replies: boolean; - associated_group_ids?: Array | undefined; - automatic: boolean; - automatic_membership_email_domains: string | null; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_edit_group?: boolean | undefined; - can_see_members: boolean; - default_notification_level: number; - email_from_alias?: string | null | undefined; - email_password: string | null; - email_username: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - imap_enabled?: boolean | undefined; - imap_last_error: string | null; - imap_mailbox_name: string; - imap_mailboxes: Array; - imap_new_emails: string | null; - imap_old_emails: string | null; - imap_port: string | null; - imap_server: string | null; - imap_ssl: string | null; - imap_updated_at?: string | null | undefined; - imap_updated_by?: ImapUpdatedBy$Outbound | null | undefined; - incoming_email: string | null; - is_group_owner_display: boolean; - is_group_user: boolean; - members_visibility_level: number; - membership_request_template: string | null; - mentionable: boolean; - mentionable_level: number; - message_count: number; - messageable: boolean; - messageable_level: number; - muted_category_ids: Array; - muted_tags?: Array | undefined; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - regular_category_ids: Array; - regular_tags?: Array | undefined; - smtp_enabled?: boolean | undefined; - smtp_port: string | null; - smtp_server: string | null; - smtp_ssl: string | null; - smtp_updated_at?: string | null | undefined; - smtp_updated_by?: SmtpUpdatedBy$Outbound | null | undefined; - title: string | null; - tracking_category_ids: Array; - tracking_tags?: Array | undefined; - user_count: number; - visibility_level: number; - watching_category_ids: Array; - watching_first_post_category_ids: Array; - watching_first_post_tags?: Array | undefined; - watching_tags?: Array | undefined; + allow_membership_requests: boolean; + allow_unknown_sender_topic_replies: boolean; + associated_group_ids?: Array | undefined; + automatic: boolean; + automatic_membership_email_domains: string | null; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_edit_group?: boolean | undefined; + can_see_members: boolean; + default_notification_level: number; + email_from_alias?: string | null | undefined; + email_password: string | null; + email_username: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + imap_enabled?: boolean | undefined; + imap_last_error: string | null; + imap_mailbox_name: string; + imap_mailboxes: Array; + imap_new_emails: string | null; + imap_old_emails: string | null; + imap_port: string | null; + imap_server: string | null; + imap_ssl: string | null; + imap_updated_at?: string | null | undefined; + imap_updated_by?: ImapUpdatedBy$Outbound | null | undefined; + incoming_email: string | null; + is_group_owner_display: boolean; + is_group_user: boolean; + members_visibility_level: number; + membership_request_template: string | null; + mentionable: boolean; + mentionable_level: number; + message_count: number; + messageable: boolean; + messageable_level: number; + muted_category_ids: Array; + muted_tags?: Array | undefined; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + regular_category_ids: Array; + regular_tags?: Array | undefined; + smtp_enabled?: boolean | undefined; + smtp_port: string | null; + smtp_server: string | null; + smtp_ssl: string | null; + smtp_updated_at?: string | null | undefined; + smtp_updated_by?: SmtpUpdatedBy$Outbound | null | undefined; + title: string | null; + tracking_category_ids: Array; + tracking_tags?: Array | undefined; + user_count: number; + visibility_level: number; + watching_category_ids: Array; + watching_first_post_category_ids: Array; + watching_first_post_tags?: Array | undefined; + watching_tags?: Array | undefined; }; /** @internal */ export const GetGroupGroup$outboundSchema: z.ZodType< - GetGroupGroup$Outbound, - z.ZodTypeDef, - GetGroupGroup -> = z - .object({ - allowMembershipRequests: z.boolean(), - allowUnknownSenderTopicReplies: z.boolean(), - associatedGroupIds: z.array(z.any()).optional(), - automatic: z.boolean(), - automaticMembershipEmailDomains: z.nullable(z.string()), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canEditGroup: z.boolean().optional(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - emailFromAlias: z.nullable(z.string()).optional(), - emailPassword: z.nullable(z.string()), - emailUsername: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - imapEnabled: z.boolean().optional(), - imapLastError: z.nullable(z.string()), - imapMailboxName: z.string(), - imapMailboxes: z.array(z.any()), - imapNewEmails: z.nullable(z.string()), - imapOldEmails: z.nullable(z.string()), - imapPort: z.nullable(z.string()), - imapServer: z.nullable(z.string()), - imapSsl: z.nullable(z.string()), - imapUpdatedAt: z.nullable(z.string()).optional(), - imapUpdatedBy: z.nullable(z.lazy(() => ImapUpdatedBy$outboundSchema)).optional(), - incomingEmail: z.nullable(z.string()), - isGroupOwnerDisplay: z.boolean(), - isGroupUser: z.boolean(), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionable: z.boolean(), - mentionableLevel: z.number().int(), - messageCount: z.number().int(), - messageable: z.boolean(), - messageableLevel: z.number().int(), - mutedCategoryIds: z.array(z.any()), - mutedTags: z.array(z.any()).optional(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - regularCategoryIds: z.array(z.any()), - regularTags: z.array(z.any()).optional(), - smtpEnabled: z.boolean().optional(), - smtpPort: z.nullable(z.string()), - smtpServer: z.nullable(z.string()), - smtpSsl: z.nullable(z.string()), - smtpUpdatedAt: z.nullable(z.string()).optional(), - smtpUpdatedBy: z.nullable(z.lazy(() => SmtpUpdatedBy$outboundSchema)).optional(), - title: z.nullable(z.string()), - trackingCategoryIds: z.array(z.any()), - trackingTags: z.array(z.any()).optional(), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - watchingCategoryIds: z.array(z.any()), - watchingFirstPostCategoryIds: z.array(z.any()), - watchingFirstPostTags: z.array(z.any()).optional(), - watchingTags: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - allowUnknownSenderTopicReplies: "allow_unknown_sender_topic_replies", - associatedGroupIds: "associated_group_ids", - automaticMembershipEmailDomains: "automatic_membership_email_domains", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canEditGroup: "can_edit_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - emailFromAlias: "email_from_alias", - emailPassword: "email_password", - emailUsername: "email_username", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - imapEnabled: "imap_enabled", - imapLastError: "imap_last_error", - imapMailboxName: "imap_mailbox_name", - imapMailboxes: "imap_mailboxes", - imapNewEmails: "imap_new_emails", - imapOldEmails: "imap_old_emails", - imapPort: "imap_port", - imapServer: "imap_server", - imapSsl: "imap_ssl", - imapUpdatedAt: "imap_updated_at", - imapUpdatedBy: "imap_updated_by", - incomingEmail: "incoming_email", - isGroupOwnerDisplay: "is_group_owner_display", - isGroupUser: "is_group_user", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageCount: "message_count", - messageableLevel: "messageable_level", - mutedCategoryIds: "muted_category_ids", - mutedTags: "muted_tags", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - regularCategoryIds: "regular_category_ids", - regularTags: "regular_tags", - smtpEnabled: "smtp_enabled", - smtpPort: "smtp_port", - smtpServer: "smtp_server", - smtpSsl: "smtp_ssl", - smtpUpdatedAt: "smtp_updated_at", - smtpUpdatedBy: "smtp_updated_by", - trackingCategoryIds: "tracking_category_ids", - trackingTags: "tracking_tags", - userCount: "user_count", - visibilityLevel: "visibility_level", - watchingCategoryIds: "watching_category_ids", - watchingFirstPostCategoryIds: "watching_first_post_category_ids", - watchingFirstPostTags: "watching_first_post_tags", - watchingTags: "watching_tags", - }); - }); + GetGroupGroup$Outbound, + z.ZodTypeDef, + GetGroupGroup +> = z.object({ + allowMembershipRequests: z.boolean(), + allowUnknownSenderTopicReplies: z.boolean(), + associatedGroupIds: z.array(z.any()).optional(), + automatic: z.boolean(), + automaticMembershipEmailDomains: z.nullable(z.string()), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canEditGroup: z.boolean().optional(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + emailFromAlias: z.nullable(z.string()).optional(), + emailPassword: z.nullable(z.string()), + emailUsername: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + imapEnabled: z.boolean().optional(), + imapLastError: z.nullable(z.string()), + imapMailboxName: z.string(), + imapMailboxes: z.array(z.any()), + imapNewEmails: z.nullable(z.string()), + imapOldEmails: z.nullable(z.string()), + imapPort: z.nullable(z.string()), + imapServer: z.nullable(z.string()), + imapSsl: z.nullable(z.string()), + imapUpdatedAt: z.nullable(z.string()).optional(), + imapUpdatedBy: z.nullable(z.lazy(() => ImapUpdatedBy$outboundSchema)) + .optional(), + incomingEmail: z.nullable(z.string()), + isGroupOwnerDisplay: z.boolean(), + isGroupUser: z.boolean(), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionable: z.boolean(), + mentionableLevel: z.number().int(), + messageCount: z.number().int(), + messageable: z.boolean(), + messageableLevel: z.number().int(), + mutedCategoryIds: z.array(z.any()), + mutedTags: z.array(z.any()).optional(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + regularCategoryIds: z.array(z.any()), + regularTags: z.array(z.any()).optional(), + smtpEnabled: z.boolean().optional(), + smtpPort: z.nullable(z.string()), + smtpServer: z.nullable(z.string()), + smtpSsl: z.nullable(z.string()), + smtpUpdatedAt: z.nullable(z.string()).optional(), + smtpUpdatedBy: z.nullable(z.lazy(() => SmtpUpdatedBy$outboundSchema)) + .optional(), + title: z.nullable(z.string()), + trackingCategoryIds: z.array(z.any()), + trackingTags: z.array(z.any()).optional(), + userCount: z.number().int(), + visibilityLevel: z.number().int(), + watchingCategoryIds: z.array(z.any()), + watchingFirstPostCategoryIds: z.array(z.any()), + watchingFirstPostTags: z.array(z.any()).optional(), + watchingTags: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + allowUnknownSenderTopicReplies: "allow_unknown_sender_topic_replies", + associatedGroupIds: "associated_group_ids", + automaticMembershipEmailDomains: "automatic_membership_email_domains", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canEditGroup: "can_edit_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + emailFromAlias: "email_from_alias", + emailPassword: "email_password", + emailUsername: "email_username", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + imapEnabled: "imap_enabled", + imapLastError: "imap_last_error", + imapMailboxName: "imap_mailbox_name", + imapMailboxes: "imap_mailboxes", + imapNewEmails: "imap_new_emails", + imapOldEmails: "imap_old_emails", + imapPort: "imap_port", + imapServer: "imap_server", + imapSsl: "imap_ssl", + imapUpdatedAt: "imap_updated_at", + imapUpdatedBy: "imap_updated_by", + incomingEmail: "incoming_email", + isGroupOwnerDisplay: "is_group_owner_display", + isGroupUser: "is_group_user", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageCount: "message_count", + messageableLevel: "messageable_level", + mutedCategoryIds: "muted_category_ids", + mutedTags: "muted_tags", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + regularCategoryIds: "regular_category_ids", + regularTags: "regular_tags", + smtpEnabled: "smtp_enabled", + smtpPort: "smtp_port", + smtpServer: "smtp_server", + smtpSsl: "smtp_ssl", + smtpUpdatedAt: "smtp_updated_at", + smtpUpdatedBy: "smtp_updated_by", + trackingCategoryIds: "tracking_category_ids", + trackingTags: "tracking_tags", + userCount: "user_count", + visibilityLevel: "visibility_level", + watchingCategoryIds: "watching_category_ids", + watchingFirstPostCategoryIds: "watching_first_post_category_ids", + watchingFirstPostTags: "watching_first_post_tags", + watchingTags: "watching_tags", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupGroup$ { - /** @deprecated use `GetGroupGroup$inboundSchema` instead. */ - export const inboundSchema = GetGroupGroup$inboundSchema; - /** @deprecated use `GetGroupGroup$outboundSchema` instead. */ - export const outboundSchema = GetGroupGroup$outboundSchema; - /** @deprecated use `GetGroupGroup$Outbound` instead. */ - export type Outbound = GetGroupGroup$Outbound; + /** @deprecated use `GetGroupGroup$inboundSchema` instead. */ + export const inboundSchema = GetGroupGroup$inboundSchema; + /** @deprecated use `GetGroupGroup$outboundSchema` instead. */ + export const outboundSchema = GetGroupGroup$outboundSchema; + /** @deprecated use `GetGroupGroup$Outbound` instead. */ + export type Outbound = GetGroupGroup$Outbound; } /** @internal */ export const GetGroupResponseBody$inboundSchema: z.ZodType< - GetGroupResponseBody, - z.ZodTypeDef, - unknown + GetGroupResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - extras: z.lazy(() => Extras$inboundSchema), - group: z.lazy(() => GetGroupGroup$inboundSchema), + extras: z.lazy(() => Extras$inboundSchema), + group: z.lazy(() => GetGroupGroup$inboundSchema), }); /** @internal */ export type GetGroupResponseBody$Outbound = { - extras: Extras$Outbound; - group: GetGroupGroup$Outbound; + extras: Extras$Outbound; + group: GetGroupGroup$Outbound; }; /** @internal */ export const GetGroupResponseBody$outboundSchema: z.ZodType< - GetGroupResponseBody$Outbound, - z.ZodTypeDef, - GetGroupResponseBody + GetGroupResponseBody$Outbound, + z.ZodTypeDef, + GetGroupResponseBody > = z.object({ - extras: z.lazy(() => Extras$outboundSchema), - group: z.lazy(() => GetGroupGroup$outboundSchema), + extras: z.lazy(() => Extras$outboundSchema), + group: z.lazy(() => GetGroupGroup$outboundSchema), }); /** @@ -618,10 +632,10 @@ export const GetGroupResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupResponseBody$ { - /** @deprecated use `GetGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGroupResponseBody$inboundSchema; - /** @deprecated use `GetGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGroupResponseBody$outboundSchema; - /** @deprecated use `GetGroupResponseBody$Outbound` instead. */ - export type Outbound = GetGroupResponseBody$Outbound; + /** @deprecated use `GetGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetGroupResponseBody$inboundSchema; + /** @deprecated use `GetGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetGroupResponseBody$outboundSchema; + /** @deprecated use `GetGroupResponseBody$Outbound` instead. */ + export type Outbound = GetGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getnotifications.ts b/src/sdk/models/operations/getnotifications.ts index 32d9953..40f11b4 100644 --- a/src/sdk/models/operations/getnotifications.ts +++ b/src/sdk/models/operations/getnotifications.ts @@ -2,230 +2,224 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Data = { - badgeId?: number | undefined; - badgeName?: string | undefined; - badgeSlug?: string | undefined; - badgeTitle?: boolean | undefined; - username?: string | undefined; + badgeId?: number | undefined; + badgeName?: string | undefined; + badgeSlug?: string | undefined; + badgeTitle?: boolean | undefined; + username?: string | undefined; }; export type Notifications = { - createdAt?: string | undefined; - data?: Data | undefined; - id?: number | undefined; - notificationType?: number | undefined; - postNumber?: string | null | undefined; - read?: boolean | undefined; - slug?: string | null | undefined; - topicId?: number | null | undefined; - userId?: number | undefined; + createdAt?: string | undefined; + data?: Data | undefined; + id?: number | undefined; + notificationType?: number | undefined; + postNumber?: string | null | undefined; + read?: boolean | undefined; + slug?: string | null | undefined; + topicId?: number | null | undefined; + userId?: number | undefined; }; /** * notifications */ export type GetNotificationsResponseBody = { - loadMoreNotifications?: string | undefined; - notifications?: Array | undefined; - seenNotificationId?: number | undefined; - totalRowsNotifications?: number | undefined; + loadMoreNotifications?: string | undefined; + notifications?: Array | undefined; + seenNotificationId?: number | undefined; + totalRowsNotifications?: number | undefined; }; /** @internal */ export const Data$inboundSchema: z.ZodType = z - .object({ - badge_id: z.number().int().optional(), - badge_name: z.string().optional(), - badge_slug: z.string().optional(), - badge_title: z.boolean().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - badge_id: "badgeId", - badge_name: "badgeName", - badge_slug: "badgeSlug", - badge_title: "badgeTitle", - }); + .object({ + badge_id: z.number().int().optional(), + badge_name: z.string().optional(), + badge_slug: z.string().optional(), + badge_title: z.boolean().optional(), + username: z.string().optional(), + }).transform((v) => { + return remap$(v, { + "badge_id": "badgeId", + "badge_name": "badgeName", + "badge_slug": "badgeSlug", + "badge_title": "badgeTitle", }); + }); /** @internal */ export type Data$Outbound = { - badge_id?: number | undefined; - badge_name?: string | undefined; - badge_slug?: string | undefined; - badge_title?: boolean | undefined; - username?: string | undefined; + badge_id?: number | undefined; + badge_name?: string | undefined; + badge_slug?: string | undefined; + badge_title?: boolean | undefined; + username?: string | undefined; }; /** @internal */ -export const Data$outboundSchema: z.ZodType = z - .object({ - badgeId: z.number().int().optional(), - badgeName: z.string().optional(), - badgeSlug: z.string().optional(), - badgeTitle: z.boolean().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - badgeId: "badge_id", - badgeName: "badge_name", - badgeSlug: "badge_slug", - badgeTitle: "badge_title", - }); +export const Data$outboundSchema: z.ZodType = + z.object({ + badgeId: z.number().int().optional(), + badgeName: z.string().optional(), + badgeSlug: z.string().optional(), + badgeTitle: z.boolean().optional(), + username: z.string().optional(), + }).transform((v) => { + return remap$(v, { + badgeId: "badge_id", + badgeName: "badge_name", + badgeSlug: "badge_slug", + badgeTitle: "badge_title", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Data$ { - /** @deprecated use `Data$inboundSchema` instead. */ - export const inboundSchema = Data$inboundSchema; - /** @deprecated use `Data$outboundSchema` instead. */ - export const outboundSchema = Data$outboundSchema; - /** @deprecated use `Data$Outbound` instead. */ - export type Outbound = Data$Outbound; + /** @deprecated use `Data$inboundSchema` instead. */ + export const inboundSchema = Data$inboundSchema; + /** @deprecated use `Data$outboundSchema` instead. */ + export const outboundSchema = Data$outboundSchema; + /** @deprecated use `Data$Outbound` instead. */ + export type Outbound = Data$Outbound; } /** @internal */ -export const Notifications$inboundSchema: z.ZodType = z - .object({ - created_at: z.string().optional(), - data: z.lazy(() => Data$inboundSchema).optional(), - id: z.number().int().optional(), - notification_type: z.number().int().optional(), - post_number: z.nullable(z.string()).optional(), - read: z.boolean().optional(), - slug: z.nullable(z.string()).optional(), - topic_id: z.nullable(z.number().int()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - created_at: "createdAt", - notification_type: "notificationType", - post_number: "postNumber", - topic_id: "topicId", - user_id: "userId", - }); - }); +export const Notifications$inboundSchema: z.ZodType< + Notifications, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().optional(), + data: z.lazy(() => Data$inboundSchema).optional(), + id: z.number().int().optional(), + notification_type: z.number().int().optional(), + post_number: z.nullable(z.string()).optional(), + read: z.boolean().optional(), + slug: z.nullable(z.string()).optional(), + topic_id: z.nullable(z.number().int()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "notification_type": "notificationType", + "post_number": "postNumber", + "topic_id": "topicId", + "user_id": "userId", + }); +}); /** @internal */ export type Notifications$Outbound = { - created_at?: string | undefined; - data?: Data$Outbound | undefined; - id?: number | undefined; - notification_type?: number | undefined; - post_number?: string | null | undefined; - read?: boolean | undefined; - slug?: string | null | undefined; - topic_id?: number | null | undefined; - user_id?: number | undefined; + created_at?: string | undefined; + data?: Data$Outbound | undefined; + id?: number | undefined; + notification_type?: number | undefined; + post_number?: string | null | undefined; + read?: boolean | undefined; + slug?: string | null | undefined; + topic_id?: number | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const Notifications$outboundSchema: z.ZodType< - Notifications$Outbound, - z.ZodTypeDef, - Notifications -> = z - .object({ - createdAt: z.string().optional(), - data: z.lazy(() => Data$outboundSchema).optional(), - id: z.number().int().optional(), - notificationType: z.number().int().optional(), - postNumber: z.nullable(z.string()).optional(), - read: z.boolean().optional(), - slug: z.nullable(z.string()).optional(), - topicId: z.nullable(z.number().int()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - createdAt: "created_at", - notificationType: "notification_type", - postNumber: "post_number", - topicId: "topic_id", - userId: "user_id", - }); - }); + Notifications$Outbound, + z.ZodTypeDef, + Notifications +> = z.object({ + createdAt: z.string().optional(), + data: z.lazy(() => Data$outboundSchema).optional(), + id: z.number().int().optional(), + notificationType: z.number().int().optional(), + postNumber: z.nullable(z.string()).optional(), + read: z.boolean().optional(), + slug: z.nullable(z.string()).optional(), + topicId: z.nullable(z.number().int()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + notificationType: "notification_type", + postNumber: "post_number", + topicId: "topic_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Notifications$ { - /** @deprecated use `Notifications$inboundSchema` instead. */ - export const inboundSchema = Notifications$inboundSchema; - /** @deprecated use `Notifications$outboundSchema` instead. */ - export const outboundSchema = Notifications$outboundSchema; - /** @deprecated use `Notifications$Outbound` instead. */ - export type Outbound = Notifications$Outbound; + /** @deprecated use `Notifications$inboundSchema` instead. */ + export const inboundSchema = Notifications$inboundSchema; + /** @deprecated use `Notifications$outboundSchema` instead. */ + export const outboundSchema = Notifications$outboundSchema; + /** @deprecated use `Notifications$Outbound` instead. */ + export type Outbound = Notifications$Outbound; } /** @internal */ export const GetNotificationsResponseBody$inboundSchema: z.ZodType< - GetNotificationsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - load_more_notifications: z.string().optional(), - notifications: z.array(z.lazy(() => Notifications$inboundSchema)).optional(), - seen_notification_id: z.number().int().optional(), - total_rows_notifications: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - load_more_notifications: "loadMoreNotifications", - seen_notification_id: "seenNotificationId", - total_rows_notifications: "totalRowsNotifications", - }); - }); + GetNotificationsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + load_more_notifications: z.string().optional(), + notifications: z.array(z.lazy(() => Notifications$inboundSchema)).optional(), + seen_notification_id: z.number().int().optional(), + total_rows_notifications: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "load_more_notifications": "loadMoreNotifications", + "seen_notification_id": "seenNotificationId", + "total_rows_notifications": "totalRowsNotifications", + }); +}); /** @internal */ export type GetNotificationsResponseBody$Outbound = { - load_more_notifications?: string | undefined; - notifications?: Array | undefined; - seen_notification_id?: number | undefined; - total_rows_notifications?: number | undefined; + load_more_notifications?: string | undefined; + notifications?: Array | undefined; + seen_notification_id?: number | undefined; + total_rows_notifications?: number | undefined; }; /** @internal */ export const GetNotificationsResponseBody$outboundSchema: z.ZodType< - GetNotificationsResponseBody$Outbound, - z.ZodTypeDef, - GetNotificationsResponseBody -> = z - .object({ - loadMoreNotifications: z.string().optional(), - notifications: z.array(z.lazy(() => Notifications$outboundSchema)).optional(), - seenNotificationId: z.number().int().optional(), - totalRowsNotifications: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - loadMoreNotifications: "load_more_notifications", - seenNotificationId: "seen_notification_id", - totalRowsNotifications: "total_rows_notifications", - }); - }); + GetNotificationsResponseBody$Outbound, + z.ZodTypeDef, + GetNotificationsResponseBody +> = z.object({ + loadMoreNotifications: z.string().optional(), + notifications: z.array(z.lazy(() => Notifications$outboundSchema)).optional(), + seenNotificationId: z.number().int().optional(), + totalRowsNotifications: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + loadMoreNotifications: "load_more_notifications", + seenNotificationId: "seen_notification_id", + totalRowsNotifications: "total_rows_notifications", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNotificationsResponseBody$ { - /** @deprecated use `GetNotificationsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetNotificationsResponseBody$inboundSchema; - /** @deprecated use `GetNotificationsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetNotificationsResponseBody$outboundSchema; - /** @deprecated use `GetNotificationsResponseBody$Outbound` instead. */ - export type Outbound = GetNotificationsResponseBody$Outbound; + /** @deprecated use `GetNotificationsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetNotificationsResponseBody$inboundSchema; + /** @deprecated use `GetNotificationsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetNotificationsResponseBody$outboundSchema; + /** @deprecated use `GetNotificationsResponseBody$Outbound` instead. */ + export type Outbound = GetNotificationsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getpost.ts b/src/sdk/models/operations/getpost.ts index fb63fb9..9396652 100644 --- a/src/sdk/models/operations/getpost.ts +++ b/src/sdk/models/operations/getpost.ts @@ -2,101 +2,104 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../../lib/schemas.js"; -import * as z from "zod"; export type GetPostRequest = { - id: string; + id: string; }; export type ActionsSummary = { - acted?: boolean | undefined; - canAct?: boolean | undefined; - canUndo?: boolean | undefined; - count?: number | undefined; - /** - * `2`: like, `3`, `4`, `6`, `7`, `8`: flag - */ - id: number; + acted?: boolean | undefined; + canAct?: boolean | undefined; + canUndo?: boolean | undefined; + count?: number | undefined; + /** + * `2`: like, `3`, `4`, `6`, `7`, `8`: flag + */ + id: number; }; /** * single post */ export type GetPostResponseBody = { - actionsSummary: Array; - admin: boolean; - avatarTemplate: string; - bookmarked: boolean; - canDelete: boolean; - canEdit: boolean; - canRecover: boolean; - canSeeHiddenPost?: boolean | undefined; - canViewEditHistory: boolean; - canWiki: boolean; - cooked: string; - createdAt: string; - deletedAt: string | null; - displayUsername?: string | null | undefined; - editReason: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairName: string | null; - flairUrl: string | null; - hidden: boolean; - id: number; - incomingLinkCount: number; - mentionedUsers?: Array | undefined; - moderator: boolean; - name?: string | null | undefined; - postNumber: number; - postType: number; - primaryGroupName: string | null; - quoteCount: number; - raw: string; - readersCount: number; - reads: number; - replyCount: number; - replyToPostNumber: string | null; - reviewableId: string | null; - reviewableScoreCount: number; - reviewableScorePendingCount: number; - score: number; - staff: boolean; - topicId: number; - topicSlug: string; - trustLevel: number; - updatedAt: string; - userDeleted: boolean; - userId: number; - userTitle: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; - additionalProperties: { [k: string]: any }; + actionsSummary: Array; + admin: boolean; + avatarTemplate: string; + bookmarked: boolean; + canDelete: boolean; + canEdit: boolean; + canRecover: boolean; + canSeeHiddenPost?: boolean | undefined; + canViewEditHistory: boolean; + canWiki: boolean; + cooked: string; + createdAt: string; + deletedAt: string | null; + displayUsername?: string | null | undefined; + editReason: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairName: string | null; + flairUrl: string | null; + hidden: boolean; + id: number; + incomingLinkCount: number; + mentionedUsers?: Array | undefined; + moderator: boolean; + name?: string | null | undefined; + postNumber: number; + postType: number; + primaryGroupName: string | null; + quoteCount: number; + raw: string; + readersCount: number; + reads: number; + replyCount: number; + replyToPostNumber: string | null; + reviewableId: string | null; + reviewableScoreCount: number; + reviewableScorePendingCount: number; + score: number; + staff: boolean; + topicId: number; + topicSlug: string; + trustLevel: number; + updatedAt: string; + userDeleted: boolean; + userId: number; + userTitle: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; + additionalProperties: { [k: string]: any }; }; /** @internal */ -export const GetPostRequest$inboundSchema: z.ZodType = - z.object({ - id: z.string(), - }); +export const GetPostRequest$inboundSchema: z.ZodType< + GetPostRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); /** @internal */ export type GetPostRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetPostRequest$outboundSchema: z.ZodType< - GetPostRequest$Outbound, - z.ZodTypeDef, - GetPostRequest + GetPostRequest$Outbound, + z.ZodTypeDef, + GetPostRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -104,346 +107,342 @@ export const GetPostRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPostRequest$ { - /** @deprecated use `GetPostRequest$inboundSchema` instead. */ - export const inboundSchema = GetPostRequest$inboundSchema; - /** @deprecated use `GetPostRequest$outboundSchema` instead. */ - export const outboundSchema = GetPostRequest$outboundSchema; - /** @deprecated use `GetPostRequest$Outbound` instead. */ - export type Outbound = GetPostRequest$Outbound; + /** @deprecated use `GetPostRequest$inboundSchema` instead. */ + export const inboundSchema = GetPostRequest$inboundSchema; + /** @deprecated use `GetPostRequest$outboundSchema` instead. */ + export const outboundSchema = GetPostRequest$outboundSchema; + /** @deprecated use `GetPostRequest$Outbound` instead. */ + export type Outbound = GetPostRequest$Outbound; } /** @internal */ -export const ActionsSummary$inboundSchema: z.ZodType = z - .object({ - acted: z.boolean().optional(), - can_act: z.boolean().optional(), - can_undo: z.boolean().optional(), - count: z.number().int().optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - can_undo: "canUndo", - }); - }); +export const ActionsSummary$inboundSchema: z.ZodType< + ActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + acted: z.boolean().optional(), + can_act: z.boolean().optional(), + can_undo: z.boolean().optional(), + count: z.number().int().optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + "can_undo": "canUndo", + }); +}); /** @internal */ export type ActionsSummary$Outbound = { - acted?: boolean | undefined; - can_act?: boolean | undefined; - can_undo?: boolean | undefined; - count?: number | undefined; - id: number; + acted?: boolean | undefined; + can_act?: boolean | undefined; + can_undo?: boolean | undefined; + count?: number | undefined; + id: number; }; /** @internal */ export const ActionsSummary$outboundSchema: z.ZodType< - ActionsSummary$Outbound, - z.ZodTypeDef, - ActionsSummary -> = z - .object({ - acted: z.boolean().optional(), - canAct: z.boolean().optional(), - canUndo: z.boolean().optional(), - count: z.number().int().optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - canUndo: "can_undo", - }); - }); + ActionsSummary$Outbound, + z.ZodTypeDef, + ActionsSummary +> = z.object({ + acted: z.boolean().optional(), + canAct: z.boolean().optional(), + canUndo: z.boolean().optional(), + count: z.number().int().optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + canUndo: "can_undo", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActionsSummary$ { - /** @deprecated use `ActionsSummary$inboundSchema` instead. */ - export const inboundSchema = ActionsSummary$inboundSchema; - /** @deprecated use `ActionsSummary$outboundSchema` instead. */ - export const outboundSchema = ActionsSummary$outboundSchema; - /** @deprecated use `ActionsSummary$Outbound` instead. */ - export type Outbound = ActionsSummary$Outbound; + /** @deprecated use `ActionsSummary$inboundSchema` instead. */ + export const inboundSchema = ActionsSummary$inboundSchema; + /** @deprecated use `ActionsSummary$outboundSchema` instead. */ + export const outboundSchema = ActionsSummary$outboundSchema; + /** @deprecated use `ActionsSummary$Outbound` instead. */ + export type Outbound = ActionsSummary$Outbound; } /** @internal */ export const GetPostResponseBody$inboundSchema: z.ZodType< - GetPostResponseBody, - z.ZodTypeDef, - unknown + GetPostResponseBody, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - actions_summary: z.array(z.lazy(() => ActionsSummary$inboundSchema)), - admin: z.boolean(), - avatar_template: z.string(), - bookmarked: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_recover: z.boolean(), - can_see_hidden_post: z.boolean().optional(), - can_view_edit_history: z.boolean(), - can_wiki: z.boolean(), - cooked: z.string(), - created_at: z.string(), - deleted_at: z.nullable(z.string()), - display_username: z.nullable(z.string()).optional(), - edit_reason: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incoming_link_count: z.number().int(), - mentioned_users: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()).optional(), - post_number: z.number().int(), - post_type: z.number().int(), - primary_group_name: z.nullable(z.string()), - quote_count: z.number().int(), - raw: z.string(), - readers_count: z.number().int(), - reads: z.number().int(), - reply_count: z.number().int(), - reply_to_post_number: z.nullable(z.string()), - reviewable_id: z.nullable(z.string()), - reviewable_score_count: z.number().int(), - reviewable_score_pending_count: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topic_id: z.number().int(), - topic_slug: z.string(), - trust_level: z.number().int(), - updated_at: z.string(), - user_deleted: z.boolean(), - user_id: z.number().int(), - user_title: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .catchall(z.any()), - "additionalProperties" + z.object({ + actions_summary: z.array(z.lazy(() => ActionsSummary$inboundSchema)), + admin: z.boolean(), + avatar_template: z.string(), + bookmarked: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_recover: z.boolean(), + can_see_hidden_post: z.boolean().optional(), + can_view_edit_history: z.boolean(), + can_wiki: z.boolean(), + cooked: z.string(), + created_at: z.string(), + deleted_at: z.nullable(z.string()), + display_username: z.nullable(z.string()).optional(), + edit_reason: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incoming_link_count: z.number().int(), + mentioned_users: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()).optional(), + post_number: z.number().int(), + post_type: z.number().int(), + primary_group_name: z.nullable(z.string()), + quote_count: z.number().int(), + raw: z.string(), + readers_count: z.number().int(), + reads: z.number().int(), + reply_count: z.number().int(), + reply_to_post_number: z.nullable(z.string()), + reviewable_id: z.nullable(z.string()), + reviewable_score_count: z.number().int(), + reviewable_score_pending_count: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topic_id: z.number().int(), + topic_slug: z.string(), + trust_level: z.number().int(), + updated_at: z.string(), + user_deleted: z.boolean(), + user_id: z.number().int(), + user_title: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), + }).catchall(z.any()), + "additionalProperties", ).transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - mentioned_users: "mentionedUsers", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "mentioned_users": "mentionedUsers", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); }); /** @internal */ export type GetPostResponseBody$Outbound = { - actions_summary: Array; - admin: boolean; - avatar_template: string; - bookmarked: boolean; - can_delete: boolean; - can_edit: boolean; - can_recover: boolean; - can_see_hidden_post?: boolean | undefined; - can_view_edit_history: boolean; - can_wiki: boolean; - cooked: string; - created_at: string; - deleted_at: string | null; - display_username?: string | null | undefined; - edit_reason: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_name: string | null; - flair_url: string | null; - hidden: boolean; - id: number; - incoming_link_count: number; - mentioned_users?: Array | undefined; - moderator: boolean; - name?: string | null | undefined; - post_number: number; - post_type: number; - primary_group_name: string | null; - quote_count: number; - raw: string; - readers_count: number; - reads: number; - reply_count: number; - reply_to_post_number: string | null; - reviewable_id: string | null; - reviewable_score_count: number; - reviewable_score_pending_count: number; - score: number; - staff: boolean; - topic_id: number; - topic_slug: string; - trust_level: number; - updated_at: string; - user_deleted: boolean; - user_id: number; - user_title: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; - [additionalProperties: string]: unknown; + actions_summary: Array; + admin: boolean; + avatar_template: string; + bookmarked: boolean; + can_delete: boolean; + can_edit: boolean; + can_recover: boolean; + can_see_hidden_post?: boolean | undefined; + can_view_edit_history: boolean; + can_wiki: boolean; + cooked: string; + created_at: string; + deleted_at: string | null; + display_username?: string | null | undefined; + edit_reason: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_name: string | null; + flair_url: string | null; + hidden: boolean; + id: number; + incoming_link_count: number; + mentioned_users?: Array | undefined; + moderator: boolean; + name?: string | null | undefined; + post_number: number; + post_type: number; + primary_group_name: string | null; + quote_count: number; + raw: string; + readers_count: number; + reads: number; + reply_count: number; + reply_to_post_number: string | null; + reviewable_id: string | null; + reviewable_score_count: number; + reviewable_score_pending_count: number; + score: number; + staff: boolean; + topic_id: number; + topic_slug: string; + trust_level: number; + updated_at: string; + user_deleted: boolean; + user_id: number; + user_title: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; + [additionalProperties: string]: unknown; }; /** @internal */ export const GetPostResponseBody$outboundSchema: z.ZodType< - GetPostResponseBody$Outbound, - z.ZodTypeDef, - GetPostResponseBody -> = z - .object({ - additionalProperties: z.record(z.any()), + GetPostResponseBody$Outbound, + z.ZodTypeDef, + GetPostResponseBody +> = z.object({ + additionalProperties: z.record(z.any()), - actionsSummary: z.array(z.lazy(() => ActionsSummary$outboundSchema)), - admin: z.boolean(), - avatarTemplate: z.string(), - bookmarked: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canRecover: z.boolean(), - canSeeHiddenPost: z.boolean().optional(), - canViewEditHistory: z.boolean(), - canWiki: z.boolean(), - cooked: z.string(), - createdAt: z.string(), - deletedAt: z.nullable(z.string()), - displayUsername: z.nullable(z.string()).optional(), - editReason: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incomingLinkCount: z.number().int(), - mentionedUsers: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()).optional(), - postNumber: z.number().int(), - postType: z.number().int(), - primaryGroupName: z.nullable(z.string()), - quoteCount: z.number().int(), - raw: z.string(), - readersCount: z.number().int(), - reads: z.number().int(), - replyCount: z.number().int(), - replyToPostNumber: z.nullable(z.string()), - reviewableId: z.nullable(z.string()), - reviewableScoreCount: z.number().int(), - reviewableScorePendingCount: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topicId: z.number().int(), - topicSlug: z.string(), - trustLevel: z.number().int(), - updatedAt: z.string(), - userDeleted: z.boolean(), - userId: z.number().int(), - userTitle: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - mentionedUsers: "mentioned_users", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }), - }; - }); + actionsSummary: z.array(z.lazy(() => ActionsSummary$outboundSchema)), + admin: z.boolean(), + avatarTemplate: z.string(), + bookmarked: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canRecover: z.boolean(), + canSeeHiddenPost: z.boolean().optional(), + canViewEditHistory: z.boolean(), + canWiki: z.boolean(), + cooked: z.string(), + createdAt: z.string(), + deletedAt: z.nullable(z.string()), + displayUsername: z.nullable(z.string()).optional(), + editReason: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incomingLinkCount: z.number().int(), + mentionedUsers: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()).optional(), + postNumber: z.number().int(), + postType: z.number().int(), + primaryGroupName: z.nullable(z.string()), + quoteCount: z.number().int(), + raw: z.string(), + readersCount: z.number().int(), + reads: z.number().int(), + replyCount: z.number().int(), + replyToPostNumber: z.nullable(z.string()), + reviewableId: z.nullable(z.string()), + reviewableScoreCount: z.number().int(), + reviewableScorePendingCount: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topicId: z.number().int(), + topicSlug: z.string(), + trustLevel: z.number().int(), + updatedAt: z.string(), + userDeleted: z.boolean(), + userId: z.number().int(), + userTitle: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + mentionedUsers: "mentioned_users", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPostResponseBody$ { - /** @deprecated use `GetPostResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPostResponseBody$inboundSchema; - /** @deprecated use `GetPostResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPostResponseBody$outboundSchema; - /** @deprecated use `GetPostResponseBody$Outbound` instead. */ - export type Outbound = GetPostResponseBody$Outbound; + /** @deprecated use `GetPostResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetPostResponseBody$inboundSchema; + /** @deprecated use `GetPostResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetPostResponseBody$outboundSchema; + /** @deprecated use `GetPostResponseBody$Outbound` instead. */ + export type Outbound = GetPostResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getsite.ts b/src/sdk/models/operations/getsite.ts index 7913738..9aa4c33 100644 --- a/src/sdk/models/operations/getsite.ts +++ b/src/sdk/models/operations/getsite.ts @@ -2,61 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Archetypes = { - id: string; - name: string; - options: Array; + id: string; + name: string; + options: Array; }; export type GetSiteRequiredTagGroups = { - minCount: number; - name: string; + minCount: number; + name: string; }; export type GetSiteCategories = { - allowGlobalTags: boolean; - allowedTagGroups: Array; - allowedTags: Array; - canEdit: boolean; - color: string; - customFields?: { [k: string]: any } | null | undefined; - defaultListFilter: string; - defaultTopPeriod: string; - defaultView: string | null; - description?: string | null | undefined; - descriptionExcerpt?: string | null | undefined; - descriptionText?: string | null | undefined; - formTemplateIds?: Array | undefined; - hasChildren: boolean; - id: number; - minimumRequiredTags: number; - name: string; - navigateToFirstPostAfterRead: boolean; - notificationLevel: number; - numFeaturedTopics: number; - parentCategoryId?: number | undefined; - permission: number; - position: number; - postCount: number; - readOnlyBanner: string | null; - readRestricted: boolean; - requiredTagGroups: Array; - showSubcategoryList: boolean; - slug: string; - sortAscending: string | null; - sortOrder: string | null; - subcategoryListStyle: string; - textColor: string; - topicCount: number; - topicTemplate: string | null; - topicUrl: string; - uploadedBackground: string | null; - uploadedBackgroundDark: string | null; - uploadedLogo: string | null; - uploadedLogoDark: string | null; + allowGlobalTags: boolean; + allowedTagGroups: Array; + allowedTags: Array; + canEdit: boolean; + color: string; + customFields?: { [k: string]: any } | null | undefined; + defaultListFilter: string; + defaultTopPeriod: string; + defaultView: string | null; + description?: string | null | undefined; + descriptionExcerpt?: string | null | undefined; + descriptionText?: string | null | undefined; + formTemplateIds?: Array | undefined; + hasChildren: boolean; + id: number; + minimumRequiredTags: number; + name: string; + navigateToFirstPostAfterRead: boolean; + notificationLevel: number; + numFeaturedTopics: number; + parentCategoryId?: number | undefined; + permission: number; + position: number; + postCount: number; + readOnlyBanner: string | null; + readRestricted: boolean; + requiredTagGroups: Array; + showSubcategoryList: boolean; + slug: string; + sortAscending: string | null; + sortOrder: string | null; + subcategoryListStyle: string; + textColor: string; + topicCount: number; + topicTemplate: string | null; + topicUrl: string; + uploadedBackground: string | null; + uploadedBackgroundDark: string | null; + uploadedLogo: string | null; + uploadedLogoDark: string | null; }; export type CensoredRegexp = {}; @@ -66,11 +66,11 @@ export type CustomEmojiTranslation = {}; export type DefaultDarkColorScheme = {}; export type GetSiteGroups = { - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - id: number; - name: string; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + id: number; + name: string; }; export type HashtagConfigurations = {}; @@ -80,477 +80,486 @@ export type HashtagIcons = {}; export type MarkdownAdditionalOptions = {}; export type NotificationTypes = { - adminProblems?: number | undefined; - assigned?: number | undefined; - bookmarkReminder: number; - chatGroupMention: number; - chatInvitation: number; - chatMention: number; - chatMessage: number; - chatQuoted?: number | undefined; - circlesActivity?: number | undefined; - codeReviewCommitApproved: number; - custom: number; - edited: number; - eventInvitation: number; - eventReminder: number; - following?: number | undefined; - followingCreatedTopic?: number | undefined; - followingReplied?: number | undefined; - grantedBadge: number; - groupMentioned: number; - groupMessageSummary: number; - invitedToPrivateMessage: number; - invitedToTopic: number; - inviteeAccepted: number; - liked: number; - likedConsolidated: number; - linked: number; - membershipRequestAccepted: number; - membershipRequestConsolidated: number; - mentioned: number; - movedPost: number; - newFeatures?: number | undefined; - postApproved: number; - posted: number; - privateMessage: number; - questionAnswerUserCommented?: number | undefined; - quoted: number; - reaction: number; - replied: number; - topicReminder: number; - votesReleased: number; - watchingCategoryOrTag: number; - watchingFirstPost: number; + adminProblems?: number | undefined; + assigned?: number | undefined; + bookmarkReminder: number; + chatGroupMention: number; + chatInvitation: number; + chatMention: number; + chatMessage: number; + chatQuoted?: number | undefined; + circlesActivity?: number | undefined; + codeReviewCommitApproved: number; + custom: number; + edited: number; + eventInvitation: number; + eventReminder: number; + following?: number | undefined; + followingCreatedTopic?: number | undefined; + followingReplied?: number | undefined; + grantedBadge: number; + groupMentioned: number; + groupMessageSummary: number; + invitedToPrivateMessage: number; + invitedToTopic: number; + inviteeAccepted: number; + liked: number; + likedConsolidated: number; + linked: number; + membershipRequestAccepted: number; + membershipRequestConsolidated: number; + mentioned: number; + movedPost: number; + newFeatures?: number | undefined; + postApproved: number; + posted: number; + privateMessage: number; + questionAnswerUserCommented?: number | undefined; + quoted: number; + reaction: number; + replied: number; + topicReminder: number; + votesReleased: number; + watchingCategoryOrTag: number; + watchingFirstPost: number; }; export type PostActionTypes = { - description: string; - id: number | null; - isCustomFlag: boolean; - isFlag: boolean; - name: string; - nameKey: string | null; - shortDescription: string; + description: string; + id: number | null; + isCustomFlag: boolean; + isFlag: boolean; + name: string; + nameKey: string | null; + shortDescription: string; }; export type PostTypes = { - moderatorAction: number; - regular: number; - smallAction: number; - whisper: number; + moderatorAction: number; + regular: number; + smallAction: number; + whisper: number; }; export type TopicFlagTypes = { - description: string; - id: number | null; - isCustomFlag: boolean; - isFlag: boolean; - name: string; - nameKey: string | null; - shortDescription: string; + description: string; + id: number | null; + isCustomFlag: boolean; + isFlag: boolean; + name: string; + nameKey: string | null; + shortDescription: string; }; export type TrustLevels = { - basic: number; - leader: number; - member: number; - newuser: number; - regular: number; + basic: number; + leader: number; + member: number; + newuser: number; + regular: number; }; export type UserColorSchemes = { - id: number; - isDark: boolean; - name: string; + id: number; + isDark: boolean; + name: string; }; export type UserThemes = { - colorSchemeId: number | null; - default: boolean; - name: string; - themeId: number; + colorSchemeId: number | null; + default: boolean; + name: string; + themeId: number; }; export type UserTips = { - adminGuide: number; - firstNotification: number; - postMenu: number; - suggestedTopics: number; - topicNotificationLevels: number; - topicTimeline: number; + adminGuide: number; + firstNotification: number; + postMenu: number; + suggestedTopics: number; + topicNotificationLevels: number; + topicTimeline: number; }; /** * success response */ export type GetSiteResponseBody = { - anonymousTopMenuItems: Array; - archetypes: Array; - authProviders: Array; - canAssociateGroups?: boolean | undefined; - canCreateTag: boolean; - canTagPms: boolean; - canTagTopics: boolean; - categories: Array; - censoredRegexp: Array; - customEmojiTranslation: CustomEmojiTranslation; - defaultArchetype: string; - defaultDarkColorScheme: DefaultDarkColorScheme | null; - deniedEmojis?: Array | undefined; - displayedAboutPluginStatGroups?: Array | undefined; - filters: Array; - groups: Array; - hashtagConfigurations?: HashtagConfigurations | undefined; - hashtagIcons?: HashtagIcons | undefined; - markdownAdditionalOptions?: MarkdownAdditionalOptions | undefined; - navigationMenuSiteTopTags?: Array | undefined; - notificationTypes: NotificationTypes; - periods: Array; - postActionTypes: Array; - postTypes: PostTypes; - tagsFilterRegexp: string; - topMenuItems: Array; - topTags: Array; - topicFeaturedLinkAllowedCategoryIds: Array; - topicFlagTypes: Array; - trustLevels: TrustLevels; - uncategorizedCategoryId: number; - userColorSchemes: Array; - userFieldMaxLength: number; - userFields: Array; - userThemes: Array; - userTips?: UserTips | undefined; - watchedWordsLink: string | null; - watchedWordsReplace: string | null; - whispersAllowedGroupsNames?: Array | undefined; - wizardRequired?: boolean | undefined; + anonymousTopMenuItems: Array; + archetypes: Array; + authProviders: Array; + canAssociateGroups?: boolean | undefined; + canCreateTag: boolean; + canTagPms: boolean; + canTagTopics: boolean; + categories: Array; + censoredRegexp: Array; + customEmojiTranslation: CustomEmojiTranslation; + defaultArchetype: string; + defaultDarkColorScheme: DefaultDarkColorScheme | null; + deniedEmojis?: Array | undefined; + displayedAboutPluginStatGroups?: Array | undefined; + filters: Array; + groups: Array; + hashtagConfigurations?: HashtagConfigurations | undefined; + hashtagIcons?: HashtagIcons | undefined; + markdownAdditionalOptions?: MarkdownAdditionalOptions | undefined; + navigationMenuSiteTopTags?: Array | undefined; + notificationTypes: NotificationTypes; + periods: Array; + postActionTypes: Array; + postTypes: PostTypes; + tagsFilterRegexp: string; + topMenuItems: Array; + topTags: Array; + topicFeaturedLinkAllowedCategoryIds: Array; + topicFlagTypes: Array; + trustLevels: TrustLevels; + uncategorizedCategoryId: number; + userColorSchemes: Array; + userFieldMaxLength: number; + userFields: Array; + userThemes: Array; + userTips?: UserTips | undefined; + watchedWordsLink: string | null; + watchedWordsReplace: string | null; + whispersAllowedGroupsNames?: Array | undefined; + wizardRequired?: boolean | undefined; }; /** @internal */ -export const Archetypes$inboundSchema: z.ZodType = z.object({ - id: z.string(), - name: z.string(), - options: z.array(z.any()), +export const Archetypes$inboundSchema: z.ZodType< + Archetypes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.string(), + options: z.array(z.any()), }); /** @internal */ export type Archetypes$Outbound = { - id: string; - name: string; - options: Array; + id: string; + name: string; + options: Array; }; /** @internal */ -export const Archetypes$outboundSchema: z.ZodType = - z.object({ - id: z.string(), - name: z.string(), - options: z.array(z.any()), - }); +export const Archetypes$outboundSchema: z.ZodType< + Archetypes$Outbound, + z.ZodTypeDef, + Archetypes +> = z.object({ + id: z.string(), + name: z.string(), + options: z.array(z.any()), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Archetypes$ { - /** @deprecated use `Archetypes$inboundSchema` instead. */ - export const inboundSchema = Archetypes$inboundSchema; - /** @deprecated use `Archetypes$outboundSchema` instead. */ - export const outboundSchema = Archetypes$outboundSchema; - /** @deprecated use `Archetypes$Outbound` instead. */ - export type Outbound = Archetypes$Outbound; + /** @deprecated use `Archetypes$inboundSchema` instead. */ + export const inboundSchema = Archetypes$inboundSchema; + /** @deprecated use `Archetypes$outboundSchema` instead. */ + export const outboundSchema = Archetypes$outboundSchema; + /** @deprecated use `Archetypes$Outbound` instead. */ + export type Outbound = Archetypes$Outbound; } /** @internal */ export const GetSiteRequiredTagGroups$inboundSchema: z.ZodType< - GetSiteRequiredTagGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - min_count: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - min_count: "minCount", - }); - }); + GetSiteRequiredTagGroups, + z.ZodTypeDef, + unknown +> = z.object({ + min_count: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "min_count": "minCount", + }); +}); /** @internal */ export type GetSiteRequiredTagGroups$Outbound = { - min_count: number; - name: string; + min_count: number; + name: string; }; /** @internal */ export const GetSiteRequiredTagGroups$outboundSchema: z.ZodType< - GetSiteRequiredTagGroups$Outbound, - z.ZodTypeDef, - GetSiteRequiredTagGroups -> = z - .object({ - minCount: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - minCount: "min_count", - }); - }); + GetSiteRequiredTagGroups$Outbound, + z.ZodTypeDef, + GetSiteRequiredTagGroups +> = z.object({ + minCount: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + minCount: "min_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSiteRequiredTagGroups$ { - /** @deprecated use `GetSiteRequiredTagGroups$inboundSchema` instead. */ - export const inboundSchema = GetSiteRequiredTagGroups$inboundSchema; - /** @deprecated use `GetSiteRequiredTagGroups$outboundSchema` instead. */ - export const outboundSchema = GetSiteRequiredTagGroups$outboundSchema; - /** @deprecated use `GetSiteRequiredTagGroups$Outbound` instead. */ - export type Outbound = GetSiteRequiredTagGroups$Outbound; + /** @deprecated use `GetSiteRequiredTagGroups$inboundSchema` instead. */ + export const inboundSchema = GetSiteRequiredTagGroups$inboundSchema; + /** @deprecated use `GetSiteRequiredTagGroups$outboundSchema` instead. */ + export const outboundSchema = GetSiteRequiredTagGroups$outboundSchema; + /** @deprecated use `GetSiteRequiredTagGroups$Outbound` instead. */ + export type Outbound = GetSiteRequiredTagGroups$Outbound; } /** @internal */ -export const GetSiteCategories$inboundSchema: z.ZodType = - z - .object({ - allow_global_tags: z.boolean(), - allowed_tag_groups: z.array(z.any()), - allowed_tags: z.array(z.any()), - can_edit: z.boolean(), - color: z.string(), - custom_fields: z.nullable(z.record(z.any())).optional(), - default_list_filter: z.string(), - default_top_period: z.string(), - default_view: z.nullable(z.string()), - description: z.nullable(z.string()).optional(), - description_excerpt: z.nullable(z.string()).optional(), - description_text: z.nullable(z.string()).optional(), - form_template_ids: z.array(z.any()).optional(), - has_children: z.boolean(), - id: z.number().int(), - minimum_required_tags: z.number().int(), - name: z.string(), - navigate_to_first_post_after_read: z.boolean(), - notification_level: z.number().int(), - num_featured_topics: z.number().int(), - parent_category_id: z.number().int().optional(), - permission: z.number().int(), - position: z.number().int(), - post_count: z.number().int(), - read_only_banner: z.nullable(z.string()), - read_restricted: z.boolean(), - required_tag_groups: z.array(z.lazy(() => GetSiteRequiredTagGroups$inboundSchema)), - show_subcategory_list: z.boolean(), - slug: z.string(), - sort_ascending: z.nullable(z.string()), - sort_order: z.nullable(z.string()), - subcategory_list_style: z.string(), - text_color: z.string(), - topic_count: z.number().int(), - topic_template: z.nullable(z.string()), - topic_url: z.string(), - uploaded_background: z.nullable(z.string()), - uploaded_background_dark: z.nullable(z.string()), - uploaded_logo: z.nullable(z.string()), - uploaded_logo_dark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allow_global_tags: "allowGlobalTags", - allowed_tag_groups: "allowedTagGroups", - allowed_tags: "allowedTags", - can_edit: "canEdit", - custom_fields: "customFields", - default_list_filter: "defaultListFilter", - default_top_period: "defaultTopPeriod", - default_view: "defaultView", - description_excerpt: "descriptionExcerpt", - description_text: "descriptionText", - form_template_ids: "formTemplateIds", - has_children: "hasChildren", - minimum_required_tags: "minimumRequiredTags", - navigate_to_first_post_after_read: "navigateToFirstPostAfterRead", - notification_level: "notificationLevel", - num_featured_topics: "numFeaturedTopics", - parent_category_id: "parentCategoryId", - post_count: "postCount", - read_only_banner: "readOnlyBanner", - read_restricted: "readRestricted", - required_tag_groups: "requiredTagGroups", - show_subcategory_list: "showSubcategoryList", - sort_ascending: "sortAscending", - sort_order: "sortOrder", - subcategory_list_style: "subcategoryListStyle", - text_color: "textColor", - topic_count: "topicCount", - topic_template: "topicTemplate", - topic_url: "topicUrl", - uploaded_background: "uploadedBackground", - uploaded_background_dark: "uploadedBackgroundDark", - uploaded_logo: "uploadedLogo", - uploaded_logo_dark: "uploadedLogoDark", - }); - }); +export const GetSiteCategories$inboundSchema: z.ZodType< + GetSiteCategories, + z.ZodTypeDef, + unknown +> = z.object({ + allow_global_tags: z.boolean(), + allowed_tag_groups: z.array(z.any()), + allowed_tags: z.array(z.any()), + can_edit: z.boolean(), + color: z.string(), + custom_fields: z.nullable(z.record(z.any())).optional(), + default_list_filter: z.string(), + default_top_period: z.string(), + default_view: z.nullable(z.string()), + description: z.nullable(z.string()).optional(), + description_excerpt: z.nullable(z.string()).optional(), + description_text: z.nullable(z.string()).optional(), + form_template_ids: z.array(z.any()).optional(), + has_children: z.boolean(), + id: z.number().int(), + minimum_required_tags: z.number().int(), + name: z.string(), + navigate_to_first_post_after_read: z.boolean(), + notification_level: z.number().int(), + num_featured_topics: z.number().int(), + parent_category_id: z.number().int().optional(), + permission: z.number().int(), + position: z.number().int(), + post_count: z.number().int(), + read_only_banner: z.nullable(z.string()), + read_restricted: z.boolean(), + required_tag_groups: z.array( + z.lazy(() => GetSiteRequiredTagGroups$inboundSchema), + ), + show_subcategory_list: z.boolean(), + slug: z.string(), + sort_ascending: z.nullable(z.string()), + sort_order: z.nullable(z.string()), + subcategory_list_style: z.string(), + text_color: z.string(), + topic_count: z.number().int(), + topic_template: z.nullable(z.string()), + topic_url: z.string(), + uploaded_background: z.nullable(z.string()), + uploaded_background_dark: z.nullable(z.string()), + uploaded_logo: z.nullable(z.string()), + uploaded_logo_dark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "allow_global_tags": "allowGlobalTags", + "allowed_tag_groups": "allowedTagGroups", + "allowed_tags": "allowedTags", + "can_edit": "canEdit", + "custom_fields": "customFields", + "default_list_filter": "defaultListFilter", + "default_top_period": "defaultTopPeriod", + "default_view": "defaultView", + "description_excerpt": "descriptionExcerpt", + "description_text": "descriptionText", + "form_template_ids": "formTemplateIds", + "has_children": "hasChildren", + "minimum_required_tags": "minimumRequiredTags", + "navigate_to_first_post_after_read": "navigateToFirstPostAfterRead", + "notification_level": "notificationLevel", + "num_featured_topics": "numFeaturedTopics", + "parent_category_id": "parentCategoryId", + "post_count": "postCount", + "read_only_banner": "readOnlyBanner", + "read_restricted": "readRestricted", + "required_tag_groups": "requiredTagGroups", + "show_subcategory_list": "showSubcategoryList", + "sort_ascending": "sortAscending", + "sort_order": "sortOrder", + "subcategory_list_style": "subcategoryListStyle", + "text_color": "textColor", + "topic_count": "topicCount", + "topic_template": "topicTemplate", + "topic_url": "topicUrl", + "uploaded_background": "uploadedBackground", + "uploaded_background_dark": "uploadedBackgroundDark", + "uploaded_logo": "uploadedLogo", + "uploaded_logo_dark": "uploadedLogoDark", + }); +}); /** @internal */ export type GetSiteCategories$Outbound = { - allow_global_tags: boolean; - allowed_tag_groups: Array; - allowed_tags: Array; - can_edit: boolean; - color: string; - custom_fields?: { [k: string]: any } | null | undefined; - default_list_filter: string; - default_top_period: string; - default_view: string | null; - description?: string | null | undefined; - description_excerpt?: string | null | undefined; - description_text?: string | null | undefined; - form_template_ids?: Array | undefined; - has_children: boolean; - id: number; - minimum_required_tags: number; - name: string; - navigate_to_first_post_after_read: boolean; - notification_level: number; - num_featured_topics: number; - parent_category_id?: number | undefined; - permission: number; - position: number; - post_count: number; - read_only_banner: string | null; - read_restricted: boolean; - required_tag_groups: Array; - show_subcategory_list: boolean; - slug: string; - sort_ascending: string | null; - sort_order: string | null; - subcategory_list_style: string; - text_color: string; - topic_count: number; - topic_template: string | null; - topic_url: string; - uploaded_background: string | null; - uploaded_background_dark: string | null; - uploaded_logo: string | null; - uploaded_logo_dark: string | null; + allow_global_tags: boolean; + allowed_tag_groups: Array; + allowed_tags: Array; + can_edit: boolean; + color: string; + custom_fields?: { [k: string]: any } | null | undefined; + default_list_filter: string; + default_top_period: string; + default_view: string | null; + description?: string | null | undefined; + description_excerpt?: string | null | undefined; + description_text?: string | null | undefined; + form_template_ids?: Array | undefined; + has_children: boolean; + id: number; + minimum_required_tags: number; + name: string; + navigate_to_first_post_after_read: boolean; + notification_level: number; + num_featured_topics: number; + parent_category_id?: number | undefined; + permission: number; + position: number; + post_count: number; + read_only_banner: string | null; + read_restricted: boolean; + required_tag_groups: Array; + show_subcategory_list: boolean; + slug: string; + sort_ascending: string | null; + sort_order: string | null; + subcategory_list_style: string; + text_color: string; + topic_count: number; + topic_template: string | null; + topic_url: string; + uploaded_background: string | null; + uploaded_background_dark: string | null; + uploaded_logo: string | null; + uploaded_logo_dark: string | null; }; /** @internal */ export const GetSiteCategories$outboundSchema: z.ZodType< - GetSiteCategories$Outbound, - z.ZodTypeDef, - GetSiteCategories -> = z - .object({ - allowGlobalTags: z.boolean(), - allowedTagGroups: z.array(z.any()), - allowedTags: z.array(z.any()), - canEdit: z.boolean(), - color: z.string(), - customFields: z.nullable(z.record(z.any())).optional(), - defaultListFilter: z.string(), - defaultTopPeriod: z.string(), - defaultView: z.nullable(z.string()), - description: z.nullable(z.string()).optional(), - descriptionExcerpt: z.nullable(z.string()).optional(), - descriptionText: z.nullable(z.string()).optional(), - formTemplateIds: z.array(z.any()).optional(), - hasChildren: z.boolean(), - id: z.number().int(), - minimumRequiredTags: z.number().int(), - name: z.string(), - navigateToFirstPostAfterRead: z.boolean(), - notificationLevel: z.number().int(), - numFeaturedTopics: z.number().int(), - parentCategoryId: z.number().int().optional(), - permission: z.number().int(), - position: z.number().int(), - postCount: z.number().int(), - readOnlyBanner: z.nullable(z.string()), - readRestricted: z.boolean(), - requiredTagGroups: z.array(z.lazy(() => GetSiteRequiredTagGroups$outboundSchema)), - showSubcategoryList: z.boolean(), - slug: z.string(), - sortAscending: z.nullable(z.string()), - sortOrder: z.nullable(z.string()), - subcategoryListStyle: z.string(), - textColor: z.string(), - topicCount: z.number().int(), - topicTemplate: z.nullable(z.string()), - topicUrl: z.string(), - uploadedBackground: z.nullable(z.string()), - uploadedBackgroundDark: z.nullable(z.string()), - uploadedLogo: z.nullable(z.string()), - uploadedLogoDark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allowGlobalTags: "allow_global_tags", - allowedTagGroups: "allowed_tag_groups", - allowedTags: "allowed_tags", - canEdit: "can_edit", - customFields: "custom_fields", - defaultListFilter: "default_list_filter", - defaultTopPeriod: "default_top_period", - defaultView: "default_view", - descriptionExcerpt: "description_excerpt", - descriptionText: "description_text", - formTemplateIds: "form_template_ids", - hasChildren: "has_children", - minimumRequiredTags: "minimum_required_tags", - navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", - notificationLevel: "notification_level", - numFeaturedTopics: "num_featured_topics", - parentCategoryId: "parent_category_id", - postCount: "post_count", - readOnlyBanner: "read_only_banner", - readRestricted: "read_restricted", - requiredTagGroups: "required_tag_groups", - showSubcategoryList: "show_subcategory_list", - sortAscending: "sort_ascending", - sortOrder: "sort_order", - subcategoryListStyle: "subcategory_list_style", - textColor: "text_color", - topicCount: "topic_count", - topicTemplate: "topic_template", - topicUrl: "topic_url", - uploadedBackground: "uploaded_background", - uploadedBackgroundDark: "uploaded_background_dark", - uploadedLogo: "uploaded_logo", - uploadedLogoDark: "uploaded_logo_dark", - }); - }); + GetSiteCategories$Outbound, + z.ZodTypeDef, + GetSiteCategories +> = z.object({ + allowGlobalTags: z.boolean(), + allowedTagGroups: z.array(z.any()), + allowedTags: z.array(z.any()), + canEdit: z.boolean(), + color: z.string(), + customFields: z.nullable(z.record(z.any())).optional(), + defaultListFilter: z.string(), + defaultTopPeriod: z.string(), + defaultView: z.nullable(z.string()), + description: z.nullable(z.string()).optional(), + descriptionExcerpt: z.nullable(z.string()).optional(), + descriptionText: z.nullable(z.string()).optional(), + formTemplateIds: z.array(z.any()).optional(), + hasChildren: z.boolean(), + id: z.number().int(), + minimumRequiredTags: z.number().int(), + name: z.string(), + navigateToFirstPostAfterRead: z.boolean(), + notificationLevel: z.number().int(), + numFeaturedTopics: z.number().int(), + parentCategoryId: z.number().int().optional(), + permission: z.number().int(), + position: z.number().int(), + postCount: z.number().int(), + readOnlyBanner: z.nullable(z.string()), + readRestricted: z.boolean(), + requiredTagGroups: z.array( + z.lazy(() => GetSiteRequiredTagGroups$outboundSchema), + ), + showSubcategoryList: z.boolean(), + slug: z.string(), + sortAscending: z.nullable(z.string()), + sortOrder: z.nullable(z.string()), + subcategoryListStyle: z.string(), + textColor: z.string(), + topicCount: z.number().int(), + topicTemplate: z.nullable(z.string()), + topicUrl: z.string(), + uploadedBackground: z.nullable(z.string()), + uploadedBackgroundDark: z.nullable(z.string()), + uploadedLogo: z.nullable(z.string()), + uploadedLogoDark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allowGlobalTags: "allow_global_tags", + allowedTagGroups: "allowed_tag_groups", + allowedTags: "allowed_tags", + canEdit: "can_edit", + customFields: "custom_fields", + defaultListFilter: "default_list_filter", + defaultTopPeriod: "default_top_period", + defaultView: "default_view", + descriptionExcerpt: "description_excerpt", + descriptionText: "description_text", + formTemplateIds: "form_template_ids", + hasChildren: "has_children", + minimumRequiredTags: "minimum_required_tags", + navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", + notificationLevel: "notification_level", + numFeaturedTopics: "num_featured_topics", + parentCategoryId: "parent_category_id", + postCount: "post_count", + readOnlyBanner: "read_only_banner", + readRestricted: "read_restricted", + requiredTagGroups: "required_tag_groups", + showSubcategoryList: "show_subcategory_list", + sortAscending: "sort_ascending", + sortOrder: "sort_order", + subcategoryListStyle: "subcategory_list_style", + textColor: "text_color", + topicCount: "topic_count", + topicTemplate: "topic_template", + topicUrl: "topic_url", + uploadedBackground: "uploaded_background", + uploadedBackgroundDark: "uploaded_background_dark", + uploadedLogo: "uploaded_logo", + uploadedLogoDark: "uploaded_logo_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSiteCategories$ { - /** @deprecated use `GetSiteCategories$inboundSchema` instead. */ - export const inboundSchema = GetSiteCategories$inboundSchema; - /** @deprecated use `GetSiteCategories$outboundSchema` instead. */ - export const outboundSchema = GetSiteCategories$outboundSchema; - /** @deprecated use `GetSiteCategories$Outbound` instead. */ - export type Outbound = GetSiteCategories$Outbound; + /** @deprecated use `GetSiteCategories$inboundSchema` instead. */ + export const inboundSchema = GetSiteCategories$inboundSchema; + /** @deprecated use `GetSiteCategories$outboundSchema` instead. */ + export const outboundSchema = GetSiteCategories$outboundSchema; + /** @deprecated use `GetSiteCategories$Outbound` instead. */ + export type Outbound = GetSiteCategories$Outbound; } /** @internal */ -export const CensoredRegexp$inboundSchema: z.ZodType = - z.object({}); +export const CensoredRegexp$inboundSchema: z.ZodType< + CensoredRegexp, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type CensoredRegexp$Outbound = {}; /** @internal */ export const CensoredRegexp$outboundSchema: z.ZodType< - CensoredRegexp$Outbound, - z.ZodTypeDef, - CensoredRegexp + CensoredRegexp$Outbound, + z.ZodTypeDef, + CensoredRegexp > = z.object({}); /** @@ -558,19 +567,19 @@ export const CensoredRegexp$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CensoredRegexp$ { - /** @deprecated use `CensoredRegexp$inboundSchema` instead. */ - export const inboundSchema = CensoredRegexp$inboundSchema; - /** @deprecated use `CensoredRegexp$outboundSchema` instead. */ - export const outboundSchema = CensoredRegexp$outboundSchema; - /** @deprecated use `CensoredRegexp$Outbound` instead. */ - export type Outbound = CensoredRegexp$Outbound; + /** @deprecated use `CensoredRegexp$inboundSchema` instead. */ + export const inboundSchema = CensoredRegexp$inboundSchema; + /** @deprecated use `CensoredRegexp$outboundSchema` instead. */ + export const outboundSchema = CensoredRegexp$outboundSchema; + /** @deprecated use `CensoredRegexp$Outbound` instead. */ + export type Outbound = CensoredRegexp$Outbound; } /** @internal */ export const CustomEmojiTranslation$inboundSchema: z.ZodType< - CustomEmojiTranslation, - z.ZodTypeDef, - unknown + CustomEmojiTranslation, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -578,9 +587,9 @@ export type CustomEmojiTranslation$Outbound = {}; /** @internal */ export const CustomEmojiTranslation$outboundSchema: z.ZodType< - CustomEmojiTranslation$Outbound, - z.ZodTypeDef, - CustomEmojiTranslation + CustomEmojiTranslation$Outbound, + z.ZodTypeDef, + CustomEmojiTranslation > = z.object({}); /** @@ -588,19 +597,19 @@ export const CustomEmojiTranslation$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CustomEmojiTranslation$ { - /** @deprecated use `CustomEmojiTranslation$inboundSchema` instead. */ - export const inboundSchema = CustomEmojiTranslation$inboundSchema; - /** @deprecated use `CustomEmojiTranslation$outboundSchema` instead. */ - export const outboundSchema = CustomEmojiTranslation$outboundSchema; - /** @deprecated use `CustomEmojiTranslation$Outbound` instead. */ - export type Outbound = CustomEmojiTranslation$Outbound; + /** @deprecated use `CustomEmojiTranslation$inboundSchema` instead. */ + export const inboundSchema = CustomEmojiTranslation$inboundSchema; + /** @deprecated use `CustomEmojiTranslation$outboundSchema` instead. */ + export const outboundSchema = CustomEmojiTranslation$outboundSchema; + /** @deprecated use `CustomEmojiTranslation$Outbound` instead. */ + export type Outbound = CustomEmojiTranslation$Outbound; } /** @internal */ export const DefaultDarkColorScheme$inboundSchema: z.ZodType< - DefaultDarkColorScheme, - z.ZodTypeDef, - unknown + DefaultDarkColorScheme, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -608,9 +617,9 @@ export type DefaultDarkColorScheme$Outbound = {}; /** @internal */ export const DefaultDarkColorScheme$outboundSchema: z.ZodType< - DefaultDarkColorScheme$Outbound, - z.ZodTypeDef, - DefaultDarkColorScheme + DefaultDarkColorScheme$Outbound, + z.ZodTypeDef, + DefaultDarkColorScheme > = z.object({}); /** @@ -618,79 +627,79 @@ export const DefaultDarkColorScheme$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DefaultDarkColorScheme$ { - /** @deprecated use `DefaultDarkColorScheme$inboundSchema` instead. */ - export const inboundSchema = DefaultDarkColorScheme$inboundSchema; - /** @deprecated use `DefaultDarkColorScheme$outboundSchema` instead. */ - export const outboundSchema = DefaultDarkColorScheme$outboundSchema; - /** @deprecated use `DefaultDarkColorScheme$Outbound` instead. */ - export type Outbound = DefaultDarkColorScheme$Outbound; + /** @deprecated use `DefaultDarkColorScheme$inboundSchema` instead. */ + export const inboundSchema = DefaultDarkColorScheme$inboundSchema; + /** @deprecated use `DefaultDarkColorScheme$outboundSchema` instead. */ + export const outboundSchema = DefaultDarkColorScheme$outboundSchema; + /** @deprecated use `DefaultDarkColorScheme$Outbound` instead. */ + export type Outbound = DefaultDarkColorScheme$Outbound; } /** @internal */ -export const GetSiteGroups$inboundSchema: z.ZodType = z - .object({ - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - id: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - }); - }); +export const GetSiteGroups$inboundSchema: z.ZodType< + GetSiteGroups, + z.ZodTypeDef, + unknown +> = z.object({ + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + id: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + }); +}); /** @internal */ export type GetSiteGroups$Outbound = { - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - id: number; - name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + id: number; + name: string; }; /** @internal */ export const GetSiteGroups$outboundSchema: z.ZodType< - GetSiteGroups$Outbound, - z.ZodTypeDef, - GetSiteGroups -> = z - .object({ - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - id: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - }); - }); + GetSiteGroups$Outbound, + z.ZodTypeDef, + GetSiteGroups +> = z.object({ + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + id: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSiteGroups$ { - /** @deprecated use `GetSiteGroups$inboundSchema` instead. */ - export const inboundSchema = GetSiteGroups$inboundSchema; - /** @deprecated use `GetSiteGroups$outboundSchema` instead. */ - export const outboundSchema = GetSiteGroups$outboundSchema; - /** @deprecated use `GetSiteGroups$Outbound` instead. */ - export type Outbound = GetSiteGroups$Outbound; + /** @deprecated use `GetSiteGroups$inboundSchema` instead. */ + export const inboundSchema = GetSiteGroups$inboundSchema; + /** @deprecated use `GetSiteGroups$outboundSchema` instead. */ + export const outboundSchema = GetSiteGroups$outboundSchema; + /** @deprecated use `GetSiteGroups$Outbound` instead. */ + export type Outbound = GetSiteGroups$Outbound; } /** @internal */ export const HashtagConfigurations$inboundSchema: z.ZodType< - HashtagConfigurations, - z.ZodTypeDef, - unknown + HashtagConfigurations, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -698,9 +707,9 @@ export type HashtagConfigurations$Outbound = {}; /** @internal */ export const HashtagConfigurations$outboundSchema: z.ZodType< - HashtagConfigurations$Outbound, - z.ZodTypeDef, - HashtagConfigurations + HashtagConfigurations$Outbound, + z.ZodTypeDef, + HashtagConfigurations > = z.object({}); /** @@ -708,27 +717,29 @@ export const HashtagConfigurations$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HashtagConfigurations$ { - /** @deprecated use `HashtagConfigurations$inboundSchema` instead. */ - export const inboundSchema = HashtagConfigurations$inboundSchema; - /** @deprecated use `HashtagConfigurations$outboundSchema` instead. */ - export const outboundSchema = HashtagConfigurations$outboundSchema; - /** @deprecated use `HashtagConfigurations$Outbound` instead. */ - export type Outbound = HashtagConfigurations$Outbound; + /** @deprecated use `HashtagConfigurations$inboundSchema` instead. */ + export const inboundSchema = HashtagConfigurations$inboundSchema; + /** @deprecated use `HashtagConfigurations$outboundSchema` instead. */ + export const outboundSchema = HashtagConfigurations$outboundSchema; + /** @deprecated use `HashtagConfigurations$Outbound` instead. */ + export type Outbound = HashtagConfigurations$Outbound; } /** @internal */ -export const HashtagIcons$inboundSchema: z.ZodType = z.object( - {} -); +export const HashtagIcons$inboundSchema: z.ZodType< + HashtagIcons, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type HashtagIcons$Outbound = {}; /** @internal */ export const HashtagIcons$outboundSchema: z.ZodType< - HashtagIcons$Outbound, - z.ZodTypeDef, - HashtagIcons + HashtagIcons$Outbound, + z.ZodTypeDef, + HashtagIcons > = z.object({}); /** @@ -736,19 +747,19 @@ export const HashtagIcons$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HashtagIcons$ { - /** @deprecated use `HashtagIcons$inboundSchema` instead. */ - export const inboundSchema = HashtagIcons$inboundSchema; - /** @deprecated use `HashtagIcons$outboundSchema` instead. */ - export const outboundSchema = HashtagIcons$outboundSchema; - /** @deprecated use `HashtagIcons$Outbound` instead. */ - export type Outbound = HashtagIcons$Outbound; + /** @deprecated use `HashtagIcons$inboundSchema` instead. */ + export const inboundSchema = HashtagIcons$inboundSchema; + /** @deprecated use `HashtagIcons$outboundSchema` instead. */ + export const outboundSchema = HashtagIcons$outboundSchema; + /** @deprecated use `HashtagIcons$Outbound` instead. */ + export type Outbound = HashtagIcons$Outbound; } /** @internal */ export const MarkdownAdditionalOptions$inboundSchema: z.ZodType< - MarkdownAdditionalOptions, - z.ZodTypeDef, - unknown + MarkdownAdditionalOptions, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -756,9 +767,9 @@ export type MarkdownAdditionalOptions$Outbound = {}; /** @internal */ export const MarkdownAdditionalOptions$outboundSchema: z.ZodType< - MarkdownAdditionalOptions$Outbound, - z.ZodTypeDef, - MarkdownAdditionalOptions + MarkdownAdditionalOptions$Outbound, + z.ZodTypeDef, + MarkdownAdditionalOptions > = z.object({}); /** @@ -766,458 +777,465 @@ export const MarkdownAdditionalOptions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkdownAdditionalOptions$ { - /** @deprecated use `MarkdownAdditionalOptions$inboundSchema` instead. */ - export const inboundSchema = MarkdownAdditionalOptions$inboundSchema; - /** @deprecated use `MarkdownAdditionalOptions$outboundSchema` instead. */ - export const outboundSchema = MarkdownAdditionalOptions$outboundSchema; - /** @deprecated use `MarkdownAdditionalOptions$Outbound` instead. */ - export type Outbound = MarkdownAdditionalOptions$Outbound; + /** @deprecated use `MarkdownAdditionalOptions$inboundSchema` instead. */ + export const inboundSchema = MarkdownAdditionalOptions$inboundSchema; + /** @deprecated use `MarkdownAdditionalOptions$outboundSchema` instead. */ + export const outboundSchema = MarkdownAdditionalOptions$outboundSchema; + /** @deprecated use `MarkdownAdditionalOptions$Outbound` instead. */ + export type Outbound = MarkdownAdditionalOptions$Outbound; } /** @internal */ -export const NotificationTypes$inboundSchema: z.ZodType = - z - .object({ - admin_problems: z.number().int().optional(), - assigned: z.number().int().optional(), - bookmark_reminder: z.number().int(), - chat_group_mention: z.number().int(), - chat_invitation: z.number().int(), - chat_mention: z.number().int(), - chat_message: z.number().int(), - chat_quoted: z.number().int().optional(), - circles_activity: z.number().int().optional(), - code_review_commit_approved: z.number().int(), - custom: z.number().int(), - edited: z.number().int(), - event_invitation: z.number().int(), - event_reminder: z.number().int(), - following: z.number().int().optional(), - following_created_topic: z.number().int().optional(), - following_replied: z.number().int().optional(), - granted_badge: z.number().int(), - group_mentioned: z.number().int(), - group_message_summary: z.number().int(), - invited_to_private_message: z.number().int(), - invited_to_topic: z.number().int(), - invitee_accepted: z.number().int(), - liked: z.number().int(), - liked_consolidated: z.number().int(), - linked: z.number().int(), - membership_request_accepted: z.number().int(), - membership_request_consolidated: z.number().int(), - mentioned: z.number().int(), - moved_post: z.number().int(), - new_features: z.number().int().optional(), - post_approved: z.number().int(), - posted: z.number().int(), - private_message: z.number().int(), - question_answer_user_commented: z.number().int().optional(), - quoted: z.number().int(), - reaction: z.number().int(), - replied: z.number().int(), - topic_reminder: z.number().int(), - votes_released: z.number().int(), - watching_category_or_tag: z.number().int(), - watching_first_post: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - admin_problems: "adminProblems", - bookmark_reminder: "bookmarkReminder", - chat_group_mention: "chatGroupMention", - chat_invitation: "chatInvitation", - chat_mention: "chatMention", - chat_message: "chatMessage", - chat_quoted: "chatQuoted", - circles_activity: "circlesActivity", - code_review_commit_approved: "codeReviewCommitApproved", - event_invitation: "eventInvitation", - event_reminder: "eventReminder", - following_created_topic: "followingCreatedTopic", - following_replied: "followingReplied", - granted_badge: "grantedBadge", - group_mentioned: "groupMentioned", - group_message_summary: "groupMessageSummary", - invited_to_private_message: "invitedToPrivateMessage", - invited_to_topic: "invitedToTopic", - invitee_accepted: "inviteeAccepted", - liked_consolidated: "likedConsolidated", - membership_request_accepted: "membershipRequestAccepted", - membership_request_consolidated: "membershipRequestConsolidated", - moved_post: "movedPost", - new_features: "newFeatures", - post_approved: "postApproved", - private_message: "privateMessage", - question_answer_user_commented: "questionAnswerUserCommented", - topic_reminder: "topicReminder", - votes_released: "votesReleased", - watching_category_or_tag: "watchingCategoryOrTag", - watching_first_post: "watchingFirstPost", - }); - }); +export const NotificationTypes$inboundSchema: z.ZodType< + NotificationTypes, + z.ZodTypeDef, + unknown +> = z.object({ + admin_problems: z.number().int().optional(), + assigned: z.number().int().optional(), + bookmark_reminder: z.number().int(), + chat_group_mention: z.number().int(), + chat_invitation: z.number().int(), + chat_mention: z.number().int(), + chat_message: z.number().int(), + chat_quoted: z.number().int().optional(), + circles_activity: z.number().int().optional(), + code_review_commit_approved: z.number().int(), + custom: z.number().int(), + edited: z.number().int(), + event_invitation: z.number().int(), + event_reminder: z.number().int(), + following: z.number().int().optional(), + following_created_topic: z.number().int().optional(), + following_replied: z.number().int().optional(), + granted_badge: z.number().int(), + group_mentioned: z.number().int(), + group_message_summary: z.number().int(), + invited_to_private_message: z.number().int(), + invited_to_topic: z.number().int(), + invitee_accepted: z.number().int(), + liked: z.number().int(), + liked_consolidated: z.number().int(), + linked: z.number().int(), + membership_request_accepted: z.number().int(), + membership_request_consolidated: z.number().int(), + mentioned: z.number().int(), + moved_post: z.number().int(), + new_features: z.number().int().optional(), + post_approved: z.number().int(), + posted: z.number().int(), + private_message: z.number().int(), + question_answer_user_commented: z.number().int().optional(), + quoted: z.number().int(), + reaction: z.number().int(), + replied: z.number().int(), + topic_reminder: z.number().int(), + votes_released: z.number().int(), + watching_category_or_tag: z.number().int(), + watching_first_post: z.number().int(), +}).transform((v) => { + return remap$(v, { + "admin_problems": "adminProblems", + "bookmark_reminder": "bookmarkReminder", + "chat_group_mention": "chatGroupMention", + "chat_invitation": "chatInvitation", + "chat_mention": "chatMention", + "chat_message": "chatMessage", + "chat_quoted": "chatQuoted", + "circles_activity": "circlesActivity", + "code_review_commit_approved": "codeReviewCommitApproved", + "event_invitation": "eventInvitation", + "event_reminder": "eventReminder", + "following_created_topic": "followingCreatedTopic", + "following_replied": "followingReplied", + "granted_badge": "grantedBadge", + "group_mentioned": "groupMentioned", + "group_message_summary": "groupMessageSummary", + "invited_to_private_message": "invitedToPrivateMessage", + "invited_to_topic": "invitedToTopic", + "invitee_accepted": "inviteeAccepted", + "liked_consolidated": "likedConsolidated", + "membership_request_accepted": "membershipRequestAccepted", + "membership_request_consolidated": "membershipRequestConsolidated", + "moved_post": "movedPost", + "new_features": "newFeatures", + "post_approved": "postApproved", + "private_message": "privateMessage", + "question_answer_user_commented": "questionAnswerUserCommented", + "topic_reminder": "topicReminder", + "votes_released": "votesReleased", + "watching_category_or_tag": "watchingCategoryOrTag", + "watching_first_post": "watchingFirstPost", + }); +}); /** @internal */ export type NotificationTypes$Outbound = { - admin_problems?: number | undefined; - assigned?: number | undefined; - bookmark_reminder: number; - chat_group_mention: number; - chat_invitation: number; - chat_mention: number; - chat_message: number; - chat_quoted?: number | undefined; - circles_activity?: number | undefined; - code_review_commit_approved: number; - custom: number; - edited: number; - event_invitation: number; - event_reminder: number; - following?: number | undefined; - following_created_topic?: number | undefined; - following_replied?: number | undefined; - granted_badge: number; - group_mentioned: number; - group_message_summary: number; - invited_to_private_message: number; - invited_to_topic: number; - invitee_accepted: number; - liked: number; - liked_consolidated: number; - linked: number; - membership_request_accepted: number; - membership_request_consolidated: number; - mentioned: number; - moved_post: number; - new_features?: number | undefined; - post_approved: number; - posted: number; - private_message: number; - question_answer_user_commented?: number | undefined; - quoted: number; - reaction: number; - replied: number; - topic_reminder: number; - votes_released: number; - watching_category_or_tag: number; - watching_first_post: number; + admin_problems?: number | undefined; + assigned?: number | undefined; + bookmark_reminder: number; + chat_group_mention: number; + chat_invitation: number; + chat_mention: number; + chat_message: number; + chat_quoted?: number | undefined; + circles_activity?: number | undefined; + code_review_commit_approved: number; + custom: number; + edited: number; + event_invitation: number; + event_reminder: number; + following?: number | undefined; + following_created_topic?: number | undefined; + following_replied?: number | undefined; + granted_badge: number; + group_mentioned: number; + group_message_summary: number; + invited_to_private_message: number; + invited_to_topic: number; + invitee_accepted: number; + liked: number; + liked_consolidated: number; + linked: number; + membership_request_accepted: number; + membership_request_consolidated: number; + mentioned: number; + moved_post: number; + new_features?: number | undefined; + post_approved: number; + posted: number; + private_message: number; + question_answer_user_commented?: number | undefined; + quoted: number; + reaction: number; + replied: number; + topic_reminder: number; + votes_released: number; + watching_category_or_tag: number; + watching_first_post: number; }; /** @internal */ export const NotificationTypes$outboundSchema: z.ZodType< - NotificationTypes$Outbound, - z.ZodTypeDef, - NotificationTypes -> = z - .object({ - adminProblems: z.number().int().optional(), - assigned: z.number().int().optional(), - bookmarkReminder: z.number().int(), - chatGroupMention: z.number().int(), - chatInvitation: z.number().int(), - chatMention: z.number().int(), - chatMessage: z.number().int(), - chatQuoted: z.number().int().optional(), - circlesActivity: z.number().int().optional(), - codeReviewCommitApproved: z.number().int(), - custom: z.number().int(), - edited: z.number().int(), - eventInvitation: z.number().int(), - eventReminder: z.number().int(), - following: z.number().int().optional(), - followingCreatedTopic: z.number().int().optional(), - followingReplied: z.number().int().optional(), - grantedBadge: z.number().int(), - groupMentioned: z.number().int(), - groupMessageSummary: z.number().int(), - invitedToPrivateMessage: z.number().int(), - invitedToTopic: z.number().int(), - inviteeAccepted: z.number().int(), - liked: z.number().int(), - likedConsolidated: z.number().int(), - linked: z.number().int(), - membershipRequestAccepted: z.number().int(), - membershipRequestConsolidated: z.number().int(), - mentioned: z.number().int(), - movedPost: z.number().int(), - newFeatures: z.number().int().optional(), - postApproved: z.number().int(), - posted: z.number().int(), - privateMessage: z.number().int(), - questionAnswerUserCommented: z.number().int().optional(), - quoted: z.number().int(), - reaction: z.number().int(), - replied: z.number().int(), - topicReminder: z.number().int(), - votesReleased: z.number().int(), - watchingCategoryOrTag: z.number().int(), - watchingFirstPost: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - adminProblems: "admin_problems", - bookmarkReminder: "bookmark_reminder", - chatGroupMention: "chat_group_mention", - chatInvitation: "chat_invitation", - chatMention: "chat_mention", - chatMessage: "chat_message", - chatQuoted: "chat_quoted", - circlesActivity: "circles_activity", - codeReviewCommitApproved: "code_review_commit_approved", - eventInvitation: "event_invitation", - eventReminder: "event_reminder", - followingCreatedTopic: "following_created_topic", - followingReplied: "following_replied", - grantedBadge: "granted_badge", - groupMentioned: "group_mentioned", - groupMessageSummary: "group_message_summary", - invitedToPrivateMessage: "invited_to_private_message", - invitedToTopic: "invited_to_topic", - inviteeAccepted: "invitee_accepted", - likedConsolidated: "liked_consolidated", - membershipRequestAccepted: "membership_request_accepted", - membershipRequestConsolidated: "membership_request_consolidated", - movedPost: "moved_post", - newFeatures: "new_features", - postApproved: "post_approved", - privateMessage: "private_message", - questionAnswerUserCommented: "question_answer_user_commented", - topicReminder: "topic_reminder", - votesReleased: "votes_released", - watchingCategoryOrTag: "watching_category_or_tag", - watchingFirstPost: "watching_first_post", - }); - }); + NotificationTypes$Outbound, + z.ZodTypeDef, + NotificationTypes +> = z.object({ + adminProblems: z.number().int().optional(), + assigned: z.number().int().optional(), + bookmarkReminder: z.number().int(), + chatGroupMention: z.number().int(), + chatInvitation: z.number().int(), + chatMention: z.number().int(), + chatMessage: z.number().int(), + chatQuoted: z.number().int().optional(), + circlesActivity: z.number().int().optional(), + codeReviewCommitApproved: z.number().int(), + custom: z.number().int(), + edited: z.number().int(), + eventInvitation: z.number().int(), + eventReminder: z.number().int(), + following: z.number().int().optional(), + followingCreatedTopic: z.number().int().optional(), + followingReplied: z.number().int().optional(), + grantedBadge: z.number().int(), + groupMentioned: z.number().int(), + groupMessageSummary: z.number().int(), + invitedToPrivateMessage: z.number().int(), + invitedToTopic: z.number().int(), + inviteeAccepted: z.number().int(), + liked: z.number().int(), + likedConsolidated: z.number().int(), + linked: z.number().int(), + membershipRequestAccepted: z.number().int(), + membershipRequestConsolidated: z.number().int(), + mentioned: z.number().int(), + movedPost: z.number().int(), + newFeatures: z.number().int().optional(), + postApproved: z.number().int(), + posted: z.number().int(), + privateMessage: z.number().int(), + questionAnswerUserCommented: z.number().int().optional(), + quoted: z.number().int(), + reaction: z.number().int(), + replied: z.number().int(), + topicReminder: z.number().int(), + votesReleased: z.number().int(), + watchingCategoryOrTag: z.number().int(), + watchingFirstPost: z.number().int(), +}).transform((v) => { + return remap$(v, { + adminProblems: "admin_problems", + bookmarkReminder: "bookmark_reminder", + chatGroupMention: "chat_group_mention", + chatInvitation: "chat_invitation", + chatMention: "chat_mention", + chatMessage: "chat_message", + chatQuoted: "chat_quoted", + circlesActivity: "circles_activity", + codeReviewCommitApproved: "code_review_commit_approved", + eventInvitation: "event_invitation", + eventReminder: "event_reminder", + followingCreatedTopic: "following_created_topic", + followingReplied: "following_replied", + grantedBadge: "granted_badge", + groupMentioned: "group_mentioned", + groupMessageSummary: "group_message_summary", + invitedToPrivateMessage: "invited_to_private_message", + invitedToTopic: "invited_to_topic", + inviteeAccepted: "invitee_accepted", + likedConsolidated: "liked_consolidated", + membershipRequestAccepted: "membership_request_accepted", + membershipRequestConsolidated: "membership_request_consolidated", + movedPost: "moved_post", + newFeatures: "new_features", + postApproved: "post_approved", + privateMessage: "private_message", + questionAnswerUserCommented: "question_answer_user_commented", + topicReminder: "topic_reminder", + votesReleased: "votes_released", + watchingCategoryOrTag: "watching_category_or_tag", + watchingFirstPost: "watching_first_post", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationTypes$ { - /** @deprecated use `NotificationTypes$inboundSchema` instead. */ - export const inboundSchema = NotificationTypes$inboundSchema; - /** @deprecated use `NotificationTypes$outboundSchema` instead. */ - export const outboundSchema = NotificationTypes$outboundSchema; - /** @deprecated use `NotificationTypes$Outbound` instead. */ - export type Outbound = NotificationTypes$Outbound; + /** @deprecated use `NotificationTypes$inboundSchema` instead. */ + export const inboundSchema = NotificationTypes$inboundSchema; + /** @deprecated use `NotificationTypes$outboundSchema` instead. */ + export const outboundSchema = NotificationTypes$outboundSchema; + /** @deprecated use `NotificationTypes$Outbound` instead. */ + export type Outbound = NotificationTypes$Outbound; } /** @internal */ -export const PostActionTypes$inboundSchema: z.ZodType = z - .object({ - description: z.string(), - id: z.nullable(z.number().int()), - is_custom_flag: z.boolean(), - is_flag: z.boolean(), - name: z.string(), - name_key: z.nullable(z.string()), - short_description: z.string(), - }) - .transform((v) => { - return remap$(v, { - is_custom_flag: "isCustomFlag", - is_flag: "isFlag", - name_key: "nameKey", - short_description: "shortDescription", - }); - }); +export const PostActionTypes$inboundSchema: z.ZodType< + PostActionTypes, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string(), + id: z.nullable(z.number().int()), + is_custom_flag: z.boolean(), + is_flag: z.boolean(), + name: z.string(), + name_key: z.nullable(z.string()), + short_description: z.string(), +}).transform((v) => { + return remap$(v, { + "is_custom_flag": "isCustomFlag", + "is_flag": "isFlag", + "name_key": "nameKey", + "short_description": "shortDescription", + }); +}); /** @internal */ export type PostActionTypes$Outbound = { - description: string; - id: number | null; - is_custom_flag: boolean; - is_flag: boolean; - name: string; - name_key: string | null; - short_description: string; + description: string; + id: number | null; + is_custom_flag: boolean; + is_flag: boolean; + name: string; + name_key: string | null; + short_description: string; }; /** @internal */ export const PostActionTypes$outboundSchema: z.ZodType< - PostActionTypes$Outbound, - z.ZodTypeDef, - PostActionTypes -> = z - .object({ - description: z.string(), - id: z.nullable(z.number().int()), - isCustomFlag: z.boolean(), - isFlag: z.boolean(), - name: z.string(), - nameKey: z.nullable(z.string()), - shortDescription: z.string(), - }) - .transform((v) => { - return remap$(v, { - isCustomFlag: "is_custom_flag", - isFlag: "is_flag", - nameKey: "name_key", - shortDescription: "short_description", - }); - }); + PostActionTypes$Outbound, + z.ZodTypeDef, + PostActionTypes +> = z.object({ + description: z.string(), + id: z.nullable(z.number().int()), + isCustomFlag: z.boolean(), + isFlag: z.boolean(), + name: z.string(), + nameKey: z.nullable(z.string()), + shortDescription: z.string(), +}).transform((v) => { + return remap$(v, { + isCustomFlag: "is_custom_flag", + isFlag: "is_flag", + nameKey: "name_key", + shortDescription: "short_description", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostActionTypes$ { - /** @deprecated use `PostActionTypes$inboundSchema` instead. */ - export const inboundSchema = PostActionTypes$inboundSchema; - /** @deprecated use `PostActionTypes$outboundSchema` instead. */ - export const outboundSchema = PostActionTypes$outboundSchema; - /** @deprecated use `PostActionTypes$Outbound` instead. */ - export type Outbound = PostActionTypes$Outbound; + /** @deprecated use `PostActionTypes$inboundSchema` instead. */ + export const inboundSchema = PostActionTypes$inboundSchema; + /** @deprecated use `PostActionTypes$outboundSchema` instead. */ + export const outboundSchema = PostActionTypes$outboundSchema; + /** @deprecated use `PostActionTypes$Outbound` instead. */ + export type Outbound = PostActionTypes$Outbound; } /** @internal */ -export const PostTypes$inboundSchema: z.ZodType = z - .object({ - moderator_action: z.number().int(), - regular: z.number().int(), - small_action: z.number().int(), - whisper: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - moderator_action: "moderatorAction", - small_action: "smallAction", - }); - }); +export const PostTypes$inboundSchema: z.ZodType< + PostTypes, + z.ZodTypeDef, + unknown +> = z.object({ + moderator_action: z.number().int(), + regular: z.number().int(), + small_action: z.number().int(), + whisper: z.number().int(), +}).transform((v) => { + return remap$(v, { + "moderator_action": "moderatorAction", + "small_action": "smallAction", + }); +}); /** @internal */ export type PostTypes$Outbound = { - moderator_action: number; - regular: number; - small_action: number; - whisper: number; + moderator_action: number; + regular: number; + small_action: number; + whisper: number; }; /** @internal */ -export const PostTypes$outboundSchema: z.ZodType = z - .object({ - moderatorAction: z.number().int(), - regular: z.number().int(), - smallAction: z.number().int(), - whisper: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - moderatorAction: "moderator_action", - smallAction: "small_action", - }); - }); +export const PostTypes$outboundSchema: z.ZodType< + PostTypes$Outbound, + z.ZodTypeDef, + PostTypes +> = z.object({ + moderatorAction: z.number().int(), + regular: z.number().int(), + smallAction: z.number().int(), + whisper: z.number().int(), +}).transform((v) => { + return remap$(v, { + moderatorAction: "moderator_action", + smallAction: "small_action", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostTypes$ { - /** @deprecated use `PostTypes$inboundSchema` instead. */ - export const inboundSchema = PostTypes$inboundSchema; - /** @deprecated use `PostTypes$outboundSchema` instead. */ - export const outboundSchema = PostTypes$outboundSchema; - /** @deprecated use `PostTypes$Outbound` instead. */ - export type Outbound = PostTypes$Outbound; + /** @deprecated use `PostTypes$inboundSchema` instead. */ + export const inboundSchema = PostTypes$inboundSchema; + /** @deprecated use `PostTypes$outboundSchema` instead. */ + export const outboundSchema = PostTypes$outboundSchema; + /** @deprecated use `PostTypes$Outbound` instead. */ + export type Outbound = PostTypes$Outbound; } /** @internal */ -export const TopicFlagTypes$inboundSchema: z.ZodType = z - .object({ - description: z.string(), - id: z.nullable(z.number().int()), - is_custom_flag: z.boolean(), - is_flag: z.boolean(), - name: z.string(), - name_key: z.nullable(z.string()), - short_description: z.string(), - }) - .transform((v) => { - return remap$(v, { - is_custom_flag: "isCustomFlag", - is_flag: "isFlag", - name_key: "nameKey", - short_description: "shortDescription", - }); - }); +export const TopicFlagTypes$inboundSchema: z.ZodType< + TopicFlagTypes, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string(), + id: z.nullable(z.number().int()), + is_custom_flag: z.boolean(), + is_flag: z.boolean(), + name: z.string(), + name_key: z.nullable(z.string()), + short_description: z.string(), +}).transform((v) => { + return remap$(v, { + "is_custom_flag": "isCustomFlag", + "is_flag": "isFlag", + "name_key": "nameKey", + "short_description": "shortDescription", + }); +}); /** @internal */ export type TopicFlagTypes$Outbound = { - description: string; - id: number | null; - is_custom_flag: boolean; - is_flag: boolean; - name: string; - name_key: string | null; - short_description: string; + description: string; + id: number | null; + is_custom_flag: boolean; + is_flag: boolean; + name: string; + name_key: string | null; + short_description: string; }; /** @internal */ export const TopicFlagTypes$outboundSchema: z.ZodType< - TopicFlagTypes$Outbound, - z.ZodTypeDef, - TopicFlagTypes -> = z - .object({ - description: z.string(), - id: z.nullable(z.number().int()), - isCustomFlag: z.boolean(), - isFlag: z.boolean(), - name: z.string(), - nameKey: z.nullable(z.string()), - shortDescription: z.string(), - }) - .transform((v) => { - return remap$(v, { - isCustomFlag: "is_custom_flag", - isFlag: "is_flag", - nameKey: "name_key", - shortDescription: "short_description", - }); - }); + TopicFlagTypes$Outbound, + z.ZodTypeDef, + TopicFlagTypes +> = z.object({ + description: z.string(), + id: z.nullable(z.number().int()), + isCustomFlag: z.boolean(), + isFlag: z.boolean(), + name: z.string(), + nameKey: z.nullable(z.string()), + shortDescription: z.string(), +}).transform((v) => { + return remap$(v, { + isCustomFlag: "is_custom_flag", + isFlag: "is_flag", + nameKey: "name_key", + shortDescription: "short_description", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicFlagTypes$ { - /** @deprecated use `TopicFlagTypes$inboundSchema` instead. */ - export const inboundSchema = TopicFlagTypes$inboundSchema; - /** @deprecated use `TopicFlagTypes$outboundSchema` instead. */ - export const outboundSchema = TopicFlagTypes$outboundSchema; - /** @deprecated use `TopicFlagTypes$Outbound` instead. */ - export type Outbound = TopicFlagTypes$Outbound; + /** @deprecated use `TopicFlagTypes$inboundSchema` instead. */ + export const inboundSchema = TopicFlagTypes$inboundSchema; + /** @deprecated use `TopicFlagTypes$outboundSchema` instead. */ + export const outboundSchema = TopicFlagTypes$outboundSchema; + /** @deprecated use `TopicFlagTypes$Outbound` instead. */ + export type Outbound = TopicFlagTypes$Outbound; } /** @internal */ -export const TrustLevels$inboundSchema: z.ZodType = z.object({ - basic: z.number().int(), - leader: z.number().int(), - member: z.number().int(), - newuser: z.number().int(), - regular: z.number().int(), +export const TrustLevels$inboundSchema: z.ZodType< + TrustLevels, + z.ZodTypeDef, + unknown +> = z.object({ + basic: z.number().int(), + leader: z.number().int(), + member: z.number().int(), + newuser: z.number().int(), + regular: z.number().int(), }); /** @internal */ export type TrustLevels$Outbound = { - basic: number; - leader: number; - member: number; - newuser: number; - regular: number; + basic: number; + leader: number; + member: number; + newuser: number; + regular: number; }; /** @internal */ export const TrustLevels$outboundSchema: z.ZodType< - TrustLevels$Outbound, - z.ZodTypeDef, - TrustLevels + TrustLevels$Outbound, + z.ZodTypeDef, + TrustLevels > = z.object({ - basic: z.number().int(), - leader: z.number().int(), - member: z.number().int(), - newuser: z.number().int(), - regular: z.number().int(), + basic: z.number().int(), + leader: z.number().int(), + member: z.number().int(), + newuser: z.number().int(), + regular: z.number().int(), }); /** @@ -1225,413 +1243,425 @@ export const TrustLevels$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TrustLevels$ { - /** @deprecated use `TrustLevels$inboundSchema` instead. */ - export const inboundSchema = TrustLevels$inboundSchema; - /** @deprecated use `TrustLevels$outboundSchema` instead. */ - export const outboundSchema = TrustLevels$outboundSchema; - /** @deprecated use `TrustLevels$Outbound` instead. */ - export type Outbound = TrustLevels$Outbound; + /** @deprecated use `TrustLevels$inboundSchema` instead. */ + export const inboundSchema = TrustLevels$inboundSchema; + /** @deprecated use `TrustLevels$outboundSchema` instead. */ + export const outboundSchema = TrustLevels$outboundSchema; + /** @deprecated use `TrustLevels$Outbound` instead. */ + export type Outbound = TrustLevels$Outbound; } /** @internal */ -export const UserColorSchemes$inboundSchema: z.ZodType = z - .object({ - id: z.number().int(), - is_dark: z.boolean(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - is_dark: "isDark", - }); - }); +export const UserColorSchemes$inboundSchema: z.ZodType< + UserColorSchemes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + is_dark: z.boolean(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "is_dark": "isDark", + }); +}); /** @internal */ export type UserColorSchemes$Outbound = { - id: number; - is_dark: boolean; - name: string; + id: number; + is_dark: boolean; + name: string; }; /** @internal */ export const UserColorSchemes$outboundSchema: z.ZodType< - UserColorSchemes$Outbound, - z.ZodTypeDef, - UserColorSchemes -> = z - .object({ - id: z.number().int(), - isDark: z.boolean(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - isDark: "is_dark", - }); - }); + UserColorSchemes$Outbound, + z.ZodTypeDef, + UserColorSchemes +> = z.object({ + id: z.number().int(), + isDark: z.boolean(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + isDark: "is_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserColorSchemes$ { - /** @deprecated use `UserColorSchemes$inboundSchema` instead. */ - export const inboundSchema = UserColorSchemes$inboundSchema; - /** @deprecated use `UserColorSchemes$outboundSchema` instead. */ - export const outboundSchema = UserColorSchemes$outboundSchema; - /** @deprecated use `UserColorSchemes$Outbound` instead. */ - export type Outbound = UserColorSchemes$Outbound; + /** @deprecated use `UserColorSchemes$inboundSchema` instead. */ + export const inboundSchema = UserColorSchemes$inboundSchema; + /** @deprecated use `UserColorSchemes$outboundSchema` instead. */ + export const outboundSchema = UserColorSchemes$outboundSchema; + /** @deprecated use `UserColorSchemes$Outbound` instead. */ + export type Outbound = UserColorSchemes$Outbound; } /** @internal */ -export const UserThemes$inboundSchema: z.ZodType = z - .object({ - color_scheme_id: z.nullable(z.number().int()), - default: z.boolean(), - name: z.string(), - theme_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - color_scheme_id: "colorSchemeId", - theme_id: "themeId", - }); - }); +export const UserThemes$inboundSchema: z.ZodType< + UserThemes, + z.ZodTypeDef, + unknown +> = z.object({ + color_scheme_id: z.nullable(z.number().int()), + default: z.boolean(), + name: z.string(), + theme_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "color_scheme_id": "colorSchemeId", + "theme_id": "themeId", + }); +}); /** @internal */ export type UserThemes$Outbound = { - color_scheme_id: number | null; - default: boolean; - name: string; - theme_id: number; + color_scheme_id: number | null; + default: boolean; + name: string; + theme_id: number; }; /** @internal */ -export const UserThemes$outboundSchema: z.ZodType = z - .object({ - colorSchemeId: z.nullable(z.number().int()), - default: z.boolean(), - name: z.string(), - themeId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - colorSchemeId: "color_scheme_id", - themeId: "theme_id", - }); - }); +export const UserThemes$outboundSchema: z.ZodType< + UserThemes$Outbound, + z.ZodTypeDef, + UserThemes +> = z.object({ + colorSchemeId: z.nullable(z.number().int()), + default: z.boolean(), + name: z.string(), + themeId: z.number().int(), +}).transform((v) => { + return remap$(v, { + colorSchemeId: "color_scheme_id", + themeId: "theme_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserThemes$ { - /** @deprecated use `UserThemes$inboundSchema` instead. */ - export const inboundSchema = UserThemes$inboundSchema; - /** @deprecated use `UserThemes$outboundSchema` instead. */ - export const outboundSchema = UserThemes$outboundSchema; - /** @deprecated use `UserThemes$Outbound` instead. */ - export type Outbound = UserThemes$Outbound; + /** @deprecated use `UserThemes$inboundSchema` instead. */ + export const inboundSchema = UserThemes$inboundSchema; + /** @deprecated use `UserThemes$outboundSchema` instead. */ + export const outboundSchema = UserThemes$outboundSchema; + /** @deprecated use `UserThemes$Outbound` instead. */ + export type Outbound = UserThemes$Outbound; } /** @internal */ -export const UserTips$inboundSchema: z.ZodType = z - .object({ - admin_guide: z.number().int(), - first_notification: z.number().int(), - post_menu: z.number().int(), - suggested_topics: z.number().int(), - topic_notification_levels: z.number().int(), - topic_timeline: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - admin_guide: "adminGuide", - first_notification: "firstNotification", - post_menu: "postMenu", - suggested_topics: "suggestedTopics", - topic_notification_levels: "topicNotificationLevels", - topic_timeline: "topicTimeline", - }); - }); +export const UserTips$inboundSchema: z.ZodType< + UserTips, + z.ZodTypeDef, + unknown +> = z.object({ + admin_guide: z.number().int(), + first_notification: z.number().int(), + post_menu: z.number().int(), + suggested_topics: z.number().int(), + topic_notification_levels: z.number().int(), + topic_timeline: z.number().int(), +}).transform((v) => { + return remap$(v, { + "admin_guide": "adminGuide", + "first_notification": "firstNotification", + "post_menu": "postMenu", + "suggested_topics": "suggestedTopics", + "topic_notification_levels": "topicNotificationLevels", + "topic_timeline": "topicTimeline", + }); +}); /** @internal */ export type UserTips$Outbound = { - admin_guide: number; - first_notification: number; - post_menu: number; - suggested_topics: number; - topic_notification_levels: number; - topic_timeline: number; + admin_guide: number; + first_notification: number; + post_menu: number; + suggested_topics: number; + topic_notification_levels: number; + topic_timeline: number; }; /** @internal */ -export const UserTips$outboundSchema: z.ZodType = z - .object({ - adminGuide: z.number().int(), - firstNotification: z.number().int(), - postMenu: z.number().int(), - suggestedTopics: z.number().int(), - topicNotificationLevels: z.number().int(), - topicTimeline: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - adminGuide: "admin_guide", - firstNotification: "first_notification", - postMenu: "post_menu", - suggestedTopics: "suggested_topics", - topicNotificationLevels: "topic_notification_levels", - topicTimeline: "topic_timeline", - }); - }); +export const UserTips$outboundSchema: z.ZodType< + UserTips$Outbound, + z.ZodTypeDef, + UserTips +> = z.object({ + adminGuide: z.number().int(), + firstNotification: z.number().int(), + postMenu: z.number().int(), + suggestedTopics: z.number().int(), + topicNotificationLevels: z.number().int(), + topicTimeline: z.number().int(), +}).transform((v) => { + return remap$(v, { + adminGuide: "admin_guide", + firstNotification: "first_notification", + postMenu: "post_menu", + suggestedTopics: "suggested_topics", + topicNotificationLevels: "topic_notification_levels", + topicTimeline: "topic_timeline", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserTips$ { - /** @deprecated use `UserTips$inboundSchema` instead. */ - export const inboundSchema = UserTips$inboundSchema; - /** @deprecated use `UserTips$outboundSchema` instead. */ - export const outboundSchema = UserTips$outboundSchema; - /** @deprecated use `UserTips$Outbound` instead. */ - export type Outbound = UserTips$Outbound; + /** @deprecated use `UserTips$inboundSchema` instead. */ + export const inboundSchema = UserTips$inboundSchema; + /** @deprecated use `UserTips$outboundSchema` instead. */ + export const outboundSchema = UserTips$outboundSchema; + /** @deprecated use `UserTips$Outbound` instead. */ + export type Outbound = UserTips$Outbound; } /** @internal */ export const GetSiteResponseBody$inboundSchema: z.ZodType< - GetSiteResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - anonymous_top_menu_items: z.array(z.any()), - archetypes: z.array(z.lazy(() => Archetypes$inboundSchema)), - auth_providers: z.array(z.any()), - can_associate_groups: z.boolean().optional(), - can_create_tag: z.boolean(), - can_tag_pms: z.boolean(), - can_tag_topics: z.boolean(), - categories: z.array(z.lazy(() => GetSiteCategories$inboundSchema)), - censored_regexp: z.array(z.lazy(() => CensoredRegexp$inboundSchema)), - custom_emoji_translation: z.lazy(() => CustomEmojiTranslation$inboundSchema), - default_archetype: z.string(), - default_dark_color_scheme: z.nullable(z.lazy(() => DefaultDarkColorScheme$inboundSchema)), - denied_emojis: z.array(z.any()).optional(), - displayed_about_plugin_stat_groups: z.array(z.any()).optional(), - filters: z.array(z.any()), - groups: z.array(z.lazy(() => GetSiteGroups$inboundSchema)), - hashtag_configurations: z.lazy(() => HashtagConfigurations$inboundSchema).optional(), - hashtag_icons: z.lazy(() => HashtagIcons$inboundSchema).optional(), - markdown_additional_options: z - .lazy(() => MarkdownAdditionalOptions$inboundSchema) - .optional(), - navigation_menu_site_top_tags: z.array(z.any()).optional(), - notification_types: z.lazy(() => NotificationTypes$inboundSchema), - periods: z.array(z.any()), - post_action_types: z.array(z.lazy(() => PostActionTypes$inboundSchema)), - post_types: z.lazy(() => PostTypes$inboundSchema), - tags_filter_regexp: z.string(), - top_menu_items: z.array(z.any()), - top_tags: z.array(z.any()), - topic_featured_link_allowed_category_ids: z.array(z.any()), - topic_flag_types: z.array(z.lazy(() => TopicFlagTypes$inboundSchema)), - trust_levels: z.lazy(() => TrustLevels$inboundSchema), - uncategorized_category_id: z.number().int(), - user_color_schemes: z.array(z.lazy(() => UserColorSchemes$inboundSchema)), - user_field_max_length: z.number().int(), - user_fields: z.array(z.any()), - user_themes: z.array(z.lazy(() => UserThemes$inboundSchema)), - user_tips: z.lazy(() => UserTips$inboundSchema).optional(), - watched_words_link: z.nullable(z.string()), - watched_words_replace: z.nullable(z.string()), - whispers_allowed_groups_names: z.array(z.any()).optional(), - wizard_required: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - anonymous_top_menu_items: "anonymousTopMenuItems", - auth_providers: "authProviders", - can_associate_groups: "canAssociateGroups", - can_create_tag: "canCreateTag", - can_tag_pms: "canTagPms", - can_tag_topics: "canTagTopics", - censored_regexp: "censoredRegexp", - custom_emoji_translation: "customEmojiTranslation", - default_archetype: "defaultArchetype", - default_dark_color_scheme: "defaultDarkColorScheme", - denied_emojis: "deniedEmojis", - displayed_about_plugin_stat_groups: "displayedAboutPluginStatGroups", - hashtag_configurations: "hashtagConfigurations", - hashtag_icons: "hashtagIcons", - markdown_additional_options: "markdownAdditionalOptions", - navigation_menu_site_top_tags: "navigationMenuSiteTopTags", - notification_types: "notificationTypes", - post_action_types: "postActionTypes", - post_types: "postTypes", - tags_filter_regexp: "tagsFilterRegexp", - top_menu_items: "topMenuItems", - top_tags: "topTags", - topic_featured_link_allowed_category_ids: "topicFeaturedLinkAllowedCategoryIds", - topic_flag_types: "topicFlagTypes", - trust_levels: "trustLevels", - uncategorized_category_id: "uncategorizedCategoryId", - user_color_schemes: "userColorSchemes", - user_field_max_length: "userFieldMaxLength", - user_fields: "userFields", - user_themes: "userThemes", - user_tips: "userTips", - watched_words_link: "watchedWordsLink", - watched_words_replace: "watchedWordsReplace", - whispers_allowed_groups_names: "whispersAllowedGroupsNames", - wizard_required: "wizardRequired", - }); - }); + GetSiteResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + anonymous_top_menu_items: z.array(z.any()), + archetypes: z.array(z.lazy(() => Archetypes$inboundSchema)), + auth_providers: z.array(z.any()), + can_associate_groups: z.boolean().optional(), + can_create_tag: z.boolean(), + can_tag_pms: z.boolean(), + can_tag_topics: z.boolean(), + categories: z.array(z.lazy(() => GetSiteCategories$inboundSchema)), + censored_regexp: z.array(z.lazy(() => CensoredRegexp$inboundSchema)), + custom_emoji_translation: z.lazy(() => CustomEmojiTranslation$inboundSchema), + default_archetype: z.string(), + default_dark_color_scheme: z.nullable( + z.lazy(() => DefaultDarkColorScheme$inboundSchema), + ), + denied_emojis: z.array(z.any()).optional(), + displayed_about_plugin_stat_groups: z.array(z.any()).optional(), + filters: z.array(z.any()), + groups: z.array(z.lazy(() => GetSiteGroups$inboundSchema)), + hashtag_configurations: z.lazy(() => HashtagConfigurations$inboundSchema) + .optional(), + hashtag_icons: z.lazy(() => HashtagIcons$inboundSchema).optional(), + markdown_additional_options: z.lazy(() => + MarkdownAdditionalOptions$inboundSchema + ).optional(), + navigation_menu_site_top_tags: z.array(z.any()).optional(), + notification_types: z.lazy(() => NotificationTypes$inboundSchema), + periods: z.array(z.any()), + post_action_types: z.array(z.lazy(() => PostActionTypes$inboundSchema)), + post_types: z.lazy(() => PostTypes$inboundSchema), + tags_filter_regexp: z.string(), + top_menu_items: z.array(z.any()), + top_tags: z.array(z.any()), + topic_featured_link_allowed_category_ids: z.array(z.any()), + topic_flag_types: z.array(z.lazy(() => TopicFlagTypes$inboundSchema)), + trust_levels: z.lazy(() => TrustLevels$inboundSchema), + uncategorized_category_id: z.number().int(), + user_color_schemes: z.array(z.lazy(() => UserColorSchemes$inboundSchema)), + user_field_max_length: z.number().int(), + user_fields: z.array(z.any()), + user_themes: z.array(z.lazy(() => UserThemes$inboundSchema)), + user_tips: z.lazy(() => UserTips$inboundSchema).optional(), + watched_words_link: z.nullable(z.string()), + watched_words_replace: z.nullable(z.string()), + whispers_allowed_groups_names: z.array(z.any()).optional(), + wizard_required: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "anonymous_top_menu_items": "anonymousTopMenuItems", + "auth_providers": "authProviders", + "can_associate_groups": "canAssociateGroups", + "can_create_tag": "canCreateTag", + "can_tag_pms": "canTagPms", + "can_tag_topics": "canTagTopics", + "censored_regexp": "censoredRegexp", + "custom_emoji_translation": "customEmojiTranslation", + "default_archetype": "defaultArchetype", + "default_dark_color_scheme": "defaultDarkColorScheme", + "denied_emojis": "deniedEmojis", + "displayed_about_plugin_stat_groups": "displayedAboutPluginStatGroups", + "hashtag_configurations": "hashtagConfigurations", + "hashtag_icons": "hashtagIcons", + "markdown_additional_options": "markdownAdditionalOptions", + "navigation_menu_site_top_tags": "navigationMenuSiteTopTags", + "notification_types": "notificationTypes", + "post_action_types": "postActionTypes", + "post_types": "postTypes", + "tags_filter_regexp": "tagsFilterRegexp", + "top_menu_items": "topMenuItems", + "top_tags": "topTags", + "topic_featured_link_allowed_category_ids": + "topicFeaturedLinkAllowedCategoryIds", + "topic_flag_types": "topicFlagTypes", + "trust_levels": "trustLevels", + "uncategorized_category_id": "uncategorizedCategoryId", + "user_color_schemes": "userColorSchemes", + "user_field_max_length": "userFieldMaxLength", + "user_fields": "userFields", + "user_themes": "userThemes", + "user_tips": "userTips", + "watched_words_link": "watchedWordsLink", + "watched_words_replace": "watchedWordsReplace", + "whispers_allowed_groups_names": "whispersAllowedGroupsNames", + "wizard_required": "wizardRequired", + }); +}); /** @internal */ export type GetSiteResponseBody$Outbound = { - anonymous_top_menu_items: Array; - archetypes: Array; - auth_providers: Array; - can_associate_groups?: boolean | undefined; - can_create_tag: boolean; - can_tag_pms: boolean; - can_tag_topics: boolean; - categories: Array; - censored_regexp: Array; - custom_emoji_translation: CustomEmojiTranslation$Outbound; - default_archetype: string; - default_dark_color_scheme: DefaultDarkColorScheme$Outbound | null; - denied_emojis?: Array | undefined; - displayed_about_plugin_stat_groups?: Array | undefined; - filters: Array; - groups: Array; - hashtag_configurations?: HashtagConfigurations$Outbound | undefined; - hashtag_icons?: HashtagIcons$Outbound | undefined; - markdown_additional_options?: MarkdownAdditionalOptions$Outbound | undefined; - navigation_menu_site_top_tags?: Array | undefined; - notification_types: NotificationTypes$Outbound; - periods: Array; - post_action_types: Array; - post_types: PostTypes$Outbound; - tags_filter_regexp: string; - top_menu_items: Array; - top_tags: Array; - topic_featured_link_allowed_category_ids: Array; - topic_flag_types: Array; - trust_levels: TrustLevels$Outbound; - uncategorized_category_id: number; - user_color_schemes: Array; - user_field_max_length: number; - user_fields: Array; - user_themes: Array; - user_tips?: UserTips$Outbound | undefined; - watched_words_link: string | null; - watched_words_replace: string | null; - whispers_allowed_groups_names?: Array | undefined; - wizard_required?: boolean | undefined; + anonymous_top_menu_items: Array; + archetypes: Array; + auth_providers: Array; + can_associate_groups?: boolean | undefined; + can_create_tag: boolean; + can_tag_pms: boolean; + can_tag_topics: boolean; + categories: Array; + censored_regexp: Array; + custom_emoji_translation: CustomEmojiTranslation$Outbound; + default_archetype: string; + default_dark_color_scheme: DefaultDarkColorScheme$Outbound | null; + denied_emojis?: Array | undefined; + displayed_about_plugin_stat_groups?: Array | undefined; + filters: Array; + groups: Array; + hashtag_configurations?: HashtagConfigurations$Outbound | undefined; + hashtag_icons?: HashtagIcons$Outbound | undefined; + markdown_additional_options?: MarkdownAdditionalOptions$Outbound | undefined; + navigation_menu_site_top_tags?: Array | undefined; + notification_types: NotificationTypes$Outbound; + periods: Array; + post_action_types: Array; + post_types: PostTypes$Outbound; + tags_filter_regexp: string; + top_menu_items: Array; + top_tags: Array; + topic_featured_link_allowed_category_ids: Array; + topic_flag_types: Array; + trust_levels: TrustLevels$Outbound; + uncategorized_category_id: number; + user_color_schemes: Array; + user_field_max_length: number; + user_fields: Array; + user_themes: Array; + user_tips?: UserTips$Outbound | undefined; + watched_words_link: string | null; + watched_words_replace: string | null; + whispers_allowed_groups_names?: Array | undefined; + wizard_required?: boolean | undefined; }; /** @internal */ export const GetSiteResponseBody$outboundSchema: z.ZodType< - GetSiteResponseBody$Outbound, - z.ZodTypeDef, - GetSiteResponseBody -> = z - .object({ - anonymousTopMenuItems: z.array(z.any()), - archetypes: z.array(z.lazy(() => Archetypes$outboundSchema)), - authProviders: z.array(z.any()), - canAssociateGroups: z.boolean().optional(), - canCreateTag: z.boolean(), - canTagPms: z.boolean(), - canTagTopics: z.boolean(), - categories: z.array(z.lazy(() => GetSiteCategories$outboundSchema)), - censoredRegexp: z.array(z.lazy(() => CensoredRegexp$outboundSchema)), - customEmojiTranslation: z.lazy(() => CustomEmojiTranslation$outboundSchema), - defaultArchetype: z.string(), - defaultDarkColorScheme: z.nullable(z.lazy(() => DefaultDarkColorScheme$outboundSchema)), - deniedEmojis: z.array(z.any()).optional(), - displayedAboutPluginStatGroups: z.array(z.any()).optional(), - filters: z.array(z.any()), - groups: z.array(z.lazy(() => GetSiteGroups$outboundSchema)), - hashtagConfigurations: z.lazy(() => HashtagConfigurations$outboundSchema).optional(), - hashtagIcons: z.lazy(() => HashtagIcons$outboundSchema).optional(), - markdownAdditionalOptions: z - .lazy(() => MarkdownAdditionalOptions$outboundSchema) - .optional(), - navigationMenuSiteTopTags: z.array(z.any()).optional(), - notificationTypes: z.lazy(() => NotificationTypes$outboundSchema), - periods: z.array(z.any()), - postActionTypes: z.array(z.lazy(() => PostActionTypes$outboundSchema)), - postTypes: z.lazy(() => PostTypes$outboundSchema), - tagsFilterRegexp: z.string(), - topMenuItems: z.array(z.any()), - topTags: z.array(z.any()), - topicFeaturedLinkAllowedCategoryIds: z.array(z.any()), - topicFlagTypes: z.array(z.lazy(() => TopicFlagTypes$outboundSchema)), - trustLevels: z.lazy(() => TrustLevels$outboundSchema), - uncategorizedCategoryId: z.number().int(), - userColorSchemes: z.array(z.lazy(() => UserColorSchemes$outboundSchema)), - userFieldMaxLength: z.number().int(), - userFields: z.array(z.any()), - userThemes: z.array(z.lazy(() => UserThemes$outboundSchema)), - userTips: z.lazy(() => UserTips$outboundSchema).optional(), - watchedWordsLink: z.nullable(z.string()), - watchedWordsReplace: z.nullable(z.string()), - whispersAllowedGroupsNames: z.array(z.any()).optional(), - wizardRequired: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - anonymousTopMenuItems: "anonymous_top_menu_items", - authProviders: "auth_providers", - canAssociateGroups: "can_associate_groups", - canCreateTag: "can_create_tag", - canTagPms: "can_tag_pms", - canTagTopics: "can_tag_topics", - censoredRegexp: "censored_regexp", - customEmojiTranslation: "custom_emoji_translation", - defaultArchetype: "default_archetype", - defaultDarkColorScheme: "default_dark_color_scheme", - deniedEmojis: "denied_emojis", - displayedAboutPluginStatGroups: "displayed_about_plugin_stat_groups", - hashtagConfigurations: "hashtag_configurations", - hashtagIcons: "hashtag_icons", - markdownAdditionalOptions: "markdown_additional_options", - navigationMenuSiteTopTags: "navigation_menu_site_top_tags", - notificationTypes: "notification_types", - postActionTypes: "post_action_types", - postTypes: "post_types", - tagsFilterRegexp: "tags_filter_regexp", - topMenuItems: "top_menu_items", - topTags: "top_tags", - topicFeaturedLinkAllowedCategoryIds: "topic_featured_link_allowed_category_ids", - topicFlagTypes: "topic_flag_types", - trustLevels: "trust_levels", - uncategorizedCategoryId: "uncategorized_category_id", - userColorSchemes: "user_color_schemes", - userFieldMaxLength: "user_field_max_length", - userFields: "user_fields", - userThemes: "user_themes", - userTips: "user_tips", - watchedWordsLink: "watched_words_link", - watchedWordsReplace: "watched_words_replace", - whispersAllowedGroupsNames: "whispers_allowed_groups_names", - wizardRequired: "wizard_required", - }); - }); + GetSiteResponseBody$Outbound, + z.ZodTypeDef, + GetSiteResponseBody +> = z.object({ + anonymousTopMenuItems: z.array(z.any()), + archetypes: z.array(z.lazy(() => Archetypes$outboundSchema)), + authProviders: z.array(z.any()), + canAssociateGroups: z.boolean().optional(), + canCreateTag: z.boolean(), + canTagPms: z.boolean(), + canTagTopics: z.boolean(), + categories: z.array(z.lazy(() => GetSiteCategories$outboundSchema)), + censoredRegexp: z.array(z.lazy(() => CensoredRegexp$outboundSchema)), + customEmojiTranslation: z.lazy(() => CustomEmojiTranslation$outboundSchema), + defaultArchetype: z.string(), + defaultDarkColorScheme: z.nullable( + z.lazy(() => DefaultDarkColorScheme$outboundSchema), + ), + deniedEmojis: z.array(z.any()).optional(), + displayedAboutPluginStatGroups: z.array(z.any()).optional(), + filters: z.array(z.any()), + groups: z.array(z.lazy(() => GetSiteGroups$outboundSchema)), + hashtagConfigurations: z.lazy(() => HashtagConfigurations$outboundSchema) + .optional(), + hashtagIcons: z.lazy(() => HashtagIcons$outboundSchema).optional(), + markdownAdditionalOptions: z.lazy(() => + MarkdownAdditionalOptions$outboundSchema + ).optional(), + navigationMenuSiteTopTags: z.array(z.any()).optional(), + notificationTypes: z.lazy(() => NotificationTypes$outboundSchema), + periods: z.array(z.any()), + postActionTypes: z.array(z.lazy(() => PostActionTypes$outboundSchema)), + postTypes: z.lazy(() => PostTypes$outboundSchema), + tagsFilterRegexp: z.string(), + topMenuItems: z.array(z.any()), + topTags: z.array(z.any()), + topicFeaturedLinkAllowedCategoryIds: z.array(z.any()), + topicFlagTypes: z.array(z.lazy(() => TopicFlagTypes$outboundSchema)), + trustLevels: z.lazy(() => TrustLevels$outboundSchema), + uncategorizedCategoryId: z.number().int(), + userColorSchemes: z.array(z.lazy(() => UserColorSchemes$outboundSchema)), + userFieldMaxLength: z.number().int(), + userFields: z.array(z.any()), + userThemes: z.array(z.lazy(() => UserThemes$outboundSchema)), + userTips: z.lazy(() => UserTips$outboundSchema).optional(), + watchedWordsLink: z.nullable(z.string()), + watchedWordsReplace: z.nullable(z.string()), + whispersAllowedGroupsNames: z.array(z.any()).optional(), + wizardRequired: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + anonymousTopMenuItems: "anonymous_top_menu_items", + authProviders: "auth_providers", + canAssociateGroups: "can_associate_groups", + canCreateTag: "can_create_tag", + canTagPms: "can_tag_pms", + canTagTopics: "can_tag_topics", + censoredRegexp: "censored_regexp", + customEmojiTranslation: "custom_emoji_translation", + defaultArchetype: "default_archetype", + defaultDarkColorScheme: "default_dark_color_scheme", + deniedEmojis: "denied_emojis", + displayedAboutPluginStatGroups: "displayed_about_plugin_stat_groups", + hashtagConfigurations: "hashtag_configurations", + hashtagIcons: "hashtag_icons", + markdownAdditionalOptions: "markdown_additional_options", + navigationMenuSiteTopTags: "navigation_menu_site_top_tags", + notificationTypes: "notification_types", + postActionTypes: "post_action_types", + postTypes: "post_types", + tagsFilterRegexp: "tags_filter_regexp", + topMenuItems: "top_menu_items", + topTags: "top_tags", + topicFeaturedLinkAllowedCategoryIds: + "topic_featured_link_allowed_category_ids", + topicFlagTypes: "topic_flag_types", + trustLevels: "trust_levels", + uncategorizedCategoryId: "uncategorized_category_id", + userColorSchemes: "user_color_schemes", + userFieldMaxLength: "user_field_max_length", + userFields: "user_fields", + userThemes: "user_themes", + userTips: "user_tips", + watchedWordsLink: "watched_words_link", + watchedWordsReplace: "watched_words_replace", + whispersAllowedGroupsNames: "whispers_allowed_groups_names", + wizardRequired: "wizard_required", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSiteResponseBody$ { - /** @deprecated use `GetSiteResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSiteResponseBody$inboundSchema; - /** @deprecated use `GetSiteResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSiteResponseBody$outboundSchema; - /** @deprecated use `GetSiteResponseBody$Outbound` instead. */ - export type Outbound = GetSiteResponseBody$Outbound; + /** @deprecated use `GetSiteResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetSiteResponseBody$inboundSchema; + /** @deprecated use `GetSiteResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetSiteResponseBody$outboundSchema; + /** @deprecated use `GetSiteResponseBody$Outbound` instead. */ + export type Outbound = GetSiteResponseBody$Outbound; } diff --git a/src/sdk/models/operations/gettag.ts b/src/sdk/models/operations/gettag.ts index 7c431cb..06ca01a 100644 --- a/src/sdk/models/operations/gettag.ts +++ b/src/sdk/models/operations/gettag.ts @@ -2,107 +2,110 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTagRequest = { - name: string; + name: string; }; export type GetTagTags = { - id?: number | undefined; - name?: string | undefined; - staff?: boolean | undefined; - topicCount?: number | undefined; + id?: number | undefined; + name?: string | undefined; + staff?: boolean | undefined; + topicCount?: number | undefined; }; export type GetTagPosters = { - description?: string | undefined; - extras?: string | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type GetTagTopics = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumpedAt?: string | undefined; - categoryId?: number | undefined; - closed?: boolean | undefined; - createdAt?: string | undefined; - fancyTitle?: string | undefined; - featuredLink?: string | null | undefined; - hasSummary?: boolean | undefined; - highestPostNumber?: number | undefined; - id?: number | undefined; - imageUrl?: string | null | undefined; - lastPostedAt?: string | undefined; - lastPosterUsername?: string | undefined; - lastReadPostNumber?: number | undefined; - likeCount?: number | undefined; - liked?: boolean | undefined; - notificationLevel?: number | undefined; - pinned?: boolean | undefined; - pinnedGlobally?: boolean | undefined; - posters?: Array | undefined; - postsCount?: number | undefined; - replyCount?: number | undefined; - slug?: string | undefined; - tags?: Array | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unreadPosts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumpedAt?: string | undefined; + categoryId?: number | undefined; + closed?: boolean | undefined; + createdAt?: string | undefined; + fancyTitle?: string | undefined; + featuredLink?: string | null | undefined; + hasSummary?: boolean | undefined; + highestPostNumber?: number | undefined; + id?: number | undefined; + imageUrl?: string | null | undefined; + lastPostedAt?: string | undefined; + lastPosterUsername?: string | undefined; + lastReadPostNumber?: number | undefined; + likeCount?: number | undefined; + liked?: boolean | undefined; + notificationLevel?: number | undefined; + pinned?: boolean | undefined; + pinnedGlobally?: boolean | undefined; + posters?: Array | undefined; + postsCount?: number | undefined; + replyCount?: number | undefined; + slug?: string | undefined; + tags?: Array | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unreadPosts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; export type GetTagTopicList = { - canCreateTopic?: boolean | undefined; - draft?: string | null | undefined; - draftKey?: string | undefined; - draftSequence?: number | undefined; - perPage?: number | undefined; - tags?: Array | undefined; - topics?: Array | undefined; + canCreateTopic?: boolean | undefined; + draft?: string | null | undefined; + draftKey?: string | undefined; + draftSequence?: number | undefined; + perPage?: number | undefined; + tags?: Array | undefined; + topics?: Array | undefined; }; export type GetTagUsers = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** * notifications */ export type GetTagResponseBody = { - primaryGroups?: Array | undefined; - topicList?: GetTagTopicList | undefined; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList?: GetTagTopicList | undefined; + users?: Array | undefined; }; /** @internal */ -export const GetTagRequest$inboundSchema: z.ZodType = - z.object({ - name: z.string(), - }); +export const GetTagRequest$inboundSchema: z.ZodType< + GetTagRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), +}); /** @internal */ export type GetTagRequest$Outbound = { - name: string; + name: string; }; /** @internal */ export const GetTagRequest$outboundSchema: z.ZodType< - GetTagRequest$Outbound, - z.ZodTypeDef, - GetTagRequest + GetTagRequest$Outbound, + z.ZodTypeDef, + GetTagRequest > = z.object({ - name: z.string(), + name: z.string(), }); /** @@ -110,463 +113,463 @@ export const GetTagRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagRequest$ { - /** @deprecated use `GetTagRequest$inboundSchema` instead. */ - export const inboundSchema = GetTagRequest$inboundSchema; - /** @deprecated use `GetTagRequest$outboundSchema` instead. */ - export const outboundSchema = GetTagRequest$outboundSchema; - /** @deprecated use `GetTagRequest$Outbound` instead. */ - export type Outbound = GetTagRequest$Outbound; + /** @deprecated use `GetTagRequest$inboundSchema` instead. */ + export const inboundSchema = GetTagRequest$inboundSchema; + /** @deprecated use `GetTagRequest$outboundSchema` instead. */ + export const outboundSchema = GetTagRequest$outboundSchema; + /** @deprecated use `GetTagRequest$Outbound` instead. */ + export type Outbound = GetTagRequest$Outbound; } /** @internal */ -export const GetTagTags$inboundSchema: z.ZodType = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - staff: z.boolean().optional(), - topic_count: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - topic_count: "topicCount", - }); - }); +export const GetTagTags$inboundSchema: z.ZodType< + GetTagTags, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + staff: z.boolean().optional(), + topic_count: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "topic_count": "topicCount", + }); +}); /** @internal */ export type GetTagTags$Outbound = { - id?: number | undefined; - name?: string | undefined; - staff?: boolean | undefined; - topic_count?: number | undefined; + id?: number | undefined; + name?: string | undefined; + staff?: boolean | undefined; + topic_count?: number | undefined; }; /** @internal */ -export const GetTagTags$outboundSchema: z.ZodType = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - staff: z.boolean().optional(), - topicCount: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - topicCount: "topic_count", - }); - }); +export const GetTagTags$outboundSchema: z.ZodType< + GetTagTags$Outbound, + z.ZodTypeDef, + GetTagTags +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + staff: z.boolean().optional(), + topicCount: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + topicCount: "topic_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagTags$ { - /** @deprecated use `GetTagTags$inboundSchema` instead. */ - export const inboundSchema = GetTagTags$inboundSchema; - /** @deprecated use `GetTagTags$outboundSchema` instead. */ - export const outboundSchema = GetTagTags$outboundSchema; - /** @deprecated use `GetTagTags$Outbound` instead. */ - export type Outbound = GetTagTags$Outbound; + /** @deprecated use `GetTagTags$inboundSchema` instead. */ + export const inboundSchema = GetTagTags$inboundSchema; + /** @deprecated use `GetTagTags$outboundSchema` instead. */ + export const outboundSchema = GetTagTags$outboundSchema; + /** @deprecated use `GetTagTags$Outbound` instead. */ + export type Outbound = GetTagTags$Outbound; } /** @internal */ -export const GetTagPosters$inboundSchema: z.ZodType = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); +export const GetTagPosters$inboundSchema: z.ZodType< + GetTagPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type GetTagPosters$Outbound = { - description?: string | undefined; - extras?: string | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const GetTagPosters$outboundSchema: z.ZodType< - GetTagPosters$Outbound, - z.ZodTypeDef, - GetTagPosters -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + GetTagPosters$Outbound, + z.ZodTypeDef, + GetTagPosters +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagPosters$ { - /** @deprecated use `GetTagPosters$inboundSchema` instead. */ - export const inboundSchema = GetTagPosters$inboundSchema; - /** @deprecated use `GetTagPosters$outboundSchema` instead. */ - export const outboundSchema = GetTagPosters$outboundSchema; - /** @deprecated use `GetTagPosters$Outbound` instead. */ - export type Outbound = GetTagPosters$Outbound; + /** @deprecated use `GetTagPosters$inboundSchema` instead. */ + export const inboundSchema = GetTagPosters$inboundSchema; + /** @deprecated use `GetTagPosters$outboundSchema` instead. */ + export const outboundSchema = GetTagPosters$outboundSchema; + /** @deprecated use `GetTagPosters$Outbound` instead. */ + export type Outbound = GetTagPosters$Outbound; } /** @internal */ -export const GetTagTopics$inboundSchema: z.ZodType = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumped_at: z.string().optional(), - category_id: z.number().int().optional(), - closed: z.boolean().optional(), - created_at: z.string().optional(), - fancy_title: z.string().optional(), - featured_link: z.nullable(z.string()).optional(), - has_summary: z.boolean().optional(), - highest_post_number: z.number().int().optional(), - id: z.number().int().optional(), - image_url: z.nullable(z.string()).optional(), - last_posted_at: z.string().optional(), - last_poster_username: z.string().optional(), - last_read_post_number: z.number().int().optional(), - like_count: z.number().int().optional(), - liked: z.boolean().optional(), - notification_level: z.number().int().optional(), - pinned: z.boolean().optional(), - pinned_globally: z.boolean().optional(), - posters: z.array(z.lazy(() => GetTagPosters$inboundSchema)).optional(), - posts_count: z.number().int().optional(), - reply_count: z.number().int().optional(), - slug: z.string().optional(), - tags: z.array(z.any()).optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unread_posts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - last_read_post_number: "lastReadPostNumber", - like_count: "likeCount", - notification_level: "notificationLevel", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - unread_posts: "unreadPosts", - }); - }); +export const GetTagTopics$inboundSchema: z.ZodType< + GetTagTopics, + z.ZodTypeDef, + unknown +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumped_at: z.string().optional(), + category_id: z.number().int().optional(), + closed: z.boolean().optional(), + created_at: z.string().optional(), + fancy_title: z.string().optional(), + featured_link: z.nullable(z.string()).optional(), + has_summary: z.boolean().optional(), + highest_post_number: z.number().int().optional(), + id: z.number().int().optional(), + image_url: z.nullable(z.string()).optional(), + last_posted_at: z.string().optional(), + last_poster_username: z.string().optional(), + last_read_post_number: z.number().int().optional(), + like_count: z.number().int().optional(), + liked: z.boolean().optional(), + notification_level: z.number().int().optional(), + pinned: z.boolean().optional(), + pinned_globally: z.boolean().optional(), + posters: z.array(z.lazy(() => GetTagPosters$inboundSchema)).optional(), + posts_count: z.number().int().optional(), + reply_count: z.number().int().optional(), + slug: z.string().optional(), + tags: z.array(z.any()).optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unread_posts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "last_read_post_number": "lastReadPostNumber", + "like_count": "likeCount", + "notification_level": "notificationLevel", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", + "unread_posts": "unreadPosts", + }); +}); /** @internal */ export type GetTagTopics$Outbound = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumped_at?: string | undefined; - category_id?: number | undefined; - closed?: boolean | undefined; - created_at?: string | undefined; - fancy_title?: string | undefined; - featured_link?: string | null | undefined; - has_summary?: boolean | undefined; - highest_post_number?: number | undefined; - id?: number | undefined; - image_url?: string | null | undefined; - last_posted_at?: string | undefined; - last_poster_username?: string | undefined; - last_read_post_number?: number | undefined; - like_count?: number | undefined; - liked?: boolean | undefined; - notification_level?: number | undefined; - pinned?: boolean | undefined; - pinned_globally?: boolean | undefined; - posters?: Array | undefined; - posts_count?: number | undefined; - reply_count?: number | undefined; - slug?: string | undefined; - tags?: Array | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unread_posts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumped_at?: string | undefined; + category_id?: number | undefined; + closed?: boolean | undefined; + created_at?: string | undefined; + fancy_title?: string | undefined; + featured_link?: string | null | undefined; + has_summary?: boolean | undefined; + highest_post_number?: number | undefined; + id?: number | undefined; + image_url?: string | null | undefined; + last_posted_at?: string | undefined; + last_poster_username?: string | undefined; + last_read_post_number?: number | undefined; + like_count?: number | undefined; + liked?: boolean | undefined; + notification_level?: number | undefined; + pinned?: boolean | undefined; + pinned_globally?: boolean | undefined; + posters?: Array | undefined; + posts_count?: number | undefined; + reply_count?: number | undefined; + slug?: string | undefined; + tags?: Array | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unread_posts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; /** @internal */ export const GetTagTopics$outboundSchema: z.ZodType< - GetTagTopics$Outbound, - z.ZodTypeDef, - GetTagTopics -> = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumpedAt: z.string().optional(), - categoryId: z.number().int().optional(), - closed: z.boolean().optional(), - createdAt: z.string().optional(), - fancyTitle: z.string().optional(), - featuredLink: z.nullable(z.string()).optional(), - hasSummary: z.boolean().optional(), - highestPostNumber: z.number().int().optional(), - id: z.number().int().optional(), - imageUrl: z.nullable(z.string()).optional(), - lastPostedAt: z.string().optional(), - lastPosterUsername: z.string().optional(), - lastReadPostNumber: z.number().int().optional(), - likeCount: z.number().int().optional(), - liked: z.boolean().optional(), - notificationLevel: z.number().int().optional(), - pinned: z.boolean().optional(), - pinnedGlobally: z.boolean().optional(), - posters: z.array(z.lazy(() => GetTagPosters$outboundSchema)).optional(), - postsCount: z.number().int().optional(), - replyCount: z.number().int().optional(), - slug: z.string().optional(), - tags: z.array(z.any()).optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unreadPosts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - lastReadPostNumber: "last_read_post_number", - likeCount: "like_count", - notificationLevel: "notification_level", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - unreadPosts: "unread_posts", - }); - }); + GetTagTopics$Outbound, + z.ZodTypeDef, + GetTagTopics +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumpedAt: z.string().optional(), + categoryId: z.number().int().optional(), + closed: z.boolean().optional(), + createdAt: z.string().optional(), + fancyTitle: z.string().optional(), + featuredLink: z.nullable(z.string()).optional(), + hasSummary: z.boolean().optional(), + highestPostNumber: z.number().int().optional(), + id: z.number().int().optional(), + imageUrl: z.nullable(z.string()).optional(), + lastPostedAt: z.string().optional(), + lastPosterUsername: z.string().optional(), + lastReadPostNumber: z.number().int().optional(), + likeCount: z.number().int().optional(), + liked: z.boolean().optional(), + notificationLevel: z.number().int().optional(), + pinned: z.boolean().optional(), + pinnedGlobally: z.boolean().optional(), + posters: z.array(z.lazy(() => GetTagPosters$outboundSchema)).optional(), + postsCount: z.number().int().optional(), + replyCount: z.number().int().optional(), + slug: z.string().optional(), + tags: z.array(z.any()).optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unreadPosts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + lastReadPostNumber: "last_read_post_number", + likeCount: "like_count", + notificationLevel: "notification_level", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + unreadPosts: "unread_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagTopics$ { - /** @deprecated use `GetTagTopics$inboundSchema` instead. */ - export const inboundSchema = GetTagTopics$inboundSchema; - /** @deprecated use `GetTagTopics$outboundSchema` instead. */ - export const outboundSchema = GetTagTopics$outboundSchema; - /** @deprecated use `GetTagTopics$Outbound` instead. */ - export type Outbound = GetTagTopics$Outbound; + /** @deprecated use `GetTagTopics$inboundSchema` instead. */ + export const inboundSchema = GetTagTopics$inboundSchema; + /** @deprecated use `GetTagTopics$outboundSchema` instead. */ + export const outboundSchema = GetTagTopics$outboundSchema; + /** @deprecated use `GetTagTopics$Outbound` instead. */ + export type Outbound = GetTagTopics$Outbound; } /** @internal */ -export const GetTagTopicList$inboundSchema: z.ZodType = z - .object({ - can_create_topic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draft_key: z.string().optional(), - draft_sequence: z.number().int().optional(), - per_page: z.number().int().optional(), - tags: z.array(z.lazy(() => GetTagTags$inboundSchema)).optional(), - topics: z.array(z.lazy(() => GetTagTopics$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - draft_key: "draftKey", - draft_sequence: "draftSequence", - per_page: "perPage", - }); - }); +export const GetTagTopicList$inboundSchema: z.ZodType< + GetTagTopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draft_key: z.string().optional(), + draft_sequence: z.number().int().optional(), + per_page: z.number().int().optional(), + tags: z.array(z.lazy(() => GetTagTags$inboundSchema)).optional(), + topics: z.array(z.lazy(() => GetTagTopics$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "per_page": "perPage", + }); +}); /** @internal */ export type GetTagTopicList$Outbound = { - can_create_topic?: boolean | undefined; - draft?: string | null | undefined; - draft_key?: string | undefined; - draft_sequence?: number | undefined; - per_page?: number | undefined; - tags?: Array | undefined; - topics?: Array | undefined; + can_create_topic?: boolean | undefined; + draft?: string | null | undefined; + draft_key?: string | undefined; + draft_sequence?: number | undefined; + per_page?: number | undefined; + tags?: Array | undefined; + topics?: Array | undefined; }; /** @internal */ export const GetTagTopicList$outboundSchema: z.ZodType< - GetTagTopicList$Outbound, - z.ZodTypeDef, - GetTagTopicList -> = z - .object({ - canCreateTopic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draftKey: z.string().optional(), - draftSequence: z.number().int().optional(), - perPage: z.number().int().optional(), - tags: z.array(z.lazy(() => GetTagTags$outboundSchema)).optional(), - topics: z.array(z.lazy(() => GetTagTopics$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - draftKey: "draft_key", - draftSequence: "draft_sequence", - perPage: "per_page", - }); - }); + GetTagTopicList$Outbound, + z.ZodTypeDef, + GetTagTopicList +> = z.object({ + canCreateTopic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draftKey: z.string().optional(), + draftSequence: z.number().int().optional(), + perPage: z.number().int().optional(), + tags: z.array(z.lazy(() => GetTagTags$outboundSchema)).optional(), + topics: z.array(z.lazy(() => GetTagTopics$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + draftKey: "draft_key", + draftSequence: "draft_sequence", + perPage: "per_page", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagTopicList$ { - /** @deprecated use `GetTagTopicList$inboundSchema` instead. */ - export const inboundSchema = GetTagTopicList$inboundSchema; - /** @deprecated use `GetTagTopicList$outboundSchema` instead. */ - export const outboundSchema = GetTagTopicList$outboundSchema; - /** @deprecated use `GetTagTopicList$Outbound` instead. */ - export type Outbound = GetTagTopicList$Outbound; + /** @deprecated use `GetTagTopicList$inboundSchema` instead. */ + export const inboundSchema = GetTagTopicList$inboundSchema; + /** @deprecated use `GetTagTopicList$outboundSchema` instead. */ + export const outboundSchema = GetTagTopicList$outboundSchema; + /** @deprecated use `GetTagTopicList$Outbound` instead. */ + export type Outbound = GetTagTopicList$Outbound; } /** @internal */ -export const GetTagUsers$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const GetTagUsers$inboundSchema: z.ZodType< + GetTagUsers, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type GetTagUsers$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** @internal */ export const GetTagUsers$outboundSchema: z.ZodType< - GetTagUsers$Outbound, - z.ZodTypeDef, - GetTagUsers -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + GetTagUsers$Outbound, + z.ZodTypeDef, + GetTagUsers +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagUsers$ { - /** @deprecated use `GetTagUsers$inboundSchema` instead. */ - export const inboundSchema = GetTagUsers$inboundSchema; - /** @deprecated use `GetTagUsers$outboundSchema` instead. */ - export const outboundSchema = GetTagUsers$outboundSchema; - /** @deprecated use `GetTagUsers$Outbound` instead. */ - export type Outbound = GetTagUsers$Outbound; + /** @deprecated use `GetTagUsers$inboundSchema` instead. */ + export const inboundSchema = GetTagUsers$inboundSchema; + /** @deprecated use `GetTagUsers$outboundSchema` instead. */ + export const outboundSchema = GetTagUsers$outboundSchema; + /** @deprecated use `GetTagUsers$Outbound` instead. */ + export type Outbound = GetTagUsers$Outbound; } /** @internal */ export const GetTagResponseBody$inboundSchema: z.ZodType< - GetTagResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => GetTagTopicList$inboundSchema).optional(), - users: z.array(z.lazy(() => GetTagUsers$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + GetTagResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => GetTagTopicList$inboundSchema).optional(), + users: z.array(z.lazy(() => GetTagUsers$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type GetTagResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list?: GetTagTopicList$Outbound | undefined; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list?: GetTagTopicList$Outbound | undefined; + users?: Array | undefined; }; /** @internal */ export const GetTagResponseBody$outboundSchema: z.ZodType< - GetTagResponseBody$Outbound, - z.ZodTypeDef, - GetTagResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => GetTagTopicList$outboundSchema).optional(), - users: z.array(z.lazy(() => GetTagUsers$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + GetTagResponseBody$Outbound, + z.ZodTypeDef, + GetTagResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => GetTagTopicList$outboundSchema).optional(), + users: z.array(z.lazy(() => GetTagUsers$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagResponseBody$ { - /** @deprecated use `GetTagResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTagResponseBody$inboundSchema; - /** @deprecated use `GetTagResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTagResponseBody$outboundSchema; - /** @deprecated use `GetTagResponseBody$Outbound` instead. */ - export type Outbound = GetTagResponseBody$Outbound; + /** @deprecated use `GetTagResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTagResponseBody$inboundSchema; + /** @deprecated use `GetTagResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTagResponseBody$outboundSchema; + /** @deprecated use `GetTagResponseBody$Outbound` instead. */ + export type Outbound = GetTagResponseBody$Outbound; } diff --git a/src/sdk/models/operations/gettaggroup.ts b/src/sdk/models/operations/gettaggroup.ts index a41b6c4..d70a461 100644 --- a/src/sdk/models/operations/gettaggroup.ts +++ b/src/sdk/models/operations/gettaggroup.ts @@ -2,54 +2,54 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTagGroupRequest = { - id: string; + id: string; }; export type GetTagGroupPermissions = { - everyone?: number | undefined; + everyone?: number | undefined; }; export type GetTagGroupTagGroup = { - id?: number | undefined; - name?: string | undefined; - onePerTopic?: boolean | undefined; - parentTagName?: Array | undefined; - permissions?: GetTagGroupPermissions | undefined; - tagNames?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + onePerTopic?: boolean | undefined; + parentTagName?: Array | undefined; + permissions?: GetTagGroupPermissions | undefined; + tagNames?: Array | undefined; }; /** * notifications */ export type GetTagGroupResponseBody = { - tagGroup?: GetTagGroupTagGroup | undefined; + tagGroup?: GetTagGroupTagGroup | undefined; }; /** @internal */ export const GetTagGroupRequest$inboundSchema: z.ZodType< - GetTagGroupRequest, - z.ZodTypeDef, - unknown + GetTagGroupRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type GetTagGroupRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetTagGroupRequest$outboundSchema: z.ZodType< - GetTagGroupRequest$Outbound, - z.ZodTypeDef, - GetTagGroupRequest + GetTagGroupRequest$Outbound, + z.ZodTypeDef, + GetTagGroupRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -57,35 +57,35 @@ export const GetTagGroupRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagGroupRequest$ { - /** @deprecated use `GetTagGroupRequest$inboundSchema` instead. */ - export const inboundSchema = GetTagGroupRequest$inboundSchema; - /** @deprecated use `GetTagGroupRequest$outboundSchema` instead. */ - export const outboundSchema = GetTagGroupRequest$outboundSchema; - /** @deprecated use `GetTagGroupRequest$Outbound` instead. */ - export type Outbound = GetTagGroupRequest$Outbound; + /** @deprecated use `GetTagGroupRequest$inboundSchema` instead. */ + export const inboundSchema = GetTagGroupRequest$inboundSchema; + /** @deprecated use `GetTagGroupRequest$outboundSchema` instead. */ + export const outboundSchema = GetTagGroupRequest$outboundSchema; + /** @deprecated use `GetTagGroupRequest$Outbound` instead. */ + export type Outbound = GetTagGroupRequest$Outbound; } /** @internal */ export const GetTagGroupPermissions$inboundSchema: z.ZodType< - GetTagGroupPermissions, - z.ZodTypeDef, - unknown + GetTagGroupPermissions, + z.ZodTypeDef, + unknown > = z.object({ - everyone: z.number().int().optional(), + everyone: z.number().int().optional(), }); /** @internal */ export type GetTagGroupPermissions$Outbound = { - everyone?: number | undefined; + everyone?: number | undefined; }; /** @internal */ export const GetTagGroupPermissions$outboundSchema: z.ZodType< - GetTagGroupPermissions$Outbound, - z.ZodTypeDef, - GetTagGroupPermissions + GetTagGroupPermissions$Outbound, + z.ZodTypeDef, + GetTagGroupPermissions > = z.object({ - everyone: z.number().int().optional(), + everyone: z.number().int().optional(), }); /** @@ -93,125 +93,117 @@ export const GetTagGroupPermissions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagGroupPermissions$ { - /** @deprecated use `GetTagGroupPermissions$inboundSchema` instead. */ - export const inboundSchema = GetTagGroupPermissions$inboundSchema; - /** @deprecated use `GetTagGroupPermissions$outboundSchema` instead. */ - export const outboundSchema = GetTagGroupPermissions$outboundSchema; - /** @deprecated use `GetTagGroupPermissions$Outbound` instead. */ - export type Outbound = GetTagGroupPermissions$Outbound; + /** @deprecated use `GetTagGroupPermissions$inboundSchema` instead. */ + export const inboundSchema = GetTagGroupPermissions$inboundSchema; + /** @deprecated use `GetTagGroupPermissions$outboundSchema` instead. */ + export const outboundSchema = GetTagGroupPermissions$outboundSchema; + /** @deprecated use `GetTagGroupPermissions$Outbound` instead. */ + export type Outbound = GetTagGroupPermissions$Outbound; } /** @internal */ export const GetTagGroupTagGroup$inboundSchema: z.ZodType< - GetTagGroupTagGroup, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - one_per_topic: z.boolean().optional(), - parent_tag_name: z.array(z.any()).optional(), - permissions: z.lazy(() => GetTagGroupPermissions$inboundSchema).optional(), - tag_names: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - one_per_topic: "onePerTopic", - parent_tag_name: "parentTagName", - tag_names: "tagNames", - }); - }); + GetTagGroupTagGroup, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + one_per_topic: z.boolean().optional(), + parent_tag_name: z.array(z.any()).optional(), + permissions: z.lazy(() => GetTagGroupPermissions$inboundSchema).optional(), + tag_names: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "one_per_topic": "onePerTopic", + "parent_tag_name": "parentTagName", + "tag_names": "tagNames", + }); +}); /** @internal */ export type GetTagGroupTagGroup$Outbound = { - id?: number | undefined; - name?: string | undefined; - one_per_topic?: boolean | undefined; - parent_tag_name?: Array | undefined; - permissions?: GetTagGroupPermissions$Outbound | undefined; - tag_names?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + one_per_topic?: boolean | undefined; + parent_tag_name?: Array | undefined; + permissions?: GetTagGroupPermissions$Outbound | undefined; + tag_names?: Array | undefined; }; /** @internal */ export const GetTagGroupTagGroup$outboundSchema: z.ZodType< - GetTagGroupTagGroup$Outbound, - z.ZodTypeDef, - GetTagGroupTagGroup -> = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - onePerTopic: z.boolean().optional(), - parentTagName: z.array(z.any()).optional(), - permissions: z.lazy(() => GetTagGroupPermissions$outboundSchema).optional(), - tagNames: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - onePerTopic: "one_per_topic", - parentTagName: "parent_tag_name", - tagNames: "tag_names", - }); - }); + GetTagGroupTagGroup$Outbound, + z.ZodTypeDef, + GetTagGroupTagGroup +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + onePerTopic: z.boolean().optional(), + parentTagName: z.array(z.any()).optional(), + permissions: z.lazy(() => GetTagGroupPermissions$outboundSchema).optional(), + tagNames: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + onePerTopic: "one_per_topic", + parentTagName: "parent_tag_name", + tagNames: "tag_names", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagGroupTagGroup$ { - /** @deprecated use `GetTagGroupTagGroup$inboundSchema` instead. */ - export const inboundSchema = GetTagGroupTagGroup$inboundSchema; - /** @deprecated use `GetTagGroupTagGroup$outboundSchema` instead. */ - export const outboundSchema = GetTagGroupTagGroup$outboundSchema; - /** @deprecated use `GetTagGroupTagGroup$Outbound` instead. */ - export type Outbound = GetTagGroupTagGroup$Outbound; + /** @deprecated use `GetTagGroupTagGroup$inboundSchema` instead. */ + export const inboundSchema = GetTagGroupTagGroup$inboundSchema; + /** @deprecated use `GetTagGroupTagGroup$outboundSchema` instead. */ + export const outboundSchema = GetTagGroupTagGroup$outboundSchema; + /** @deprecated use `GetTagGroupTagGroup$Outbound` instead. */ + export type Outbound = GetTagGroupTagGroup$Outbound; } /** @internal */ export const GetTagGroupResponseBody$inboundSchema: z.ZodType< - GetTagGroupResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - tag_group: z.lazy(() => GetTagGroupTagGroup$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - tag_group: "tagGroup", - }); - }); + GetTagGroupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + tag_group: z.lazy(() => GetTagGroupTagGroup$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "tag_group": "tagGroup", + }); +}); /** @internal */ export type GetTagGroupResponseBody$Outbound = { - tag_group?: GetTagGroupTagGroup$Outbound | undefined; + tag_group?: GetTagGroupTagGroup$Outbound | undefined; }; /** @internal */ export const GetTagGroupResponseBody$outboundSchema: z.ZodType< - GetTagGroupResponseBody$Outbound, - z.ZodTypeDef, - GetTagGroupResponseBody -> = z - .object({ - tagGroup: z.lazy(() => GetTagGroupTagGroup$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - tagGroup: "tag_group", - }); - }); + GetTagGroupResponseBody$Outbound, + z.ZodTypeDef, + GetTagGroupResponseBody +> = z.object({ + tagGroup: z.lazy(() => GetTagGroupTagGroup$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + tagGroup: "tag_group", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagGroupResponseBody$ { - /** @deprecated use `GetTagGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTagGroupResponseBody$inboundSchema; - /** @deprecated use `GetTagGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTagGroupResponseBody$outboundSchema; - /** @deprecated use `GetTagGroupResponseBody$Outbound` instead. */ - export type Outbound = GetTagGroupResponseBody$Outbound; + /** @deprecated use `GetTagGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTagGroupResponseBody$inboundSchema; + /** @deprecated use `GetTagGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTagGroupResponseBody$outboundSchema; + /** @deprecated use `GetTagGroupResponseBody$Outbound` instead. */ + export type Outbound = GetTagGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/gettopic.ts b/src/sdk/models/operations/gettopic.ts index 5b92f92..6121050 100644 --- a/src/sdk/models/operations/gettopic.ts +++ b/src/sdk/models/operations/gettopic.ts @@ -2,195 +2,195 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTopicRequest = { - apiKey: string; - apiUsername: string; - id: string; + apiKey: string; + apiUsername: string; + id: string; }; export type GetTopicActionsSummary = { - canAct: boolean; - count: number; - hidden: boolean; - id: number; + canAct: boolean; + count: number; + hidden: boolean; + id: number; }; export type CreatedBy = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type LastPoster = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type Participants = { - admin: boolean; - avatarTemplate: string; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairName: string | null; - flairUrl: string | null; - id: number; - moderator: boolean; - name: string; - postCount: number; - primaryGroupName: string | null; - trustLevel: number; - username: string; + admin: boolean; + avatarTemplate: string; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairName: string | null; + flairUrl: string | null; + id: number; + moderator: boolean; + name: string; + postCount: number; + primaryGroupName: string | null; + trustLevel: number; + username: string; }; export type Details = { - canArchiveTopic: boolean; - canCloseTopic: boolean; - canConvertTopic: boolean; - canCreatePost: boolean; - canDelete: boolean; - canEdit: boolean; - canEditStaffNotes: boolean; - canFlagTopic?: boolean | undefined; - canInviteTo?: boolean | undefined; - canInviteViaEmail?: boolean | undefined; - canModerateCategory: boolean; - canMovePosts: boolean; - canPinUnpinTopic: boolean; - canRemoveAllowedUsers: boolean; - canRemoveSelfId: number; - canReplyAsNewTopic: boolean; - canReviewTopic: boolean; - canSplitMergeTopic: boolean; - canToggleTopicVisibility: boolean; - createdBy: CreatedBy; - lastPoster: LastPoster; - notificationLevel: number; - participants?: Array | undefined; + canArchiveTopic: boolean; + canCloseTopic: boolean; + canConvertTopic: boolean; + canCreatePost: boolean; + canDelete: boolean; + canEdit: boolean; + canEditStaffNotes: boolean; + canFlagTopic?: boolean | undefined; + canInviteTo?: boolean | undefined; + canInviteViaEmail?: boolean | undefined; + canModerateCategory: boolean; + canMovePosts: boolean; + canPinUnpinTopic: boolean; + canRemoveAllowedUsers: boolean; + canRemoveSelfId: number; + canReplyAsNewTopic: boolean; + canReviewTopic: boolean; + canSplitMergeTopic: boolean; + canToggleTopicVisibility: boolean; + createdBy: CreatedBy; + lastPoster: LastPoster; + notificationLevel: number; + participants?: Array | undefined; }; export type GetTopicTopicsActionsSummary = { - canAct: boolean; - id: number; + canAct: boolean; + id: number; }; export type LinkCounts = { - clicks: number; - internal: boolean; - reflection: boolean; - title: string; - url: string; + clicks: number; + internal: boolean; + reflection: boolean; + title: string; + url: string; }; export type Posts = { - actionsSummary: Array; - admin: boolean; - avatarTemplate: string; - bookmarked: boolean; - canDelete: boolean; - canEdit: boolean; - canRecover: boolean; - canSeeHiddenPost?: boolean | undefined; - canViewEditHistory: boolean; - canWiki: boolean; - cooked: string; - createdAt: string; - deletedAt: string | null; - displayUsername: string; - editReason: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairName: string | null; - flairUrl: string | null; - hidden: boolean; - id: number; - incomingLinkCount: number; - linkCounts: Array; - moderator: boolean; - name: string; - postNumber: number; - postType: number; - primaryGroupName: string | null; - quoteCount: number; - read: boolean; - readersCount: number; - reads: number; - replyCount: number; - replyToPostNumber: string | null; - reviewableId: number; - reviewableScoreCount: number; - reviewableScorePendingCount: number; - score: number; - staff: boolean; - topicId: number; - topicSlug: string; - trustLevel: number; - updatedAt: string; - userDeleted: boolean; - userId: number; - userTitle: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actionsSummary: Array; + admin: boolean; + avatarTemplate: string; + bookmarked: boolean; + canDelete: boolean; + canEdit: boolean; + canRecover: boolean; + canSeeHiddenPost?: boolean | undefined; + canViewEditHistory: boolean; + canWiki: boolean; + cooked: string; + createdAt: string; + deletedAt: string | null; + displayUsername: string; + editReason: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairName: string | null; + flairUrl: string | null; + hidden: boolean; + id: number; + incomingLinkCount: number; + linkCounts: Array; + moderator: boolean; + name: string; + postNumber: number; + postType: number; + primaryGroupName: string | null; + quoteCount: number; + read: boolean; + readersCount: number; + reads: number; + replyCount: number; + replyToPostNumber: string | null; + reviewableId: number; + reviewableScoreCount: number; + reviewableScorePendingCount: number; + score: number; + staff: boolean; + topicId: number; + topicSlug: string; + trustLevel: number; + updatedAt: string; + userDeleted: boolean; + userId: number; + userTitle: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; export type PostStream = { - posts: Array; - stream: Array; + posts: Array; + stream: Array; }; export type GetTopicUser = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type Posters = { - description: string; - extras: string; - user: GetTopicUser; + description: string; + extras: string; + user: GetTopicUser; }; export type GetTopicTagsDescriptions = {}; export type SuggestedTopics = { - archetype: string; - archived: boolean; - bookmarked: string | null; - bumped: boolean; - bumpedAt: string; - categoryId: number; - closed: boolean; - createdAt: string; - excerpt: string; - fancyTitle: string; - featuredLink: string | null; - highestPostNumber: number; - id: number; - imageUrl: string | null; - lastPostedAt: string | null; - likeCount: number; - liked: string | null; - pinned: boolean; - posters: Array; - postsCount: number; - replyCount: number; - slug: string; - tags: Array; - tagsDescriptions: GetTopicTagsDescriptions; - title: string; - unpinned: string | null; - unseen: boolean; - views: number; - visible: boolean; + archetype: string; + archived: boolean; + bookmarked: string | null; + bumped: boolean; + bumpedAt: string; + categoryId: number; + closed: boolean; + createdAt: string; + excerpt: string; + fancyTitle: string; + featuredLink: string | null; + highestPostNumber: number; + id: number; + imageUrl: string | null; + lastPostedAt: string | null; + likeCount: number; + liked: string | null; + pinned: boolean; + posters: Array; + postsCount: number; + replyCount: number; + slug: string; + tags: Array; + tagsDescriptions: GetTopicTagsDescriptions; + title: string; + unpinned: string | null; + unseen: boolean; + views: number; + visible: boolean; }; export type TagsDescriptions = {}; @@ -199,964 +199,989 @@ export type TagsDescriptions = {}; * specific posts */ export type GetTopicResponseBody = { - actionsSummary: Array; - archetype: string; - archived: boolean; - bookmarked: boolean; - bookmarks: Array; - categoryId: number; - chunkSize: number; - closed: boolean; - createdAt: string; - currentPostNumber?: number | undefined; - deletedAt: string | null; - deletedBy: string | null; - details: Details; - draft: string | null; - draftKey: string; - draftSequence: number; - fancyTitle: string; - featuredLink: string | null; - hasDeleted: boolean; - hasSummary: boolean; - highestPostNumber: number | null; - id: number; - imageUrl: string | null; - lastPostedAt: string | null; - likeCount: number; - messageBusLastId: number; - participantCount: number; - pinned: boolean; - pinnedAt: string | null; - pinnedGlobally: boolean; - pinnedUntil: string | null; - postStream: PostStream; - postsCount: number; - replyCount: number; - showReadIndicator: boolean; - slowModeEnabledUntil: string | null; - slowModeSeconds: number; - slug: string; - suggestedTopics: Array; - summarizable: boolean; - tags: Array; - tagsDescriptions: TagsDescriptions; - thumbnails: string | null; - timelineLookup: Array; - title: string; - topicTimer: string | null; - unpinned: string | null; - userId: number; - views: number; - visible: boolean; - wordCount: number | null; + actionsSummary: Array; + archetype: string; + archived: boolean; + bookmarked: boolean; + bookmarks: Array; + categoryId: number; + chunkSize: number; + closed: boolean; + createdAt: string; + currentPostNumber?: number | undefined; + deletedAt: string | null; + deletedBy: string | null; + details: Details; + draft: string | null; + draftKey: string; + draftSequence: number; + fancyTitle: string; + featuredLink: string | null; + hasDeleted: boolean; + hasSummary: boolean; + highestPostNumber: number | null; + id: number; + imageUrl: string | null; + lastPostedAt: string | null; + likeCount: number; + messageBusLastId: number; + participantCount: number; + pinned: boolean; + pinnedAt: string | null; + pinnedGlobally: boolean; + pinnedUntil: string | null; + postStream: PostStream; + postsCount: number; + replyCount: number; + showReadIndicator: boolean; + slowModeEnabledUntil: string | null; + slowModeSeconds: number; + slug: string; + suggestedTopics: Array; + summarizable: boolean; + tags: Array; + tagsDescriptions: TagsDescriptions; + thumbnails: string | null; + timelineLookup: Array; + title: string; + topicTimer: string | null; + unpinned: string | null; + userId: number; + views: number; + visible: boolean; + wordCount: number | null; }; /** @internal */ -export const GetTopicRequest$inboundSchema: z.ZodType = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); +export const GetTopicRequest$inboundSchema: z.ZodType< + GetTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type GetTopicRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - id: string; + "Api-Key": string; + "Api-Username": string; + id: string; }; /** @internal */ export const GetTopicRequest$outboundSchema: z.ZodType< - GetTopicRequest$Outbound, - z.ZodTypeDef, - GetTopicRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + GetTopicRequest$Outbound, + z.ZodTypeDef, + GetTopicRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicRequest$ { - /** @deprecated use `GetTopicRequest$inboundSchema` instead. */ - export const inboundSchema = GetTopicRequest$inboundSchema; - /** @deprecated use `GetTopicRequest$outboundSchema` instead. */ - export const outboundSchema = GetTopicRequest$outboundSchema; - /** @deprecated use `GetTopicRequest$Outbound` instead. */ - export type Outbound = GetTopicRequest$Outbound; + /** @deprecated use `GetTopicRequest$inboundSchema` instead. */ + export const inboundSchema = GetTopicRequest$inboundSchema; + /** @deprecated use `GetTopicRequest$outboundSchema` instead. */ + export const outboundSchema = GetTopicRequest$outboundSchema; + /** @deprecated use `GetTopicRequest$Outbound` instead. */ + export type Outbound = GetTopicRequest$Outbound; } /** @internal */ export const GetTopicActionsSummary$inboundSchema: z.ZodType< - GetTopicActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean(), - count: z.number().int(), - hidden: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + GetTopicActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean(), + count: z.number().int(), + hidden: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type GetTopicActionsSummary$Outbound = { - can_act: boolean; - count: number; - hidden: boolean; - id: number; + can_act: boolean; + count: number; + hidden: boolean; + id: number; }; /** @internal */ export const GetTopicActionsSummary$outboundSchema: z.ZodType< - GetTopicActionsSummary$Outbound, - z.ZodTypeDef, - GetTopicActionsSummary -> = z - .object({ - canAct: z.boolean(), - count: z.number().int(), - hidden: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + GetTopicActionsSummary$Outbound, + z.ZodTypeDef, + GetTopicActionsSummary +> = z.object({ + canAct: z.boolean(), + count: z.number().int(), + hidden: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicActionsSummary$ { - /** @deprecated use `GetTopicActionsSummary$inboundSchema` instead. */ - export const inboundSchema = GetTopicActionsSummary$inboundSchema; - /** @deprecated use `GetTopicActionsSummary$outboundSchema` instead. */ - export const outboundSchema = GetTopicActionsSummary$outboundSchema; - /** @deprecated use `GetTopicActionsSummary$Outbound` instead. */ - export type Outbound = GetTopicActionsSummary$Outbound; + /** @deprecated use `GetTopicActionsSummary$inboundSchema` instead. */ + export const inboundSchema = GetTopicActionsSummary$inboundSchema; + /** @deprecated use `GetTopicActionsSummary$outboundSchema` instead. */ + export const outboundSchema = GetTopicActionsSummary$outboundSchema; + /** @deprecated use `GetTopicActionsSummary$Outbound` instead. */ + export type Outbound = GetTopicActionsSummary$Outbound; } /** @internal */ -export const CreatedBy$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const CreatedBy$inboundSchema: z.ZodType< + CreatedBy, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type CreatedBy$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ -export const CreatedBy$outboundSchema: z.ZodType = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); +export const CreatedBy$outboundSchema: z.ZodType< + CreatedBy$Outbound, + z.ZodTypeDef, + CreatedBy +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatedBy$ { - /** @deprecated use `CreatedBy$inboundSchema` instead. */ - export const inboundSchema = CreatedBy$inboundSchema; - /** @deprecated use `CreatedBy$outboundSchema` instead. */ - export const outboundSchema = CreatedBy$outboundSchema; - /** @deprecated use `CreatedBy$Outbound` instead. */ - export type Outbound = CreatedBy$Outbound; + /** @deprecated use `CreatedBy$inboundSchema` instead. */ + export const inboundSchema = CreatedBy$inboundSchema; + /** @deprecated use `CreatedBy$outboundSchema` instead. */ + export const outboundSchema = CreatedBy$outboundSchema; + /** @deprecated use `CreatedBy$Outbound` instead. */ + export type Outbound = CreatedBy$Outbound; } /** @internal */ -export const LastPoster$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const LastPoster$inboundSchema: z.ZodType< + LastPoster, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type LastPoster$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ -export const LastPoster$outboundSchema: z.ZodType = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); +export const LastPoster$outboundSchema: z.ZodType< + LastPoster$Outbound, + z.ZodTypeDef, + LastPoster +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LastPoster$ { - /** @deprecated use `LastPoster$inboundSchema` instead. */ - export const inboundSchema = LastPoster$inboundSchema; - /** @deprecated use `LastPoster$outboundSchema` instead. */ - export const outboundSchema = LastPoster$outboundSchema; - /** @deprecated use `LastPoster$Outbound` instead. */ - export type Outbound = LastPoster$Outbound; + /** @deprecated use `LastPoster$inboundSchema` instead. */ + export const inboundSchema = LastPoster$inboundSchema; + /** @deprecated use `LastPoster$outboundSchema` instead. */ + export const outboundSchema = LastPoster$outboundSchema; + /** @deprecated use `LastPoster$Outbound` instead. */ + export type Outbound = LastPoster$Outbound; } /** @internal */ -export const Participants$inboundSchema: z.ZodType = z - .object({ - admin: z.boolean(), - avatar_template: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - id: z.number().int(), - moderator: z.boolean(), - name: z.string(), - post_count: z.number().int(), - primary_group_name: z.nullable(z.string()), - trust_level: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - post_count: "postCount", - primary_group_name: "primaryGroupName", - trust_level: "trustLevel", - }); - }); +export const Participants$inboundSchema: z.ZodType< + Participants, + z.ZodTypeDef, + unknown +> = z.object({ + admin: z.boolean(), + avatar_template: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + id: z.number().int(), + moderator: z.boolean(), + name: z.string(), + post_count: z.number().int(), + primary_group_name: z.nullable(z.string()), + trust_level: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "post_count": "postCount", + "primary_group_name": "primaryGroupName", + "trust_level": "trustLevel", + }); +}); /** @internal */ export type Participants$Outbound = { - admin: boolean; - avatar_template: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_name: string | null; - flair_url: string | null; - id: number; - moderator: boolean; - name: string; - post_count: number; - primary_group_name: string | null; - trust_level: number; - username: string; + admin: boolean; + avatar_template: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_name: string | null; + flair_url: string | null; + id: number; + moderator: boolean; + name: string; + post_count: number; + primary_group_name: string | null; + trust_level: number; + username: string; }; /** @internal */ export const Participants$outboundSchema: z.ZodType< - Participants$Outbound, - z.ZodTypeDef, - Participants -> = z - .object({ - admin: z.boolean(), - avatarTemplate: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - id: z.number().int(), - moderator: z.boolean(), - name: z.string(), - postCount: z.number().int(), - primaryGroupName: z.nullable(z.string()), - trustLevel: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - postCount: "post_count", - primaryGroupName: "primary_group_name", - trustLevel: "trust_level", - }); - }); + Participants$Outbound, + z.ZodTypeDef, + Participants +> = z.object({ + admin: z.boolean(), + avatarTemplate: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + id: z.number().int(), + moderator: z.boolean(), + name: z.string(), + postCount: z.number().int(), + primaryGroupName: z.nullable(z.string()), + trustLevel: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + postCount: "post_count", + primaryGroupName: "primary_group_name", + trustLevel: "trust_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Participants$ { - /** @deprecated use `Participants$inboundSchema` instead. */ - export const inboundSchema = Participants$inboundSchema; - /** @deprecated use `Participants$outboundSchema` instead. */ - export const outboundSchema = Participants$outboundSchema; - /** @deprecated use `Participants$Outbound` instead. */ - export type Outbound = Participants$Outbound; + /** @deprecated use `Participants$inboundSchema` instead. */ + export const inboundSchema = Participants$inboundSchema; + /** @deprecated use `Participants$outboundSchema` instead. */ + export const outboundSchema = Participants$outboundSchema; + /** @deprecated use `Participants$Outbound` instead. */ + export type Outbound = Participants$Outbound; } /** @internal */ -export const Details$inboundSchema: z.ZodType = z - .object({ - can_archive_topic: z.boolean(), - can_close_topic: z.boolean(), - can_convert_topic: z.boolean(), - can_create_post: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_edit_staff_notes: z.boolean(), - can_flag_topic: z.boolean().optional(), - can_invite_to: z.boolean().optional(), - can_invite_via_email: z.boolean().optional(), - can_moderate_category: z.boolean(), - can_move_posts: z.boolean(), - can_pin_unpin_topic: z.boolean(), - can_remove_allowed_users: z.boolean(), - can_remove_self_id: z.number().int(), - can_reply_as_new_topic: z.boolean(), - can_review_topic: z.boolean(), - can_split_merge_topic: z.boolean(), - can_toggle_topic_visibility: z.boolean(), - created_by: z.lazy(() => CreatedBy$inboundSchema), - last_poster: z.lazy(() => LastPoster$inboundSchema), - notification_level: z.number().int(), - participants: z.array(z.lazy(() => Participants$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_archive_topic: "canArchiveTopic", - can_close_topic: "canCloseTopic", - can_convert_topic: "canConvertTopic", - can_create_post: "canCreatePost", - can_delete: "canDelete", - can_edit: "canEdit", - can_edit_staff_notes: "canEditStaffNotes", - can_flag_topic: "canFlagTopic", - can_invite_to: "canInviteTo", - can_invite_via_email: "canInviteViaEmail", - can_moderate_category: "canModerateCategory", - can_move_posts: "canMovePosts", - can_pin_unpin_topic: "canPinUnpinTopic", - can_remove_allowed_users: "canRemoveAllowedUsers", - can_remove_self_id: "canRemoveSelfId", - can_reply_as_new_topic: "canReplyAsNewTopic", - can_review_topic: "canReviewTopic", - can_split_merge_topic: "canSplitMergeTopic", - can_toggle_topic_visibility: "canToggleTopicVisibility", - created_by: "createdBy", - last_poster: "lastPoster", - notification_level: "notificationLevel", - }); +export const Details$inboundSchema: z.ZodType = + z.object({ + can_archive_topic: z.boolean(), + can_close_topic: z.boolean(), + can_convert_topic: z.boolean(), + can_create_post: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_edit_staff_notes: z.boolean(), + can_flag_topic: z.boolean().optional(), + can_invite_to: z.boolean().optional(), + can_invite_via_email: z.boolean().optional(), + can_moderate_category: z.boolean(), + can_move_posts: z.boolean(), + can_pin_unpin_topic: z.boolean(), + can_remove_allowed_users: z.boolean(), + can_remove_self_id: z.number().int(), + can_reply_as_new_topic: z.boolean(), + can_review_topic: z.boolean(), + can_split_merge_topic: z.boolean(), + can_toggle_topic_visibility: z.boolean(), + created_by: z.lazy(() => CreatedBy$inboundSchema), + last_poster: z.lazy(() => LastPoster$inboundSchema), + notification_level: z.number().int(), + participants: z.array(z.lazy(() => Participants$inboundSchema)).optional(), + }).transform((v) => { + return remap$(v, { + "can_archive_topic": "canArchiveTopic", + "can_close_topic": "canCloseTopic", + "can_convert_topic": "canConvertTopic", + "can_create_post": "canCreatePost", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_edit_staff_notes": "canEditStaffNotes", + "can_flag_topic": "canFlagTopic", + "can_invite_to": "canInviteTo", + "can_invite_via_email": "canInviteViaEmail", + "can_moderate_category": "canModerateCategory", + "can_move_posts": "canMovePosts", + "can_pin_unpin_topic": "canPinUnpinTopic", + "can_remove_allowed_users": "canRemoveAllowedUsers", + "can_remove_self_id": "canRemoveSelfId", + "can_reply_as_new_topic": "canReplyAsNewTopic", + "can_review_topic": "canReviewTopic", + "can_split_merge_topic": "canSplitMergeTopic", + "can_toggle_topic_visibility": "canToggleTopicVisibility", + "created_by": "createdBy", + "last_poster": "lastPoster", + "notification_level": "notificationLevel", }); + }); /** @internal */ export type Details$Outbound = { - can_archive_topic: boolean; - can_close_topic: boolean; - can_convert_topic: boolean; - can_create_post: boolean; - can_delete: boolean; - can_edit: boolean; - can_edit_staff_notes: boolean; - can_flag_topic?: boolean | undefined; - can_invite_to?: boolean | undefined; - can_invite_via_email?: boolean | undefined; - can_moderate_category: boolean; - can_move_posts: boolean; - can_pin_unpin_topic: boolean; - can_remove_allowed_users: boolean; - can_remove_self_id: number; - can_reply_as_new_topic: boolean; - can_review_topic: boolean; - can_split_merge_topic: boolean; - can_toggle_topic_visibility: boolean; - created_by: CreatedBy$Outbound; - last_poster: LastPoster$Outbound; - notification_level: number; - participants?: Array | undefined; + can_archive_topic: boolean; + can_close_topic: boolean; + can_convert_topic: boolean; + can_create_post: boolean; + can_delete: boolean; + can_edit: boolean; + can_edit_staff_notes: boolean; + can_flag_topic?: boolean | undefined; + can_invite_to?: boolean | undefined; + can_invite_via_email?: boolean | undefined; + can_moderate_category: boolean; + can_move_posts: boolean; + can_pin_unpin_topic: boolean; + can_remove_allowed_users: boolean; + can_remove_self_id: number; + can_reply_as_new_topic: boolean; + can_review_topic: boolean; + can_split_merge_topic: boolean; + can_toggle_topic_visibility: boolean; + created_by: CreatedBy$Outbound; + last_poster: LastPoster$Outbound; + notification_level: number; + participants?: Array | undefined; }; /** @internal */ -export const Details$outboundSchema: z.ZodType = z - .object({ - canArchiveTopic: z.boolean(), - canCloseTopic: z.boolean(), - canConvertTopic: z.boolean(), - canCreatePost: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canEditStaffNotes: z.boolean(), - canFlagTopic: z.boolean().optional(), - canInviteTo: z.boolean().optional(), - canInviteViaEmail: z.boolean().optional(), - canModerateCategory: z.boolean(), - canMovePosts: z.boolean(), - canPinUnpinTopic: z.boolean(), - canRemoveAllowedUsers: z.boolean(), - canRemoveSelfId: z.number().int(), - canReplyAsNewTopic: z.boolean(), - canReviewTopic: z.boolean(), - canSplitMergeTopic: z.boolean(), - canToggleTopicVisibility: z.boolean(), - createdBy: z.lazy(() => CreatedBy$outboundSchema), - lastPoster: z.lazy(() => LastPoster$outboundSchema), - notificationLevel: z.number().int(), - participants: z.array(z.lazy(() => Participants$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canArchiveTopic: "can_archive_topic", - canCloseTopic: "can_close_topic", - canConvertTopic: "can_convert_topic", - canCreatePost: "can_create_post", - canDelete: "can_delete", - canEdit: "can_edit", - canEditStaffNotes: "can_edit_staff_notes", - canFlagTopic: "can_flag_topic", - canInviteTo: "can_invite_to", - canInviteViaEmail: "can_invite_via_email", - canModerateCategory: "can_moderate_category", - canMovePosts: "can_move_posts", - canPinUnpinTopic: "can_pin_unpin_topic", - canRemoveAllowedUsers: "can_remove_allowed_users", - canRemoveSelfId: "can_remove_self_id", - canReplyAsNewTopic: "can_reply_as_new_topic", - canReviewTopic: "can_review_topic", - canSplitMergeTopic: "can_split_merge_topic", - canToggleTopicVisibility: "can_toggle_topic_visibility", - createdBy: "created_by", - lastPoster: "last_poster", - notificationLevel: "notification_level", - }); - }); +export const Details$outboundSchema: z.ZodType< + Details$Outbound, + z.ZodTypeDef, + Details +> = z.object({ + canArchiveTopic: z.boolean(), + canCloseTopic: z.boolean(), + canConvertTopic: z.boolean(), + canCreatePost: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canEditStaffNotes: z.boolean(), + canFlagTopic: z.boolean().optional(), + canInviteTo: z.boolean().optional(), + canInviteViaEmail: z.boolean().optional(), + canModerateCategory: z.boolean(), + canMovePosts: z.boolean(), + canPinUnpinTopic: z.boolean(), + canRemoveAllowedUsers: z.boolean(), + canRemoveSelfId: z.number().int(), + canReplyAsNewTopic: z.boolean(), + canReviewTopic: z.boolean(), + canSplitMergeTopic: z.boolean(), + canToggleTopicVisibility: z.boolean(), + createdBy: z.lazy(() => CreatedBy$outboundSchema), + lastPoster: z.lazy(() => LastPoster$outboundSchema), + notificationLevel: z.number().int(), + participants: z.array(z.lazy(() => Participants$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + canArchiveTopic: "can_archive_topic", + canCloseTopic: "can_close_topic", + canConvertTopic: "can_convert_topic", + canCreatePost: "can_create_post", + canDelete: "can_delete", + canEdit: "can_edit", + canEditStaffNotes: "can_edit_staff_notes", + canFlagTopic: "can_flag_topic", + canInviteTo: "can_invite_to", + canInviteViaEmail: "can_invite_via_email", + canModerateCategory: "can_moderate_category", + canMovePosts: "can_move_posts", + canPinUnpinTopic: "can_pin_unpin_topic", + canRemoveAllowedUsers: "can_remove_allowed_users", + canRemoveSelfId: "can_remove_self_id", + canReplyAsNewTopic: "can_reply_as_new_topic", + canReviewTopic: "can_review_topic", + canSplitMergeTopic: "can_split_merge_topic", + canToggleTopicVisibility: "can_toggle_topic_visibility", + createdBy: "created_by", + lastPoster: "last_poster", + notificationLevel: "notification_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Details$ { - /** @deprecated use `Details$inboundSchema` instead. */ - export const inboundSchema = Details$inboundSchema; - /** @deprecated use `Details$outboundSchema` instead. */ - export const outboundSchema = Details$outboundSchema; - /** @deprecated use `Details$Outbound` instead. */ - export type Outbound = Details$Outbound; + /** @deprecated use `Details$inboundSchema` instead. */ + export const inboundSchema = Details$inboundSchema; + /** @deprecated use `Details$outboundSchema` instead. */ + export const outboundSchema = Details$outboundSchema; + /** @deprecated use `Details$Outbound` instead. */ + export type Outbound = Details$Outbound; } /** @internal */ export const GetTopicTopicsActionsSummary$inboundSchema: z.ZodType< - GetTopicTopicsActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + GetTopicTopicsActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type GetTopicTopicsActionsSummary$Outbound = { - can_act: boolean; - id: number; + can_act: boolean; + id: number; }; /** @internal */ export const GetTopicTopicsActionsSummary$outboundSchema: z.ZodType< - GetTopicTopicsActionsSummary$Outbound, - z.ZodTypeDef, - GetTopicTopicsActionsSummary -> = z - .object({ - canAct: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + GetTopicTopicsActionsSummary$Outbound, + z.ZodTypeDef, + GetTopicTopicsActionsSummary +> = z.object({ + canAct: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicTopicsActionsSummary$ { - /** @deprecated use `GetTopicTopicsActionsSummary$inboundSchema` instead. */ - export const inboundSchema = GetTopicTopicsActionsSummary$inboundSchema; - /** @deprecated use `GetTopicTopicsActionsSummary$outboundSchema` instead. */ - export const outboundSchema = GetTopicTopicsActionsSummary$outboundSchema; - /** @deprecated use `GetTopicTopicsActionsSummary$Outbound` instead. */ - export type Outbound = GetTopicTopicsActionsSummary$Outbound; + /** @deprecated use `GetTopicTopicsActionsSummary$inboundSchema` instead. */ + export const inboundSchema = GetTopicTopicsActionsSummary$inboundSchema; + /** @deprecated use `GetTopicTopicsActionsSummary$outboundSchema` instead. */ + export const outboundSchema = GetTopicTopicsActionsSummary$outboundSchema; + /** @deprecated use `GetTopicTopicsActionsSummary$Outbound` instead. */ + export type Outbound = GetTopicTopicsActionsSummary$Outbound; } /** @internal */ -export const LinkCounts$inboundSchema: z.ZodType = z.object({ - clicks: z.number().int(), - internal: z.boolean(), - reflection: z.boolean(), - title: z.string(), - url: z.string(), +export const LinkCounts$inboundSchema: z.ZodType< + LinkCounts, + z.ZodTypeDef, + unknown +> = z.object({ + clicks: z.number().int(), + internal: z.boolean(), + reflection: z.boolean(), + title: z.string(), + url: z.string(), }); /** @internal */ export type LinkCounts$Outbound = { - clicks: number; - internal: boolean; - reflection: boolean; - title: string; - url: string; + clicks: number; + internal: boolean; + reflection: boolean; + title: string; + url: string; }; /** @internal */ -export const LinkCounts$outboundSchema: z.ZodType = - z.object({ - clicks: z.number().int(), - internal: z.boolean(), - reflection: z.boolean(), - title: z.string(), - url: z.string(), - }); +export const LinkCounts$outboundSchema: z.ZodType< + LinkCounts$Outbound, + z.ZodTypeDef, + LinkCounts +> = z.object({ + clicks: z.number().int(), + internal: z.boolean(), + reflection: z.boolean(), + title: z.string(), + url: z.string(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LinkCounts$ { - /** @deprecated use `LinkCounts$inboundSchema` instead. */ - export const inboundSchema = LinkCounts$inboundSchema; - /** @deprecated use `LinkCounts$outboundSchema` instead. */ - export const outboundSchema = LinkCounts$outboundSchema; - /** @deprecated use `LinkCounts$Outbound` instead. */ - export type Outbound = LinkCounts$Outbound; + /** @deprecated use `LinkCounts$inboundSchema` instead. */ + export const inboundSchema = LinkCounts$inboundSchema; + /** @deprecated use `LinkCounts$outboundSchema` instead. */ + export const outboundSchema = LinkCounts$outboundSchema; + /** @deprecated use `LinkCounts$Outbound` instead. */ + export type Outbound = LinkCounts$Outbound; } /** @internal */ export const Posts$inboundSchema: z.ZodType = z - .object({ - actions_summary: z.array(z.lazy(() => GetTopicTopicsActionsSummary$inboundSchema)), - admin: z.boolean(), - avatar_template: z.string(), - bookmarked: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_recover: z.boolean(), - can_see_hidden_post: z.boolean().optional(), - can_view_edit_history: z.boolean(), - can_wiki: z.boolean(), - cooked: z.string(), - created_at: z.string(), - deleted_at: z.nullable(z.string()), - display_username: z.string(), - edit_reason: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incoming_link_count: z.number().int(), - link_counts: z.array(z.lazy(() => LinkCounts$inboundSchema)), - moderator: z.boolean(), - name: z.string(), - post_number: z.number().int(), - post_type: z.number().int(), - primary_group_name: z.nullable(z.string()), - quote_count: z.number().int(), - read: z.boolean(), - readers_count: z.number().int(), - reads: z.number().int(), - reply_count: z.number().int(), - reply_to_post_number: z.nullable(z.string()), - reviewable_id: z.number().int(), - reviewable_score_count: z.number().int(), - reviewable_score_pending_count: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topic_id: z.number().int(), - topic_slug: z.string(), - trust_level: z.number().int(), - updated_at: z.string(), - user_deleted: z.boolean(), - user_id: z.number().int(), - user_title: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - link_counts: "linkCounts", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); + .object({ + actions_summary: z.array( + z.lazy(() => GetTopicTopicsActionsSummary$inboundSchema), + ), + admin: z.boolean(), + avatar_template: z.string(), + bookmarked: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_recover: z.boolean(), + can_see_hidden_post: z.boolean().optional(), + can_view_edit_history: z.boolean(), + can_wiki: z.boolean(), + cooked: z.string(), + created_at: z.string(), + deleted_at: z.nullable(z.string()), + display_username: z.string(), + edit_reason: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incoming_link_count: z.number().int(), + link_counts: z.array(z.lazy(() => LinkCounts$inboundSchema)), + moderator: z.boolean(), + name: z.string(), + post_number: z.number().int(), + post_type: z.number().int(), + primary_group_name: z.nullable(z.string()), + quote_count: z.number().int(), + read: z.boolean(), + readers_count: z.number().int(), + reads: z.number().int(), + reply_count: z.number().int(), + reply_to_post_number: z.nullable(z.string()), + reviewable_id: z.number().int(), + reviewable_score_count: z.number().int(), + reviewable_score_pending_count: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topic_id: z.number().int(), + topic_slug: z.string(), + trust_level: z.number().int(), + updated_at: z.string(), + user_deleted: z.boolean(), + user_id: z.number().int(), + user_title: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), + }).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "link_counts": "linkCounts", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", }); + }); /** @internal */ export type Posts$Outbound = { - actions_summary: Array; - admin: boolean; - avatar_template: string; - bookmarked: boolean; - can_delete: boolean; - can_edit: boolean; - can_recover: boolean; - can_see_hidden_post?: boolean | undefined; - can_view_edit_history: boolean; - can_wiki: boolean; - cooked: string; - created_at: string; - deleted_at: string | null; - display_username: string; - edit_reason: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_name: string | null; - flair_url: string | null; - hidden: boolean; - id: number; - incoming_link_count: number; - link_counts: Array; - moderator: boolean; - name: string; - post_number: number; - post_type: number; - primary_group_name: string | null; - quote_count: number; - read: boolean; - readers_count: number; - reads: number; - reply_count: number; - reply_to_post_number: string | null; - reviewable_id: number; - reviewable_score_count: number; - reviewable_score_pending_count: number; - score: number; - staff: boolean; - topic_id: number; - topic_slug: string; - trust_level: number; - updated_at: string; - user_deleted: boolean; - user_id: number; - user_title: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actions_summary: Array; + admin: boolean; + avatar_template: string; + bookmarked: boolean; + can_delete: boolean; + can_edit: boolean; + can_recover: boolean; + can_see_hidden_post?: boolean | undefined; + can_view_edit_history: boolean; + can_wiki: boolean; + cooked: string; + created_at: string; + deleted_at: string | null; + display_username: string; + edit_reason: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_name: string | null; + flair_url: string | null; + hidden: boolean; + id: number; + incoming_link_count: number; + link_counts: Array; + moderator: boolean; + name: string; + post_number: number; + post_type: number; + primary_group_name: string | null; + quote_count: number; + read: boolean; + readers_count: number; + reads: number; + reply_count: number; + reply_to_post_number: string | null; + reviewable_id: number; + reviewable_score_count: number; + reviewable_score_pending_count: number; + score: number; + staff: boolean; + topic_id: number; + topic_slug: string; + trust_level: number; + updated_at: string; + user_deleted: boolean; + user_id: number; + user_title: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ -export const Posts$outboundSchema: z.ZodType = z - .object({ - actionsSummary: z.array(z.lazy(() => GetTopicTopicsActionsSummary$outboundSchema)), - admin: z.boolean(), - avatarTemplate: z.string(), - bookmarked: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canRecover: z.boolean(), - canSeeHiddenPost: z.boolean().optional(), - canViewEditHistory: z.boolean(), - canWiki: z.boolean(), - cooked: z.string(), - createdAt: z.string(), - deletedAt: z.nullable(z.string()), - displayUsername: z.string(), - editReason: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incomingLinkCount: z.number().int(), - linkCounts: z.array(z.lazy(() => LinkCounts$outboundSchema)), - moderator: z.boolean(), - name: z.string(), - postNumber: z.number().int(), - postType: z.number().int(), - primaryGroupName: z.nullable(z.string()), - quoteCount: z.number().int(), - read: z.boolean(), - readersCount: z.number().int(), - reads: z.number().int(), - replyCount: z.number().int(), - replyToPostNumber: z.nullable(z.string()), - reviewableId: z.number().int(), - reviewableScoreCount: z.number().int(), - reviewableScorePendingCount: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topicId: z.number().int(), - topicSlug: z.string(), - trustLevel: z.number().int(), - updatedAt: z.string(), - userDeleted: z.boolean(), - userId: z.number().int(), - userTitle: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - linkCounts: "link_counts", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); +export const Posts$outboundSchema: z.ZodType< + Posts$Outbound, + z.ZodTypeDef, + Posts +> = z.object({ + actionsSummary: z.array( + z.lazy(() => GetTopicTopicsActionsSummary$outboundSchema), + ), + admin: z.boolean(), + avatarTemplate: z.string(), + bookmarked: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canRecover: z.boolean(), + canSeeHiddenPost: z.boolean().optional(), + canViewEditHistory: z.boolean(), + canWiki: z.boolean(), + cooked: z.string(), + createdAt: z.string(), + deletedAt: z.nullable(z.string()), + displayUsername: z.string(), + editReason: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incomingLinkCount: z.number().int(), + linkCounts: z.array(z.lazy(() => LinkCounts$outboundSchema)), + moderator: z.boolean(), + name: z.string(), + postNumber: z.number().int(), + postType: z.number().int(), + primaryGroupName: z.nullable(z.string()), + quoteCount: z.number().int(), + read: z.boolean(), + readersCount: z.number().int(), + reads: z.number().int(), + replyCount: z.number().int(), + replyToPostNumber: z.nullable(z.string()), + reviewableId: z.number().int(), + reviewableScoreCount: z.number().int(), + reviewableScorePendingCount: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topicId: z.number().int(), + topicSlug: z.string(), + trustLevel: z.number().int(), + updatedAt: z.string(), + userDeleted: z.boolean(), + userId: z.number().int(), + userTitle: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + linkCounts: "link_counts", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Posts$ { - /** @deprecated use `Posts$inboundSchema` instead. */ - export const inboundSchema = Posts$inboundSchema; - /** @deprecated use `Posts$outboundSchema` instead. */ - export const outboundSchema = Posts$outboundSchema; - /** @deprecated use `Posts$Outbound` instead. */ - export type Outbound = Posts$Outbound; + /** @deprecated use `Posts$inboundSchema` instead. */ + export const inboundSchema = Posts$inboundSchema; + /** @deprecated use `Posts$outboundSchema` instead. */ + export const outboundSchema = Posts$outboundSchema; + /** @deprecated use `Posts$Outbound` instead. */ + export type Outbound = Posts$Outbound; } /** @internal */ -export const PostStream$inboundSchema: z.ZodType = z.object({ - posts: z.array(z.lazy(() => Posts$inboundSchema)), - stream: z.array(z.any()), +export const PostStream$inboundSchema: z.ZodType< + PostStream, + z.ZodTypeDef, + unknown +> = z.object({ + posts: z.array(z.lazy(() => Posts$inboundSchema)), + stream: z.array(z.any()), }); /** @internal */ export type PostStream$Outbound = { - posts: Array; - stream: Array; + posts: Array; + stream: Array; }; /** @internal */ -export const PostStream$outboundSchema: z.ZodType = - z.object({ - posts: z.array(z.lazy(() => Posts$outboundSchema)), - stream: z.array(z.any()), - }); +export const PostStream$outboundSchema: z.ZodType< + PostStream$Outbound, + z.ZodTypeDef, + PostStream +> = z.object({ + posts: z.array(z.lazy(() => Posts$outboundSchema)), + stream: z.array(z.any()), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostStream$ { - /** @deprecated use `PostStream$inboundSchema` instead. */ - export const inboundSchema = PostStream$inboundSchema; - /** @deprecated use `PostStream$outboundSchema` instead. */ - export const outboundSchema = PostStream$outboundSchema; - /** @deprecated use `PostStream$Outbound` instead. */ - export type Outbound = PostStream$Outbound; + /** @deprecated use `PostStream$inboundSchema` instead. */ + export const inboundSchema = PostStream$inboundSchema; + /** @deprecated use `PostStream$outboundSchema` instead. */ + export const outboundSchema = PostStream$outboundSchema; + /** @deprecated use `PostStream$Outbound` instead. */ + export type Outbound = PostStream$Outbound; } /** @internal */ -export const GetTopicUser$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const GetTopicUser$inboundSchema: z.ZodType< + GetTopicUser, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type GetTopicUser$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ export const GetTopicUser$outboundSchema: z.ZodType< - GetTopicUser$Outbound, - z.ZodTypeDef, - GetTopicUser -> = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + GetTopicUser$Outbound, + z.ZodTypeDef, + GetTopicUser +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicUser$ { - /** @deprecated use `GetTopicUser$inboundSchema` instead. */ - export const inboundSchema = GetTopicUser$inboundSchema; - /** @deprecated use `GetTopicUser$outboundSchema` instead. */ - export const outboundSchema = GetTopicUser$outboundSchema; - /** @deprecated use `GetTopicUser$Outbound` instead. */ - export type Outbound = GetTopicUser$Outbound; + /** @deprecated use `GetTopicUser$inboundSchema` instead. */ + export const inboundSchema = GetTopicUser$inboundSchema; + /** @deprecated use `GetTopicUser$outboundSchema` instead. */ + export const outboundSchema = GetTopicUser$outboundSchema; + /** @deprecated use `GetTopicUser$Outbound` instead. */ + export type Outbound = GetTopicUser$Outbound; } /** @internal */ -export const Posters$inboundSchema: z.ZodType = z.object({ +export const Posters$inboundSchema: z.ZodType = + z.object({ description: z.string(), extras: z.string(), user: z.lazy(() => GetTopicUser$inboundSchema), -}); + }); /** @internal */ export type Posters$Outbound = { - description: string; - extras: string; - user: GetTopicUser$Outbound; + description: string; + extras: string; + user: GetTopicUser$Outbound; }; /** @internal */ -export const Posters$outboundSchema: z.ZodType = z.object({ - description: z.string(), - extras: z.string(), - user: z.lazy(() => GetTopicUser$outboundSchema), +export const Posters$outboundSchema: z.ZodType< + Posters$Outbound, + z.ZodTypeDef, + Posters +> = z.object({ + description: z.string(), + extras: z.string(), + user: z.lazy(() => GetTopicUser$outboundSchema), }); /** @@ -1164,19 +1189,19 @@ export const Posters$outboundSchema: z.ZodType = z.object({}); /** @internal */ @@ -1184,9 +1209,9 @@ export type GetTopicTagsDescriptions$Outbound = {}; /** @internal */ export const GetTopicTagsDescriptions$outboundSchema: z.ZodType< - GetTopicTagsDescriptions$Outbound, - z.ZodTypeDef, - GetTopicTagsDescriptions + GetTopicTagsDescriptions$Outbound, + z.ZodTypeDef, + GetTopicTagsDescriptions > = z.object({}); /** @@ -1194,176 +1219,179 @@ export const GetTopicTagsDescriptions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicTagsDescriptions$ { - /** @deprecated use `GetTopicTagsDescriptions$inboundSchema` instead. */ - export const inboundSchema = GetTopicTagsDescriptions$inboundSchema; - /** @deprecated use `GetTopicTagsDescriptions$outboundSchema` instead. */ - export const outboundSchema = GetTopicTagsDescriptions$outboundSchema; - /** @deprecated use `GetTopicTagsDescriptions$Outbound` instead. */ - export type Outbound = GetTopicTagsDescriptions$Outbound; + /** @deprecated use `GetTopicTagsDescriptions$inboundSchema` instead. */ + export const inboundSchema = GetTopicTagsDescriptions$inboundSchema; + /** @deprecated use `GetTopicTagsDescriptions$outboundSchema` instead. */ + export const outboundSchema = GetTopicTagsDescriptions$outboundSchema; + /** @deprecated use `GetTopicTagsDescriptions$Outbound` instead. */ + export type Outbound = GetTopicTagsDescriptions$Outbound; } /** @internal */ -export const SuggestedTopics$inboundSchema: z.ZodType = z - .object({ - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.nullable(z.string()), - bumped: z.boolean(), - bumped_at: z.string(), - category_id: z.number().int(), - closed: z.boolean(), - created_at: z.string(), - excerpt: z.string(), - fancy_title: z.string(), - featured_link: z.nullable(z.string()), - highest_post_number: z.number().int(), - id: z.number().int(), - image_url: z.nullable(z.string()), - last_posted_at: z.nullable(z.string()), - like_count: z.number().int(), - liked: z.nullable(z.string()), - pinned: z.boolean(), - posters: z.array(z.lazy(() => Posters$inboundSchema)), - posts_count: z.number().int(), - reply_count: z.number().int(), - slug: z.string(), - tags: z.array(z.any()), - tags_descriptions: z.lazy(() => GetTopicTagsDescriptions$inboundSchema), - title: z.string(), - unpinned: z.nullable(z.string()), - unseen: z.boolean(), - views: z.number().int(), - visible: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - like_count: "likeCount", - posts_count: "postsCount", - reply_count: "replyCount", - tags_descriptions: "tagsDescriptions", - }); - }); +export const SuggestedTopics$inboundSchema: z.ZodType< + SuggestedTopics, + z.ZodTypeDef, + unknown +> = z.object({ + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.nullable(z.string()), + bumped: z.boolean(), + bumped_at: z.string(), + category_id: z.number().int(), + closed: z.boolean(), + created_at: z.string(), + excerpt: z.string(), + fancy_title: z.string(), + featured_link: z.nullable(z.string()), + highest_post_number: z.number().int(), + id: z.number().int(), + image_url: z.nullable(z.string()), + last_posted_at: z.nullable(z.string()), + like_count: z.number().int(), + liked: z.nullable(z.string()), + pinned: z.boolean(), + posters: z.array(z.lazy(() => Posters$inboundSchema)), + posts_count: z.number().int(), + reply_count: z.number().int(), + slug: z.string(), + tags: z.array(z.any()), + tags_descriptions: z.lazy(() => GetTopicTagsDescriptions$inboundSchema), + title: z.string(), + unpinned: z.nullable(z.string()), + unseen: z.boolean(), + views: z.number().int(), + visible: z.boolean(), +}).transform((v) => { + return remap$(v, { + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "like_count": "likeCount", + "posts_count": "postsCount", + "reply_count": "replyCount", + "tags_descriptions": "tagsDescriptions", + }); +}); /** @internal */ export type SuggestedTopics$Outbound = { - archetype: string; - archived: boolean; - bookmarked: string | null; - bumped: boolean; - bumped_at: string; - category_id: number; - closed: boolean; - created_at: string; - excerpt: string; - fancy_title: string; - featured_link: string | null; - highest_post_number: number; - id: number; - image_url: string | null; - last_posted_at: string | null; - like_count: number; - liked: string | null; - pinned: boolean; - posters: Array; - posts_count: number; - reply_count: number; - slug: string; - tags: Array; - tags_descriptions: GetTopicTagsDescriptions$Outbound; - title: string; - unpinned: string | null; - unseen: boolean; - views: number; - visible: boolean; + archetype: string; + archived: boolean; + bookmarked: string | null; + bumped: boolean; + bumped_at: string; + category_id: number; + closed: boolean; + created_at: string; + excerpt: string; + fancy_title: string; + featured_link: string | null; + highest_post_number: number; + id: number; + image_url: string | null; + last_posted_at: string | null; + like_count: number; + liked: string | null; + pinned: boolean; + posters: Array; + posts_count: number; + reply_count: number; + slug: string; + tags: Array; + tags_descriptions: GetTopicTagsDescriptions$Outbound; + title: string; + unpinned: string | null; + unseen: boolean; + views: number; + visible: boolean; }; /** @internal */ export const SuggestedTopics$outboundSchema: z.ZodType< - SuggestedTopics$Outbound, - z.ZodTypeDef, - SuggestedTopics -> = z - .object({ - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.nullable(z.string()), - bumped: z.boolean(), - bumpedAt: z.string(), - categoryId: z.number().int(), - closed: z.boolean(), - createdAt: z.string(), - excerpt: z.string(), - fancyTitle: z.string(), - featuredLink: z.nullable(z.string()), - highestPostNumber: z.number().int(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - lastPostedAt: z.nullable(z.string()), - likeCount: z.number().int(), - liked: z.nullable(z.string()), - pinned: z.boolean(), - posters: z.array(z.lazy(() => Posters$outboundSchema)), - postsCount: z.number().int(), - replyCount: z.number().int(), - slug: z.string(), - tags: z.array(z.any()), - tagsDescriptions: z.lazy(() => GetTopicTagsDescriptions$outboundSchema), - title: z.string(), - unpinned: z.nullable(z.string()), - unseen: z.boolean(), - views: z.number().int(), - visible: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - likeCount: "like_count", - postsCount: "posts_count", - replyCount: "reply_count", - tagsDescriptions: "tags_descriptions", - }); - }); + SuggestedTopics$Outbound, + z.ZodTypeDef, + SuggestedTopics +> = z.object({ + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.nullable(z.string()), + bumped: z.boolean(), + bumpedAt: z.string(), + categoryId: z.number().int(), + closed: z.boolean(), + createdAt: z.string(), + excerpt: z.string(), + fancyTitle: z.string(), + featuredLink: z.nullable(z.string()), + highestPostNumber: z.number().int(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + lastPostedAt: z.nullable(z.string()), + likeCount: z.number().int(), + liked: z.nullable(z.string()), + pinned: z.boolean(), + posters: z.array(z.lazy(() => Posters$outboundSchema)), + postsCount: z.number().int(), + replyCount: z.number().int(), + slug: z.string(), + tags: z.array(z.any()), + tagsDescriptions: z.lazy(() => GetTopicTagsDescriptions$outboundSchema), + title: z.string(), + unpinned: z.nullable(z.string()), + unseen: z.boolean(), + views: z.number().int(), + visible: z.boolean(), +}).transform((v) => { + return remap$(v, { + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + likeCount: "like_count", + postsCount: "posts_count", + replyCount: "reply_count", + tagsDescriptions: "tags_descriptions", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuggestedTopics$ { - /** @deprecated use `SuggestedTopics$inboundSchema` instead. */ - export const inboundSchema = SuggestedTopics$inboundSchema; - /** @deprecated use `SuggestedTopics$outboundSchema` instead. */ - export const outboundSchema = SuggestedTopics$outboundSchema; - /** @deprecated use `SuggestedTopics$Outbound` instead. */ - export type Outbound = SuggestedTopics$Outbound; + /** @deprecated use `SuggestedTopics$inboundSchema` instead. */ + export const inboundSchema = SuggestedTopics$inboundSchema; + /** @deprecated use `SuggestedTopics$outboundSchema` instead. */ + export const outboundSchema = SuggestedTopics$outboundSchema; + /** @deprecated use `SuggestedTopics$Outbound` instead. */ + export type Outbound = SuggestedTopics$Outbound; } /** @internal */ -export const TagsDescriptions$inboundSchema: z.ZodType = - z.object({}); +export const TagsDescriptions$inboundSchema: z.ZodType< + TagsDescriptions, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type TagsDescriptions$Outbound = {}; /** @internal */ export const TagsDescriptions$outboundSchema: z.ZodType< - TagsDescriptions$Outbound, - z.ZodTypeDef, - TagsDescriptions + TagsDescriptions$Outbound, + z.ZodTypeDef, + TagsDescriptions > = z.object({}); /** @@ -1371,274 +1399,270 @@ export const TagsDescriptions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TagsDescriptions$ { - /** @deprecated use `TagsDescriptions$inboundSchema` instead. */ - export const inboundSchema = TagsDescriptions$inboundSchema; - /** @deprecated use `TagsDescriptions$outboundSchema` instead. */ - export const outboundSchema = TagsDescriptions$outboundSchema; - /** @deprecated use `TagsDescriptions$Outbound` instead. */ - export type Outbound = TagsDescriptions$Outbound; + /** @deprecated use `TagsDescriptions$inboundSchema` instead. */ + export const inboundSchema = TagsDescriptions$inboundSchema; + /** @deprecated use `TagsDescriptions$outboundSchema` instead. */ + export const outboundSchema = TagsDescriptions$outboundSchema; + /** @deprecated use `TagsDescriptions$Outbound` instead. */ + export type Outbound = TagsDescriptions$Outbound; } /** @internal */ export const GetTopicResponseBody$inboundSchema: z.ZodType< - GetTopicResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - actions_summary: z.array(z.lazy(() => GetTopicActionsSummary$inboundSchema)), - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.boolean(), - bookmarks: z.array(z.any()), - category_id: z.number().int(), - chunk_size: z.number().int(), - closed: z.boolean(), - created_at: z.string(), - current_post_number: z.number().int().optional(), - deleted_at: z.nullable(z.string()), - deleted_by: z.nullable(z.string()), - details: z.lazy(() => Details$inboundSchema), - draft: z.nullable(z.string()), - draft_key: z.string(), - draft_sequence: z.number().int(), - fancy_title: z.string(), - featured_link: z.nullable(z.string()), - has_deleted: z.boolean(), - has_summary: z.boolean(), - highest_post_number: z.nullable(z.number().int()), - id: z.number().int(), - image_url: z.nullable(z.string()), - last_posted_at: z.nullable(z.string()), - like_count: z.number().int(), - message_bus_last_id: z.number().int(), - participant_count: z.number().int(), - pinned: z.boolean(), - pinned_at: z.nullable(z.string()), - pinned_globally: z.boolean(), - pinned_until: z.nullable(z.string()), - post_stream: z.lazy(() => PostStream$inboundSchema), - posts_count: z.number().int(), - reply_count: z.number().int(), - show_read_indicator: z.boolean(), - slow_mode_enabled_until: z.nullable(z.string()), - slow_mode_seconds: z.number().int(), - slug: z.string(), - suggested_topics: z.array(z.lazy(() => SuggestedTopics$inboundSchema)), - summarizable: z.boolean(), - tags: z.array(z.any()), - tags_descriptions: z.lazy(() => TagsDescriptions$inboundSchema), - thumbnails: z.nullable(z.string()), - timeline_lookup: z.array(z.any()), - title: z.string(), - topic_timer: z.nullable(z.string()), - unpinned: z.nullable(z.string()), - user_id: z.number().int(), - views: z.number().int(), - visible: z.boolean(), - word_count: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - category_id: "categoryId", - chunk_size: "chunkSize", - created_at: "createdAt", - current_post_number: "currentPostNumber", - deleted_at: "deletedAt", - deleted_by: "deletedBy", - draft_key: "draftKey", - draft_sequence: "draftSequence", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_deleted: "hasDeleted", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - like_count: "likeCount", - message_bus_last_id: "messageBusLastId", - participant_count: "participantCount", - pinned_at: "pinnedAt", - pinned_globally: "pinnedGlobally", - pinned_until: "pinnedUntil", - post_stream: "postStream", - posts_count: "postsCount", - reply_count: "replyCount", - show_read_indicator: "showReadIndicator", - slow_mode_enabled_until: "slowModeEnabledUntil", - slow_mode_seconds: "slowModeSeconds", - suggested_topics: "suggestedTopics", - tags_descriptions: "tagsDescriptions", - timeline_lookup: "timelineLookup", - topic_timer: "topicTimer", - user_id: "userId", - word_count: "wordCount", - }); - }); + GetTopicResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array(z.lazy(() => GetTopicActionsSummary$inboundSchema)), + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.boolean(), + bookmarks: z.array(z.any()), + category_id: z.number().int(), + chunk_size: z.number().int(), + closed: z.boolean(), + created_at: z.string(), + current_post_number: z.number().int().optional(), + deleted_at: z.nullable(z.string()), + deleted_by: z.nullable(z.string()), + details: z.lazy(() => Details$inboundSchema), + draft: z.nullable(z.string()), + draft_key: z.string(), + draft_sequence: z.number().int(), + fancy_title: z.string(), + featured_link: z.nullable(z.string()), + has_deleted: z.boolean(), + has_summary: z.boolean(), + highest_post_number: z.nullable(z.number().int()), + id: z.number().int(), + image_url: z.nullable(z.string()), + last_posted_at: z.nullable(z.string()), + like_count: z.number().int(), + message_bus_last_id: z.number().int(), + participant_count: z.number().int(), + pinned: z.boolean(), + pinned_at: z.nullable(z.string()), + pinned_globally: z.boolean(), + pinned_until: z.nullable(z.string()), + post_stream: z.lazy(() => PostStream$inboundSchema), + posts_count: z.number().int(), + reply_count: z.number().int(), + show_read_indicator: z.boolean(), + slow_mode_enabled_until: z.nullable(z.string()), + slow_mode_seconds: z.number().int(), + slug: z.string(), + suggested_topics: z.array(z.lazy(() => SuggestedTopics$inboundSchema)), + summarizable: z.boolean(), + tags: z.array(z.any()), + tags_descriptions: z.lazy(() => TagsDescriptions$inboundSchema), + thumbnails: z.nullable(z.string()), + timeline_lookup: z.array(z.any()), + title: z.string(), + topic_timer: z.nullable(z.string()), + unpinned: z.nullable(z.string()), + user_id: z.number().int(), + views: z.number().int(), + visible: z.boolean(), + word_count: z.nullable(z.number().int()), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "category_id": "categoryId", + "chunk_size": "chunkSize", + "created_at": "createdAt", + "current_post_number": "currentPostNumber", + "deleted_at": "deletedAt", + "deleted_by": "deletedBy", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_deleted": "hasDeleted", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "like_count": "likeCount", + "message_bus_last_id": "messageBusLastId", + "participant_count": "participantCount", + "pinned_at": "pinnedAt", + "pinned_globally": "pinnedGlobally", + "pinned_until": "pinnedUntil", + "post_stream": "postStream", + "posts_count": "postsCount", + "reply_count": "replyCount", + "show_read_indicator": "showReadIndicator", + "slow_mode_enabled_until": "slowModeEnabledUntil", + "slow_mode_seconds": "slowModeSeconds", + "suggested_topics": "suggestedTopics", + "tags_descriptions": "tagsDescriptions", + "timeline_lookup": "timelineLookup", + "topic_timer": "topicTimer", + "user_id": "userId", + "word_count": "wordCount", + }); +}); /** @internal */ export type GetTopicResponseBody$Outbound = { - actions_summary: Array; - archetype: string; - archived: boolean; - bookmarked: boolean; - bookmarks: Array; - category_id: number; - chunk_size: number; - closed: boolean; - created_at: string; - current_post_number?: number | undefined; - deleted_at: string | null; - deleted_by: string | null; - details: Details$Outbound; - draft: string | null; - draft_key: string; - draft_sequence: number; - fancy_title: string; - featured_link: string | null; - has_deleted: boolean; - has_summary: boolean; - highest_post_number: number | null; - id: number; - image_url: string | null; - last_posted_at: string | null; - like_count: number; - message_bus_last_id: number; - participant_count: number; - pinned: boolean; - pinned_at: string | null; - pinned_globally: boolean; - pinned_until: string | null; - post_stream: PostStream$Outbound; - posts_count: number; - reply_count: number; - show_read_indicator: boolean; - slow_mode_enabled_until: string | null; - slow_mode_seconds: number; - slug: string; - suggested_topics: Array; - summarizable: boolean; - tags: Array; - tags_descriptions: TagsDescriptions$Outbound; - thumbnails: string | null; - timeline_lookup: Array; - title: string; - topic_timer: string | null; - unpinned: string | null; - user_id: number; - views: number; - visible: boolean; - word_count: number | null; + actions_summary: Array; + archetype: string; + archived: boolean; + bookmarked: boolean; + bookmarks: Array; + category_id: number; + chunk_size: number; + closed: boolean; + created_at: string; + current_post_number?: number | undefined; + deleted_at: string | null; + deleted_by: string | null; + details: Details$Outbound; + draft: string | null; + draft_key: string; + draft_sequence: number; + fancy_title: string; + featured_link: string | null; + has_deleted: boolean; + has_summary: boolean; + highest_post_number: number | null; + id: number; + image_url: string | null; + last_posted_at: string | null; + like_count: number; + message_bus_last_id: number; + participant_count: number; + pinned: boolean; + pinned_at: string | null; + pinned_globally: boolean; + pinned_until: string | null; + post_stream: PostStream$Outbound; + posts_count: number; + reply_count: number; + show_read_indicator: boolean; + slow_mode_enabled_until: string | null; + slow_mode_seconds: number; + slug: string; + suggested_topics: Array; + summarizable: boolean; + tags: Array; + tags_descriptions: TagsDescriptions$Outbound; + thumbnails: string | null; + timeline_lookup: Array; + title: string; + topic_timer: string | null; + unpinned: string | null; + user_id: number; + views: number; + visible: boolean; + word_count: number | null; }; /** @internal */ export const GetTopicResponseBody$outboundSchema: z.ZodType< - GetTopicResponseBody$Outbound, - z.ZodTypeDef, - GetTopicResponseBody -> = z - .object({ - actionsSummary: z.array(z.lazy(() => GetTopicActionsSummary$outboundSchema)), - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.boolean(), - bookmarks: z.array(z.any()), - categoryId: z.number().int(), - chunkSize: z.number().int(), - closed: z.boolean(), - createdAt: z.string(), - currentPostNumber: z.number().int().optional(), - deletedAt: z.nullable(z.string()), - deletedBy: z.nullable(z.string()), - details: z.lazy(() => Details$outboundSchema), - draft: z.nullable(z.string()), - draftKey: z.string(), - draftSequence: z.number().int(), - fancyTitle: z.string(), - featuredLink: z.nullable(z.string()), - hasDeleted: z.boolean(), - hasSummary: z.boolean(), - highestPostNumber: z.nullable(z.number().int()), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - lastPostedAt: z.nullable(z.string()), - likeCount: z.number().int(), - messageBusLastId: z.number().int(), - participantCount: z.number().int(), - pinned: z.boolean(), - pinnedAt: z.nullable(z.string()), - pinnedGlobally: z.boolean(), - pinnedUntil: z.nullable(z.string()), - postStream: z.lazy(() => PostStream$outboundSchema), - postsCount: z.number().int(), - replyCount: z.number().int(), - showReadIndicator: z.boolean(), - slowModeEnabledUntil: z.nullable(z.string()), - slowModeSeconds: z.number().int(), - slug: z.string(), - suggestedTopics: z.array(z.lazy(() => SuggestedTopics$outboundSchema)), - summarizable: z.boolean(), - tags: z.array(z.any()), - tagsDescriptions: z.lazy(() => TagsDescriptions$outboundSchema), - thumbnails: z.nullable(z.string()), - timelineLookup: z.array(z.any()), - title: z.string(), - topicTimer: z.nullable(z.string()), - unpinned: z.nullable(z.string()), - userId: z.number().int(), - views: z.number().int(), - visible: z.boolean(), - wordCount: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - categoryId: "category_id", - chunkSize: "chunk_size", - createdAt: "created_at", - currentPostNumber: "current_post_number", - deletedAt: "deleted_at", - deletedBy: "deleted_by", - draftKey: "draft_key", - draftSequence: "draft_sequence", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasDeleted: "has_deleted", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - likeCount: "like_count", - messageBusLastId: "message_bus_last_id", - participantCount: "participant_count", - pinnedAt: "pinned_at", - pinnedGlobally: "pinned_globally", - pinnedUntil: "pinned_until", - postStream: "post_stream", - postsCount: "posts_count", - replyCount: "reply_count", - showReadIndicator: "show_read_indicator", - slowModeEnabledUntil: "slow_mode_enabled_until", - slowModeSeconds: "slow_mode_seconds", - suggestedTopics: "suggested_topics", - tagsDescriptions: "tags_descriptions", - timelineLookup: "timeline_lookup", - topicTimer: "topic_timer", - userId: "user_id", - wordCount: "word_count", - }); - }); + GetTopicResponseBody$Outbound, + z.ZodTypeDef, + GetTopicResponseBody +> = z.object({ + actionsSummary: z.array(z.lazy(() => GetTopicActionsSummary$outboundSchema)), + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.boolean(), + bookmarks: z.array(z.any()), + categoryId: z.number().int(), + chunkSize: z.number().int(), + closed: z.boolean(), + createdAt: z.string(), + currentPostNumber: z.number().int().optional(), + deletedAt: z.nullable(z.string()), + deletedBy: z.nullable(z.string()), + details: z.lazy(() => Details$outboundSchema), + draft: z.nullable(z.string()), + draftKey: z.string(), + draftSequence: z.number().int(), + fancyTitle: z.string(), + featuredLink: z.nullable(z.string()), + hasDeleted: z.boolean(), + hasSummary: z.boolean(), + highestPostNumber: z.nullable(z.number().int()), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + lastPostedAt: z.nullable(z.string()), + likeCount: z.number().int(), + messageBusLastId: z.number().int(), + participantCount: z.number().int(), + pinned: z.boolean(), + pinnedAt: z.nullable(z.string()), + pinnedGlobally: z.boolean(), + pinnedUntil: z.nullable(z.string()), + postStream: z.lazy(() => PostStream$outboundSchema), + postsCount: z.number().int(), + replyCount: z.number().int(), + showReadIndicator: z.boolean(), + slowModeEnabledUntil: z.nullable(z.string()), + slowModeSeconds: z.number().int(), + slug: z.string(), + suggestedTopics: z.array(z.lazy(() => SuggestedTopics$outboundSchema)), + summarizable: z.boolean(), + tags: z.array(z.any()), + tagsDescriptions: z.lazy(() => TagsDescriptions$outboundSchema), + thumbnails: z.nullable(z.string()), + timelineLookup: z.array(z.any()), + title: z.string(), + topicTimer: z.nullable(z.string()), + unpinned: z.nullable(z.string()), + userId: z.number().int(), + views: z.number().int(), + visible: z.boolean(), + wordCount: z.nullable(z.number().int()), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + categoryId: "category_id", + chunkSize: "chunk_size", + createdAt: "created_at", + currentPostNumber: "current_post_number", + deletedAt: "deleted_at", + deletedBy: "deleted_by", + draftKey: "draft_key", + draftSequence: "draft_sequence", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasDeleted: "has_deleted", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + likeCount: "like_count", + messageBusLastId: "message_bus_last_id", + participantCount: "participant_count", + pinnedAt: "pinned_at", + pinnedGlobally: "pinned_globally", + pinnedUntil: "pinned_until", + postStream: "post_stream", + postsCount: "posts_count", + replyCount: "reply_count", + showReadIndicator: "show_read_indicator", + slowModeEnabledUntil: "slow_mode_enabled_until", + slowModeSeconds: "slow_mode_seconds", + suggestedTopics: "suggested_topics", + tagsDescriptions: "tags_descriptions", + timelineLookup: "timeline_lookup", + topicTimer: "topic_timer", + userId: "user_id", + wordCount: "word_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicResponseBody$ { - /** @deprecated use `GetTopicResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTopicResponseBody$inboundSchema; - /** @deprecated use `GetTopicResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTopicResponseBody$outboundSchema; - /** @deprecated use `GetTopicResponseBody$Outbound` instead. */ - export type Outbound = GetTopicResponseBody$Outbound; + /** @deprecated use `GetTopicResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTopicResponseBody$inboundSchema; + /** @deprecated use `GetTopicResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTopicResponseBody$outboundSchema; + /** @deprecated use `GetTopicResponseBody$Outbound` instead. */ + export type Outbound = GetTopicResponseBody$Outbound; } diff --git a/src/sdk/models/operations/gettopicbyexternalid.ts b/src/sdk/models/operations/gettopicbyexternalid.ts index 1fa6ee2..326f8bf 100644 --- a/src/sdk/models/operations/gettopicbyexternalid.ts +++ b/src/sdk/models/operations/gettopicbyexternalid.ts @@ -2,57 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTopicByExternalIdRequest = { - externalId: string; + externalId: string; }; /** @internal */ export const GetTopicByExternalIdRequest$inboundSchema: z.ZodType< - GetTopicByExternalIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - external_id: z.string(), - }) - .transform((v) => { - return remap$(v, { - external_id: "externalId", - }); - }); + GetTopicByExternalIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + external_id: z.string(), +}).transform((v) => { + return remap$(v, { + "external_id": "externalId", + }); +}); /** @internal */ export type GetTopicByExternalIdRequest$Outbound = { - external_id: string; + external_id: string; }; /** @internal */ export const GetTopicByExternalIdRequest$outboundSchema: z.ZodType< - GetTopicByExternalIdRequest$Outbound, - z.ZodTypeDef, - GetTopicByExternalIdRequest -> = z - .object({ - externalId: z.string(), - }) - .transform((v) => { - return remap$(v, { - externalId: "external_id", - }); - }); + GetTopicByExternalIdRequest$Outbound, + z.ZodTypeDef, + GetTopicByExternalIdRequest +> = z.object({ + externalId: z.string(), +}).transform((v) => { + return remap$(v, { + externalId: "external_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicByExternalIdRequest$ { - /** @deprecated use `GetTopicByExternalIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetTopicByExternalIdRequest$inboundSchema; - /** @deprecated use `GetTopicByExternalIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetTopicByExternalIdRequest$outboundSchema; - /** @deprecated use `GetTopicByExternalIdRequest$Outbound` instead. */ - export type Outbound = GetTopicByExternalIdRequest$Outbound; + /** @deprecated use `GetTopicByExternalIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetTopicByExternalIdRequest$inboundSchema; + /** @deprecated use `GetTopicByExternalIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetTopicByExternalIdRequest$outboundSchema; + /** @deprecated use `GetTopicByExternalIdRequest$Outbound` instead. */ + export type Outbound = GetTopicByExternalIdRequest$Outbound; } diff --git a/src/sdk/models/operations/getuser.ts b/src/sdk/models/operations/getuser.ts index 539b9cd..8aab6c4 100644 --- a/src/sdk/models/operations/getuser.ts +++ b/src/sdk/models/operations/getuser.ts @@ -2,1476 +2,1478 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserRequest = { - apiKey: string; - apiUsername: string; - username: string; + apiKey: string; + apiUsername: string; + username: string; }; export type GetUserCustomFields = { - firstName?: string | null | undefined; + firstName?: string | null | undefined; }; export type GroupUsers = { - groupId: number; - notificationLevel: number; - owner?: boolean | undefined; - userId: number; + groupId: number; + notificationLevel: number; + owner?: boolean | undefined; + userId: number; }; export type GetUserGroups = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canSeeMembers: boolean; - defaultNotificationLevel: number; - displayName: string; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canSeeMembers: boolean; + defaultNotificationLevel: number; + displayName: string; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; export type UserAuthTokens = { - browser: string; - clientIp: string; - createdAt: string; - device: string; - icon: string; - id: number; - isActive: boolean; - location: string; - os: string; - seenAt: string; + browser: string; + clientIp: string; + createdAt: string; + device: string; + icon: string; + id: number; + isActive: boolean; + location: string; + os: string; + seenAt: string; }; export type UserFields = { - one: string | null; - two: string | null; + one: string | null; + two: string | null; }; export type UserNotificationSchedule = { - day0EndTime: number; - day0StartTime: number; - day1EndTime: number; - day1StartTime: number; - day2EndTime: number; - day2StartTime: number; - day3EndTime: number; - day3StartTime: number; - day4EndTime: number; - day4StartTime: number; - day5EndTime: number; - day5StartTime: number; - day6EndTime: number; - day6StartTime: number; - enabled: boolean; + day0EndTime: number; + day0StartTime: number; + day1EndTime: number; + day1StartTime: number; + day2EndTime: number; + day2StartTime: number; + day3EndTime: number; + day3StartTime: number; + day4EndTime: number; + day4StartTime: number; + day5EndTime: number; + day5StartTime: number; + day6EndTime: number; + day6StartTime: number; + enabled: boolean; }; export type UserOption = { - allowPrivateMessages: boolean; - autoTrackTopicsAfterMsecs: number; - automaticallyUnpinTopics: boolean; - bookmarkAutoDeletePreference?: number | undefined; - colorSchemeId: string | null; - darkSchemeId: string | null; - defaultCalendar?: string | undefined; - digestAfterMinutes: number; - dynamicFavicon: boolean; - emailDigests: boolean; - emailInReplyTo: boolean; - emailLevel: number; - emailMessagesLevel: number; - emailPreviousReplies: number; - enableAllowedPmUsers: boolean; - enableDefer: boolean; - enableQuoting: boolean; - externalLinksInNewTab: boolean; - hideProfileAndPresence: boolean; - homepageId: string | null; - includeTl0InDigests: boolean; - likeNotificationFrequency: number; - mailingListMode: boolean; - mailingListModeFrequency: number; - newTopicDurationMinutes: number; - notificationLevelWhenReplying: number; - oldestSearchLogDate?: string | null | undefined; - seenPopups?: Array | null | undefined; - sidebarLinkToFilteredList?: boolean | undefined; - sidebarShowCountOfNewItems?: boolean | undefined; - skipNewUserTips: boolean; - textSize: string; - textSizeSeq: number; - themeIds: Array; - themeKeySeq: number; - timezone: string | null; - titleCountMode: string; - userId: number; - watchedPrecedenceOverMuted?: boolean | null | undefined; + allowPrivateMessages: boolean; + autoTrackTopicsAfterMsecs: number; + automaticallyUnpinTopics: boolean; + bookmarkAutoDeletePreference?: number | undefined; + colorSchemeId: string | null; + darkSchemeId: string | null; + defaultCalendar?: string | undefined; + digestAfterMinutes: number; + dynamicFavicon: boolean; + emailDigests: boolean; + emailInReplyTo: boolean; + emailLevel: number; + emailMessagesLevel: number; + emailPreviousReplies: number; + enableAllowedPmUsers: boolean; + enableDefer: boolean; + enableQuoting: boolean; + externalLinksInNewTab: boolean; + hideProfileAndPresence: boolean; + homepageId: string | null; + includeTl0InDigests: boolean; + likeNotificationFrequency: number; + mailingListMode: boolean; + mailingListModeFrequency: number; + newTopicDurationMinutes: number; + notificationLevelWhenReplying: number; + oldestSearchLogDate?: string | null | undefined; + seenPopups?: Array | null | undefined; + sidebarLinkToFilteredList?: boolean | undefined; + sidebarShowCountOfNewItems?: boolean | undefined; + skipNewUserTips: boolean; + textSize: string; + textSizeSeq: number; + themeIds: Array; + themeKeySeq: number; + timezone: string | null; + titleCountMode: string; + userId: number; + watchedPrecedenceOverMuted?: boolean | null | undefined; }; export type User = { - admin: boolean; - allowedPmUsernames: Array; - avatarTemplate: string; - badgeCount: number; - canBeDeleted: boolean; - canChangeBio: boolean; - canChangeLocation: boolean; - canChangeTrackingPreferences: boolean; - canChangeWebsite: boolean; - canDeleteAllPosts: boolean; - canEdit: boolean; - canEditEmail: boolean; - canEditName: boolean; - canEditUsername: boolean; - canIgnoreUser: boolean; - canMuteUser: boolean; - canSendPrivateMessageToUser: boolean; - canSendPrivateMessages: boolean; - canUploadProfileHeader: boolean; - canUploadUserCardBackground: boolean; - createdAt: string; - customFields: GetUserCustomFields; - displaySidebarTags?: boolean | undefined; - featuredTopic: string | null; - featuredUserBadgeIds: Array; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId: string | null; - flairName: string | null; - flairUrl: string | null; - groupUsers: Array; - groups: Array; - hasTitleBadges: boolean; - id: number; - ignored: boolean; - ignoredUsernames: Array; - invitedBy: string | null; - lastPostedAt: string | null; - lastSeenAt: string | null; - locale: string | null; - mailingListPostsPerDay: number; - moderator: boolean; - muted: boolean; - mutedCategoryIds: Array; - mutedTags: Array; - mutedUsernames: Array; - name: string; - pendingCount: number; - pendingPostsCount?: number | undefined; - postCount: number; - primaryGroupId: string | null; - primaryGroupName: string | null; - profileViewCount: number; - recentTimeRead: number; - regularCategoryIds: Array; - secondFactorBackupEnabled?: boolean | undefined; - secondFactorEnabled: boolean; - sidebarCategoryIds?: Array | undefined; - sidebarTags?: Array | undefined; - staged: boolean; - systemAvatarTemplate: string; - systemAvatarUploadId: string | null; - timeRead: number; - title: string | null; - trackedCategoryIds: Array; - trackedTags: Array; - trustLevel: number; - uploadedAvatarId: string | null; - useLogoSmallAsAvatar: boolean; - userApiKeys: string | null; - userAuthTokens: Array; - userFields?: UserFields | undefined; - userNotificationSchedule: UserNotificationSchedule; - userOption: UserOption; - username: string; - watchedCategoryIds: Array; - watchedFirstPostCategoryIds: Array; - watchedTags: Array; - watchingFirstPostTags: Array; + admin: boolean; + allowedPmUsernames: Array; + avatarTemplate: string; + badgeCount: number; + canBeDeleted: boolean; + canChangeBio: boolean; + canChangeLocation: boolean; + canChangeTrackingPreferences: boolean; + canChangeWebsite: boolean; + canDeleteAllPosts: boolean; + canEdit: boolean; + canEditEmail: boolean; + canEditName: boolean; + canEditUsername: boolean; + canIgnoreUser: boolean; + canMuteUser: boolean; + canSendPrivateMessageToUser: boolean; + canSendPrivateMessages: boolean; + canUploadProfileHeader: boolean; + canUploadUserCardBackground: boolean; + createdAt: string; + customFields: GetUserCustomFields; + displaySidebarTags?: boolean | undefined; + featuredTopic: string | null; + featuredUserBadgeIds: Array; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId: string | null; + flairName: string | null; + flairUrl: string | null; + groupUsers: Array; + groups: Array; + hasTitleBadges: boolean; + id: number; + ignored: boolean; + ignoredUsernames: Array; + invitedBy: string | null; + lastPostedAt: string | null; + lastSeenAt: string | null; + locale: string | null; + mailingListPostsPerDay: number; + moderator: boolean; + muted: boolean; + mutedCategoryIds: Array; + mutedTags: Array; + mutedUsernames: Array; + name: string; + pendingCount: number; + pendingPostsCount?: number | undefined; + postCount: number; + primaryGroupId: string | null; + primaryGroupName: string | null; + profileViewCount: number; + recentTimeRead: number; + regularCategoryIds: Array; + secondFactorBackupEnabled?: boolean | undefined; + secondFactorEnabled: boolean; + sidebarCategoryIds?: Array | undefined; + sidebarTags?: Array | undefined; + staged: boolean; + systemAvatarTemplate: string; + systemAvatarUploadId: string | null; + timeRead: number; + title: string | null; + trackedCategoryIds: Array; + trackedTags: Array; + trustLevel: number; + uploadedAvatarId: string | null; + useLogoSmallAsAvatar: boolean; + userApiKeys: string | null; + userAuthTokens: Array; + userFields?: UserFields | undefined; + userNotificationSchedule: UserNotificationSchedule; + userOption: UserOption; + username: string; + watchedCategoryIds: Array; + watchedFirstPostCategoryIds: Array; + watchedTags: Array; + watchingFirstPostTags: Array; }; /** * user response */ export type GetUserResponseBody = { - user: User; - userBadges: Array; + user: User; + userBadges: Array; }; /** @internal */ -export const GetUserRequest$inboundSchema: z.ZodType = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); +export const GetUserRequest$inboundSchema: z.ZodType< + GetUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type GetUserRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - username: string; + "Api-Key": string; + "Api-Username": string; + username: string; }; /** @internal */ export const GetUserRequest$outboundSchema: z.ZodType< - GetUserRequest$Outbound, - z.ZodTypeDef, - GetUserRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + GetUserRequest$Outbound, + z.ZodTypeDef, + GetUserRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserRequest$ { - /** @deprecated use `GetUserRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserRequest$inboundSchema; - /** @deprecated use `GetUserRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserRequest$outboundSchema; - /** @deprecated use `GetUserRequest$Outbound` instead. */ - export type Outbound = GetUserRequest$Outbound; + /** @deprecated use `GetUserRequest$inboundSchema` instead. */ + export const inboundSchema = GetUserRequest$inboundSchema; + /** @deprecated use `GetUserRequest$outboundSchema` instead. */ + export const outboundSchema = GetUserRequest$outboundSchema; + /** @deprecated use `GetUserRequest$Outbound` instead. */ + export type Outbound = GetUserRequest$Outbound; } /** @internal */ export const GetUserCustomFields$inboundSchema: z.ZodType< - GetUserCustomFields, - z.ZodTypeDef, - unknown -> = z - .object({ - first_name: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - first_name: "firstName", - }); - }); + GetUserCustomFields, + z.ZodTypeDef, + unknown +> = z.object({ + first_name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "first_name": "firstName", + }); +}); /** @internal */ export type GetUserCustomFields$Outbound = { - first_name?: string | null | undefined; + first_name?: string | null | undefined; }; /** @internal */ export const GetUserCustomFields$outboundSchema: z.ZodType< - GetUserCustomFields$Outbound, - z.ZodTypeDef, - GetUserCustomFields -> = z - .object({ - firstName: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - firstName: "first_name", - }); - }); + GetUserCustomFields$Outbound, + z.ZodTypeDef, + GetUserCustomFields +> = z.object({ + firstName: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + firstName: "first_name", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserCustomFields$ { - /** @deprecated use `GetUserCustomFields$inboundSchema` instead. */ - export const inboundSchema = GetUserCustomFields$inboundSchema; - /** @deprecated use `GetUserCustomFields$outboundSchema` instead. */ - export const outboundSchema = GetUserCustomFields$outboundSchema; - /** @deprecated use `GetUserCustomFields$Outbound` instead. */ - export type Outbound = GetUserCustomFields$Outbound; + /** @deprecated use `GetUserCustomFields$inboundSchema` instead. */ + export const inboundSchema = GetUserCustomFields$inboundSchema; + /** @deprecated use `GetUserCustomFields$outboundSchema` instead. */ + export const outboundSchema = GetUserCustomFields$outboundSchema; + /** @deprecated use `GetUserCustomFields$Outbound` instead. */ + export type Outbound = GetUserCustomFields$Outbound; } /** @internal */ -export const GroupUsers$inboundSchema: z.ZodType = z - .object({ - group_id: z.number().int(), - notification_level: z.number().int(), - owner: z.boolean().optional(), - user_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_id: "groupId", - notification_level: "notificationLevel", - user_id: "userId", - }); - }); +export const GroupUsers$inboundSchema: z.ZodType< + GroupUsers, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.number().int(), + notification_level: z.number().int(), + owner: z.boolean().optional(), + user_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + "notification_level": "notificationLevel", + "user_id": "userId", + }); +}); /** @internal */ export type GroupUsers$Outbound = { - group_id: number; - notification_level: number; - owner?: boolean | undefined; - user_id: number; + group_id: number; + notification_level: number; + owner?: boolean | undefined; + user_id: number; }; /** @internal */ -export const GroupUsers$outboundSchema: z.ZodType = z - .object({ - groupId: z.number().int(), - notificationLevel: z.number().int(), - owner: z.boolean().optional(), - userId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupId: "group_id", - notificationLevel: "notification_level", - userId: "user_id", - }); - }); +export const GroupUsers$outboundSchema: z.ZodType< + GroupUsers$Outbound, + z.ZodTypeDef, + GroupUsers +> = z.object({ + groupId: z.number().int(), + notificationLevel: z.number().int(), + owner: z.boolean().optional(), + userId: z.number().int(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + notificationLevel: "notification_level", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GroupUsers$ { - /** @deprecated use `GroupUsers$inboundSchema` instead. */ - export const inboundSchema = GroupUsers$inboundSchema; - /** @deprecated use `GroupUsers$outboundSchema` instead. */ - export const outboundSchema = GroupUsers$outboundSchema; - /** @deprecated use `GroupUsers$Outbound` instead. */ - export type Outbound = GroupUsers$Outbound; + /** @deprecated use `GroupUsers$inboundSchema` instead. */ + export const inboundSchema = GroupUsers$inboundSchema; + /** @deprecated use `GroupUsers$outboundSchema` instead. */ + export const outboundSchema = GroupUsers$outboundSchema; + /** @deprecated use `GroupUsers$Outbound` instead. */ + export type Outbound = GroupUsers$Outbound; } /** @internal */ -export const GetUserGroups$inboundSchema: z.ZodType = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - display_name: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - display_name: "displayName", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); - }); +export const GetUserGroups$inboundSchema: z.ZodType< + GetUserGroups, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + display_name: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "display_name": "displayName", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + }); +}); /** @internal */ export type GetUserGroups$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_see_members: boolean; - default_notification_level: number; - display_name: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_see_members: boolean; + default_notification_level: number; + display_name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ export const GetUserGroups$outboundSchema: z.ZodType< - GetUserGroups$Outbound, - z.ZodTypeDef, - GetUserGroups -> = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - displayName: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - displayName: "display_name", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); + GetUserGroups$Outbound, + z.ZodTypeDef, + GetUserGroups +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + displayName: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + displayName: "display_name", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserGroups$ { - /** @deprecated use `GetUserGroups$inboundSchema` instead. */ - export const inboundSchema = GetUserGroups$inboundSchema; - /** @deprecated use `GetUserGroups$outboundSchema` instead. */ - export const outboundSchema = GetUserGroups$outboundSchema; - /** @deprecated use `GetUserGroups$Outbound` instead. */ - export type Outbound = GetUserGroups$Outbound; + /** @deprecated use `GetUserGroups$inboundSchema` instead. */ + export const inboundSchema = GetUserGroups$inboundSchema; + /** @deprecated use `GetUserGroups$outboundSchema` instead. */ + export const outboundSchema = GetUserGroups$outboundSchema; + /** @deprecated use `GetUserGroups$Outbound` instead. */ + export type Outbound = GetUserGroups$Outbound; } /** @internal */ -export const UserAuthTokens$inboundSchema: z.ZodType = z - .object({ - browser: z.string(), - client_ip: z.string(), - created_at: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - is_active: z.boolean(), - location: z.string(), - os: z.string(), - seen_at: z.string(), - }) - .transform((v) => { - return remap$(v, { - client_ip: "clientIp", - created_at: "createdAt", - is_active: "isActive", - seen_at: "seenAt", - }); - }); +export const UserAuthTokens$inboundSchema: z.ZodType< + UserAuthTokens, + z.ZodTypeDef, + unknown +> = z.object({ + browser: z.string(), + client_ip: z.string(), + created_at: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + is_active: z.boolean(), + location: z.string(), + os: z.string(), + seen_at: z.string(), +}).transform((v) => { + return remap$(v, { + "client_ip": "clientIp", + "created_at": "createdAt", + "is_active": "isActive", + "seen_at": "seenAt", + }); +}); /** @internal */ export type UserAuthTokens$Outbound = { - browser: string; - client_ip: string; - created_at: string; - device: string; - icon: string; - id: number; - is_active: boolean; - location: string; - os: string; - seen_at: string; + browser: string; + client_ip: string; + created_at: string; + device: string; + icon: string; + id: number; + is_active: boolean; + location: string; + os: string; + seen_at: string; }; /** @internal */ export const UserAuthTokens$outboundSchema: z.ZodType< - UserAuthTokens$Outbound, - z.ZodTypeDef, - UserAuthTokens -> = z - .object({ - browser: z.string(), - clientIp: z.string(), - createdAt: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - isActive: z.boolean(), - location: z.string(), - os: z.string(), - seenAt: z.string(), - }) - .transform((v) => { - return remap$(v, { - clientIp: "client_ip", - createdAt: "created_at", - isActive: "is_active", - seenAt: "seen_at", - }); - }); + UserAuthTokens$Outbound, + z.ZodTypeDef, + UserAuthTokens +> = z.object({ + browser: z.string(), + clientIp: z.string(), + createdAt: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + isActive: z.boolean(), + location: z.string(), + os: z.string(), + seenAt: z.string(), +}).transform((v) => { + return remap$(v, { + clientIp: "client_ip", + createdAt: "created_at", + isActive: "is_active", + seenAt: "seen_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserAuthTokens$ { - /** @deprecated use `UserAuthTokens$inboundSchema` instead. */ - export const inboundSchema = UserAuthTokens$inboundSchema; - /** @deprecated use `UserAuthTokens$outboundSchema` instead. */ - export const outboundSchema = UserAuthTokens$outboundSchema; - /** @deprecated use `UserAuthTokens$Outbound` instead. */ - export type Outbound = UserAuthTokens$Outbound; + /** @deprecated use `UserAuthTokens$inboundSchema` instead. */ + export const inboundSchema = UserAuthTokens$inboundSchema; + /** @deprecated use `UserAuthTokens$outboundSchema` instead. */ + export const outboundSchema = UserAuthTokens$outboundSchema; + /** @deprecated use `UserAuthTokens$Outbound` instead. */ + export type Outbound = UserAuthTokens$Outbound; } /** @internal */ -export const UserFields$inboundSchema: z.ZodType = z - .object({ - "1": z.nullable(z.string()), - "2": z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - "1": "one", - "2": "two", - }); - }); +export const UserFields$inboundSchema: z.ZodType< + UserFields, + z.ZodTypeDef, + unknown +> = z.object({ + "1": z.nullable(z.string()), + "2": z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "1": "one", + "2": "two", + }); +}); /** @internal */ export type UserFields$Outbound = { - "1": string | null; - "2": string | null; + "1": string | null; + "2": string | null; }; /** @internal */ -export const UserFields$outboundSchema: z.ZodType = z - .object({ - one: z.nullable(z.string()), - two: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - one: "1", - two: "2", - }); - }); +export const UserFields$outboundSchema: z.ZodType< + UserFields$Outbound, + z.ZodTypeDef, + UserFields +> = z.object({ + one: z.nullable(z.string()), + two: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + one: "1", + two: "2", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserFields$ { - /** @deprecated use `UserFields$inboundSchema` instead. */ - export const inboundSchema = UserFields$inboundSchema; - /** @deprecated use `UserFields$outboundSchema` instead. */ - export const outboundSchema = UserFields$outboundSchema; - /** @deprecated use `UserFields$Outbound` instead. */ - export type Outbound = UserFields$Outbound; + /** @deprecated use `UserFields$inboundSchema` instead. */ + export const inboundSchema = UserFields$inboundSchema; + /** @deprecated use `UserFields$outboundSchema` instead. */ + export const outboundSchema = UserFields$outboundSchema; + /** @deprecated use `UserFields$Outbound` instead. */ + export type Outbound = UserFields$Outbound; } /** @internal */ export const UserNotificationSchedule$inboundSchema: z.ZodType< - UserNotificationSchedule, - z.ZodTypeDef, - unknown -> = z - .object({ - day_0_end_time: z.number().int(), - day_0_start_time: z.number().int(), - day_1_end_time: z.number().int(), - day_1_start_time: z.number().int(), - day_2_end_time: z.number().int(), - day_2_start_time: z.number().int(), - day_3_end_time: z.number().int(), - day_3_start_time: z.number().int(), - day_4_end_time: z.number().int(), - day_4_start_time: z.number().int(), - day_5_end_time: z.number().int(), - day_5_start_time: z.number().int(), - day_6_end_time: z.number().int(), - day_6_start_time: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day_0_end_time: "day0EndTime", - day_0_start_time: "day0StartTime", - day_1_end_time: "day1EndTime", - day_1_start_time: "day1StartTime", - day_2_end_time: "day2EndTime", - day_2_start_time: "day2StartTime", - day_3_end_time: "day3EndTime", - day_3_start_time: "day3StartTime", - day_4_end_time: "day4EndTime", - day_4_start_time: "day4StartTime", - day_5_end_time: "day5EndTime", - day_5_start_time: "day5StartTime", - day_6_end_time: "day6EndTime", - day_6_start_time: "day6StartTime", - }); - }); + UserNotificationSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + day_0_end_time: z.number().int(), + day_0_start_time: z.number().int(), + day_1_end_time: z.number().int(), + day_1_start_time: z.number().int(), + day_2_end_time: z.number().int(), + day_2_start_time: z.number().int(), + day_3_end_time: z.number().int(), + day_3_start_time: z.number().int(), + day_4_end_time: z.number().int(), + day_4_start_time: z.number().int(), + day_5_end_time: z.number().int(), + day_5_start_time: z.number().int(), + day_6_end_time: z.number().int(), + day_6_start_time: z.number().int(), + enabled: z.boolean(), +}).transform((v) => { + return remap$(v, { + "day_0_end_time": "day0EndTime", + "day_0_start_time": "day0StartTime", + "day_1_end_time": "day1EndTime", + "day_1_start_time": "day1StartTime", + "day_2_end_time": "day2EndTime", + "day_2_start_time": "day2StartTime", + "day_3_end_time": "day3EndTime", + "day_3_start_time": "day3StartTime", + "day_4_end_time": "day4EndTime", + "day_4_start_time": "day4StartTime", + "day_5_end_time": "day5EndTime", + "day_5_start_time": "day5StartTime", + "day_6_end_time": "day6EndTime", + "day_6_start_time": "day6StartTime", + }); +}); /** @internal */ export type UserNotificationSchedule$Outbound = { - day_0_end_time: number; - day_0_start_time: number; - day_1_end_time: number; - day_1_start_time: number; - day_2_end_time: number; - day_2_start_time: number; - day_3_end_time: number; - day_3_start_time: number; - day_4_end_time: number; - day_4_start_time: number; - day_5_end_time: number; - day_5_start_time: number; - day_6_end_time: number; - day_6_start_time: number; - enabled: boolean; + day_0_end_time: number; + day_0_start_time: number; + day_1_end_time: number; + day_1_start_time: number; + day_2_end_time: number; + day_2_start_time: number; + day_3_end_time: number; + day_3_start_time: number; + day_4_end_time: number; + day_4_start_time: number; + day_5_end_time: number; + day_5_start_time: number; + day_6_end_time: number; + day_6_start_time: number; + enabled: boolean; }; /** @internal */ export const UserNotificationSchedule$outboundSchema: z.ZodType< - UserNotificationSchedule$Outbound, - z.ZodTypeDef, - UserNotificationSchedule -> = z - .object({ - day0EndTime: z.number().int(), - day0StartTime: z.number().int(), - day1EndTime: z.number().int(), - day1StartTime: z.number().int(), - day2EndTime: z.number().int(), - day2StartTime: z.number().int(), - day3EndTime: z.number().int(), - day3StartTime: z.number().int(), - day4EndTime: z.number().int(), - day4StartTime: z.number().int(), - day5EndTime: z.number().int(), - day5StartTime: z.number().int(), - day6EndTime: z.number().int(), - day6StartTime: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day0EndTime: "day_0_end_time", - day0StartTime: "day_0_start_time", - day1EndTime: "day_1_end_time", - day1StartTime: "day_1_start_time", - day2EndTime: "day_2_end_time", - day2StartTime: "day_2_start_time", - day3EndTime: "day_3_end_time", - day3StartTime: "day_3_start_time", - day4EndTime: "day_4_end_time", - day4StartTime: "day_4_start_time", - day5EndTime: "day_5_end_time", - day5StartTime: "day_5_start_time", - day6EndTime: "day_6_end_time", - day6StartTime: "day_6_start_time", - }); - }); + UserNotificationSchedule$Outbound, + z.ZodTypeDef, + UserNotificationSchedule +> = z.object({ + day0EndTime: z.number().int(), + day0StartTime: z.number().int(), + day1EndTime: z.number().int(), + day1StartTime: z.number().int(), + day2EndTime: z.number().int(), + day2StartTime: z.number().int(), + day3EndTime: z.number().int(), + day3StartTime: z.number().int(), + day4EndTime: z.number().int(), + day4StartTime: z.number().int(), + day5EndTime: z.number().int(), + day5StartTime: z.number().int(), + day6EndTime: z.number().int(), + day6StartTime: z.number().int(), + enabled: z.boolean(), +}).transform((v) => { + return remap$(v, { + day0EndTime: "day_0_end_time", + day0StartTime: "day_0_start_time", + day1EndTime: "day_1_end_time", + day1StartTime: "day_1_start_time", + day2EndTime: "day_2_end_time", + day2StartTime: "day_2_start_time", + day3EndTime: "day_3_end_time", + day3StartTime: "day_3_start_time", + day4EndTime: "day_4_end_time", + day4StartTime: "day_4_start_time", + day5EndTime: "day_5_end_time", + day5StartTime: "day_5_start_time", + day6EndTime: "day_6_end_time", + day6StartTime: "day_6_start_time", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserNotificationSchedule$ { - /** @deprecated use `UserNotificationSchedule$inboundSchema` instead. */ - export const inboundSchema = UserNotificationSchedule$inboundSchema; - /** @deprecated use `UserNotificationSchedule$outboundSchema` instead. */ - export const outboundSchema = UserNotificationSchedule$outboundSchema; - /** @deprecated use `UserNotificationSchedule$Outbound` instead. */ - export type Outbound = UserNotificationSchedule$Outbound; + /** @deprecated use `UserNotificationSchedule$inboundSchema` instead. */ + export const inboundSchema = UserNotificationSchedule$inboundSchema; + /** @deprecated use `UserNotificationSchedule$outboundSchema` instead. */ + export const outboundSchema = UserNotificationSchedule$outboundSchema; + /** @deprecated use `UserNotificationSchedule$Outbound` instead. */ + export type Outbound = UserNotificationSchedule$Outbound; } /** @internal */ -export const UserOption$inboundSchema: z.ZodType = z - .object({ - allow_private_messages: z.boolean(), - auto_track_topics_after_msecs: z.number().int(), - automatically_unpin_topics: z.boolean(), - bookmark_auto_delete_preference: z.number().int().optional(), - color_scheme_id: z.nullable(z.string()), - dark_scheme_id: z.nullable(z.string()), - default_calendar: z.string().optional(), - digest_after_minutes: z.number().int(), - dynamic_favicon: z.boolean(), - email_digests: z.boolean(), - email_in_reply_to: z.boolean(), - email_level: z.number().int(), - email_messages_level: z.number().int(), - email_previous_replies: z.number().int(), - enable_allowed_pm_users: z.boolean(), - enable_defer: z.boolean(), - enable_quoting: z.boolean(), - external_links_in_new_tab: z.boolean(), - hide_profile_and_presence: z.boolean(), - homepage_id: z.nullable(z.string()), - include_tl0_in_digests: z.boolean(), - like_notification_frequency: z.number().int(), - mailing_list_mode: z.boolean(), - mailing_list_mode_frequency: z.number().int(), - new_topic_duration_minutes: z.number().int(), - notification_level_when_replying: z.number().int(), - oldest_search_log_date: z.nullable(z.string()).optional(), - seen_popups: z.nullable(z.array(z.any())).optional(), - sidebar_link_to_filtered_list: z.boolean().optional(), - sidebar_show_count_of_new_items: z.boolean().optional(), - skip_new_user_tips: z.boolean(), - text_size: z.string(), - text_size_seq: z.number().int(), - theme_ids: z.array(z.any()), - theme_key_seq: z.number().int(), - timezone: z.nullable(z.string()), - title_count_mode: z.string(), - user_id: z.number().int(), - watched_precedence_over_muted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allow_private_messages: "allowPrivateMessages", - auto_track_topics_after_msecs: "autoTrackTopicsAfterMsecs", - automatically_unpin_topics: "automaticallyUnpinTopics", - bookmark_auto_delete_preference: "bookmarkAutoDeletePreference", - color_scheme_id: "colorSchemeId", - dark_scheme_id: "darkSchemeId", - default_calendar: "defaultCalendar", - digest_after_minutes: "digestAfterMinutes", - dynamic_favicon: "dynamicFavicon", - email_digests: "emailDigests", - email_in_reply_to: "emailInReplyTo", - email_level: "emailLevel", - email_messages_level: "emailMessagesLevel", - email_previous_replies: "emailPreviousReplies", - enable_allowed_pm_users: "enableAllowedPmUsers", - enable_defer: "enableDefer", - enable_quoting: "enableQuoting", - external_links_in_new_tab: "externalLinksInNewTab", - hide_profile_and_presence: "hideProfileAndPresence", - homepage_id: "homepageId", - include_tl0_in_digests: "includeTl0InDigests", - like_notification_frequency: "likeNotificationFrequency", - mailing_list_mode: "mailingListMode", - mailing_list_mode_frequency: "mailingListModeFrequency", - new_topic_duration_minutes: "newTopicDurationMinutes", - notification_level_when_replying: "notificationLevelWhenReplying", - oldest_search_log_date: "oldestSearchLogDate", - seen_popups: "seenPopups", - sidebar_link_to_filtered_list: "sidebarLinkToFilteredList", - sidebar_show_count_of_new_items: "sidebarShowCountOfNewItems", - skip_new_user_tips: "skipNewUserTips", - text_size: "textSize", - text_size_seq: "textSizeSeq", - theme_ids: "themeIds", - theme_key_seq: "themeKeySeq", - title_count_mode: "titleCountMode", - user_id: "userId", - watched_precedence_over_muted: "watchedPrecedenceOverMuted", - }); - }); +export const UserOption$inboundSchema: z.ZodType< + UserOption, + z.ZodTypeDef, + unknown +> = z.object({ + allow_private_messages: z.boolean(), + auto_track_topics_after_msecs: z.number().int(), + automatically_unpin_topics: z.boolean(), + bookmark_auto_delete_preference: z.number().int().optional(), + color_scheme_id: z.nullable(z.string()), + dark_scheme_id: z.nullable(z.string()), + default_calendar: z.string().optional(), + digest_after_minutes: z.number().int(), + dynamic_favicon: z.boolean(), + email_digests: z.boolean(), + email_in_reply_to: z.boolean(), + email_level: z.number().int(), + email_messages_level: z.number().int(), + email_previous_replies: z.number().int(), + enable_allowed_pm_users: z.boolean(), + enable_defer: z.boolean(), + enable_quoting: z.boolean(), + external_links_in_new_tab: z.boolean(), + hide_profile_and_presence: z.boolean(), + homepage_id: z.nullable(z.string()), + include_tl0_in_digests: z.boolean(), + like_notification_frequency: z.number().int(), + mailing_list_mode: z.boolean(), + mailing_list_mode_frequency: z.number().int(), + new_topic_duration_minutes: z.number().int(), + notification_level_when_replying: z.number().int(), + oldest_search_log_date: z.nullable(z.string()).optional(), + seen_popups: z.nullable(z.array(z.any())).optional(), + sidebar_link_to_filtered_list: z.boolean().optional(), + sidebar_show_count_of_new_items: z.boolean().optional(), + skip_new_user_tips: z.boolean(), + text_size: z.string(), + text_size_seq: z.number().int(), + theme_ids: z.array(z.any()), + theme_key_seq: z.number().int(), + timezone: z.nullable(z.string()), + title_count_mode: z.string(), + user_id: z.number().int(), + watched_precedence_over_muted: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "allow_private_messages": "allowPrivateMessages", + "auto_track_topics_after_msecs": "autoTrackTopicsAfterMsecs", + "automatically_unpin_topics": "automaticallyUnpinTopics", + "bookmark_auto_delete_preference": "bookmarkAutoDeletePreference", + "color_scheme_id": "colorSchemeId", + "dark_scheme_id": "darkSchemeId", + "default_calendar": "defaultCalendar", + "digest_after_minutes": "digestAfterMinutes", + "dynamic_favicon": "dynamicFavicon", + "email_digests": "emailDigests", + "email_in_reply_to": "emailInReplyTo", + "email_level": "emailLevel", + "email_messages_level": "emailMessagesLevel", + "email_previous_replies": "emailPreviousReplies", + "enable_allowed_pm_users": "enableAllowedPmUsers", + "enable_defer": "enableDefer", + "enable_quoting": "enableQuoting", + "external_links_in_new_tab": "externalLinksInNewTab", + "hide_profile_and_presence": "hideProfileAndPresence", + "homepage_id": "homepageId", + "include_tl0_in_digests": "includeTl0InDigests", + "like_notification_frequency": "likeNotificationFrequency", + "mailing_list_mode": "mailingListMode", + "mailing_list_mode_frequency": "mailingListModeFrequency", + "new_topic_duration_minutes": "newTopicDurationMinutes", + "notification_level_when_replying": "notificationLevelWhenReplying", + "oldest_search_log_date": "oldestSearchLogDate", + "seen_popups": "seenPopups", + "sidebar_link_to_filtered_list": "sidebarLinkToFilteredList", + "sidebar_show_count_of_new_items": "sidebarShowCountOfNewItems", + "skip_new_user_tips": "skipNewUserTips", + "text_size": "textSize", + "text_size_seq": "textSizeSeq", + "theme_ids": "themeIds", + "theme_key_seq": "themeKeySeq", + "title_count_mode": "titleCountMode", + "user_id": "userId", + "watched_precedence_over_muted": "watchedPrecedenceOverMuted", + }); +}); /** @internal */ export type UserOption$Outbound = { - allow_private_messages: boolean; - auto_track_topics_after_msecs: number; - automatically_unpin_topics: boolean; - bookmark_auto_delete_preference?: number | undefined; - color_scheme_id: string | null; - dark_scheme_id: string | null; - default_calendar?: string | undefined; - digest_after_minutes: number; - dynamic_favicon: boolean; - email_digests: boolean; - email_in_reply_to: boolean; - email_level: number; - email_messages_level: number; - email_previous_replies: number; - enable_allowed_pm_users: boolean; - enable_defer: boolean; - enable_quoting: boolean; - external_links_in_new_tab: boolean; - hide_profile_and_presence: boolean; - homepage_id: string | null; - include_tl0_in_digests: boolean; - like_notification_frequency: number; - mailing_list_mode: boolean; - mailing_list_mode_frequency: number; - new_topic_duration_minutes: number; - notification_level_when_replying: number; - oldest_search_log_date?: string | null | undefined; - seen_popups?: Array | null | undefined; - sidebar_link_to_filtered_list?: boolean | undefined; - sidebar_show_count_of_new_items?: boolean | undefined; - skip_new_user_tips: boolean; - text_size: string; - text_size_seq: number; - theme_ids: Array; - theme_key_seq: number; - timezone: string | null; - title_count_mode: string; - user_id: number; - watched_precedence_over_muted?: boolean | null | undefined; + allow_private_messages: boolean; + auto_track_topics_after_msecs: number; + automatically_unpin_topics: boolean; + bookmark_auto_delete_preference?: number | undefined; + color_scheme_id: string | null; + dark_scheme_id: string | null; + default_calendar?: string | undefined; + digest_after_minutes: number; + dynamic_favicon: boolean; + email_digests: boolean; + email_in_reply_to: boolean; + email_level: number; + email_messages_level: number; + email_previous_replies: number; + enable_allowed_pm_users: boolean; + enable_defer: boolean; + enable_quoting: boolean; + external_links_in_new_tab: boolean; + hide_profile_and_presence: boolean; + homepage_id: string | null; + include_tl0_in_digests: boolean; + like_notification_frequency: number; + mailing_list_mode: boolean; + mailing_list_mode_frequency: number; + new_topic_duration_minutes: number; + notification_level_when_replying: number; + oldest_search_log_date?: string | null | undefined; + seen_popups?: Array | null | undefined; + sidebar_link_to_filtered_list?: boolean | undefined; + sidebar_show_count_of_new_items?: boolean | undefined; + skip_new_user_tips: boolean; + text_size: string; + text_size_seq: number; + theme_ids: Array; + theme_key_seq: number; + timezone: string | null; + title_count_mode: string; + user_id: number; + watched_precedence_over_muted?: boolean | null | undefined; }; /** @internal */ -export const UserOption$outboundSchema: z.ZodType = z - .object({ - allowPrivateMessages: z.boolean(), - autoTrackTopicsAfterMsecs: z.number().int(), - automaticallyUnpinTopics: z.boolean(), - bookmarkAutoDeletePreference: z.number().int().optional(), - colorSchemeId: z.nullable(z.string()), - darkSchemeId: z.nullable(z.string()), - defaultCalendar: z.string().optional(), - digestAfterMinutes: z.number().int(), - dynamicFavicon: z.boolean(), - emailDigests: z.boolean(), - emailInReplyTo: z.boolean(), - emailLevel: z.number().int(), - emailMessagesLevel: z.number().int(), - emailPreviousReplies: z.number().int(), - enableAllowedPmUsers: z.boolean(), - enableDefer: z.boolean(), - enableQuoting: z.boolean(), - externalLinksInNewTab: z.boolean(), - hideProfileAndPresence: z.boolean(), - homepageId: z.nullable(z.string()), - includeTl0InDigests: z.boolean(), - likeNotificationFrequency: z.number().int(), - mailingListMode: z.boolean(), - mailingListModeFrequency: z.number().int(), - newTopicDurationMinutes: z.number().int(), - notificationLevelWhenReplying: z.number().int(), - oldestSearchLogDate: z.nullable(z.string()).optional(), - seenPopups: z.nullable(z.array(z.any())).optional(), - sidebarLinkToFilteredList: z.boolean().optional(), - sidebarShowCountOfNewItems: z.boolean().optional(), - skipNewUserTips: z.boolean(), - textSize: z.string(), - textSizeSeq: z.number().int(), - themeIds: z.array(z.any()), - themeKeySeq: z.number().int(), - timezone: z.nullable(z.string()), - titleCountMode: z.string(), - userId: z.number().int(), - watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allowPrivateMessages: "allow_private_messages", - autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", - automaticallyUnpinTopics: "automatically_unpin_topics", - bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", - colorSchemeId: "color_scheme_id", - darkSchemeId: "dark_scheme_id", - defaultCalendar: "default_calendar", - digestAfterMinutes: "digest_after_minutes", - dynamicFavicon: "dynamic_favicon", - emailDigests: "email_digests", - emailInReplyTo: "email_in_reply_to", - emailLevel: "email_level", - emailMessagesLevel: "email_messages_level", - emailPreviousReplies: "email_previous_replies", - enableAllowedPmUsers: "enable_allowed_pm_users", - enableDefer: "enable_defer", - enableQuoting: "enable_quoting", - externalLinksInNewTab: "external_links_in_new_tab", - hideProfileAndPresence: "hide_profile_and_presence", - homepageId: "homepage_id", - includeTl0InDigests: "include_tl0_in_digests", - likeNotificationFrequency: "like_notification_frequency", - mailingListMode: "mailing_list_mode", - mailingListModeFrequency: "mailing_list_mode_frequency", - newTopicDurationMinutes: "new_topic_duration_minutes", - notificationLevelWhenReplying: "notification_level_when_replying", - oldestSearchLogDate: "oldest_search_log_date", - seenPopups: "seen_popups", - sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", - sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", - skipNewUserTips: "skip_new_user_tips", - textSize: "text_size", - textSizeSeq: "text_size_seq", - themeIds: "theme_ids", - themeKeySeq: "theme_key_seq", - titleCountMode: "title_count_mode", - userId: "user_id", - watchedPrecedenceOverMuted: "watched_precedence_over_muted", - }); - }); +export const UserOption$outboundSchema: z.ZodType< + UserOption$Outbound, + z.ZodTypeDef, + UserOption +> = z.object({ + allowPrivateMessages: z.boolean(), + autoTrackTopicsAfterMsecs: z.number().int(), + automaticallyUnpinTopics: z.boolean(), + bookmarkAutoDeletePreference: z.number().int().optional(), + colorSchemeId: z.nullable(z.string()), + darkSchemeId: z.nullable(z.string()), + defaultCalendar: z.string().optional(), + digestAfterMinutes: z.number().int(), + dynamicFavicon: z.boolean(), + emailDigests: z.boolean(), + emailInReplyTo: z.boolean(), + emailLevel: z.number().int(), + emailMessagesLevel: z.number().int(), + emailPreviousReplies: z.number().int(), + enableAllowedPmUsers: z.boolean(), + enableDefer: z.boolean(), + enableQuoting: z.boolean(), + externalLinksInNewTab: z.boolean(), + hideProfileAndPresence: z.boolean(), + homepageId: z.nullable(z.string()), + includeTl0InDigests: z.boolean(), + likeNotificationFrequency: z.number().int(), + mailingListMode: z.boolean(), + mailingListModeFrequency: z.number().int(), + newTopicDurationMinutes: z.number().int(), + notificationLevelWhenReplying: z.number().int(), + oldestSearchLogDate: z.nullable(z.string()).optional(), + seenPopups: z.nullable(z.array(z.any())).optional(), + sidebarLinkToFilteredList: z.boolean().optional(), + sidebarShowCountOfNewItems: z.boolean().optional(), + skipNewUserTips: z.boolean(), + textSize: z.string(), + textSizeSeq: z.number().int(), + themeIds: z.array(z.any()), + themeKeySeq: z.number().int(), + timezone: z.nullable(z.string()), + titleCountMode: z.string(), + userId: z.number().int(), + watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + allowPrivateMessages: "allow_private_messages", + autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", + automaticallyUnpinTopics: "automatically_unpin_topics", + bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", + colorSchemeId: "color_scheme_id", + darkSchemeId: "dark_scheme_id", + defaultCalendar: "default_calendar", + digestAfterMinutes: "digest_after_minutes", + dynamicFavicon: "dynamic_favicon", + emailDigests: "email_digests", + emailInReplyTo: "email_in_reply_to", + emailLevel: "email_level", + emailMessagesLevel: "email_messages_level", + emailPreviousReplies: "email_previous_replies", + enableAllowedPmUsers: "enable_allowed_pm_users", + enableDefer: "enable_defer", + enableQuoting: "enable_quoting", + externalLinksInNewTab: "external_links_in_new_tab", + hideProfileAndPresence: "hide_profile_and_presence", + homepageId: "homepage_id", + includeTl0InDigests: "include_tl0_in_digests", + likeNotificationFrequency: "like_notification_frequency", + mailingListMode: "mailing_list_mode", + mailingListModeFrequency: "mailing_list_mode_frequency", + newTopicDurationMinutes: "new_topic_duration_minutes", + notificationLevelWhenReplying: "notification_level_when_replying", + oldestSearchLogDate: "oldest_search_log_date", + seenPopups: "seen_popups", + sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", + sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", + skipNewUserTips: "skip_new_user_tips", + textSize: "text_size", + textSizeSeq: "text_size_seq", + themeIds: "theme_ids", + themeKeySeq: "theme_key_seq", + titleCountMode: "title_count_mode", + userId: "user_id", + watchedPrecedenceOverMuted: "watched_precedence_over_muted", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserOption$ { - /** @deprecated use `UserOption$inboundSchema` instead. */ - export const inboundSchema = UserOption$inboundSchema; - /** @deprecated use `UserOption$outboundSchema` instead. */ - export const outboundSchema = UserOption$outboundSchema; - /** @deprecated use `UserOption$Outbound` instead. */ - export type Outbound = UserOption$Outbound; + /** @deprecated use `UserOption$inboundSchema` instead. */ + export const inboundSchema = UserOption$inboundSchema; + /** @deprecated use `UserOption$outboundSchema` instead. */ + export const outboundSchema = UserOption$outboundSchema; + /** @deprecated use `UserOption$Outbound` instead. */ + export type Outbound = UserOption$Outbound; } /** @internal */ export const User$inboundSchema: z.ZodType = z - .object({ - admin: z.boolean(), - allowed_pm_usernames: z.array(z.any()), - avatar_template: z.string(), - badge_count: z.number().int(), - can_be_deleted: z.boolean(), - can_change_bio: z.boolean(), - can_change_location: z.boolean(), - can_change_tracking_preferences: z.boolean(), - can_change_website: z.boolean(), - can_delete_all_posts: z.boolean(), - can_edit: z.boolean(), - can_edit_email: z.boolean(), - can_edit_name: z.boolean(), - can_edit_username: z.boolean(), - can_ignore_user: z.boolean(), - can_mute_user: z.boolean(), - can_send_private_message_to_user: z.boolean(), - can_send_private_messages: z.boolean(), - can_upload_profile_header: z.boolean(), - can_upload_user_card_background: z.boolean(), - created_at: z.string(), - custom_fields: z.lazy(() => GetUserCustomFields$inboundSchema), - display_sidebar_tags: z.boolean().optional(), - featured_topic: z.nullable(z.string()), - featured_user_badge_ids: z.array(z.any()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - group_users: z.array(z.lazy(() => GroupUsers$inboundSchema)), - groups: z.array(z.lazy(() => GetUserGroups$inboundSchema)), - has_title_badges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignored_usernames: z.array(z.any()), - invited_by: z.nullable(z.string()), - last_posted_at: z.nullable(z.string()), - last_seen_at: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailing_list_posts_per_day: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - muted_category_ids: z.array(z.any()), - muted_tags: z.array(z.any()), - muted_usernames: z.array(z.any()), - name: z.string(), - pending_count: z.number().int(), - pending_posts_count: z.number().int().optional(), - post_count: z.number().int(), - primary_group_id: z.nullable(z.string()), - primary_group_name: z.nullable(z.string()), - profile_view_count: z.number().int(), - recent_time_read: z.number().int(), - regular_category_ids: z.array(z.any()), - second_factor_backup_enabled: z.boolean().optional(), - second_factor_enabled: z.boolean(), - sidebar_category_ids: z.array(z.any()).optional(), - sidebar_tags: z.array(z.any()).optional(), - staged: z.boolean(), - system_avatar_template: z.string(), - system_avatar_upload_id: z.nullable(z.string()), - time_read: z.number().int(), - title: z.nullable(z.string()), - tracked_category_ids: z.array(z.any()), - tracked_tags: z.array(z.any()), - trust_level: z.number().int(), - uploaded_avatar_id: z.nullable(z.string()), - use_logo_small_as_avatar: z.boolean(), - user_api_keys: z.nullable(z.string()), - user_auth_tokens: z.array(z.lazy(() => UserAuthTokens$inboundSchema)), - user_fields: z.lazy(() => UserFields$inboundSchema).optional(), - user_notification_schedule: z.lazy(() => UserNotificationSchedule$inboundSchema), - user_option: z.lazy(() => UserOption$inboundSchema), - username: z.string(), - watched_category_ids: z.array(z.any()), - watched_first_post_category_ids: z.array(z.any()), - watched_tags: z.array(z.any()), - watching_first_post_tags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowed_pm_usernames: "allowedPmUsernames", - avatar_template: "avatarTemplate", - badge_count: "badgeCount", - can_be_deleted: "canBeDeleted", - can_change_bio: "canChangeBio", - can_change_location: "canChangeLocation", - can_change_tracking_preferences: "canChangeTrackingPreferences", - can_change_website: "canChangeWebsite", - can_delete_all_posts: "canDeleteAllPosts", - can_edit: "canEdit", - can_edit_email: "canEditEmail", - can_edit_name: "canEditName", - can_edit_username: "canEditUsername", - can_ignore_user: "canIgnoreUser", - can_mute_user: "canMuteUser", - can_send_private_message_to_user: "canSendPrivateMessageToUser", - can_send_private_messages: "canSendPrivateMessages", - can_upload_profile_header: "canUploadProfileHeader", - can_upload_user_card_background: "canUploadUserCardBackground", - created_at: "createdAt", - custom_fields: "customFields", - display_sidebar_tags: "displaySidebarTags", - featured_topic: "featuredTopic", - featured_user_badge_ids: "featuredUserBadgeIds", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - group_users: "groupUsers", - has_title_badges: "hasTitleBadges", - ignored_usernames: "ignoredUsernames", - invited_by: "invitedBy", - last_posted_at: "lastPostedAt", - last_seen_at: "lastSeenAt", - mailing_list_posts_per_day: "mailingListPostsPerDay", - muted_category_ids: "mutedCategoryIds", - muted_tags: "mutedTags", - muted_usernames: "mutedUsernames", - pending_count: "pendingCount", - pending_posts_count: "pendingPostsCount", - post_count: "postCount", - primary_group_id: "primaryGroupId", - primary_group_name: "primaryGroupName", - profile_view_count: "profileViewCount", - recent_time_read: "recentTimeRead", - regular_category_ids: "regularCategoryIds", - second_factor_backup_enabled: "secondFactorBackupEnabled", - second_factor_enabled: "secondFactorEnabled", - sidebar_category_ids: "sidebarCategoryIds", - sidebar_tags: "sidebarTags", - system_avatar_template: "systemAvatarTemplate", - system_avatar_upload_id: "systemAvatarUploadId", - time_read: "timeRead", - tracked_category_ids: "trackedCategoryIds", - tracked_tags: "trackedTags", - trust_level: "trustLevel", - uploaded_avatar_id: "uploadedAvatarId", - use_logo_small_as_avatar: "useLogoSmallAsAvatar", - user_api_keys: "userApiKeys", - user_auth_tokens: "userAuthTokens", - user_fields: "userFields", - user_notification_schedule: "userNotificationSchedule", - user_option: "userOption", - watched_category_ids: "watchedCategoryIds", - watched_first_post_category_ids: "watchedFirstPostCategoryIds", - watched_tags: "watchedTags", - watching_first_post_tags: "watchingFirstPostTags", - }); + .object({ + admin: z.boolean(), + allowed_pm_usernames: z.array(z.any()), + avatar_template: z.string(), + badge_count: z.number().int(), + can_be_deleted: z.boolean(), + can_change_bio: z.boolean(), + can_change_location: z.boolean(), + can_change_tracking_preferences: z.boolean(), + can_change_website: z.boolean(), + can_delete_all_posts: z.boolean(), + can_edit: z.boolean(), + can_edit_email: z.boolean(), + can_edit_name: z.boolean(), + can_edit_username: z.boolean(), + can_ignore_user: z.boolean(), + can_mute_user: z.boolean(), + can_send_private_message_to_user: z.boolean(), + can_send_private_messages: z.boolean(), + can_upload_profile_header: z.boolean(), + can_upload_user_card_background: z.boolean(), + created_at: z.string(), + custom_fields: z.lazy(() => GetUserCustomFields$inboundSchema), + display_sidebar_tags: z.boolean().optional(), + featured_topic: z.nullable(z.string()), + featured_user_badge_ids: z.array(z.any()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + group_users: z.array(z.lazy(() => GroupUsers$inboundSchema)), + groups: z.array(z.lazy(() => GetUserGroups$inboundSchema)), + has_title_badges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignored_usernames: z.array(z.any()), + invited_by: z.nullable(z.string()), + last_posted_at: z.nullable(z.string()), + last_seen_at: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailing_list_posts_per_day: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + muted_category_ids: z.array(z.any()), + muted_tags: z.array(z.any()), + muted_usernames: z.array(z.any()), + name: z.string(), + pending_count: z.number().int(), + pending_posts_count: z.number().int().optional(), + post_count: z.number().int(), + primary_group_id: z.nullable(z.string()), + primary_group_name: z.nullable(z.string()), + profile_view_count: z.number().int(), + recent_time_read: z.number().int(), + regular_category_ids: z.array(z.any()), + second_factor_backup_enabled: z.boolean().optional(), + second_factor_enabled: z.boolean(), + sidebar_category_ids: z.array(z.any()).optional(), + sidebar_tags: z.array(z.any()).optional(), + staged: z.boolean(), + system_avatar_template: z.string(), + system_avatar_upload_id: z.nullable(z.string()), + time_read: z.number().int(), + title: z.nullable(z.string()), + tracked_category_ids: z.array(z.any()), + tracked_tags: z.array(z.any()), + trust_level: z.number().int(), + uploaded_avatar_id: z.nullable(z.string()), + use_logo_small_as_avatar: z.boolean(), + user_api_keys: z.nullable(z.string()), + user_auth_tokens: z.array(z.lazy(() => UserAuthTokens$inboundSchema)), + user_fields: z.lazy(() => UserFields$inboundSchema).optional(), + user_notification_schedule: z.lazy(() => + UserNotificationSchedule$inboundSchema + ), + user_option: z.lazy(() => UserOption$inboundSchema), + username: z.string(), + watched_category_ids: z.array(z.any()), + watched_first_post_category_ids: z.array(z.any()), + watched_tags: z.array(z.any()), + watching_first_post_tags: z.array(z.any()), + }).transform((v) => { + return remap$(v, { + "allowed_pm_usernames": "allowedPmUsernames", + "avatar_template": "avatarTemplate", + "badge_count": "badgeCount", + "can_be_deleted": "canBeDeleted", + "can_change_bio": "canChangeBio", + "can_change_location": "canChangeLocation", + "can_change_tracking_preferences": "canChangeTrackingPreferences", + "can_change_website": "canChangeWebsite", + "can_delete_all_posts": "canDeleteAllPosts", + "can_edit": "canEdit", + "can_edit_email": "canEditEmail", + "can_edit_name": "canEditName", + "can_edit_username": "canEditUsername", + "can_ignore_user": "canIgnoreUser", + "can_mute_user": "canMuteUser", + "can_send_private_message_to_user": "canSendPrivateMessageToUser", + "can_send_private_messages": "canSendPrivateMessages", + "can_upload_profile_header": "canUploadProfileHeader", + "can_upload_user_card_background": "canUploadUserCardBackground", + "created_at": "createdAt", + "custom_fields": "customFields", + "display_sidebar_tags": "displaySidebarTags", + "featured_topic": "featuredTopic", + "featured_user_badge_ids": "featuredUserBadgeIds", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "group_users": "groupUsers", + "has_title_badges": "hasTitleBadges", + "ignored_usernames": "ignoredUsernames", + "invited_by": "invitedBy", + "last_posted_at": "lastPostedAt", + "last_seen_at": "lastSeenAt", + "mailing_list_posts_per_day": "mailingListPostsPerDay", + "muted_category_ids": "mutedCategoryIds", + "muted_tags": "mutedTags", + "muted_usernames": "mutedUsernames", + "pending_count": "pendingCount", + "pending_posts_count": "pendingPostsCount", + "post_count": "postCount", + "primary_group_id": "primaryGroupId", + "primary_group_name": "primaryGroupName", + "profile_view_count": "profileViewCount", + "recent_time_read": "recentTimeRead", + "regular_category_ids": "regularCategoryIds", + "second_factor_backup_enabled": "secondFactorBackupEnabled", + "second_factor_enabled": "secondFactorEnabled", + "sidebar_category_ids": "sidebarCategoryIds", + "sidebar_tags": "sidebarTags", + "system_avatar_template": "systemAvatarTemplate", + "system_avatar_upload_id": "systemAvatarUploadId", + "time_read": "timeRead", + "tracked_category_ids": "trackedCategoryIds", + "tracked_tags": "trackedTags", + "trust_level": "trustLevel", + "uploaded_avatar_id": "uploadedAvatarId", + "use_logo_small_as_avatar": "useLogoSmallAsAvatar", + "user_api_keys": "userApiKeys", + "user_auth_tokens": "userAuthTokens", + "user_fields": "userFields", + "user_notification_schedule": "userNotificationSchedule", + "user_option": "userOption", + "watched_category_ids": "watchedCategoryIds", + "watched_first_post_category_ids": "watchedFirstPostCategoryIds", + "watched_tags": "watchedTags", + "watching_first_post_tags": "watchingFirstPostTags", }); + }); /** @internal */ export type User$Outbound = { - admin: boolean; - allowed_pm_usernames: Array; - avatar_template: string; - badge_count: number; - can_be_deleted: boolean; - can_change_bio: boolean; - can_change_location: boolean; - can_change_tracking_preferences: boolean; - can_change_website: boolean; - can_delete_all_posts: boolean; - can_edit: boolean; - can_edit_email: boolean; - can_edit_name: boolean; - can_edit_username: boolean; - can_ignore_user: boolean; - can_mute_user: boolean; - can_send_private_message_to_user: boolean; - can_send_private_messages: boolean; - can_upload_profile_header: boolean; - can_upload_user_card_background: boolean; - created_at: string; - custom_fields: GetUserCustomFields$Outbound; - display_sidebar_tags?: boolean | undefined; - featured_topic: string | null; - featured_user_badge_ids: Array; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id: string | null; - flair_name: string | null; - flair_url: string | null; - group_users: Array; - groups: Array; - has_title_badges: boolean; - id: number; - ignored: boolean; - ignored_usernames: Array; - invited_by: string | null; - last_posted_at: string | null; - last_seen_at: string | null; - locale: string | null; - mailing_list_posts_per_day: number; - moderator: boolean; - muted: boolean; - muted_category_ids: Array; - muted_tags: Array; - muted_usernames: Array; - name: string; - pending_count: number; - pending_posts_count?: number | undefined; - post_count: number; - primary_group_id: string | null; - primary_group_name: string | null; - profile_view_count: number; - recent_time_read: number; - regular_category_ids: Array; - second_factor_backup_enabled?: boolean | undefined; - second_factor_enabled: boolean; - sidebar_category_ids?: Array | undefined; - sidebar_tags?: Array | undefined; - staged: boolean; - system_avatar_template: string; - system_avatar_upload_id: string | null; - time_read: number; - title: string | null; - tracked_category_ids: Array; - tracked_tags: Array; - trust_level: number; - uploaded_avatar_id: string | null; - use_logo_small_as_avatar: boolean; - user_api_keys: string | null; - user_auth_tokens: Array; - user_fields?: UserFields$Outbound | undefined; - user_notification_schedule: UserNotificationSchedule$Outbound; - user_option: UserOption$Outbound; - username: string; - watched_category_ids: Array; - watched_first_post_category_ids: Array; - watched_tags: Array; - watching_first_post_tags: Array; + admin: boolean; + allowed_pm_usernames: Array; + avatar_template: string; + badge_count: number; + can_be_deleted: boolean; + can_change_bio: boolean; + can_change_location: boolean; + can_change_tracking_preferences: boolean; + can_change_website: boolean; + can_delete_all_posts: boolean; + can_edit: boolean; + can_edit_email: boolean; + can_edit_name: boolean; + can_edit_username: boolean; + can_ignore_user: boolean; + can_mute_user: boolean; + can_send_private_message_to_user: boolean; + can_send_private_messages: boolean; + can_upload_profile_header: boolean; + can_upload_user_card_background: boolean; + created_at: string; + custom_fields: GetUserCustomFields$Outbound; + display_sidebar_tags?: boolean | undefined; + featured_topic: string | null; + featured_user_badge_ids: Array; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id: string | null; + flair_name: string | null; + flair_url: string | null; + group_users: Array; + groups: Array; + has_title_badges: boolean; + id: number; + ignored: boolean; + ignored_usernames: Array; + invited_by: string | null; + last_posted_at: string | null; + last_seen_at: string | null; + locale: string | null; + mailing_list_posts_per_day: number; + moderator: boolean; + muted: boolean; + muted_category_ids: Array; + muted_tags: Array; + muted_usernames: Array; + name: string; + pending_count: number; + pending_posts_count?: number | undefined; + post_count: number; + primary_group_id: string | null; + primary_group_name: string | null; + profile_view_count: number; + recent_time_read: number; + regular_category_ids: Array; + second_factor_backup_enabled?: boolean | undefined; + second_factor_enabled: boolean; + sidebar_category_ids?: Array | undefined; + sidebar_tags?: Array | undefined; + staged: boolean; + system_avatar_template: string; + system_avatar_upload_id: string | null; + time_read: number; + title: string | null; + tracked_category_ids: Array; + tracked_tags: Array; + trust_level: number; + uploaded_avatar_id: string | null; + use_logo_small_as_avatar: boolean; + user_api_keys: string | null; + user_auth_tokens: Array; + user_fields?: UserFields$Outbound | undefined; + user_notification_schedule: UserNotificationSchedule$Outbound; + user_option: UserOption$Outbound; + username: string; + watched_category_ids: Array; + watched_first_post_category_ids: Array; + watched_tags: Array; + watching_first_post_tags: Array; }; /** @internal */ -export const User$outboundSchema: z.ZodType = z - .object({ - admin: z.boolean(), - allowedPmUsernames: z.array(z.any()), - avatarTemplate: z.string(), - badgeCount: z.number().int(), - canBeDeleted: z.boolean(), - canChangeBio: z.boolean(), - canChangeLocation: z.boolean(), - canChangeTrackingPreferences: z.boolean(), - canChangeWebsite: z.boolean(), - canDeleteAllPosts: z.boolean(), - canEdit: z.boolean(), - canEditEmail: z.boolean(), - canEditName: z.boolean(), - canEditUsername: z.boolean(), - canIgnoreUser: z.boolean(), - canMuteUser: z.boolean(), - canSendPrivateMessageToUser: z.boolean(), - canSendPrivateMessages: z.boolean(), - canUploadProfileHeader: z.boolean(), - canUploadUserCardBackground: z.boolean(), - createdAt: z.string(), - customFields: z.lazy(() => GetUserCustomFields$outboundSchema), - displaySidebarTags: z.boolean().optional(), - featuredTopic: z.nullable(z.string()), - featuredUserBadgeIds: z.array(z.any()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - groupUsers: z.array(z.lazy(() => GroupUsers$outboundSchema)), - groups: z.array(z.lazy(() => GetUserGroups$outboundSchema)), - hasTitleBadges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignoredUsernames: z.array(z.any()), - invitedBy: z.nullable(z.string()), - lastPostedAt: z.nullable(z.string()), - lastSeenAt: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailingListPostsPerDay: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - mutedCategoryIds: z.array(z.any()), - mutedTags: z.array(z.any()), - mutedUsernames: z.array(z.any()), - name: z.string(), - pendingCount: z.number().int(), - pendingPostsCount: z.number().int().optional(), - postCount: z.number().int(), - primaryGroupId: z.nullable(z.string()), - primaryGroupName: z.nullable(z.string()), - profileViewCount: z.number().int(), - recentTimeRead: z.number().int(), - regularCategoryIds: z.array(z.any()), - secondFactorBackupEnabled: z.boolean().optional(), - secondFactorEnabled: z.boolean(), - sidebarCategoryIds: z.array(z.any()).optional(), - sidebarTags: z.array(z.any()).optional(), - staged: z.boolean(), - systemAvatarTemplate: z.string(), - systemAvatarUploadId: z.nullable(z.string()), - timeRead: z.number().int(), - title: z.nullable(z.string()), - trackedCategoryIds: z.array(z.any()), - trackedTags: z.array(z.any()), - trustLevel: z.number().int(), - uploadedAvatarId: z.nullable(z.string()), - useLogoSmallAsAvatar: z.boolean(), - userApiKeys: z.nullable(z.string()), - userAuthTokens: z.array(z.lazy(() => UserAuthTokens$outboundSchema)), - userFields: z.lazy(() => UserFields$outboundSchema).optional(), - userNotificationSchedule: z.lazy(() => UserNotificationSchedule$outboundSchema), - userOption: z.lazy(() => UserOption$outboundSchema), - username: z.string(), - watchedCategoryIds: z.array(z.any()), - watchedFirstPostCategoryIds: z.array(z.any()), - watchedTags: z.array(z.any()), - watchingFirstPostTags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowedPmUsernames: "allowed_pm_usernames", - avatarTemplate: "avatar_template", - badgeCount: "badge_count", - canBeDeleted: "can_be_deleted", - canChangeBio: "can_change_bio", - canChangeLocation: "can_change_location", - canChangeTrackingPreferences: "can_change_tracking_preferences", - canChangeWebsite: "can_change_website", - canDeleteAllPosts: "can_delete_all_posts", - canEdit: "can_edit", - canEditEmail: "can_edit_email", - canEditName: "can_edit_name", - canEditUsername: "can_edit_username", - canIgnoreUser: "can_ignore_user", - canMuteUser: "can_mute_user", - canSendPrivateMessageToUser: "can_send_private_message_to_user", - canSendPrivateMessages: "can_send_private_messages", - canUploadProfileHeader: "can_upload_profile_header", - canUploadUserCardBackground: "can_upload_user_card_background", - createdAt: "created_at", - customFields: "custom_fields", - displaySidebarTags: "display_sidebar_tags", - featuredTopic: "featured_topic", - featuredUserBadgeIds: "featured_user_badge_ids", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - groupUsers: "group_users", - hasTitleBadges: "has_title_badges", - ignoredUsernames: "ignored_usernames", - invitedBy: "invited_by", - lastPostedAt: "last_posted_at", - lastSeenAt: "last_seen_at", - mailingListPostsPerDay: "mailing_list_posts_per_day", - mutedCategoryIds: "muted_category_ids", - mutedTags: "muted_tags", - mutedUsernames: "muted_usernames", - pendingCount: "pending_count", - pendingPostsCount: "pending_posts_count", - postCount: "post_count", - primaryGroupId: "primary_group_id", - primaryGroupName: "primary_group_name", - profileViewCount: "profile_view_count", - recentTimeRead: "recent_time_read", - regularCategoryIds: "regular_category_ids", - secondFactorBackupEnabled: "second_factor_backup_enabled", - secondFactorEnabled: "second_factor_enabled", - sidebarCategoryIds: "sidebar_category_ids", - sidebarTags: "sidebar_tags", - systemAvatarTemplate: "system_avatar_template", - systemAvatarUploadId: "system_avatar_upload_id", - timeRead: "time_read", - trackedCategoryIds: "tracked_category_ids", - trackedTags: "tracked_tags", - trustLevel: "trust_level", - uploadedAvatarId: "uploaded_avatar_id", - useLogoSmallAsAvatar: "use_logo_small_as_avatar", - userApiKeys: "user_api_keys", - userAuthTokens: "user_auth_tokens", - userFields: "user_fields", - userNotificationSchedule: "user_notification_schedule", - userOption: "user_option", - watchedCategoryIds: "watched_category_ids", - watchedFirstPostCategoryIds: "watched_first_post_category_ids", - watchedTags: "watched_tags", - watchingFirstPostTags: "watching_first_post_tags", - }); +export const User$outboundSchema: z.ZodType = + z.object({ + admin: z.boolean(), + allowedPmUsernames: z.array(z.any()), + avatarTemplate: z.string(), + badgeCount: z.number().int(), + canBeDeleted: z.boolean(), + canChangeBio: z.boolean(), + canChangeLocation: z.boolean(), + canChangeTrackingPreferences: z.boolean(), + canChangeWebsite: z.boolean(), + canDeleteAllPosts: z.boolean(), + canEdit: z.boolean(), + canEditEmail: z.boolean(), + canEditName: z.boolean(), + canEditUsername: z.boolean(), + canIgnoreUser: z.boolean(), + canMuteUser: z.boolean(), + canSendPrivateMessageToUser: z.boolean(), + canSendPrivateMessages: z.boolean(), + canUploadProfileHeader: z.boolean(), + canUploadUserCardBackground: z.boolean(), + createdAt: z.string(), + customFields: z.lazy(() => GetUserCustomFields$outboundSchema), + displaySidebarTags: z.boolean().optional(), + featuredTopic: z.nullable(z.string()), + featuredUserBadgeIds: z.array(z.any()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + groupUsers: z.array(z.lazy(() => GroupUsers$outboundSchema)), + groups: z.array(z.lazy(() => GetUserGroups$outboundSchema)), + hasTitleBadges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignoredUsernames: z.array(z.any()), + invitedBy: z.nullable(z.string()), + lastPostedAt: z.nullable(z.string()), + lastSeenAt: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailingListPostsPerDay: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + mutedCategoryIds: z.array(z.any()), + mutedTags: z.array(z.any()), + mutedUsernames: z.array(z.any()), + name: z.string(), + pendingCount: z.number().int(), + pendingPostsCount: z.number().int().optional(), + postCount: z.number().int(), + primaryGroupId: z.nullable(z.string()), + primaryGroupName: z.nullable(z.string()), + profileViewCount: z.number().int(), + recentTimeRead: z.number().int(), + regularCategoryIds: z.array(z.any()), + secondFactorBackupEnabled: z.boolean().optional(), + secondFactorEnabled: z.boolean(), + sidebarCategoryIds: z.array(z.any()).optional(), + sidebarTags: z.array(z.any()).optional(), + staged: z.boolean(), + systemAvatarTemplate: z.string(), + systemAvatarUploadId: z.nullable(z.string()), + timeRead: z.number().int(), + title: z.nullable(z.string()), + trackedCategoryIds: z.array(z.any()), + trackedTags: z.array(z.any()), + trustLevel: z.number().int(), + uploadedAvatarId: z.nullable(z.string()), + useLogoSmallAsAvatar: z.boolean(), + userApiKeys: z.nullable(z.string()), + userAuthTokens: z.array(z.lazy(() => UserAuthTokens$outboundSchema)), + userFields: z.lazy(() => UserFields$outboundSchema).optional(), + userNotificationSchedule: z.lazy(() => + UserNotificationSchedule$outboundSchema + ), + userOption: z.lazy(() => UserOption$outboundSchema), + username: z.string(), + watchedCategoryIds: z.array(z.any()), + watchedFirstPostCategoryIds: z.array(z.any()), + watchedTags: z.array(z.any()), + watchingFirstPostTags: z.array(z.any()), + }).transform((v) => { + return remap$(v, { + allowedPmUsernames: "allowed_pm_usernames", + avatarTemplate: "avatar_template", + badgeCount: "badge_count", + canBeDeleted: "can_be_deleted", + canChangeBio: "can_change_bio", + canChangeLocation: "can_change_location", + canChangeTrackingPreferences: "can_change_tracking_preferences", + canChangeWebsite: "can_change_website", + canDeleteAllPosts: "can_delete_all_posts", + canEdit: "can_edit", + canEditEmail: "can_edit_email", + canEditName: "can_edit_name", + canEditUsername: "can_edit_username", + canIgnoreUser: "can_ignore_user", + canMuteUser: "can_mute_user", + canSendPrivateMessageToUser: "can_send_private_message_to_user", + canSendPrivateMessages: "can_send_private_messages", + canUploadProfileHeader: "can_upload_profile_header", + canUploadUserCardBackground: "can_upload_user_card_background", + createdAt: "created_at", + customFields: "custom_fields", + displaySidebarTags: "display_sidebar_tags", + featuredTopic: "featured_topic", + featuredUserBadgeIds: "featured_user_badge_ids", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + groupUsers: "group_users", + hasTitleBadges: "has_title_badges", + ignoredUsernames: "ignored_usernames", + invitedBy: "invited_by", + lastPostedAt: "last_posted_at", + lastSeenAt: "last_seen_at", + mailingListPostsPerDay: "mailing_list_posts_per_day", + mutedCategoryIds: "muted_category_ids", + mutedTags: "muted_tags", + mutedUsernames: "muted_usernames", + pendingCount: "pending_count", + pendingPostsCount: "pending_posts_count", + postCount: "post_count", + primaryGroupId: "primary_group_id", + primaryGroupName: "primary_group_name", + profileViewCount: "profile_view_count", + recentTimeRead: "recent_time_read", + regularCategoryIds: "regular_category_ids", + secondFactorBackupEnabled: "second_factor_backup_enabled", + secondFactorEnabled: "second_factor_enabled", + sidebarCategoryIds: "sidebar_category_ids", + sidebarTags: "sidebar_tags", + systemAvatarTemplate: "system_avatar_template", + systemAvatarUploadId: "system_avatar_upload_id", + timeRead: "time_read", + trackedCategoryIds: "tracked_category_ids", + trackedTags: "tracked_tags", + trustLevel: "trust_level", + uploadedAvatarId: "uploaded_avatar_id", + useLogoSmallAsAvatar: "use_logo_small_as_avatar", + userApiKeys: "user_api_keys", + userAuthTokens: "user_auth_tokens", + userFields: "user_fields", + userNotificationSchedule: "user_notification_schedule", + userOption: "user_option", + watchedCategoryIds: "watched_category_ids", + watchedFirstPostCategoryIds: "watched_first_post_category_ids", + watchedTags: "watched_tags", + watchingFirstPostTags: "watching_first_post_tags", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace User$ { - /** @deprecated use `User$inboundSchema` instead. */ - export const inboundSchema = User$inboundSchema; - /** @deprecated use `User$outboundSchema` instead. */ - export const outboundSchema = User$outboundSchema; - /** @deprecated use `User$Outbound` instead. */ - export type Outbound = User$Outbound; + /** @deprecated use `User$inboundSchema` instead. */ + export const inboundSchema = User$inboundSchema; + /** @deprecated use `User$outboundSchema` instead. */ + export const outboundSchema = User$outboundSchema; + /** @deprecated use `User$Outbound` instead. */ + export type Outbound = User$Outbound; } /** @internal */ export const GetUserResponseBody$inboundSchema: z.ZodType< - GetUserResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - user: z.lazy(() => User$inboundSchema), - user_badges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - user_badges: "userBadges", - }); - }); + GetUserResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + user: z.lazy(() => User$inboundSchema), + user_badges: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "user_badges": "userBadges", + }); +}); /** @internal */ export type GetUserResponseBody$Outbound = { - user: User$Outbound; - user_badges: Array; + user: User$Outbound; + user_badges: Array; }; /** @internal */ export const GetUserResponseBody$outboundSchema: z.ZodType< - GetUserResponseBody$Outbound, - z.ZodTypeDef, - GetUserResponseBody -> = z - .object({ - user: z.lazy(() => User$outboundSchema), - userBadges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - userBadges: "user_badges", - }); - }); + GetUserResponseBody$Outbound, + z.ZodTypeDef, + GetUserResponseBody +> = z.object({ + user: z.lazy(() => User$outboundSchema), + userBadges: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + userBadges: "user_badges", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserResponseBody$ { - /** @deprecated use `GetUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserResponseBody$inboundSchema; - /** @deprecated use `GetUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserResponseBody$outboundSchema; - /** @deprecated use `GetUserResponseBody$Outbound` instead. */ - export type Outbound = GetUserResponseBody$Outbound; + /** @deprecated use `GetUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUserResponseBody$inboundSchema; + /** @deprecated use `GetUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUserResponseBody$outboundSchema; + /** @deprecated use `GetUserResponseBody$Outbound` instead. */ + export type Outbound = GetUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getuseremails.ts b/src/sdk/models/operations/getuseremails.ts index 1da1965..4df2af8 100644 --- a/src/sdk/models/operations/getuseremails.ts +++ b/src/sdk/models/operations/getuseremails.ts @@ -2,44 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserEmailsRequest = { - username: string; + username: string; }; /** * success response */ export type GetUserEmailsResponseBody = { - associatedAccounts: Array; - email: string; - secondaryEmails: Array; - unconfirmedEmails: Array; + associatedAccounts: Array; + email: string; + secondaryEmails: Array; + unconfirmedEmails: Array; }; /** @internal */ export const GetUserEmailsRequest$inboundSchema: z.ZodType< - GetUserEmailsRequest, - z.ZodTypeDef, - unknown + GetUserEmailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - username: z.string(), + username: z.string(), }); /** @internal */ export type GetUserEmailsRequest$Outbound = { - username: string; + username: string; }; /** @internal */ export const GetUserEmailsRequest$outboundSchema: z.ZodType< - GetUserEmailsRequest$Outbound, - z.ZodTypeDef, - GetUserEmailsRequest + GetUserEmailsRequest$Outbound, + z.ZodTypeDef, + GetUserEmailsRequest > = z.object({ - username: z.string(), + username: z.string(), }); /** @@ -47,71 +47,67 @@ export const GetUserEmailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserEmailsRequest$ { - /** @deprecated use `GetUserEmailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserEmailsRequest$inboundSchema; - /** @deprecated use `GetUserEmailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserEmailsRequest$outboundSchema; - /** @deprecated use `GetUserEmailsRequest$Outbound` instead. */ - export type Outbound = GetUserEmailsRequest$Outbound; + /** @deprecated use `GetUserEmailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetUserEmailsRequest$inboundSchema; + /** @deprecated use `GetUserEmailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetUserEmailsRequest$outboundSchema; + /** @deprecated use `GetUserEmailsRequest$Outbound` instead. */ + export type Outbound = GetUserEmailsRequest$Outbound; } /** @internal */ export const GetUserEmailsResponseBody$inboundSchema: z.ZodType< - GetUserEmailsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - associated_accounts: z.array(z.any()), - email: z.string(), - secondary_emails: z.array(z.any()), - unconfirmed_emails: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - associated_accounts: "associatedAccounts", - secondary_emails: "secondaryEmails", - unconfirmed_emails: "unconfirmedEmails", - }); - }); + GetUserEmailsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + associated_accounts: z.array(z.any()), + email: z.string(), + secondary_emails: z.array(z.any()), + unconfirmed_emails: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "associated_accounts": "associatedAccounts", + "secondary_emails": "secondaryEmails", + "unconfirmed_emails": "unconfirmedEmails", + }); +}); /** @internal */ export type GetUserEmailsResponseBody$Outbound = { - associated_accounts: Array; - email: string; - secondary_emails: Array; - unconfirmed_emails: Array; + associated_accounts: Array; + email: string; + secondary_emails: Array; + unconfirmed_emails: Array; }; /** @internal */ export const GetUserEmailsResponseBody$outboundSchema: z.ZodType< - GetUserEmailsResponseBody$Outbound, - z.ZodTypeDef, - GetUserEmailsResponseBody -> = z - .object({ - associatedAccounts: z.array(z.any()), - email: z.string(), - secondaryEmails: z.array(z.any()), - unconfirmedEmails: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - associatedAccounts: "associated_accounts", - secondaryEmails: "secondary_emails", - unconfirmedEmails: "unconfirmed_emails", - }); - }); + GetUserEmailsResponseBody$Outbound, + z.ZodTypeDef, + GetUserEmailsResponseBody +> = z.object({ + associatedAccounts: z.array(z.any()), + email: z.string(), + secondaryEmails: z.array(z.any()), + unconfirmedEmails: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + associatedAccounts: "associated_accounts", + secondaryEmails: "secondary_emails", + unconfirmedEmails: "unconfirmed_emails", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserEmailsResponseBody$ { - /** @deprecated use `GetUserEmailsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserEmailsResponseBody$inboundSchema; - /** @deprecated use `GetUserEmailsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserEmailsResponseBody$outboundSchema; - /** @deprecated use `GetUserEmailsResponseBody$Outbound` instead. */ - export type Outbound = GetUserEmailsResponseBody$Outbound; + /** @deprecated use `GetUserEmailsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUserEmailsResponseBody$inboundSchema; + /** @deprecated use `GetUserEmailsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUserEmailsResponseBody$outboundSchema; + /** @deprecated use `GetUserEmailsResponseBody$Outbound` instead. */ + export type Outbound = GetUserEmailsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getuserexternalid.ts b/src/sdk/models/operations/getuserexternalid.ts index b9bddbb..8afc8b2 100644 --- a/src/sdk/models/operations/getuserexternalid.ts +++ b/src/sdk/models/operations/getuserexternalid.ts @@ -2,1526 +2,1496 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserExternalIdRequest = { - apiKey: string; - apiUsername: string; - externalId: string; + apiKey: string; + apiUsername: string; + externalId: string; }; export type GetUserExternalIdCustomFields = { - firstName?: string | null | undefined; + firstName?: string | null | undefined; }; export type GetUserExternalIdGroupUsers = { - groupId: number; - notificationLevel: number; - owner?: boolean | undefined; - userId: number; + groupId: number; + notificationLevel: number; + owner?: boolean | undefined; + userId: number; }; export type GetUserExternalIdGroups = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canSeeMembers: boolean; - defaultNotificationLevel: number; - displayName: string; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canSeeMembers: boolean; + defaultNotificationLevel: number; + displayName: string; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; export type GetUserExternalIdUserAuthTokens = { - browser: string; - clientIp: string; - createdAt: string; - device: string; - icon: string; - id: number; - isActive: boolean; - location: string; - os: string; - seenAt: string; + browser: string; + clientIp: string; + createdAt: string; + device: string; + icon: string; + id: number; + isActive: boolean; + location: string; + os: string; + seenAt: string; }; export type GetUserExternalIdUserFields = { - one: string | null; - two: string | null; + one: string | null; + two: string | null; }; export type GetUserExternalIdUserNotificationSchedule = { - day0EndTime: number; - day0StartTime: number; - day1EndTime: number; - day1StartTime: number; - day2EndTime: number; - day2StartTime: number; - day3EndTime: number; - day3StartTime: number; - day4EndTime: number; - day4StartTime: number; - day5EndTime: number; - day5StartTime: number; - day6EndTime: number; - day6StartTime: number; - enabled: boolean; + day0EndTime: number; + day0StartTime: number; + day1EndTime: number; + day1StartTime: number; + day2EndTime: number; + day2StartTime: number; + day3EndTime: number; + day3StartTime: number; + day4EndTime: number; + day4StartTime: number; + day5EndTime: number; + day5StartTime: number; + day6EndTime: number; + day6StartTime: number; + enabled: boolean; }; export type GetUserExternalIdUserOption = { - allowPrivateMessages: boolean; - autoTrackTopicsAfterMsecs: number; - automaticallyUnpinTopics: boolean; - bookmarkAutoDeletePreference?: number | undefined; - colorSchemeId: string | null; - darkSchemeId: string | null; - defaultCalendar?: string | undefined; - digestAfterMinutes: number; - dynamicFavicon: boolean; - emailDigests: boolean; - emailInReplyTo: boolean; - emailLevel: number; - emailMessagesLevel: number; - emailPreviousReplies: number; - enableAllowedPmUsers: boolean; - enableDefer: boolean; - enableQuoting: boolean; - externalLinksInNewTab: boolean; - hideProfileAndPresence: boolean; - homepageId: string | null; - includeTl0InDigests: boolean; - likeNotificationFrequency: number; - mailingListMode: boolean; - mailingListModeFrequency: number; - newTopicDurationMinutes: number; - notificationLevelWhenReplying: number; - oldestSearchLogDate?: string | null | undefined; - seenPopups?: Array | null | undefined; - sidebarLinkToFilteredList?: boolean | undefined; - sidebarShowCountOfNewItems?: boolean | undefined; - skipNewUserTips: boolean; - textSize: string; - textSizeSeq: number; - themeIds: Array; - themeKeySeq: number; - timezone: string | null; - titleCountMode: string; - userId: number; - watchedPrecedenceOverMuted?: boolean | null | undefined; + allowPrivateMessages: boolean; + autoTrackTopicsAfterMsecs: number; + automaticallyUnpinTopics: boolean; + bookmarkAutoDeletePreference?: number | undefined; + colorSchemeId: string | null; + darkSchemeId: string | null; + defaultCalendar?: string | undefined; + digestAfterMinutes: number; + dynamicFavicon: boolean; + emailDigests: boolean; + emailInReplyTo: boolean; + emailLevel: number; + emailMessagesLevel: number; + emailPreviousReplies: number; + enableAllowedPmUsers: boolean; + enableDefer: boolean; + enableQuoting: boolean; + externalLinksInNewTab: boolean; + hideProfileAndPresence: boolean; + homepageId: string | null; + includeTl0InDigests: boolean; + likeNotificationFrequency: number; + mailingListMode: boolean; + mailingListModeFrequency: number; + newTopicDurationMinutes: number; + notificationLevelWhenReplying: number; + oldestSearchLogDate?: string | null | undefined; + seenPopups?: Array | null | undefined; + sidebarLinkToFilteredList?: boolean | undefined; + sidebarShowCountOfNewItems?: boolean | undefined; + skipNewUserTips: boolean; + textSize: string; + textSizeSeq: number; + themeIds: Array; + themeKeySeq: number; + timezone: string | null; + titleCountMode: string; + userId: number; + watchedPrecedenceOverMuted?: boolean | null | undefined; }; export type GetUserExternalIdUser = { - admin: boolean; - allowedPmUsernames: Array; - avatarTemplate: string; - badgeCount: number; - canBeDeleted: boolean; - canChangeBio: boolean; - canChangeLocation: boolean; - canChangeTrackingPreferences: boolean; - canChangeWebsite: boolean; - canDeleteAllPosts: boolean; - canEdit: boolean; - canEditEmail: boolean; - canEditName: boolean; - canEditUsername: boolean; - canIgnoreUser: boolean; - canMuteUser: boolean; - canSendPrivateMessageToUser: boolean; - canSendPrivateMessages: boolean; - canUploadProfileHeader: boolean; - canUploadUserCardBackground: boolean; - createdAt: string; - customFields: GetUserExternalIdCustomFields; - displaySidebarTags?: boolean | undefined; - featuredTopic: string | null; - featuredUserBadgeIds: Array; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId: string | null; - flairName: string | null; - flairUrl: string | null; - groupUsers: Array; - groups: Array; - hasTitleBadges: boolean; - id: number; - ignored: boolean; - ignoredUsernames: Array; - invitedBy: string | null; - lastPostedAt: string | null; - lastSeenAt: string | null; - locale: string | null; - mailingListPostsPerDay: number; - moderator: boolean; - muted: boolean; - mutedCategoryIds: Array; - mutedTags: Array; - mutedUsernames: Array; - name: string; - pendingCount: number; - pendingPostsCount?: number | undefined; - postCount: number; - primaryGroupId: string | null; - primaryGroupName: string | null; - profileViewCount: number; - recentTimeRead: number; - regularCategoryIds: Array; - secondFactorBackupEnabled?: boolean | undefined; - secondFactorEnabled: boolean; - sidebarCategoryIds?: Array | undefined; - sidebarTags?: Array | undefined; - staged: boolean; - systemAvatarTemplate: string; - systemAvatarUploadId: string | null; - timeRead: number; - title: string | null; - trackedCategoryIds: Array; - trackedTags: Array; - trustLevel: number; - uploadedAvatarId: string | null; - useLogoSmallAsAvatar: boolean; - userApiKeys: string | null; - userAuthTokens: Array; - userFields?: GetUserExternalIdUserFields | undefined; - userNotificationSchedule: GetUserExternalIdUserNotificationSchedule; - userOption: GetUserExternalIdUserOption; - username: string; - watchedCategoryIds: Array; - watchedFirstPostCategoryIds: Array; - watchedTags: Array; - watchingFirstPostTags: Array; + admin: boolean; + allowedPmUsernames: Array; + avatarTemplate: string; + badgeCount: number; + canBeDeleted: boolean; + canChangeBio: boolean; + canChangeLocation: boolean; + canChangeTrackingPreferences: boolean; + canChangeWebsite: boolean; + canDeleteAllPosts: boolean; + canEdit: boolean; + canEditEmail: boolean; + canEditName: boolean; + canEditUsername: boolean; + canIgnoreUser: boolean; + canMuteUser: boolean; + canSendPrivateMessageToUser: boolean; + canSendPrivateMessages: boolean; + canUploadProfileHeader: boolean; + canUploadUserCardBackground: boolean; + createdAt: string; + customFields: GetUserExternalIdCustomFields; + displaySidebarTags?: boolean | undefined; + featuredTopic: string | null; + featuredUserBadgeIds: Array; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId: string | null; + flairName: string | null; + flairUrl: string | null; + groupUsers: Array; + groups: Array; + hasTitleBadges: boolean; + id: number; + ignored: boolean; + ignoredUsernames: Array; + invitedBy: string | null; + lastPostedAt: string | null; + lastSeenAt: string | null; + locale: string | null; + mailingListPostsPerDay: number; + moderator: boolean; + muted: boolean; + mutedCategoryIds: Array; + mutedTags: Array; + mutedUsernames: Array; + name: string; + pendingCount: number; + pendingPostsCount?: number | undefined; + postCount: number; + primaryGroupId: string | null; + primaryGroupName: string | null; + profileViewCount: number; + recentTimeRead: number; + regularCategoryIds: Array; + secondFactorBackupEnabled?: boolean | undefined; + secondFactorEnabled: boolean; + sidebarCategoryIds?: Array | undefined; + sidebarTags?: Array | undefined; + staged: boolean; + systemAvatarTemplate: string; + systemAvatarUploadId: string | null; + timeRead: number; + title: string | null; + trackedCategoryIds: Array; + trackedTags: Array; + trustLevel: number; + uploadedAvatarId: string | null; + useLogoSmallAsAvatar: boolean; + userApiKeys: string | null; + userAuthTokens: Array; + userFields?: GetUserExternalIdUserFields | undefined; + userNotificationSchedule: GetUserExternalIdUserNotificationSchedule; + userOption: GetUserExternalIdUserOption; + username: string; + watchedCategoryIds: Array; + watchedFirstPostCategoryIds: Array; + watchedTags: Array; + watchingFirstPostTags: Array; }; /** * user response */ export type GetUserExternalIdResponseBody = { - user: GetUserExternalIdUser; - userBadges: Array; + user: GetUserExternalIdUser; + userBadges: Array; }; /** @internal */ export const GetUserExternalIdRequest$inboundSchema: z.ZodType< - GetUserExternalIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - external_id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - external_id: "externalId", - }); - }); + GetUserExternalIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + external_id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "external_id": "externalId", + }); +}); /** @internal */ export type GetUserExternalIdRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - external_id: string; + "Api-Key": string; + "Api-Username": string; + external_id: string; }; /** @internal */ export const GetUserExternalIdRequest$outboundSchema: z.ZodType< - GetUserExternalIdRequest$Outbound, - z.ZodTypeDef, - GetUserExternalIdRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - externalId: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - externalId: "external_id", - }); - }); + GetUserExternalIdRequest$Outbound, + z.ZodTypeDef, + GetUserExternalIdRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + externalId: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + externalId: "external_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdRequest$ { - /** @deprecated use `GetUserExternalIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdRequest$inboundSchema; - /** @deprecated use `GetUserExternalIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdRequest$outboundSchema; - /** @deprecated use `GetUserExternalIdRequest$Outbound` instead. */ - export type Outbound = GetUserExternalIdRequest$Outbound; + /** @deprecated use `GetUserExternalIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdRequest$inboundSchema; + /** @deprecated use `GetUserExternalIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdRequest$outboundSchema; + /** @deprecated use `GetUserExternalIdRequest$Outbound` instead. */ + export type Outbound = GetUserExternalIdRequest$Outbound; } /** @internal */ export const GetUserExternalIdCustomFields$inboundSchema: z.ZodType< - GetUserExternalIdCustomFields, - z.ZodTypeDef, - unknown -> = z - .object({ - first_name: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - first_name: "firstName", - }); - }); + GetUserExternalIdCustomFields, + z.ZodTypeDef, + unknown +> = z.object({ + first_name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "first_name": "firstName", + }); +}); /** @internal */ export type GetUserExternalIdCustomFields$Outbound = { - first_name?: string | null | undefined; + first_name?: string | null | undefined; }; /** @internal */ export const GetUserExternalIdCustomFields$outboundSchema: z.ZodType< - GetUserExternalIdCustomFields$Outbound, - z.ZodTypeDef, - GetUserExternalIdCustomFields -> = z - .object({ - firstName: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - firstName: "first_name", - }); - }); + GetUserExternalIdCustomFields$Outbound, + z.ZodTypeDef, + GetUserExternalIdCustomFields +> = z.object({ + firstName: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + firstName: "first_name", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdCustomFields$ { - /** @deprecated use `GetUserExternalIdCustomFields$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdCustomFields$inboundSchema; - /** @deprecated use `GetUserExternalIdCustomFields$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdCustomFields$outboundSchema; - /** @deprecated use `GetUserExternalIdCustomFields$Outbound` instead. */ - export type Outbound = GetUserExternalIdCustomFields$Outbound; + /** @deprecated use `GetUserExternalIdCustomFields$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdCustomFields$inboundSchema; + /** @deprecated use `GetUserExternalIdCustomFields$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdCustomFields$outboundSchema; + /** @deprecated use `GetUserExternalIdCustomFields$Outbound` instead. */ + export type Outbound = GetUserExternalIdCustomFields$Outbound; } /** @internal */ export const GetUserExternalIdGroupUsers$inboundSchema: z.ZodType< - GetUserExternalIdGroupUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - group_id: z.number().int(), - notification_level: z.number().int(), - owner: z.boolean().optional(), - user_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_id: "groupId", - notification_level: "notificationLevel", - user_id: "userId", - }); - }); + GetUserExternalIdGroupUsers, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.number().int(), + notification_level: z.number().int(), + owner: z.boolean().optional(), + user_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + "notification_level": "notificationLevel", + "user_id": "userId", + }); +}); /** @internal */ export type GetUserExternalIdGroupUsers$Outbound = { - group_id: number; - notification_level: number; - owner?: boolean | undefined; - user_id: number; + group_id: number; + notification_level: number; + owner?: boolean | undefined; + user_id: number; }; /** @internal */ export const GetUserExternalIdGroupUsers$outboundSchema: z.ZodType< - GetUserExternalIdGroupUsers$Outbound, - z.ZodTypeDef, - GetUserExternalIdGroupUsers -> = z - .object({ - groupId: z.number().int(), - notificationLevel: z.number().int(), - owner: z.boolean().optional(), - userId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupId: "group_id", - notificationLevel: "notification_level", - userId: "user_id", - }); - }); + GetUserExternalIdGroupUsers$Outbound, + z.ZodTypeDef, + GetUserExternalIdGroupUsers +> = z.object({ + groupId: z.number().int(), + notificationLevel: z.number().int(), + owner: z.boolean().optional(), + userId: z.number().int(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + notificationLevel: "notification_level", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdGroupUsers$ { - /** @deprecated use `GetUserExternalIdGroupUsers$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdGroupUsers$inboundSchema; - /** @deprecated use `GetUserExternalIdGroupUsers$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdGroupUsers$outboundSchema; - /** @deprecated use `GetUserExternalIdGroupUsers$Outbound` instead. */ - export type Outbound = GetUserExternalIdGroupUsers$Outbound; + /** @deprecated use `GetUserExternalIdGroupUsers$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdGroupUsers$inboundSchema; + /** @deprecated use `GetUserExternalIdGroupUsers$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdGroupUsers$outboundSchema; + /** @deprecated use `GetUserExternalIdGroupUsers$Outbound` instead. */ + export type Outbound = GetUserExternalIdGroupUsers$Outbound; } /** @internal */ export const GetUserExternalIdGroups$inboundSchema: z.ZodType< - GetUserExternalIdGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - display_name: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - display_name: "displayName", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); - }); + GetUserExternalIdGroups, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + display_name: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "display_name": "displayName", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + }); +}); /** @internal */ export type GetUserExternalIdGroups$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_see_members: boolean; - default_notification_level: number; - display_name: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_see_members: boolean; + default_notification_level: number; + display_name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ export const GetUserExternalIdGroups$outboundSchema: z.ZodType< - GetUserExternalIdGroups$Outbound, - z.ZodTypeDef, - GetUserExternalIdGroups -> = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - displayName: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - displayName: "display_name", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); + GetUserExternalIdGroups$Outbound, + z.ZodTypeDef, + GetUserExternalIdGroups +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + displayName: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + displayName: "display_name", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdGroups$ { - /** @deprecated use `GetUserExternalIdGroups$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdGroups$inboundSchema; - /** @deprecated use `GetUserExternalIdGroups$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdGroups$outboundSchema; - /** @deprecated use `GetUserExternalIdGroups$Outbound` instead. */ - export type Outbound = GetUserExternalIdGroups$Outbound; + /** @deprecated use `GetUserExternalIdGroups$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdGroups$inboundSchema; + /** @deprecated use `GetUserExternalIdGroups$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdGroups$outboundSchema; + /** @deprecated use `GetUserExternalIdGroups$Outbound` instead. */ + export type Outbound = GetUserExternalIdGroups$Outbound; } /** @internal */ export const GetUserExternalIdUserAuthTokens$inboundSchema: z.ZodType< - GetUserExternalIdUserAuthTokens, - z.ZodTypeDef, - unknown -> = z - .object({ - browser: z.string(), - client_ip: z.string(), - created_at: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - is_active: z.boolean(), - location: z.string(), - os: z.string(), - seen_at: z.string(), - }) - .transform((v) => { - return remap$(v, { - client_ip: "clientIp", - created_at: "createdAt", - is_active: "isActive", - seen_at: "seenAt", - }); - }); + GetUserExternalIdUserAuthTokens, + z.ZodTypeDef, + unknown +> = z.object({ + browser: z.string(), + client_ip: z.string(), + created_at: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + is_active: z.boolean(), + location: z.string(), + os: z.string(), + seen_at: z.string(), +}).transform((v) => { + return remap$(v, { + "client_ip": "clientIp", + "created_at": "createdAt", + "is_active": "isActive", + "seen_at": "seenAt", + }); +}); /** @internal */ export type GetUserExternalIdUserAuthTokens$Outbound = { - browser: string; - client_ip: string; - created_at: string; - device: string; - icon: string; - id: number; - is_active: boolean; - location: string; - os: string; - seen_at: string; + browser: string; + client_ip: string; + created_at: string; + device: string; + icon: string; + id: number; + is_active: boolean; + location: string; + os: string; + seen_at: string; }; /** @internal */ export const GetUserExternalIdUserAuthTokens$outboundSchema: z.ZodType< - GetUserExternalIdUserAuthTokens$Outbound, - z.ZodTypeDef, - GetUserExternalIdUserAuthTokens -> = z - .object({ - browser: z.string(), - clientIp: z.string(), - createdAt: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - isActive: z.boolean(), - location: z.string(), - os: z.string(), - seenAt: z.string(), - }) - .transform((v) => { - return remap$(v, { - clientIp: "client_ip", - createdAt: "created_at", - isActive: "is_active", - seenAt: "seen_at", - }); - }); + GetUserExternalIdUserAuthTokens$Outbound, + z.ZodTypeDef, + GetUserExternalIdUserAuthTokens +> = z.object({ + browser: z.string(), + clientIp: z.string(), + createdAt: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + isActive: z.boolean(), + location: z.string(), + os: z.string(), + seenAt: z.string(), +}).transform((v) => { + return remap$(v, { + clientIp: "client_ip", + createdAt: "created_at", + isActive: "is_active", + seenAt: "seen_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdUserAuthTokens$ { - /** @deprecated use `GetUserExternalIdUserAuthTokens$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdUserAuthTokens$inboundSchema; - /** @deprecated use `GetUserExternalIdUserAuthTokens$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdUserAuthTokens$outboundSchema; - /** @deprecated use `GetUserExternalIdUserAuthTokens$Outbound` instead. */ - export type Outbound = GetUserExternalIdUserAuthTokens$Outbound; + /** @deprecated use `GetUserExternalIdUserAuthTokens$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdUserAuthTokens$inboundSchema; + /** @deprecated use `GetUserExternalIdUserAuthTokens$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdUserAuthTokens$outboundSchema; + /** @deprecated use `GetUserExternalIdUserAuthTokens$Outbound` instead. */ + export type Outbound = GetUserExternalIdUserAuthTokens$Outbound; } /** @internal */ export const GetUserExternalIdUserFields$inboundSchema: z.ZodType< - GetUserExternalIdUserFields, - z.ZodTypeDef, - unknown -> = z - .object({ - "1": z.nullable(z.string()), - "2": z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - "1": "one", - "2": "two", - }); - }); + GetUserExternalIdUserFields, + z.ZodTypeDef, + unknown +> = z.object({ + "1": z.nullable(z.string()), + "2": z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "1": "one", + "2": "two", + }); +}); /** @internal */ export type GetUserExternalIdUserFields$Outbound = { - "1": string | null; - "2": string | null; + "1": string | null; + "2": string | null; }; /** @internal */ export const GetUserExternalIdUserFields$outboundSchema: z.ZodType< - GetUserExternalIdUserFields$Outbound, - z.ZodTypeDef, - GetUserExternalIdUserFields -> = z - .object({ - one: z.nullable(z.string()), - two: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - one: "1", - two: "2", - }); - }); + GetUserExternalIdUserFields$Outbound, + z.ZodTypeDef, + GetUserExternalIdUserFields +> = z.object({ + one: z.nullable(z.string()), + two: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + one: "1", + two: "2", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdUserFields$ { - /** @deprecated use `GetUserExternalIdUserFields$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdUserFields$inboundSchema; - /** @deprecated use `GetUserExternalIdUserFields$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdUserFields$outboundSchema; - /** @deprecated use `GetUserExternalIdUserFields$Outbound` instead. */ - export type Outbound = GetUserExternalIdUserFields$Outbound; + /** @deprecated use `GetUserExternalIdUserFields$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdUserFields$inboundSchema; + /** @deprecated use `GetUserExternalIdUserFields$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdUserFields$outboundSchema; + /** @deprecated use `GetUserExternalIdUserFields$Outbound` instead. */ + export type Outbound = GetUserExternalIdUserFields$Outbound; } /** @internal */ export const GetUserExternalIdUserNotificationSchedule$inboundSchema: z.ZodType< - GetUserExternalIdUserNotificationSchedule, - z.ZodTypeDef, - unknown -> = z - .object({ - day_0_end_time: z.number().int(), - day_0_start_time: z.number().int(), - day_1_end_time: z.number().int(), - day_1_start_time: z.number().int(), - day_2_end_time: z.number().int(), - day_2_start_time: z.number().int(), - day_3_end_time: z.number().int(), - day_3_start_time: z.number().int(), - day_4_end_time: z.number().int(), - day_4_start_time: z.number().int(), - day_5_end_time: z.number().int(), - day_5_start_time: z.number().int(), - day_6_end_time: z.number().int(), - day_6_start_time: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day_0_end_time: "day0EndTime", - day_0_start_time: "day0StartTime", - day_1_end_time: "day1EndTime", - day_1_start_time: "day1StartTime", - day_2_end_time: "day2EndTime", - day_2_start_time: "day2StartTime", - day_3_end_time: "day3EndTime", - day_3_start_time: "day3StartTime", - day_4_end_time: "day4EndTime", - day_4_start_time: "day4StartTime", - day_5_end_time: "day5EndTime", - day_5_start_time: "day5StartTime", - day_6_end_time: "day6EndTime", - day_6_start_time: "day6StartTime", - }); - }); + GetUserExternalIdUserNotificationSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + day_0_end_time: z.number().int(), + day_0_start_time: z.number().int(), + day_1_end_time: z.number().int(), + day_1_start_time: z.number().int(), + day_2_end_time: z.number().int(), + day_2_start_time: z.number().int(), + day_3_end_time: z.number().int(), + day_3_start_time: z.number().int(), + day_4_end_time: z.number().int(), + day_4_start_time: z.number().int(), + day_5_end_time: z.number().int(), + day_5_start_time: z.number().int(), + day_6_end_time: z.number().int(), + day_6_start_time: z.number().int(), + enabled: z.boolean(), +}).transform((v) => { + return remap$(v, { + "day_0_end_time": "day0EndTime", + "day_0_start_time": "day0StartTime", + "day_1_end_time": "day1EndTime", + "day_1_start_time": "day1StartTime", + "day_2_end_time": "day2EndTime", + "day_2_start_time": "day2StartTime", + "day_3_end_time": "day3EndTime", + "day_3_start_time": "day3StartTime", + "day_4_end_time": "day4EndTime", + "day_4_start_time": "day4StartTime", + "day_5_end_time": "day5EndTime", + "day_5_start_time": "day5StartTime", + "day_6_end_time": "day6EndTime", + "day_6_start_time": "day6StartTime", + }); +}); /** @internal */ export type GetUserExternalIdUserNotificationSchedule$Outbound = { - day_0_end_time: number; - day_0_start_time: number; - day_1_end_time: number; - day_1_start_time: number; - day_2_end_time: number; - day_2_start_time: number; - day_3_end_time: number; - day_3_start_time: number; - day_4_end_time: number; - day_4_start_time: number; - day_5_end_time: number; - day_5_start_time: number; - day_6_end_time: number; - day_6_start_time: number; - enabled: boolean; + day_0_end_time: number; + day_0_start_time: number; + day_1_end_time: number; + day_1_start_time: number; + day_2_end_time: number; + day_2_start_time: number; + day_3_end_time: number; + day_3_start_time: number; + day_4_end_time: number; + day_4_start_time: number; + day_5_end_time: number; + day_5_start_time: number; + day_6_end_time: number; + day_6_start_time: number; + enabled: boolean; }; /** @internal */ -export const GetUserExternalIdUserNotificationSchedule$outboundSchema: z.ZodType< +export const GetUserExternalIdUserNotificationSchedule$outboundSchema: + z.ZodType< GetUserExternalIdUserNotificationSchedule$Outbound, z.ZodTypeDef, GetUserExternalIdUserNotificationSchedule -> = z - .object({ - day0EndTime: z.number().int(), - day0StartTime: z.number().int(), - day1EndTime: z.number().int(), - day1StartTime: z.number().int(), - day2EndTime: z.number().int(), - day2StartTime: z.number().int(), - day3EndTime: z.number().int(), - day3StartTime: z.number().int(), - day4EndTime: z.number().int(), - day4StartTime: z.number().int(), - day5EndTime: z.number().int(), - day5StartTime: z.number().int(), - day6EndTime: z.number().int(), - day6StartTime: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day0EndTime: "day_0_end_time", - day0StartTime: "day_0_start_time", - day1EndTime: "day_1_end_time", - day1StartTime: "day_1_start_time", - day2EndTime: "day_2_end_time", - day2StartTime: "day_2_start_time", - day3EndTime: "day_3_end_time", - day3StartTime: "day_3_start_time", - day4EndTime: "day_4_end_time", - day4StartTime: "day_4_start_time", - day5EndTime: "day_5_end_time", - day5StartTime: "day_5_start_time", - day6EndTime: "day_6_end_time", - day6StartTime: "day_6_start_time", - }); + > = z.object({ + day0EndTime: z.number().int(), + day0StartTime: z.number().int(), + day1EndTime: z.number().int(), + day1StartTime: z.number().int(), + day2EndTime: z.number().int(), + day2StartTime: z.number().int(), + day3EndTime: z.number().int(), + day3StartTime: z.number().int(), + day4EndTime: z.number().int(), + day4StartTime: z.number().int(), + day5EndTime: z.number().int(), + day5StartTime: z.number().int(), + day6EndTime: z.number().int(), + day6StartTime: z.number().int(), + enabled: z.boolean(), + }).transform((v) => { + return remap$(v, { + day0EndTime: "day_0_end_time", + day0StartTime: "day_0_start_time", + day1EndTime: "day_1_end_time", + day1StartTime: "day_1_start_time", + day2EndTime: "day_2_end_time", + day2StartTime: "day_2_start_time", + day3EndTime: "day_3_end_time", + day3StartTime: "day_3_start_time", + day4EndTime: "day_4_end_time", + day4StartTime: "day_4_start_time", + day5EndTime: "day_5_end_time", + day5StartTime: "day_5_start_time", + day6EndTime: "day_6_end_time", + day6StartTime: "day_6_start_time", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdUserNotificationSchedule$ { - /** @deprecated use `GetUserExternalIdUserNotificationSchedule$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdUserNotificationSchedule$inboundSchema; - /** @deprecated use `GetUserExternalIdUserNotificationSchedule$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdUserNotificationSchedule$outboundSchema; - /** @deprecated use `GetUserExternalIdUserNotificationSchedule$Outbound` instead. */ - export type Outbound = GetUserExternalIdUserNotificationSchedule$Outbound; + /** @deprecated use `GetUserExternalIdUserNotificationSchedule$inboundSchema` instead. */ + export const inboundSchema = + GetUserExternalIdUserNotificationSchedule$inboundSchema; + /** @deprecated use `GetUserExternalIdUserNotificationSchedule$outboundSchema` instead. */ + export const outboundSchema = + GetUserExternalIdUserNotificationSchedule$outboundSchema; + /** @deprecated use `GetUserExternalIdUserNotificationSchedule$Outbound` instead. */ + export type Outbound = GetUserExternalIdUserNotificationSchedule$Outbound; } /** @internal */ export const GetUserExternalIdUserOption$inboundSchema: z.ZodType< - GetUserExternalIdUserOption, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_private_messages: z.boolean(), - auto_track_topics_after_msecs: z.number().int(), - automatically_unpin_topics: z.boolean(), - bookmark_auto_delete_preference: z.number().int().optional(), - color_scheme_id: z.nullable(z.string()), - dark_scheme_id: z.nullable(z.string()), - default_calendar: z.string().optional(), - digest_after_minutes: z.number().int(), - dynamic_favicon: z.boolean(), - email_digests: z.boolean(), - email_in_reply_to: z.boolean(), - email_level: z.number().int(), - email_messages_level: z.number().int(), - email_previous_replies: z.number().int(), - enable_allowed_pm_users: z.boolean(), - enable_defer: z.boolean(), - enable_quoting: z.boolean(), - external_links_in_new_tab: z.boolean(), - hide_profile_and_presence: z.boolean(), - homepage_id: z.nullable(z.string()), - include_tl0_in_digests: z.boolean(), - like_notification_frequency: z.number().int(), - mailing_list_mode: z.boolean(), - mailing_list_mode_frequency: z.number().int(), - new_topic_duration_minutes: z.number().int(), - notification_level_when_replying: z.number().int(), - oldest_search_log_date: z.nullable(z.string()).optional(), - seen_popups: z.nullable(z.array(z.any())).optional(), - sidebar_link_to_filtered_list: z.boolean().optional(), - sidebar_show_count_of_new_items: z.boolean().optional(), - skip_new_user_tips: z.boolean(), - text_size: z.string(), - text_size_seq: z.number().int(), - theme_ids: z.array(z.any()), - theme_key_seq: z.number().int(), - timezone: z.nullable(z.string()), - title_count_mode: z.string(), - user_id: z.number().int(), - watched_precedence_over_muted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allow_private_messages: "allowPrivateMessages", - auto_track_topics_after_msecs: "autoTrackTopicsAfterMsecs", - automatically_unpin_topics: "automaticallyUnpinTopics", - bookmark_auto_delete_preference: "bookmarkAutoDeletePreference", - color_scheme_id: "colorSchemeId", - dark_scheme_id: "darkSchemeId", - default_calendar: "defaultCalendar", - digest_after_minutes: "digestAfterMinutes", - dynamic_favicon: "dynamicFavicon", - email_digests: "emailDigests", - email_in_reply_to: "emailInReplyTo", - email_level: "emailLevel", - email_messages_level: "emailMessagesLevel", - email_previous_replies: "emailPreviousReplies", - enable_allowed_pm_users: "enableAllowedPmUsers", - enable_defer: "enableDefer", - enable_quoting: "enableQuoting", - external_links_in_new_tab: "externalLinksInNewTab", - hide_profile_and_presence: "hideProfileAndPresence", - homepage_id: "homepageId", - include_tl0_in_digests: "includeTl0InDigests", - like_notification_frequency: "likeNotificationFrequency", - mailing_list_mode: "mailingListMode", - mailing_list_mode_frequency: "mailingListModeFrequency", - new_topic_duration_minutes: "newTopicDurationMinutes", - notification_level_when_replying: "notificationLevelWhenReplying", - oldest_search_log_date: "oldestSearchLogDate", - seen_popups: "seenPopups", - sidebar_link_to_filtered_list: "sidebarLinkToFilteredList", - sidebar_show_count_of_new_items: "sidebarShowCountOfNewItems", - skip_new_user_tips: "skipNewUserTips", - text_size: "textSize", - text_size_seq: "textSizeSeq", - theme_ids: "themeIds", - theme_key_seq: "themeKeySeq", - title_count_mode: "titleCountMode", - user_id: "userId", - watched_precedence_over_muted: "watchedPrecedenceOverMuted", - }); - }); + GetUserExternalIdUserOption, + z.ZodTypeDef, + unknown +> = z.object({ + allow_private_messages: z.boolean(), + auto_track_topics_after_msecs: z.number().int(), + automatically_unpin_topics: z.boolean(), + bookmark_auto_delete_preference: z.number().int().optional(), + color_scheme_id: z.nullable(z.string()), + dark_scheme_id: z.nullable(z.string()), + default_calendar: z.string().optional(), + digest_after_minutes: z.number().int(), + dynamic_favicon: z.boolean(), + email_digests: z.boolean(), + email_in_reply_to: z.boolean(), + email_level: z.number().int(), + email_messages_level: z.number().int(), + email_previous_replies: z.number().int(), + enable_allowed_pm_users: z.boolean(), + enable_defer: z.boolean(), + enable_quoting: z.boolean(), + external_links_in_new_tab: z.boolean(), + hide_profile_and_presence: z.boolean(), + homepage_id: z.nullable(z.string()), + include_tl0_in_digests: z.boolean(), + like_notification_frequency: z.number().int(), + mailing_list_mode: z.boolean(), + mailing_list_mode_frequency: z.number().int(), + new_topic_duration_minutes: z.number().int(), + notification_level_when_replying: z.number().int(), + oldest_search_log_date: z.nullable(z.string()).optional(), + seen_popups: z.nullable(z.array(z.any())).optional(), + sidebar_link_to_filtered_list: z.boolean().optional(), + sidebar_show_count_of_new_items: z.boolean().optional(), + skip_new_user_tips: z.boolean(), + text_size: z.string(), + text_size_seq: z.number().int(), + theme_ids: z.array(z.any()), + theme_key_seq: z.number().int(), + timezone: z.nullable(z.string()), + title_count_mode: z.string(), + user_id: z.number().int(), + watched_precedence_over_muted: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "allow_private_messages": "allowPrivateMessages", + "auto_track_topics_after_msecs": "autoTrackTopicsAfterMsecs", + "automatically_unpin_topics": "automaticallyUnpinTopics", + "bookmark_auto_delete_preference": "bookmarkAutoDeletePreference", + "color_scheme_id": "colorSchemeId", + "dark_scheme_id": "darkSchemeId", + "default_calendar": "defaultCalendar", + "digest_after_minutes": "digestAfterMinutes", + "dynamic_favicon": "dynamicFavicon", + "email_digests": "emailDigests", + "email_in_reply_to": "emailInReplyTo", + "email_level": "emailLevel", + "email_messages_level": "emailMessagesLevel", + "email_previous_replies": "emailPreviousReplies", + "enable_allowed_pm_users": "enableAllowedPmUsers", + "enable_defer": "enableDefer", + "enable_quoting": "enableQuoting", + "external_links_in_new_tab": "externalLinksInNewTab", + "hide_profile_and_presence": "hideProfileAndPresence", + "homepage_id": "homepageId", + "include_tl0_in_digests": "includeTl0InDigests", + "like_notification_frequency": "likeNotificationFrequency", + "mailing_list_mode": "mailingListMode", + "mailing_list_mode_frequency": "mailingListModeFrequency", + "new_topic_duration_minutes": "newTopicDurationMinutes", + "notification_level_when_replying": "notificationLevelWhenReplying", + "oldest_search_log_date": "oldestSearchLogDate", + "seen_popups": "seenPopups", + "sidebar_link_to_filtered_list": "sidebarLinkToFilteredList", + "sidebar_show_count_of_new_items": "sidebarShowCountOfNewItems", + "skip_new_user_tips": "skipNewUserTips", + "text_size": "textSize", + "text_size_seq": "textSizeSeq", + "theme_ids": "themeIds", + "theme_key_seq": "themeKeySeq", + "title_count_mode": "titleCountMode", + "user_id": "userId", + "watched_precedence_over_muted": "watchedPrecedenceOverMuted", + }); +}); /** @internal */ export type GetUserExternalIdUserOption$Outbound = { - allow_private_messages: boolean; - auto_track_topics_after_msecs: number; - automatically_unpin_topics: boolean; - bookmark_auto_delete_preference?: number | undefined; - color_scheme_id: string | null; - dark_scheme_id: string | null; - default_calendar?: string | undefined; - digest_after_minutes: number; - dynamic_favicon: boolean; - email_digests: boolean; - email_in_reply_to: boolean; - email_level: number; - email_messages_level: number; - email_previous_replies: number; - enable_allowed_pm_users: boolean; - enable_defer: boolean; - enable_quoting: boolean; - external_links_in_new_tab: boolean; - hide_profile_and_presence: boolean; - homepage_id: string | null; - include_tl0_in_digests: boolean; - like_notification_frequency: number; - mailing_list_mode: boolean; - mailing_list_mode_frequency: number; - new_topic_duration_minutes: number; - notification_level_when_replying: number; - oldest_search_log_date?: string | null | undefined; - seen_popups?: Array | null | undefined; - sidebar_link_to_filtered_list?: boolean | undefined; - sidebar_show_count_of_new_items?: boolean | undefined; - skip_new_user_tips: boolean; - text_size: string; - text_size_seq: number; - theme_ids: Array; - theme_key_seq: number; - timezone: string | null; - title_count_mode: string; - user_id: number; - watched_precedence_over_muted?: boolean | null | undefined; + allow_private_messages: boolean; + auto_track_topics_after_msecs: number; + automatically_unpin_topics: boolean; + bookmark_auto_delete_preference?: number | undefined; + color_scheme_id: string | null; + dark_scheme_id: string | null; + default_calendar?: string | undefined; + digest_after_minutes: number; + dynamic_favicon: boolean; + email_digests: boolean; + email_in_reply_to: boolean; + email_level: number; + email_messages_level: number; + email_previous_replies: number; + enable_allowed_pm_users: boolean; + enable_defer: boolean; + enable_quoting: boolean; + external_links_in_new_tab: boolean; + hide_profile_and_presence: boolean; + homepage_id: string | null; + include_tl0_in_digests: boolean; + like_notification_frequency: number; + mailing_list_mode: boolean; + mailing_list_mode_frequency: number; + new_topic_duration_minutes: number; + notification_level_when_replying: number; + oldest_search_log_date?: string | null | undefined; + seen_popups?: Array | null | undefined; + sidebar_link_to_filtered_list?: boolean | undefined; + sidebar_show_count_of_new_items?: boolean | undefined; + skip_new_user_tips: boolean; + text_size: string; + text_size_seq: number; + theme_ids: Array; + theme_key_seq: number; + timezone: string | null; + title_count_mode: string; + user_id: number; + watched_precedence_over_muted?: boolean | null | undefined; }; /** @internal */ export const GetUserExternalIdUserOption$outboundSchema: z.ZodType< - GetUserExternalIdUserOption$Outbound, - z.ZodTypeDef, - GetUserExternalIdUserOption -> = z - .object({ - allowPrivateMessages: z.boolean(), - autoTrackTopicsAfterMsecs: z.number().int(), - automaticallyUnpinTopics: z.boolean(), - bookmarkAutoDeletePreference: z.number().int().optional(), - colorSchemeId: z.nullable(z.string()), - darkSchemeId: z.nullable(z.string()), - defaultCalendar: z.string().optional(), - digestAfterMinutes: z.number().int(), - dynamicFavicon: z.boolean(), - emailDigests: z.boolean(), - emailInReplyTo: z.boolean(), - emailLevel: z.number().int(), - emailMessagesLevel: z.number().int(), - emailPreviousReplies: z.number().int(), - enableAllowedPmUsers: z.boolean(), - enableDefer: z.boolean(), - enableQuoting: z.boolean(), - externalLinksInNewTab: z.boolean(), - hideProfileAndPresence: z.boolean(), - homepageId: z.nullable(z.string()), - includeTl0InDigests: z.boolean(), - likeNotificationFrequency: z.number().int(), - mailingListMode: z.boolean(), - mailingListModeFrequency: z.number().int(), - newTopicDurationMinutes: z.number().int(), - notificationLevelWhenReplying: z.number().int(), - oldestSearchLogDate: z.nullable(z.string()).optional(), - seenPopups: z.nullable(z.array(z.any())).optional(), - sidebarLinkToFilteredList: z.boolean().optional(), - sidebarShowCountOfNewItems: z.boolean().optional(), - skipNewUserTips: z.boolean(), - textSize: z.string(), - textSizeSeq: z.number().int(), - themeIds: z.array(z.any()), - themeKeySeq: z.number().int(), - timezone: z.nullable(z.string()), - titleCountMode: z.string(), - userId: z.number().int(), - watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allowPrivateMessages: "allow_private_messages", - autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", - automaticallyUnpinTopics: "automatically_unpin_topics", - bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", - colorSchemeId: "color_scheme_id", - darkSchemeId: "dark_scheme_id", - defaultCalendar: "default_calendar", - digestAfterMinutes: "digest_after_minutes", - dynamicFavicon: "dynamic_favicon", - emailDigests: "email_digests", - emailInReplyTo: "email_in_reply_to", - emailLevel: "email_level", - emailMessagesLevel: "email_messages_level", - emailPreviousReplies: "email_previous_replies", - enableAllowedPmUsers: "enable_allowed_pm_users", - enableDefer: "enable_defer", - enableQuoting: "enable_quoting", - externalLinksInNewTab: "external_links_in_new_tab", - hideProfileAndPresence: "hide_profile_and_presence", - homepageId: "homepage_id", - includeTl0InDigests: "include_tl0_in_digests", - likeNotificationFrequency: "like_notification_frequency", - mailingListMode: "mailing_list_mode", - mailingListModeFrequency: "mailing_list_mode_frequency", - newTopicDurationMinutes: "new_topic_duration_minutes", - notificationLevelWhenReplying: "notification_level_when_replying", - oldestSearchLogDate: "oldest_search_log_date", - seenPopups: "seen_popups", - sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", - sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", - skipNewUserTips: "skip_new_user_tips", - textSize: "text_size", - textSizeSeq: "text_size_seq", - themeIds: "theme_ids", - themeKeySeq: "theme_key_seq", - titleCountMode: "title_count_mode", - userId: "user_id", - watchedPrecedenceOverMuted: "watched_precedence_over_muted", - }); - }); + GetUserExternalIdUserOption$Outbound, + z.ZodTypeDef, + GetUserExternalIdUserOption +> = z.object({ + allowPrivateMessages: z.boolean(), + autoTrackTopicsAfterMsecs: z.number().int(), + automaticallyUnpinTopics: z.boolean(), + bookmarkAutoDeletePreference: z.number().int().optional(), + colorSchemeId: z.nullable(z.string()), + darkSchemeId: z.nullable(z.string()), + defaultCalendar: z.string().optional(), + digestAfterMinutes: z.number().int(), + dynamicFavicon: z.boolean(), + emailDigests: z.boolean(), + emailInReplyTo: z.boolean(), + emailLevel: z.number().int(), + emailMessagesLevel: z.number().int(), + emailPreviousReplies: z.number().int(), + enableAllowedPmUsers: z.boolean(), + enableDefer: z.boolean(), + enableQuoting: z.boolean(), + externalLinksInNewTab: z.boolean(), + hideProfileAndPresence: z.boolean(), + homepageId: z.nullable(z.string()), + includeTl0InDigests: z.boolean(), + likeNotificationFrequency: z.number().int(), + mailingListMode: z.boolean(), + mailingListModeFrequency: z.number().int(), + newTopicDurationMinutes: z.number().int(), + notificationLevelWhenReplying: z.number().int(), + oldestSearchLogDate: z.nullable(z.string()).optional(), + seenPopups: z.nullable(z.array(z.any())).optional(), + sidebarLinkToFilteredList: z.boolean().optional(), + sidebarShowCountOfNewItems: z.boolean().optional(), + skipNewUserTips: z.boolean(), + textSize: z.string(), + textSizeSeq: z.number().int(), + themeIds: z.array(z.any()), + themeKeySeq: z.number().int(), + timezone: z.nullable(z.string()), + titleCountMode: z.string(), + userId: z.number().int(), + watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + allowPrivateMessages: "allow_private_messages", + autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", + automaticallyUnpinTopics: "automatically_unpin_topics", + bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", + colorSchemeId: "color_scheme_id", + darkSchemeId: "dark_scheme_id", + defaultCalendar: "default_calendar", + digestAfterMinutes: "digest_after_minutes", + dynamicFavicon: "dynamic_favicon", + emailDigests: "email_digests", + emailInReplyTo: "email_in_reply_to", + emailLevel: "email_level", + emailMessagesLevel: "email_messages_level", + emailPreviousReplies: "email_previous_replies", + enableAllowedPmUsers: "enable_allowed_pm_users", + enableDefer: "enable_defer", + enableQuoting: "enable_quoting", + externalLinksInNewTab: "external_links_in_new_tab", + hideProfileAndPresence: "hide_profile_and_presence", + homepageId: "homepage_id", + includeTl0InDigests: "include_tl0_in_digests", + likeNotificationFrequency: "like_notification_frequency", + mailingListMode: "mailing_list_mode", + mailingListModeFrequency: "mailing_list_mode_frequency", + newTopicDurationMinutes: "new_topic_duration_minutes", + notificationLevelWhenReplying: "notification_level_when_replying", + oldestSearchLogDate: "oldest_search_log_date", + seenPopups: "seen_popups", + sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", + sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", + skipNewUserTips: "skip_new_user_tips", + textSize: "text_size", + textSizeSeq: "text_size_seq", + themeIds: "theme_ids", + themeKeySeq: "theme_key_seq", + titleCountMode: "title_count_mode", + userId: "user_id", + watchedPrecedenceOverMuted: "watched_precedence_over_muted", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdUserOption$ { - /** @deprecated use `GetUserExternalIdUserOption$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdUserOption$inboundSchema; - /** @deprecated use `GetUserExternalIdUserOption$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdUserOption$outboundSchema; - /** @deprecated use `GetUserExternalIdUserOption$Outbound` instead. */ - export type Outbound = GetUserExternalIdUserOption$Outbound; + /** @deprecated use `GetUserExternalIdUserOption$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdUserOption$inboundSchema; + /** @deprecated use `GetUserExternalIdUserOption$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdUserOption$outboundSchema; + /** @deprecated use `GetUserExternalIdUserOption$Outbound` instead. */ + export type Outbound = GetUserExternalIdUserOption$Outbound; } /** @internal */ export const GetUserExternalIdUser$inboundSchema: z.ZodType< - GetUserExternalIdUser, - z.ZodTypeDef, - unknown -> = z - .object({ - admin: z.boolean(), - allowed_pm_usernames: z.array(z.any()), - avatar_template: z.string(), - badge_count: z.number().int(), - can_be_deleted: z.boolean(), - can_change_bio: z.boolean(), - can_change_location: z.boolean(), - can_change_tracking_preferences: z.boolean(), - can_change_website: z.boolean(), - can_delete_all_posts: z.boolean(), - can_edit: z.boolean(), - can_edit_email: z.boolean(), - can_edit_name: z.boolean(), - can_edit_username: z.boolean(), - can_ignore_user: z.boolean(), - can_mute_user: z.boolean(), - can_send_private_message_to_user: z.boolean(), - can_send_private_messages: z.boolean(), - can_upload_profile_header: z.boolean(), - can_upload_user_card_background: z.boolean(), - created_at: z.string(), - custom_fields: z.lazy(() => GetUserExternalIdCustomFields$inboundSchema), - display_sidebar_tags: z.boolean().optional(), - featured_topic: z.nullable(z.string()), - featured_user_badge_ids: z.array(z.any()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - group_users: z.array(z.lazy(() => GetUserExternalIdGroupUsers$inboundSchema)), - groups: z.array(z.lazy(() => GetUserExternalIdGroups$inboundSchema)), - has_title_badges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignored_usernames: z.array(z.any()), - invited_by: z.nullable(z.string()), - last_posted_at: z.nullable(z.string()), - last_seen_at: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailing_list_posts_per_day: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - muted_category_ids: z.array(z.any()), - muted_tags: z.array(z.any()), - muted_usernames: z.array(z.any()), - name: z.string(), - pending_count: z.number().int(), - pending_posts_count: z.number().int().optional(), - post_count: z.number().int(), - primary_group_id: z.nullable(z.string()), - primary_group_name: z.nullable(z.string()), - profile_view_count: z.number().int(), - recent_time_read: z.number().int(), - regular_category_ids: z.array(z.any()), - second_factor_backup_enabled: z.boolean().optional(), - second_factor_enabled: z.boolean(), - sidebar_category_ids: z.array(z.any()).optional(), - sidebar_tags: z.array(z.any()).optional(), - staged: z.boolean(), - system_avatar_template: z.string(), - system_avatar_upload_id: z.nullable(z.string()), - time_read: z.number().int(), - title: z.nullable(z.string()), - tracked_category_ids: z.array(z.any()), - tracked_tags: z.array(z.any()), - trust_level: z.number().int(), - uploaded_avatar_id: z.nullable(z.string()), - use_logo_small_as_avatar: z.boolean(), - user_api_keys: z.nullable(z.string()), - user_auth_tokens: z.array(z.lazy(() => GetUserExternalIdUserAuthTokens$inboundSchema)), - user_fields: z.lazy(() => GetUserExternalIdUserFields$inboundSchema).optional(), - user_notification_schedule: z.lazy( - () => GetUserExternalIdUserNotificationSchedule$inboundSchema - ), - user_option: z.lazy(() => GetUserExternalIdUserOption$inboundSchema), - username: z.string(), - watched_category_ids: z.array(z.any()), - watched_first_post_category_ids: z.array(z.any()), - watched_tags: z.array(z.any()), - watching_first_post_tags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowed_pm_usernames: "allowedPmUsernames", - avatar_template: "avatarTemplate", - badge_count: "badgeCount", - can_be_deleted: "canBeDeleted", - can_change_bio: "canChangeBio", - can_change_location: "canChangeLocation", - can_change_tracking_preferences: "canChangeTrackingPreferences", - can_change_website: "canChangeWebsite", - can_delete_all_posts: "canDeleteAllPosts", - can_edit: "canEdit", - can_edit_email: "canEditEmail", - can_edit_name: "canEditName", - can_edit_username: "canEditUsername", - can_ignore_user: "canIgnoreUser", - can_mute_user: "canMuteUser", - can_send_private_message_to_user: "canSendPrivateMessageToUser", - can_send_private_messages: "canSendPrivateMessages", - can_upload_profile_header: "canUploadProfileHeader", - can_upload_user_card_background: "canUploadUserCardBackground", - created_at: "createdAt", - custom_fields: "customFields", - display_sidebar_tags: "displaySidebarTags", - featured_topic: "featuredTopic", - featured_user_badge_ids: "featuredUserBadgeIds", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - group_users: "groupUsers", - has_title_badges: "hasTitleBadges", - ignored_usernames: "ignoredUsernames", - invited_by: "invitedBy", - last_posted_at: "lastPostedAt", - last_seen_at: "lastSeenAt", - mailing_list_posts_per_day: "mailingListPostsPerDay", - muted_category_ids: "mutedCategoryIds", - muted_tags: "mutedTags", - muted_usernames: "mutedUsernames", - pending_count: "pendingCount", - pending_posts_count: "pendingPostsCount", - post_count: "postCount", - primary_group_id: "primaryGroupId", - primary_group_name: "primaryGroupName", - profile_view_count: "profileViewCount", - recent_time_read: "recentTimeRead", - regular_category_ids: "regularCategoryIds", - second_factor_backup_enabled: "secondFactorBackupEnabled", - second_factor_enabled: "secondFactorEnabled", - sidebar_category_ids: "sidebarCategoryIds", - sidebar_tags: "sidebarTags", - system_avatar_template: "systemAvatarTemplate", - system_avatar_upload_id: "systemAvatarUploadId", - time_read: "timeRead", - tracked_category_ids: "trackedCategoryIds", - tracked_tags: "trackedTags", - trust_level: "trustLevel", - uploaded_avatar_id: "uploadedAvatarId", - use_logo_small_as_avatar: "useLogoSmallAsAvatar", - user_api_keys: "userApiKeys", - user_auth_tokens: "userAuthTokens", - user_fields: "userFields", - user_notification_schedule: "userNotificationSchedule", - user_option: "userOption", - watched_category_ids: "watchedCategoryIds", - watched_first_post_category_ids: "watchedFirstPostCategoryIds", - watched_tags: "watchedTags", - watching_first_post_tags: "watchingFirstPostTags", - }); - }); + GetUserExternalIdUser, + z.ZodTypeDef, + unknown +> = z.object({ + admin: z.boolean(), + allowed_pm_usernames: z.array(z.any()), + avatar_template: z.string(), + badge_count: z.number().int(), + can_be_deleted: z.boolean(), + can_change_bio: z.boolean(), + can_change_location: z.boolean(), + can_change_tracking_preferences: z.boolean(), + can_change_website: z.boolean(), + can_delete_all_posts: z.boolean(), + can_edit: z.boolean(), + can_edit_email: z.boolean(), + can_edit_name: z.boolean(), + can_edit_username: z.boolean(), + can_ignore_user: z.boolean(), + can_mute_user: z.boolean(), + can_send_private_message_to_user: z.boolean(), + can_send_private_messages: z.boolean(), + can_upload_profile_header: z.boolean(), + can_upload_user_card_background: z.boolean(), + created_at: z.string(), + custom_fields: z.lazy(() => GetUserExternalIdCustomFields$inboundSchema), + display_sidebar_tags: z.boolean().optional(), + featured_topic: z.nullable(z.string()), + featured_user_badge_ids: z.array(z.any()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + group_users: z.array(z.lazy(() => GetUserExternalIdGroupUsers$inboundSchema)), + groups: z.array(z.lazy(() => GetUserExternalIdGroups$inboundSchema)), + has_title_badges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignored_usernames: z.array(z.any()), + invited_by: z.nullable(z.string()), + last_posted_at: z.nullable(z.string()), + last_seen_at: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailing_list_posts_per_day: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + muted_category_ids: z.array(z.any()), + muted_tags: z.array(z.any()), + muted_usernames: z.array(z.any()), + name: z.string(), + pending_count: z.number().int(), + pending_posts_count: z.number().int().optional(), + post_count: z.number().int(), + primary_group_id: z.nullable(z.string()), + primary_group_name: z.nullable(z.string()), + profile_view_count: z.number().int(), + recent_time_read: z.number().int(), + regular_category_ids: z.array(z.any()), + second_factor_backup_enabled: z.boolean().optional(), + second_factor_enabled: z.boolean(), + sidebar_category_ids: z.array(z.any()).optional(), + sidebar_tags: z.array(z.any()).optional(), + staged: z.boolean(), + system_avatar_template: z.string(), + system_avatar_upload_id: z.nullable(z.string()), + time_read: z.number().int(), + title: z.nullable(z.string()), + tracked_category_ids: z.array(z.any()), + tracked_tags: z.array(z.any()), + trust_level: z.number().int(), + uploaded_avatar_id: z.nullable(z.string()), + use_logo_small_as_avatar: z.boolean(), + user_api_keys: z.nullable(z.string()), + user_auth_tokens: z.array( + z.lazy(() => GetUserExternalIdUserAuthTokens$inboundSchema), + ), + user_fields: z.lazy(() => GetUserExternalIdUserFields$inboundSchema) + .optional(), + user_notification_schedule: z.lazy(() => + GetUserExternalIdUserNotificationSchedule$inboundSchema + ), + user_option: z.lazy(() => GetUserExternalIdUserOption$inboundSchema), + username: z.string(), + watched_category_ids: z.array(z.any()), + watched_first_post_category_ids: z.array(z.any()), + watched_tags: z.array(z.any()), + watching_first_post_tags: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "allowed_pm_usernames": "allowedPmUsernames", + "avatar_template": "avatarTemplate", + "badge_count": "badgeCount", + "can_be_deleted": "canBeDeleted", + "can_change_bio": "canChangeBio", + "can_change_location": "canChangeLocation", + "can_change_tracking_preferences": "canChangeTrackingPreferences", + "can_change_website": "canChangeWebsite", + "can_delete_all_posts": "canDeleteAllPosts", + "can_edit": "canEdit", + "can_edit_email": "canEditEmail", + "can_edit_name": "canEditName", + "can_edit_username": "canEditUsername", + "can_ignore_user": "canIgnoreUser", + "can_mute_user": "canMuteUser", + "can_send_private_message_to_user": "canSendPrivateMessageToUser", + "can_send_private_messages": "canSendPrivateMessages", + "can_upload_profile_header": "canUploadProfileHeader", + "can_upload_user_card_background": "canUploadUserCardBackground", + "created_at": "createdAt", + "custom_fields": "customFields", + "display_sidebar_tags": "displaySidebarTags", + "featured_topic": "featuredTopic", + "featured_user_badge_ids": "featuredUserBadgeIds", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "group_users": "groupUsers", + "has_title_badges": "hasTitleBadges", + "ignored_usernames": "ignoredUsernames", + "invited_by": "invitedBy", + "last_posted_at": "lastPostedAt", + "last_seen_at": "lastSeenAt", + "mailing_list_posts_per_day": "mailingListPostsPerDay", + "muted_category_ids": "mutedCategoryIds", + "muted_tags": "mutedTags", + "muted_usernames": "mutedUsernames", + "pending_count": "pendingCount", + "pending_posts_count": "pendingPostsCount", + "post_count": "postCount", + "primary_group_id": "primaryGroupId", + "primary_group_name": "primaryGroupName", + "profile_view_count": "profileViewCount", + "recent_time_read": "recentTimeRead", + "regular_category_ids": "regularCategoryIds", + "second_factor_backup_enabled": "secondFactorBackupEnabled", + "second_factor_enabled": "secondFactorEnabled", + "sidebar_category_ids": "sidebarCategoryIds", + "sidebar_tags": "sidebarTags", + "system_avatar_template": "systemAvatarTemplate", + "system_avatar_upload_id": "systemAvatarUploadId", + "time_read": "timeRead", + "tracked_category_ids": "trackedCategoryIds", + "tracked_tags": "trackedTags", + "trust_level": "trustLevel", + "uploaded_avatar_id": "uploadedAvatarId", + "use_logo_small_as_avatar": "useLogoSmallAsAvatar", + "user_api_keys": "userApiKeys", + "user_auth_tokens": "userAuthTokens", + "user_fields": "userFields", + "user_notification_schedule": "userNotificationSchedule", + "user_option": "userOption", + "watched_category_ids": "watchedCategoryIds", + "watched_first_post_category_ids": "watchedFirstPostCategoryIds", + "watched_tags": "watchedTags", + "watching_first_post_tags": "watchingFirstPostTags", + }); +}); /** @internal */ export type GetUserExternalIdUser$Outbound = { - admin: boolean; - allowed_pm_usernames: Array; - avatar_template: string; - badge_count: number; - can_be_deleted: boolean; - can_change_bio: boolean; - can_change_location: boolean; - can_change_tracking_preferences: boolean; - can_change_website: boolean; - can_delete_all_posts: boolean; - can_edit: boolean; - can_edit_email: boolean; - can_edit_name: boolean; - can_edit_username: boolean; - can_ignore_user: boolean; - can_mute_user: boolean; - can_send_private_message_to_user: boolean; - can_send_private_messages: boolean; - can_upload_profile_header: boolean; - can_upload_user_card_background: boolean; - created_at: string; - custom_fields: GetUserExternalIdCustomFields$Outbound; - display_sidebar_tags?: boolean | undefined; - featured_topic: string | null; - featured_user_badge_ids: Array; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id: string | null; - flair_name: string | null; - flair_url: string | null; - group_users: Array; - groups: Array; - has_title_badges: boolean; - id: number; - ignored: boolean; - ignored_usernames: Array; - invited_by: string | null; - last_posted_at: string | null; - last_seen_at: string | null; - locale: string | null; - mailing_list_posts_per_day: number; - moderator: boolean; - muted: boolean; - muted_category_ids: Array; - muted_tags: Array; - muted_usernames: Array; - name: string; - pending_count: number; - pending_posts_count?: number | undefined; - post_count: number; - primary_group_id: string | null; - primary_group_name: string | null; - profile_view_count: number; - recent_time_read: number; - regular_category_ids: Array; - second_factor_backup_enabled?: boolean | undefined; - second_factor_enabled: boolean; - sidebar_category_ids?: Array | undefined; - sidebar_tags?: Array | undefined; - staged: boolean; - system_avatar_template: string; - system_avatar_upload_id: string | null; - time_read: number; - title: string | null; - tracked_category_ids: Array; - tracked_tags: Array; - trust_level: number; - uploaded_avatar_id: string | null; - use_logo_small_as_avatar: boolean; - user_api_keys: string | null; - user_auth_tokens: Array; - user_fields?: GetUserExternalIdUserFields$Outbound | undefined; - user_notification_schedule: GetUserExternalIdUserNotificationSchedule$Outbound; - user_option: GetUserExternalIdUserOption$Outbound; - username: string; - watched_category_ids: Array; - watched_first_post_category_ids: Array; - watched_tags: Array; - watching_first_post_tags: Array; + admin: boolean; + allowed_pm_usernames: Array; + avatar_template: string; + badge_count: number; + can_be_deleted: boolean; + can_change_bio: boolean; + can_change_location: boolean; + can_change_tracking_preferences: boolean; + can_change_website: boolean; + can_delete_all_posts: boolean; + can_edit: boolean; + can_edit_email: boolean; + can_edit_name: boolean; + can_edit_username: boolean; + can_ignore_user: boolean; + can_mute_user: boolean; + can_send_private_message_to_user: boolean; + can_send_private_messages: boolean; + can_upload_profile_header: boolean; + can_upload_user_card_background: boolean; + created_at: string; + custom_fields: GetUserExternalIdCustomFields$Outbound; + display_sidebar_tags?: boolean | undefined; + featured_topic: string | null; + featured_user_badge_ids: Array; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id: string | null; + flair_name: string | null; + flair_url: string | null; + group_users: Array; + groups: Array; + has_title_badges: boolean; + id: number; + ignored: boolean; + ignored_usernames: Array; + invited_by: string | null; + last_posted_at: string | null; + last_seen_at: string | null; + locale: string | null; + mailing_list_posts_per_day: number; + moderator: boolean; + muted: boolean; + muted_category_ids: Array; + muted_tags: Array; + muted_usernames: Array; + name: string; + pending_count: number; + pending_posts_count?: number | undefined; + post_count: number; + primary_group_id: string | null; + primary_group_name: string | null; + profile_view_count: number; + recent_time_read: number; + regular_category_ids: Array; + second_factor_backup_enabled?: boolean | undefined; + second_factor_enabled: boolean; + sidebar_category_ids?: Array | undefined; + sidebar_tags?: Array | undefined; + staged: boolean; + system_avatar_template: string; + system_avatar_upload_id: string | null; + time_read: number; + title: string | null; + tracked_category_ids: Array; + tracked_tags: Array; + trust_level: number; + uploaded_avatar_id: string | null; + use_logo_small_as_avatar: boolean; + user_api_keys: string | null; + user_auth_tokens: Array; + user_fields?: GetUserExternalIdUserFields$Outbound | undefined; + user_notification_schedule: + GetUserExternalIdUserNotificationSchedule$Outbound; + user_option: GetUserExternalIdUserOption$Outbound; + username: string; + watched_category_ids: Array; + watched_first_post_category_ids: Array; + watched_tags: Array; + watching_first_post_tags: Array; }; /** @internal */ export const GetUserExternalIdUser$outboundSchema: z.ZodType< - GetUserExternalIdUser$Outbound, - z.ZodTypeDef, - GetUserExternalIdUser -> = z - .object({ - admin: z.boolean(), - allowedPmUsernames: z.array(z.any()), - avatarTemplate: z.string(), - badgeCount: z.number().int(), - canBeDeleted: z.boolean(), - canChangeBio: z.boolean(), - canChangeLocation: z.boolean(), - canChangeTrackingPreferences: z.boolean(), - canChangeWebsite: z.boolean(), - canDeleteAllPosts: z.boolean(), - canEdit: z.boolean(), - canEditEmail: z.boolean(), - canEditName: z.boolean(), - canEditUsername: z.boolean(), - canIgnoreUser: z.boolean(), - canMuteUser: z.boolean(), - canSendPrivateMessageToUser: z.boolean(), - canSendPrivateMessages: z.boolean(), - canUploadProfileHeader: z.boolean(), - canUploadUserCardBackground: z.boolean(), - createdAt: z.string(), - customFields: z.lazy(() => GetUserExternalIdCustomFields$outboundSchema), - displaySidebarTags: z.boolean().optional(), - featuredTopic: z.nullable(z.string()), - featuredUserBadgeIds: z.array(z.any()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - groupUsers: z.array(z.lazy(() => GetUserExternalIdGroupUsers$outboundSchema)), - groups: z.array(z.lazy(() => GetUserExternalIdGroups$outboundSchema)), - hasTitleBadges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignoredUsernames: z.array(z.any()), - invitedBy: z.nullable(z.string()), - lastPostedAt: z.nullable(z.string()), - lastSeenAt: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailingListPostsPerDay: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - mutedCategoryIds: z.array(z.any()), - mutedTags: z.array(z.any()), - mutedUsernames: z.array(z.any()), - name: z.string(), - pendingCount: z.number().int(), - pendingPostsCount: z.number().int().optional(), - postCount: z.number().int(), - primaryGroupId: z.nullable(z.string()), - primaryGroupName: z.nullable(z.string()), - profileViewCount: z.number().int(), - recentTimeRead: z.number().int(), - regularCategoryIds: z.array(z.any()), - secondFactorBackupEnabled: z.boolean().optional(), - secondFactorEnabled: z.boolean(), - sidebarCategoryIds: z.array(z.any()).optional(), - sidebarTags: z.array(z.any()).optional(), - staged: z.boolean(), - systemAvatarTemplate: z.string(), - systemAvatarUploadId: z.nullable(z.string()), - timeRead: z.number().int(), - title: z.nullable(z.string()), - trackedCategoryIds: z.array(z.any()), - trackedTags: z.array(z.any()), - trustLevel: z.number().int(), - uploadedAvatarId: z.nullable(z.string()), - useLogoSmallAsAvatar: z.boolean(), - userApiKeys: z.nullable(z.string()), - userAuthTokens: z.array(z.lazy(() => GetUserExternalIdUserAuthTokens$outboundSchema)), - userFields: z.lazy(() => GetUserExternalIdUserFields$outboundSchema).optional(), - userNotificationSchedule: z.lazy( - () => GetUserExternalIdUserNotificationSchedule$outboundSchema - ), - userOption: z.lazy(() => GetUserExternalIdUserOption$outboundSchema), - username: z.string(), - watchedCategoryIds: z.array(z.any()), - watchedFirstPostCategoryIds: z.array(z.any()), - watchedTags: z.array(z.any()), - watchingFirstPostTags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowedPmUsernames: "allowed_pm_usernames", - avatarTemplate: "avatar_template", - badgeCount: "badge_count", - canBeDeleted: "can_be_deleted", - canChangeBio: "can_change_bio", - canChangeLocation: "can_change_location", - canChangeTrackingPreferences: "can_change_tracking_preferences", - canChangeWebsite: "can_change_website", - canDeleteAllPosts: "can_delete_all_posts", - canEdit: "can_edit", - canEditEmail: "can_edit_email", - canEditName: "can_edit_name", - canEditUsername: "can_edit_username", - canIgnoreUser: "can_ignore_user", - canMuteUser: "can_mute_user", - canSendPrivateMessageToUser: "can_send_private_message_to_user", - canSendPrivateMessages: "can_send_private_messages", - canUploadProfileHeader: "can_upload_profile_header", - canUploadUserCardBackground: "can_upload_user_card_background", - createdAt: "created_at", - customFields: "custom_fields", - displaySidebarTags: "display_sidebar_tags", - featuredTopic: "featured_topic", - featuredUserBadgeIds: "featured_user_badge_ids", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - groupUsers: "group_users", - hasTitleBadges: "has_title_badges", - ignoredUsernames: "ignored_usernames", - invitedBy: "invited_by", - lastPostedAt: "last_posted_at", - lastSeenAt: "last_seen_at", - mailingListPostsPerDay: "mailing_list_posts_per_day", - mutedCategoryIds: "muted_category_ids", - mutedTags: "muted_tags", - mutedUsernames: "muted_usernames", - pendingCount: "pending_count", - pendingPostsCount: "pending_posts_count", - postCount: "post_count", - primaryGroupId: "primary_group_id", - primaryGroupName: "primary_group_name", - profileViewCount: "profile_view_count", - recentTimeRead: "recent_time_read", - regularCategoryIds: "regular_category_ids", - secondFactorBackupEnabled: "second_factor_backup_enabled", - secondFactorEnabled: "second_factor_enabled", - sidebarCategoryIds: "sidebar_category_ids", - sidebarTags: "sidebar_tags", - systemAvatarTemplate: "system_avatar_template", - systemAvatarUploadId: "system_avatar_upload_id", - timeRead: "time_read", - trackedCategoryIds: "tracked_category_ids", - trackedTags: "tracked_tags", - trustLevel: "trust_level", - uploadedAvatarId: "uploaded_avatar_id", - useLogoSmallAsAvatar: "use_logo_small_as_avatar", - userApiKeys: "user_api_keys", - userAuthTokens: "user_auth_tokens", - userFields: "user_fields", - userNotificationSchedule: "user_notification_schedule", - userOption: "user_option", - watchedCategoryIds: "watched_category_ids", - watchedFirstPostCategoryIds: "watched_first_post_category_ids", - watchedTags: "watched_tags", - watchingFirstPostTags: "watching_first_post_tags", - }); - }); + GetUserExternalIdUser$Outbound, + z.ZodTypeDef, + GetUserExternalIdUser +> = z.object({ + admin: z.boolean(), + allowedPmUsernames: z.array(z.any()), + avatarTemplate: z.string(), + badgeCount: z.number().int(), + canBeDeleted: z.boolean(), + canChangeBio: z.boolean(), + canChangeLocation: z.boolean(), + canChangeTrackingPreferences: z.boolean(), + canChangeWebsite: z.boolean(), + canDeleteAllPosts: z.boolean(), + canEdit: z.boolean(), + canEditEmail: z.boolean(), + canEditName: z.boolean(), + canEditUsername: z.boolean(), + canIgnoreUser: z.boolean(), + canMuteUser: z.boolean(), + canSendPrivateMessageToUser: z.boolean(), + canSendPrivateMessages: z.boolean(), + canUploadProfileHeader: z.boolean(), + canUploadUserCardBackground: z.boolean(), + createdAt: z.string(), + customFields: z.lazy(() => GetUserExternalIdCustomFields$outboundSchema), + displaySidebarTags: z.boolean().optional(), + featuredTopic: z.nullable(z.string()), + featuredUserBadgeIds: z.array(z.any()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + groupUsers: z.array(z.lazy(() => GetUserExternalIdGroupUsers$outboundSchema)), + groups: z.array(z.lazy(() => GetUserExternalIdGroups$outboundSchema)), + hasTitleBadges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignoredUsernames: z.array(z.any()), + invitedBy: z.nullable(z.string()), + lastPostedAt: z.nullable(z.string()), + lastSeenAt: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailingListPostsPerDay: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + mutedCategoryIds: z.array(z.any()), + mutedTags: z.array(z.any()), + mutedUsernames: z.array(z.any()), + name: z.string(), + pendingCount: z.number().int(), + pendingPostsCount: z.number().int().optional(), + postCount: z.number().int(), + primaryGroupId: z.nullable(z.string()), + primaryGroupName: z.nullable(z.string()), + profileViewCount: z.number().int(), + recentTimeRead: z.number().int(), + regularCategoryIds: z.array(z.any()), + secondFactorBackupEnabled: z.boolean().optional(), + secondFactorEnabled: z.boolean(), + sidebarCategoryIds: z.array(z.any()).optional(), + sidebarTags: z.array(z.any()).optional(), + staged: z.boolean(), + systemAvatarTemplate: z.string(), + systemAvatarUploadId: z.nullable(z.string()), + timeRead: z.number().int(), + title: z.nullable(z.string()), + trackedCategoryIds: z.array(z.any()), + trackedTags: z.array(z.any()), + trustLevel: z.number().int(), + uploadedAvatarId: z.nullable(z.string()), + useLogoSmallAsAvatar: z.boolean(), + userApiKeys: z.nullable(z.string()), + userAuthTokens: z.array( + z.lazy(() => GetUserExternalIdUserAuthTokens$outboundSchema), + ), + userFields: z.lazy(() => GetUserExternalIdUserFields$outboundSchema) + .optional(), + userNotificationSchedule: z.lazy(() => + GetUserExternalIdUserNotificationSchedule$outboundSchema + ), + userOption: z.lazy(() => GetUserExternalIdUserOption$outboundSchema), + username: z.string(), + watchedCategoryIds: z.array(z.any()), + watchedFirstPostCategoryIds: z.array(z.any()), + watchedTags: z.array(z.any()), + watchingFirstPostTags: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + allowedPmUsernames: "allowed_pm_usernames", + avatarTemplate: "avatar_template", + badgeCount: "badge_count", + canBeDeleted: "can_be_deleted", + canChangeBio: "can_change_bio", + canChangeLocation: "can_change_location", + canChangeTrackingPreferences: "can_change_tracking_preferences", + canChangeWebsite: "can_change_website", + canDeleteAllPosts: "can_delete_all_posts", + canEdit: "can_edit", + canEditEmail: "can_edit_email", + canEditName: "can_edit_name", + canEditUsername: "can_edit_username", + canIgnoreUser: "can_ignore_user", + canMuteUser: "can_mute_user", + canSendPrivateMessageToUser: "can_send_private_message_to_user", + canSendPrivateMessages: "can_send_private_messages", + canUploadProfileHeader: "can_upload_profile_header", + canUploadUserCardBackground: "can_upload_user_card_background", + createdAt: "created_at", + customFields: "custom_fields", + displaySidebarTags: "display_sidebar_tags", + featuredTopic: "featured_topic", + featuredUserBadgeIds: "featured_user_badge_ids", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + groupUsers: "group_users", + hasTitleBadges: "has_title_badges", + ignoredUsernames: "ignored_usernames", + invitedBy: "invited_by", + lastPostedAt: "last_posted_at", + lastSeenAt: "last_seen_at", + mailingListPostsPerDay: "mailing_list_posts_per_day", + mutedCategoryIds: "muted_category_ids", + mutedTags: "muted_tags", + mutedUsernames: "muted_usernames", + pendingCount: "pending_count", + pendingPostsCount: "pending_posts_count", + postCount: "post_count", + primaryGroupId: "primary_group_id", + primaryGroupName: "primary_group_name", + profileViewCount: "profile_view_count", + recentTimeRead: "recent_time_read", + regularCategoryIds: "regular_category_ids", + secondFactorBackupEnabled: "second_factor_backup_enabled", + secondFactorEnabled: "second_factor_enabled", + sidebarCategoryIds: "sidebar_category_ids", + sidebarTags: "sidebar_tags", + systemAvatarTemplate: "system_avatar_template", + systemAvatarUploadId: "system_avatar_upload_id", + timeRead: "time_read", + trackedCategoryIds: "tracked_category_ids", + trackedTags: "tracked_tags", + trustLevel: "trust_level", + uploadedAvatarId: "uploaded_avatar_id", + useLogoSmallAsAvatar: "use_logo_small_as_avatar", + userApiKeys: "user_api_keys", + userAuthTokens: "user_auth_tokens", + userFields: "user_fields", + userNotificationSchedule: "user_notification_schedule", + userOption: "user_option", + watchedCategoryIds: "watched_category_ids", + watchedFirstPostCategoryIds: "watched_first_post_category_ids", + watchedTags: "watched_tags", + watchingFirstPostTags: "watching_first_post_tags", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdUser$ { - /** @deprecated use `GetUserExternalIdUser$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdUser$inboundSchema; - /** @deprecated use `GetUserExternalIdUser$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdUser$outboundSchema; - /** @deprecated use `GetUserExternalIdUser$Outbound` instead. */ - export type Outbound = GetUserExternalIdUser$Outbound; + /** @deprecated use `GetUserExternalIdUser$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdUser$inboundSchema; + /** @deprecated use `GetUserExternalIdUser$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdUser$outboundSchema; + /** @deprecated use `GetUserExternalIdUser$Outbound` instead. */ + export type Outbound = GetUserExternalIdUser$Outbound; } /** @internal */ export const GetUserExternalIdResponseBody$inboundSchema: z.ZodType< - GetUserExternalIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - user: z.lazy(() => GetUserExternalIdUser$inboundSchema), - user_badges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - user_badges: "userBadges", - }); - }); + GetUserExternalIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + user: z.lazy(() => GetUserExternalIdUser$inboundSchema), + user_badges: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "user_badges": "userBadges", + }); +}); /** @internal */ export type GetUserExternalIdResponseBody$Outbound = { - user: GetUserExternalIdUser$Outbound; - user_badges: Array; + user: GetUserExternalIdUser$Outbound; + user_badges: Array; }; /** @internal */ export const GetUserExternalIdResponseBody$outboundSchema: z.ZodType< - GetUserExternalIdResponseBody$Outbound, - z.ZodTypeDef, - GetUserExternalIdResponseBody -> = z - .object({ - user: z.lazy(() => GetUserExternalIdUser$outboundSchema), - userBadges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - userBadges: "user_badges", - }); - }); + GetUserExternalIdResponseBody$Outbound, + z.ZodTypeDef, + GetUserExternalIdResponseBody +> = z.object({ + user: z.lazy(() => GetUserExternalIdUser$outboundSchema), + userBadges: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + userBadges: "user_badges", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserExternalIdResponseBody$ { - /** @deprecated use `GetUserExternalIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserExternalIdResponseBody$inboundSchema; - /** @deprecated use `GetUserExternalIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserExternalIdResponseBody$outboundSchema; - /** @deprecated use `GetUserExternalIdResponseBody$Outbound` instead. */ - export type Outbound = GetUserExternalIdResponseBody$Outbound; + /** @deprecated use `GetUserExternalIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUserExternalIdResponseBody$inboundSchema; + /** @deprecated use `GetUserExternalIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUserExternalIdResponseBody$outboundSchema; + /** @deprecated use `GetUserExternalIdResponseBody$Outbound` instead. */ + export type Outbound = GetUserExternalIdResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getuseridentiyproviderexternalid.ts b/src/sdk/models/operations/getuseridentiyproviderexternalid.ts index b8a93e6..c0b852e 100644 --- a/src/sdk/models/operations/getuseridentiyproviderexternalid.ts +++ b/src/sdk/models/operations/getuseridentiyproviderexternalid.ts @@ -2,758 +2,750 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserIdentiyProviderExternalIdRequest = { - apiKey: string; - apiUsername: string; - externalId: string; - /** - * Authentication provider name. Can be found in the provider callback URL: `/auth/{provider}/callback` - */ - provider: string; + apiKey: string; + apiUsername: string; + externalId: string; + /** + * Authentication provider name. Can be found in the provider callback URL: `/auth/{provider}/callback` + */ + provider: string; }; export type GetUserIdentiyProviderExternalIdCustomFields = { - firstName?: string | null | undefined; + firstName?: string | null | undefined; }; export type GetUserIdentiyProviderExternalIdGroupUsers = { - groupId: number; - notificationLevel: number; - owner?: boolean | undefined; - userId: number; + groupId: number; + notificationLevel: number; + owner?: boolean | undefined; + userId: number; }; export type GetUserIdentiyProviderExternalIdGroups = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canSeeMembers: boolean; - defaultNotificationLevel: number; - displayName: string; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canSeeMembers: boolean; + defaultNotificationLevel: number; + displayName: string; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; export type GetUserIdentiyProviderExternalIdUserAuthTokens = { - browser: string; - clientIp: string; - createdAt: string; - device: string; - icon: string; - id: number; - isActive: boolean; - location: string; - os: string; - seenAt: string; + browser: string; + clientIp: string; + createdAt: string; + device: string; + icon: string; + id: number; + isActive: boolean; + location: string; + os: string; + seenAt: string; }; export type GetUserIdentiyProviderExternalIdUserFields = { - one: string | null; - two: string | null; + one: string | null; + two: string | null; }; export type GetUserIdentiyProviderExternalIdUserNotificationSchedule = { - day0EndTime: number; - day0StartTime: number; - day1EndTime: number; - day1StartTime: number; - day2EndTime: number; - day2StartTime: number; - day3EndTime: number; - day3StartTime: number; - day4EndTime: number; - day4StartTime: number; - day5EndTime: number; - day5StartTime: number; - day6EndTime: number; - day6StartTime: number; - enabled: boolean; + day0EndTime: number; + day0StartTime: number; + day1EndTime: number; + day1StartTime: number; + day2EndTime: number; + day2StartTime: number; + day3EndTime: number; + day3StartTime: number; + day4EndTime: number; + day4StartTime: number; + day5EndTime: number; + day5StartTime: number; + day6EndTime: number; + day6StartTime: number; + enabled: boolean; }; export type GetUserIdentiyProviderExternalIdUserOption = { - allowPrivateMessages: boolean; - autoTrackTopicsAfterMsecs: number; - automaticallyUnpinTopics: boolean; - bookmarkAutoDeletePreference?: number | undefined; - colorSchemeId: string | null; - darkSchemeId: string | null; - defaultCalendar?: string | undefined; - digestAfterMinutes: number; - dynamicFavicon: boolean; - emailDigests: boolean; - emailInReplyTo: boolean; - emailLevel: number; - emailMessagesLevel: number; - emailPreviousReplies: number; - enableAllowedPmUsers: boolean; - enableDefer: boolean; - enableQuoting: boolean; - externalLinksInNewTab: boolean; - hideProfileAndPresence: boolean; - homepageId: string | null; - includeTl0InDigests: boolean; - likeNotificationFrequency: number; - mailingListMode: boolean; - mailingListModeFrequency: number; - newTopicDurationMinutes: number; - notificationLevelWhenReplying: number; - oldestSearchLogDate?: string | null | undefined; - seenPopups?: Array | null | undefined; - sidebarLinkToFilteredList?: boolean | undefined; - sidebarShowCountOfNewItems?: boolean | undefined; - skipNewUserTips: boolean; - textSize: string; - textSizeSeq: number; - themeIds: Array; - themeKeySeq: number; - timezone: string | null; - titleCountMode: string; - userId: number; - watchedPrecedenceOverMuted?: boolean | null | undefined; + allowPrivateMessages: boolean; + autoTrackTopicsAfterMsecs: number; + automaticallyUnpinTopics: boolean; + bookmarkAutoDeletePreference?: number | undefined; + colorSchemeId: string | null; + darkSchemeId: string | null; + defaultCalendar?: string | undefined; + digestAfterMinutes: number; + dynamicFavicon: boolean; + emailDigests: boolean; + emailInReplyTo: boolean; + emailLevel: number; + emailMessagesLevel: number; + emailPreviousReplies: number; + enableAllowedPmUsers: boolean; + enableDefer: boolean; + enableQuoting: boolean; + externalLinksInNewTab: boolean; + hideProfileAndPresence: boolean; + homepageId: string | null; + includeTl0InDigests: boolean; + likeNotificationFrequency: number; + mailingListMode: boolean; + mailingListModeFrequency: number; + newTopicDurationMinutes: number; + notificationLevelWhenReplying: number; + oldestSearchLogDate?: string | null | undefined; + seenPopups?: Array | null | undefined; + sidebarLinkToFilteredList?: boolean | undefined; + sidebarShowCountOfNewItems?: boolean | undefined; + skipNewUserTips: boolean; + textSize: string; + textSizeSeq: number; + themeIds: Array; + themeKeySeq: number; + timezone: string | null; + titleCountMode: string; + userId: number; + watchedPrecedenceOverMuted?: boolean | null | undefined; }; export type GetUserIdentiyProviderExternalIdUser = { - admin: boolean; - allowedPmUsernames: Array; - avatarTemplate: string; - badgeCount: number; - canBeDeleted: boolean; - canChangeBio: boolean; - canChangeLocation: boolean; - canChangeTrackingPreferences: boolean; - canChangeWebsite: boolean; - canDeleteAllPosts: boolean; - canEdit: boolean; - canEditEmail: boolean; - canEditName: boolean; - canEditUsername: boolean; - canIgnoreUser: boolean; - canMuteUser: boolean; - canSendPrivateMessageToUser: boolean; - canSendPrivateMessages: boolean; - canUploadProfileHeader: boolean; - canUploadUserCardBackground: boolean; - createdAt: string; - customFields: GetUserIdentiyProviderExternalIdCustomFields; - displaySidebarTags?: boolean | undefined; - featuredTopic: string | null; - featuredUserBadgeIds: Array; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId: string | null; - flairName: string | null; - flairUrl: string | null; - groupUsers: Array; - groups: Array; - hasTitleBadges: boolean; - id: number; - ignored: boolean; - ignoredUsernames: Array; - invitedBy: string | null; - lastPostedAt: string | null; - lastSeenAt: string | null; - locale: string | null; - mailingListPostsPerDay: number; - moderator: boolean; - muted: boolean; - mutedCategoryIds: Array; - mutedTags: Array; - mutedUsernames: Array; - name: string; - pendingCount: number; - pendingPostsCount?: number | undefined; - postCount: number; - primaryGroupId: string | null; - primaryGroupName: string | null; - profileViewCount: number; - recentTimeRead: number; - regularCategoryIds: Array; - secondFactorBackupEnabled?: boolean | undefined; - secondFactorEnabled: boolean; - sidebarCategoryIds?: Array | undefined; - sidebarTags?: Array | undefined; - staged: boolean; - systemAvatarTemplate: string; - systemAvatarUploadId: string | null; - timeRead: number; - title: string | null; - trackedCategoryIds: Array; - trackedTags: Array; - trustLevel: number; - uploadedAvatarId: string | null; - useLogoSmallAsAvatar: boolean; - userApiKeys: string | null; - userAuthTokens: Array; - userFields?: GetUserIdentiyProviderExternalIdUserFields | undefined; - userNotificationSchedule: GetUserIdentiyProviderExternalIdUserNotificationSchedule; - userOption: GetUserIdentiyProviderExternalIdUserOption; - username: string; - watchedCategoryIds: Array; - watchedFirstPostCategoryIds: Array; - watchedTags: Array; - watchingFirstPostTags: Array; + admin: boolean; + allowedPmUsernames: Array; + avatarTemplate: string; + badgeCount: number; + canBeDeleted: boolean; + canChangeBio: boolean; + canChangeLocation: boolean; + canChangeTrackingPreferences: boolean; + canChangeWebsite: boolean; + canDeleteAllPosts: boolean; + canEdit: boolean; + canEditEmail: boolean; + canEditName: boolean; + canEditUsername: boolean; + canIgnoreUser: boolean; + canMuteUser: boolean; + canSendPrivateMessageToUser: boolean; + canSendPrivateMessages: boolean; + canUploadProfileHeader: boolean; + canUploadUserCardBackground: boolean; + createdAt: string; + customFields: GetUserIdentiyProviderExternalIdCustomFields; + displaySidebarTags?: boolean | undefined; + featuredTopic: string | null; + featuredUserBadgeIds: Array; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId: string | null; + flairName: string | null; + flairUrl: string | null; + groupUsers: Array; + groups: Array; + hasTitleBadges: boolean; + id: number; + ignored: boolean; + ignoredUsernames: Array; + invitedBy: string | null; + lastPostedAt: string | null; + lastSeenAt: string | null; + locale: string | null; + mailingListPostsPerDay: number; + moderator: boolean; + muted: boolean; + mutedCategoryIds: Array; + mutedTags: Array; + mutedUsernames: Array; + name: string; + pendingCount: number; + pendingPostsCount?: number | undefined; + postCount: number; + primaryGroupId: string | null; + primaryGroupName: string | null; + profileViewCount: number; + recentTimeRead: number; + regularCategoryIds: Array; + secondFactorBackupEnabled?: boolean | undefined; + secondFactorEnabled: boolean; + sidebarCategoryIds?: Array | undefined; + sidebarTags?: Array | undefined; + staged: boolean; + systemAvatarTemplate: string; + systemAvatarUploadId: string | null; + timeRead: number; + title: string | null; + trackedCategoryIds: Array; + trackedTags: Array; + trustLevel: number; + uploadedAvatarId: string | null; + useLogoSmallAsAvatar: boolean; + userApiKeys: string | null; + userAuthTokens: Array; + userFields?: GetUserIdentiyProviderExternalIdUserFields | undefined; + userNotificationSchedule: + GetUserIdentiyProviderExternalIdUserNotificationSchedule; + userOption: GetUserIdentiyProviderExternalIdUserOption; + username: string; + watchedCategoryIds: Array; + watchedFirstPostCategoryIds: Array; + watchedTags: Array; + watchingFirstPostTags: Array; }; /** * user response */ export type GetUserIdentiyProviderExternalIdResponseBody = { - user: GetUserIdentiyProviderExternalIdUser; - userBadges: Array; + user: GetUserIdentiyProviderExternalIdUser; + userBadges: Array; }; /** @internal */ export const GetUserIdentiyProviderExternalIdRequest$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - external_id: z.string(), - provider: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - external_id: "externalId", - }); - }); + GetUserIdentiyProviderExternalIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + external_id: z.string(), + provider: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "external_id": "externalId", + }); +}); /** @internal */ export type GetUserIdentiyProviderExternalIdRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - external_id: string; - provider: string; + "Api-Key": string; + "Api-Username": string; + external_id: string; + provider: string; }; /** @internal */ export const GetUserIdentiyProviderExternalIdRequest$outboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdRequest$Outbound, - z.ZodTypeDef, - GetUserIdentiyProviderExternalIdRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - externalId: z.string(), - provider: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - externalId: "external_id", - }); - }); + GetUserIdentiyProviderExternalIdRequest$Outbound, + z.ZodTypeDef, + GetUserIdentiyProviderExternalIdRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + externalId: z.string(), + provider: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + externalId: "external_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdRequest$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdRequest$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdRequest$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdRequest$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdRequest$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdRequest$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdRequest$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdRequest$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdCustomFields$inboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdCustomFields$inboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdCustomFields, z.ZodTypeDef, unknown -> = z - .object({ - first_name: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - first_name: "firstName", - }); + > = z.object({ + first_name: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + "first_name": "firstName", }); + }); /** @internal */ export type GetUserIdentiyProviderExternalIdCustomFields$Outbound = { - first_name?: string | null | undefined; + first_name?: string | null | undefined; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdCustomFields$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdCustomFields$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdCustomFields$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdCustomFields -> = z - .object({ - firstName: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - firstName: "first_name", - }); + > = z.object({ + firstName: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + firstName: "first_name", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdCustomFields$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdCustomFields$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdCustomFields$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdCustomFields$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdCustomFields$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdCustomFields$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdCustomFields$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdCustomFields$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdGroupUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - group_id: z.number().int(), - notification_level: z.number().int(), - owner: z.boolean().optional(), - user_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_id: "groupId", - notification_level: "notificationLevel", - user_id: "userId", - }); +export const GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema: + z.ZodType = + z.object({ + group_id: z.number().int(), + notification_level: z.number().int(), + owner: z.boolean().optional(), + user_id: z.number().int(), + }).transform((v) => { + return remap$(v, { + "group_id": "groupId", + "notification_level": "notificationLevel", + "user_id": "userId", + }); }); /** @internal */ export type GetUserIdentiyProviderExternalIdGroupUsers$Outbound = { - group_id: number; - notification_level: number; - owner?: boolean | undefined; - user_id: number; + group_id: number; + notification_level: number; + owner?: boolean | undefined; + user_id: number; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdGroupUsers$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdGroupUsers -> = z - .object({ - groupId: z.number().int(), - notificationLevel: z.number().int(), - owner: z.boolean().optional(), - userId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupId: "group_id", - notificationLevel: "notification_level", - userId: "user_id", - }); + > = z.object({ + groupId: z.number().int(), + notificationLevel: z.number().int(), + owner: z.boolean().optional(), + userId: z.number().int(), + }).transform((v) => { + return remap$(v, { + groupId: "group_id", + notificationLevel: "notification_level", + userId: "user_id", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdGroupUsers$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdGroupUsers$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroupUsers$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdGroupUsers$Outbound; } /** @internal */ export const GetUserIdentiyProviderExternalIdGroups$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - display_name: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - display_name: "displayName", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); - }); + GetUserIdentiyProviderExternalIdGroups, + z.ZodTypeDef, + unknown +> = z.object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + display_name: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), +}).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "display_name": "displayName", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", + }); +}); /** @internal */ export type GetUserIdentiyProviderExternalIdGroups$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_see_members: boolean; - default_notification_level: number; - display_name: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_see_members: boolean; + default_notification_level: number; + display_name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ export const GetUserIdentiyProviderExternalIdGroups$outboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdGroups$Outbound, - z.ZodTypeDef, - GetUserIdentiyProviderExternalIdGroups -> = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - displayName: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - displayName: "display_name", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); + GetUserIdentiyProviderExternalIdGroups$Outbound, + z.ZodTypeDef, + GetUserIdentiyProviderExternalIdGroups +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + displayName: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + displayName: "display_name", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdGroups$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdGroups$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdGroups$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdGroups$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdGroups$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdGroups$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdGroups$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdGroups$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserAuthTokens, z.ZodTypeDef, unknown -> = z - .object({ - browser: z.string(), - client_ip: z.string(), - created_at: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - is_active: z.boolean(), - location: z.string(), - os: z.string(), - seen_at: z.string(), - }) - .transform((v) => { - return remap$(v, { - client_ip: "clientIp", - created_at: "createdAt", - is_active: "isActive", - seen_at: "seenAt", - }); + > = z.object({ + browser: z.string(), + client_ip: z.string(), + created_at: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + is_active: z.boolean(), + location: z.string(), + os: z.string(), + seen_at: z.string(), + }).transform((v) => { + return remap$(v, { + "client_ip": "clientIp", + "created_at": "createdAt", + "is_active": "isActive", + "seen_at": "seenAt", }); + }); /** @internal */ export type GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound = { - browser: string; - client_ip: string; - created_at: string; - device: string; - icon: string; - id: number; - is_active: boolean; - location: string; - os: string; - seen_at: string; + browser: string; + client_ip: string; + created_at: string; + device: string; + icon: string; + id: number; + is_active: boolean; + location: string; + os: string; + seen_at: string; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdUserAuthTokens -> = z - .object({ - browser: z.string(), - clientIp: z.string(), - createdAt: z.string(), - device: z.string(), - icon: z.string(), - id: z.number().int(), - isActive: z.boolean(), - location: z.string(), - os: z.string(), - seenAt: z.string(), - }) - .transform((v) => { - return remap$(v, { - clientIp: "client_ip", - createdAt: "created_at", - isActive: "is_active", - seenAt: "seen_at", - }); + > = z.object({ + browser: z.string(), + clientIp: z.string(), + createdAt: z.string(), + device: z.string(), + icon: z.string(), + id: z.number().int(), + isActive: z.boolean(), + location: z.string(), + os: z.string(), + seenAt: z.string(), + }).transform((v) => { + return remap$(v, { + clientIp: "client_ip", + createdAt: "created_at", + isActive: "is_active", + seenAt: "seen_at", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdUserAuthTokens$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound` instead. */ + export type Outbound = + GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdUserFields$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdUserFields, - z.ZodTypeDef, - unknown -> = z - .object({ - "1": z.nullable(z.string()), - "2": z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - "1": "one", - "2": "two", - }); +export const GetUserIdentiyProviderExternalIdUserFields$inboundSchema: + z.ZodType = + z.object({ + "1": z.nullable(z.string()), + "2": z.nullable(z.string()), + }).transform((v) => { + return remap$(v, { + "1": "one", + "2": "two", + }); }); /** @internal */ export type GetUserIdentiyProviderExternalIdUserFields$Outbound = { - "1": string | null; - "2": string | null; + "1": string | null; + "2": string | null; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdUserFields$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserFields$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserFields$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdUserFields -> = z - .object({ - one: z.nullable(z.string()), - two: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - one: "1", - two: "2", - }); + > = z.object({ + one: z.nullable(z.string()), + two: z.nullable(z.string()), + }).transform((v) => { + return remap$(v, { + one: "1", + two: "2", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdUserFields$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdUserFields$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdUserFields$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdUserFields$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdUserFields$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdUserFields$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserFields$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdUserFields$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserNotificationSchedule, z.ZodTypeDef, unknown -> = z - .object({ - day_0_end_time: z.number().int(), - day_0_start_time: z.number().int(), - day_1_end_time: z.number().int(), - day_1_start_time: z.number().int(), - day_2_end_time: z.number().int(), - day_2_start_time: z.number().int(), - day_3_end_time: z.number().int(), - day_3_start_time: z.number().int(), - day_4_end_time: z.number().int(), - day_4_start_time: z.number().int(), - day_5_end_time: z.number().int(), - day_5_start_time: z.number().int(), - day_6_end_time: z.number().int(), - day_6_start_time: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day_0_end_time: "day0EndTime", - day_0_start_time: "day0StartTime", - day_1_end_time: "day1EndTime", - day_1_start_time: "day1StartTime", - day_2_end_time: "day2EndTime", - day_2_start_time: "day2StartTime", - day_3_end_time: "day3EndTime", - day_3_start_time: "day3StartTime", - day_4_end_time: "day4EndTime", - day_4_start_time: "day4StartTime", - day_5_end_time: "day5EndTime", - day_5_start_time: "day5StartTime", - day_6_end_time: "day6EndTime", - day_6_start_time: "day6StartTime", - }); + > = z.object({ + day_0_end_time: z.number().int(), + day_0_start_time: z.number().int(), + day_1_end_time: z.number().int(), + day_1_start_time: z.number().int(), + day_2_end_time: z.number().int(), + day_2_start_time: z.number().int(), + day_3_end_time: z.number().int(), + day_3_start_time: z.number().int(), + day_4_end_time: z.number().int(), + day_4_start_time: z.number().int(), + day_5_end_time: z.number().int(), + day_5_start_time: z.number().int(), + day_6_end_time: z.number().int(), + day_6_start_time: z.number().int(), + enabled: z.boolean(), + }).transform((v) => { + return remap$(v, { + "day_0_end_time": "day0EndTime", + "day_0_start_time": "day0StartTime", + "day_1_end_time": "day1EndTime", + "day_1_start_time": "day1StartTime", + "day_2_end_time": "day2EndTime", + "day_2_start_time": "day2StartTime", + "day_3_end_time": "day3EndTime", + "day_3_start_time": "day3StartTime", + "day_4_end_time": "day4EndTime", + "day_4_start_time": "day4StartTime", + "day_5_end_time": "day5EndTime", + "day_5_start_time": "day5StartTime", + "day_6_end_time": "day6EndTime", + "day_6_start_time": "day6StartTime", }); + }); /** @internal */ -export type GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound = { +export type GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound = + { day_0_end_time: number; day_0_start_time: number; day_1_end_time: number; @@ -769,780 +761,790 @@ export type GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound = day_6_end_time: number; day_6_start_time: number; enabled: boolean; -}; + }; /** @internal */ -export const GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdUserNotificationSchedule -> = z - .object({ - day0EndTime: z.number().int(), - day0StartTime: z.number().int(), - day1EndTime: z.number().int(), - day1StartTime: z.number().int(), - day2EndTime: z.number().int(), - day2StartTime: z.number().int(), - day3EndTime: z.number().int(), - day3StartTime: z.number().int(), - day4EndTime: z.number().int(), - day4StartTime: z.number().int(), - day5EndTime: z.number().int(), - day5StartTime: z.number().int(), - day6EndTime: z.number().int(), - day6StartTime: z.number().int(), - enabled: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - day0EndTime: "day_0_end_time", - day0StartTime: "day_0_start_time", - day1EndTime: "day_1_end_time", - day1StartTime: "day_1_start_time", - day2EndTime: "day_2_end_time", - day2StartTime: "day_2_start_time", - day3EndTime: "day_3_end_time", - day3StartTime: "day_3_start_time", - day4EndTime: "day_4_end_time", - day4StartTime: "day_4_start_time", - day5EndTime: "day_5_end_time", - day5StartTime: "day_5_start_time", - day6EndTime: "day_6_end_time", - day6StartTime: "day_6_start_time", - }); + > = z.object({ + day0EndTime: z.number().int(), + day0StartTime: z.number().int(), + day1EndTime: z.number().int(), + day1StartTime: z.number().int(), + day2EndTime: z.number().int(), + day2StartTime: z.number().int(), + day3EndTime: z.number().int(), + day3StartTime: z.number().int(), + day4EndTime: z.number().int(), + day4StartTime: z.number().int(), + day5EndTime: z.number().int(), + day5StartTime: z.number().int(), + day6EndTime: z.number().int(), + day6StartTime: z.number().int(), + enabled: z.boolean(), + }).transform((v) => { + return remap$(v, { + day0EndTime: "day_0_end_time", + day0StartTime: "day_0_start_time", + day1EndTime: "day_1_end_time", + day1StartTime: "day_1_start_time", + day2EndTime: "day_2_end_time", + day2StartTime: "day_2_start_time", + day3EndTime: "day_3_end_time", + day3StartTime: "day_3_start_time", + day4EndTime: "day_4_end_time", + day4StartTime: "day_4_start_time", + day5EndTime: "day_5_end_time", + day5StartTime: "day_5_start_time", + day6EndTime: "day_6_end_time", + day6StartTime: "day_6_start_time", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdUserNotificationSchedule$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema` instead. */ - export const inboundSchema = - GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema` instead. */ - export const outboundSchema = - GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound` instead. */ + export type Outbound = + GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdUserOption$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdUserOption, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_private_messages: z.boolean(), - auto_track_topics_after_msecs: z.number().int(), - automatically_unpin_topics: z.boolean(), - bookmark_auto_delete_preference: z.number().int().optional(), - color_scheme_id: z.nullable(z.string()), - dark_scheme_id: z.nullable(z.string()), - default_calendar: z.string().optional(), - digest_after_minutes: z.number().int(), - dynamic_favicon: z.boolean(), - email_digests: z.boolean(), - email_in_reply_to: z.boolean(), - email_level: z.number().int(), - email_messages_level: z.number().int(), - email_previous_replies: z.number().int(), - enable_allowed_pm_users: z.boolean(), - enable_defer: z.boolean(), - enable_quoting: z.boolean(), - external_links_in_new_tab: z.boolean(), - hide_profile_and_presence: z.boolean(), - homepage_id: z.nullable(z.string()), - include_tl0_in_digests: z.boolean(), - like_notification_frequency: z.number().int(), - mailing_list_mode: z.boolean(), - mailing_list_mode_frequency: z.number().int(), - new_topic_duration_minutes: z.number().int(), - notification_level_when_replying: z.number().int(), - oldest_search_log_date: z.nullable(z.string()).optional(), - seen_popups: z.nullable(z.array(z.any())).optional(), - sidebar_link_to_filtered_list: z.boolean().optional(), - sidebar_show_count_of_new_items: z.boolean().optional(), - skip_new_user_tips: z.boolean(), - text_size: z.string(), - text_size_seq: z.number().int(), - theme_ids: z.array(z.any()), - theme_key_seq: z.number().int(), - timezone: z.nullable(z.string()), - title_count_mode: z.string(), - user_id: z.number().int(), - watched_precedence_over_muted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allow_private_messages: "allowPrivateMessages", - auto_track_topics_after_msecs: "autoTrackTopicsAfterMsecs", - automatically_unpin_topics: "automaticallyUnpinTopics", - bookmark_auto_delete_preference: "bookmarkAutoDeletePreference", - color_scheme_id: "colorSchemeId", - dark_scheme_id: "darkSchemeId", - default_calendar: "defaultCalendar", - digest_after_minutes: "digestAfterMinutes", - dynamic_favicon: "dynamicFavicon", - email_digests: "emailDigests", - email_in_reply_to: "emailInReplyTo", - email_level: "emailLevel", - email_messages_level: "emailMessagesLevel", - email_previous_replies: "emailPreviousReplies", - enable_allowed_pm_users: "enableAllowedPmUsers", - enable_defer: "enableDefer", - enable_quoting: "enableQuoting", - external_links_in_new_tab: "externalLinksInNewTab", - hide_profile_and_presence: "hideProfileAndPresence", - homepage_id: "homepageId", - include_tl0_in_digests: "includeTl0InDigests", - like_notification_frequency: "likeNotificationFrequency", - mailing_list_mode: "mailingListMode", - mailing_list_mode_frequency: "mailingListModeFrequency", - new_topic_duration_minutes: "newTopicDurationMinutes", - notification_level_when_replying: "notificationLevelWhenReplying", - oldest_search_log_date: "oldestSearchLogDate", - seen_popups: "seenPopups", - sidebar_link_to_filtered_list: "sidebarLinkToFilteredList", - sidebar_show_count_of_new_items: "sidebarShowCountOfNewItems", - skip_new_user_tips: "skipNewUserTips", - text_size: "textSize", - text_size_seq: "textSizeSeq", - theme_ids: "themeIds", - theme_key_seq: "themeKeySeq", - title_count_mode: "titleCountMode", - user_id: "userId", - watched_precedence_over_muted: "watchedPrecedenceOverMuted", - }); +export const GetUserIdentiyProviderExternalIdUserOption$inboundSchema: + z.ZodType = + z.object({ + allow_private_messages: z.boolean(), + auto_track_topics_after_msecs: z.number().int(), + automatically_unpin_topics: z.boolean(), + bookmark_auto_delete_preference: z.number().int().optional(), + color_scheme_id: z.nullable(z.string()), + dark_scheme_id: z.nullable(z.string()), + default_calendar: z.string().optional(), + digest_after_minutes: z.number().int(), + dynamic_favicon: z.boolean(), + email_digests: z.boolean(), + email_in_reply_to: z.boolean(), + email_level: z.number().int(), + email_messages_level: z.number().int(), + email_previous_replies: z.number().int(), + enable_allowed_pm_users: z.boolean(), + enable_defer: z.boolean(), + enable_quoting: z.boolean(), + external_links_in_new_tab: z.boolean(), + hide_profile_and_presence: z.boolean(), + homepage_id: z.nullable(z.string()), + include_tl0_in_digests: z.boolean(), + like_notification_frequency: z.number().int(), + mailing_list_mode: z.boolean(), + mailing_list_mode_frequency: z.number().int(), + new_topic_duration_minutes: z.number().int(), + notification_level_when_replying: z.number().int(), + oldest_search_log_date: z.nullable(z.string()).optional(), + seen_popups: z.nullable(z.array(z.any())).optional(), + sidebar_link_to_filtered_list: z.boolean().optional(), + sidebar_show_count_of_new_items: z.boolean().optional(), + skip_new_user_tips: z.boolean(), + text_size: z.string(), + text_size_seq: z.number().int(), + theme_ids: z.array(z.any()), + theme_key_seq: z.number().int(), + timezone: z.nullable(z.string()), + title_count_mode: z.string(), + user_id: z.number().int(), + watched_precedence_over_muted: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + "allow_private_messages": "allowPrivateMessages", + "auto_track_topics_after_msecs": "autoTrackTopicsAfterMsecs", + "automatically_unpin_topics": "automaticallyUnpinTopics", + "bookmark_auto_delete_preference": "bookmarkAutoDeletePreference", + "color_scheme_id": "colorSchemeId", + "dark_scheme_id": "darkSchemeId", + "default_calendar": "defaultCalendar", + "digest_after_minutes": "digestAfterMinutes", + "dynamic_favicon": "dynamicFavicon", + "email_digests": "emailDigests", + "email_in_reply_to": "emailInReplyTo", + "email_level": "emailLevel", + "email_messages_level": "emailMessagesLevel", + "email_previous_replies": "emailPreviousReplies", + "enable_allowed_pm_users": "enableAllowedPmUsers", + "enable_defer": "enableDefer", + "enable_quoting": "enableQuoting", + "external_links_in_new_tab": "externalLinksInNewTab", + "hide_profile_and_presence": "hideProfileAndPresence", + "homepage_id": "homepageId", + "include_tl0_in_digests": "includeTl0InDigests", + "like_notification_frequency": "likeNotificationFrequency", + "mailing_list_mode": "mailingListMode", + "mailing_list_mode_frequency": "mailingListModeFrequency", + "new_topic_duration_minutes": "newTopicDurationMinutes", + "notification_level_when_replying": "notificationLevelWhenReplying", + "oldest_search_log_date": "oldestSearchLogDate", + "seen_popups": "seenPopups", + "sidebar_link_to_filtered_list": "sidebarLinkToFilteredList", + "sidebar_show_count_of_new_items": "sidebarShowCountOfNewItems", + "skip_new_user_tips": "skipNewUserTips", + "text_size": "textSize", + "text_size_seq": "textSizeSeq", + "theme_ids": "themeIds", + "theme_key_seq": "themeKeySeq", + "title_count_mode": "titleCountMode", + "user_id": "userId", + "watched_precedence_over_muted": "watchedPrecedenceOverMuted", + }); }); /** @internal */ export type GetUserIdentiyProviderExternalIdUserOption$Outbound = { - allow_private_messages: boolean; - auto_track_topics_after_msecs: number; - automatically_unpin_topics: boolean; - bookmark_auto_delete_preference?: number | undefined; - color_scheme_id: string | null; - dark_scheme_id: string | null; - default_calendar?: string | undefined; - digest_after_minutes: number; - dynamic_favicon: boolean; - email_digests: boolean; - email_in_reply_to: boolean; - email_level: number; - email_messages_level: number; - email_previous_replies: number; - enable_allowed_pm_users: boolean; - enable_defer: boolean; - enable_quoting: boolean; - external_links_in_new_tab: boolean; - hide_profile_and_presence: boolean; - homepage_id: string | null; - include_tl0_in_digests: boolean; - like_notification_frequency: number; - mailing_list_mode: boolean; - mailing_list_mode_frequency: number; - new_topic_duration_minutes: number; - notification_level_when_replying: number; - oldest_search_log_date?: string | null | undefined; - seen_popups?: Array | null | undefined; - sidebar_link_to_filtered_list?: boolean | undefined; - sidebar_show_count_of_new_items?: boolean | undefined; - skip_new_user_tips: boolean; - text_size: string; - text_size_seq: number; - theme_ids: Array; - theme_key_seq: number; - timezone: string | null; - title_count_mode: string; - user_id: number; - watched_precedence_over_muted?: boolean | null | undefined; + allow_private_messages: boolean; + auto_track_topics_after_msecs: number; + automatically_unpin_topics: boolean; + bookmark_auto_delete_preference?: number | undefined; + color_scheme_id: string | null; + dark_scheme_id: string | null; + default_calendar?: string | undefined; + digest_after_minutes: number; + dynamic_favicon: boolean; + email_digests: boolean; + email_in_reply_to: boolean; + email_level: number; + email_messages_level: number; + email_previous_replies: number; + enable_allowed_pm_users: boolean; + enable_defer: boolean; + enable_quoting: boolean; + external_links_in_new_tab: boolean; + hide_profile_and_presence: boolean; + homepage_id: string | null; + include_tl0_in_digests: boolean; + like_notification_frequency: number; + mailing_list_mode: boolean; + mailing_list_mode_frequency: number; + new_topic_duration_minutes: number; + notification_level_when_replying: number; + oldest_search_log_date?: string | null | undefined; + seen_popups?: Array | null | undefined; + sidebar_link_to_filtered_list?: boolean | undefined; + sidebar_show_count_of_new_items?: boolean | undefined; + skip_new_user_tips: boolean; + text_size: string; + text_size_seq: number; + theme_ids: Array; + theme_key_seq: number; + timezone: string | null; + title_count_mode: string; + user_id: number; + watched_precedence_over_muted?: boolean | null | undefined; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdUserOption$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdUserOption$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdUserOption$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdUserOption -> = z - .object({ - allowPrivateMessages: z.boolean(), - autoTrackTopicsAfterMsecs: z.number().int(), - automaticallyUnpinTopics: z.boolean(), - bookmarkAutoDeletePreference: z.number().int().optional(), - colorSchemeId: z.nullable(z.string()), - darkSchemeId: z.nullable(z.string()), - defaultCalendar: z.string().optional(), - digestAfterMinutes: z.number().int(), - dynamicFavicon: z.boolean(), - emailDigests: z.boolean(), - emailInReplyTo: z.boolean(), - emailLevel: z.number().int(), - emailMessagesLevel: z.number().int(), - emailPreviousReplies: z.number().int(), - enableAllowedPmUsers: z.boolean(), - enableDefer: z.boolean(), - enableQuoting: z.boolean(), - externalLinksInNewTab: z.boolean(), - hideProfileAndPresence: z.boolean(), - homepageId: z.nullable(z.string()), - includeTl0InDigests: z.boolean(), - likeNotificationFrequency: z.number().int(), - mailingListMode: z.boolean(), - mailingListModeFrequency: z.number().int(), - newTopicDurationMinutes: z.number().int(), - notificationLevelWhenReplying: z.number().int(), - oldestSearchLogDate: z.nullable(z.string()).optional(), - seenPopups: z.nullable(z.array(z.any())).optional(), - sidebarLinkToFilteredList: z.boolean().optional(), - sidebarShowCountOfNewItems: z.boolean().optional(), - skipNewUserTips: z.boolean(), - textSize: z.string(), - textSizeSeq: z.number().int(), - themeIds: z.array(z.any()), - themeKeySeq: z.number().int(), - timezone: z.nullable(z.string()), - titleCountMode: z.string(), - userId: z.number().int(), - watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), - }) - .transform((v) => { - return remap$(v, { - allowPrivateMessages: "allow_private_messages", - autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", - automaticallyUnpinTopics: "automatically_unpin_topics", - bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", - colorSchemeId: "color_scheme_id", - darkSchemeId: "dark_scheme_id", - defaultCalendar: "default_calendar", - digestAfterMinutes: "digest_after_minutes", - dynamicFavicon: "dynamic_favicon", - emailDigests: "email_digests", - emailInReplyTo: "email_in_reply_to", - emailLevel: "email_level", - emailMessagesLevel: "email_messages_level", - emailPreviousReplies: "email_previous_replies", - enableAllowedPmUsers: "enable_allowed_pm_users", - enableDefer: "enable_defer", - enableQuoting: "enable_quoting", - externalLinksInNewTab: "external_links_in_new_tab", - hideProfileAndPresence: "hide_profile_and_presence", - homepageId: "homepage_id", - includeTl0InDigests: "include_tl0_in_digests", - likeNotificationFrequency: "like_notification_frequency", - mailingListMode: "mailing_list_mode", - mailingListModeFrequency: "mailing_list_mode_frequency", - newTopicDurationMinutes: "new_topic_duration_minutes", - notificationLevelWhenReplying: "notification_level_when_replying", - oldestSearchLogDate: "oldest_search_log_date", - seenPopups: "seen_popups", - sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", - sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", - skipNewUserTips: "skip_new_user_tips", - textSize: "text_size", - textSizeSeq: "text_size_seq", - themeIds: "theme_ids", - themeKeySeq: "theme_key_seq", - titleCountMode: "title_count_mode", - userId: "user_id", - watchedPrecedenceOverMuted: "watched_precedence_over_muted", - }); + > = z.object({ + allowPrivateMessages: z.boolean(), + autoTrackTopicsAfterMsecs: z.number().int(), + automaticallyUnpinTopics: z.boolean(), + bookmarkAutoDeletePreference: z.number().int().optional(), + colorSchemeId: z.nullable(z.string()), + darkSchemeId: z.nullable(z.string()), + defaultCalendar: z.string().optional(), + digestAfterMinutes: z.number().int(), + dynamicFavicon: z.boolean(), + emailDigests: z.boolean(), + emailInReplyTo: z.boolean(), + emailLevel: z.number().int(), + emailMessagesLevel: z.number().int(), + emailPreviousReplies: z.number().int(), + enableAllowedPmUsers: z.boolean(), + enableDefer: z.boolean(), + enableQuoting: z.boolean(), + externalLinksInNewTab: z.boolean(), + hideProfileAndPresence: z.boolean(), + homepageId: z.nullable(z.string()), + includeTl0InDigests: z.boolean(), + likeNotificationFrequency: z.number().int(), + mailingListMode: z.boolean(), + mailingListModeFrequency: z.number().int(), + newTopicDurationMinutes: z.number().int(), + notificationLevelWhenReplying: z.number().int(), + oldestSearchLogDate: z.nullable(z.string()).optional(), + seenPopups: z.nullable(z.array(z.any())).optional(), + sidebarLinkToFilteredList: z.boolean().optional(), + sidebarShowCountOfNewItems: z.boolean().optional(), + skipNewUserTips: z.boolean(), + textSize: z.string(), + textSizeSeq: z.number().int(), + themeIds: z.array(z.any()), + themeKeySeq: z.number().int(), + timezone: z.nullable(z.string()), + titleCountMode: z.string(), + userId: z.number().int(), + watchedPrecedenceOverMuted: z.nullable(z.boolean()).optional(), + }).transform((v) => { + return remap$(v, { + allowPrivateMessages: "allow_private_messages", + autoTrackTopicsAfterMsecs: "auto_track_topics_after_msecs", + automaticallyUnpinTopics: "automatically_unpin_topics", + bookmarkAutoDeletePreference: "bookmark_auto_delete_preference", + colorSchemeId: "color_scheme_id", + darkSchemeId: "dark_scheme_id", + defaultCalendar: "default_calendar", + digestAfterMinutes: "digest_after_minutes", + dynamicFavicon: "dynamic_favicon", + emailDigests: "email_digests", + emailInReplyTo: "email_in_reply_to", + emailLevel: "email_level", + emailMessagesLevel: "email_messages_level", + emailPreviousReplies: "email_previous_replies", + enableAllowedPmUsers: "enable_allowed_pm_users", + enableDefer: "enable_defer", + enableQuoting: "enable_quoting", + externalLinksInNewTab: "external_links_in_new_tab", + hideProfileAndPresence: "hide_profile_and_presence", + homepageId: "homepage_id", + includeTl0InDigests: "include_tl0_in_digests", + likeNotificationFrequency: "like_notification_frequency", + mailingListMode: "mailing_list_mode", + mailingListModeFrequency: "mailing_list_mode_frequency", + newTopicDurationMinutes: "new_topic_duration_minutes", + notificationLevelWhenReplying: "notification_level_when_replying", + oldestSearchLogDate: "oldest_search_log_date", + seenPopups: "seen_popups", + sidebarLinkToFilteredList: "sidebar_link_to_filtered_list", + sidebarShowCountOfNewItems: "sidebar_show_count_of_new_items", + skipNewUserTips: "skip_new_user_tips", + textSize: "text_size", + textSizeSeq: "text_size_seq", + themeIds: "theme_ids", + themeKeySeq: "theme_key_seq", + titleCountMode: "title_count_mode", + userId: "user_id", + watchedPrecedenceOverMuted: "watched_precedence_over_muted", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdUserOption$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdUserOption$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdUserOption$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdUserOption$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdUserOption$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdUserOption$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUserOption$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdUserOption$Outbound; } /** @internal */ export const GetUserIdentiyProviderExternalIdUser$inboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdUser, - z.ZodTypeDef, - unknown -> = z - .object({ - admin: z.boolean(), - allowed_pm_usernames: z.array(z.any()), - avatar_template: z.string(), - badge_count: z.number().int(), - can_be_deleted: z.boolean(), - can_change_bio: z.boolean(), - can_change_location: z.boolean(), - can_change_tracking_preferences: z.boolean(), - can_change_website: z.boolean(), - can_delete_all_posts: z.boolean(), - can_edit: z.boolean(), - can_edit_email: z.boolean(), - can_edit_name: z.boolean(), - can_edit_username: z.boolean(), - can_ignore_user: z.boolean(), - can_mute_user: z.boolean(), - can_send_private_message_to_user: z.boolean(), - can_send_private_messages: z.boolean(), - can_upload_profile_header: z.boolean(), - can_upload_user_card_background: z.boolean(), - created_at: z.string(), - custom_fields: z.lazy(() => GetUserIdentiyProviderExternalIdCustomFields$inboundSchema), - display_sidebar_tags: z.boolean().optional(), - featured_topic: z.nullable(z.string()), - featured_user_badge_ids: z.array(z.any()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - group_users: z.array( - z.lazy(() => GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema) - ), - groups: z.array(z.lazy(() => GetUserIdentiyProviderExternalIdGroups$inboundSchema)), - has_title_badges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignored_usernames: z.array(z.any()), - invited_by: z.nullable(z.string()), - last_posted_at: z.nullable(z.string()), - last_seen_at: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailing_list_posts_per_day: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - muted_category_ids: z.array(z.any()), - muted_tags: z.array(z.any()), - muted_usernames: z.array(z.any()), - name: z.string(), - pending_count: z.number().int(), - pending_posts_count: z.number().int().optional(), - post_count: z.number().int(), - primary_group_id: z.nullable(z.string()), - primary_group_name: z.nullable(z.string()), - profile_view_count: z.number().int(), - recent_time_read: z.number().int(), - regular_category_ids: z.array(z.any()), - second_factor_backup_enabled: z.boolean().optional(), - second_factor_enabled: z.boolean(), - sidebar_category_ids: z.array(z.any()).optional(), - sidebar_tags: z.array(z.any()).optional(), - staged: z.boolean(), - system_avatar_template: z.string(), - system_avatar_upload_id: z.nullable(z.string()), - time_read: z.number().int(), - title: z.nullable(z.string()), - tracked_category_ids: z.array(z.any()), - tracked_tags: z.array(z.any()), - trust_level: z.number().int(), - uploaded_avatar_id: z.nullable(z.string()), - use_logo_small_as_avatar: z.boolean(), - user_api_keys: z.nullable(z.string()), - user_auth_tokens: z.array( - z.lazy(() => GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema) - ), - user_fields: z - .lazy(() => GetUserIdentiyProviderExternalIdUserFields$inboundSchema) - .optional(), - user_notification_schedule: z.lazy( - () => GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema - ), - user_option: z.lazy(() => GetUserIdentiyProviderExternalIdUserOption$inboundSchema), - username: z.string(), - watched_category_ids: z.array(z.any()), - watched_first_post_category_ids: z.array(z.any()), - watched_tags: z.array(z.any()), - watching_first_post_tags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowed_pm_usernames: "allowedPmUsernames", - avatar_template: "avatarTemplate", - badge_count: "badgeCount", - can_be_deleted: "canBeDeleted", - can_change_bio: "canChangeBio", - can_change_location: "canChangeLocation", - can_change_tracking_preferences: "canChangeTrackingPreferences", - can_change_website: "canChangeWebsite", - can_delete_all_posts: "canDeleteAllPosts", - can_edit: "canEdit", - can_edit_email: "canEditEmail", - can_edit_name: "canEditName", - can_edit_username: "canEditUsername", - can_ignore_user: "canIgnoreUser", - can_mute_user: "canMuteUser", - can_send_private_message_to_user: "canSendPrivateMessageToUser", - can_send_private_messages: "canSendPrivateMessages", - can_upload_profile_header: "canUploadProfileHeader", - can_upload_user_card_background: "canUploadUserCardBackground", - created_at: "createdAt", - custom_fields: "customFields", - display_sidebar_tags: "displaySidebarTags", - featured_topic: "featuredTopic", - featured_user_badge_ids: "featuredUserBadgeIds", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - group_users: "groupUsers", - has_title_badges: "hasTitleBadges", - ignored_usernames: "ignoredUsernames", - invited_by: "invitedBy", - last_posted_at: "lastPostedAt", - last_seen_at: "lastSeenAt", - mailing_list_posts_per_day: "mailingListPostsPerDay", - muted_category_ids: "mutedCategoryIds", - muted_tags: "mutedTags", - muted_usernames: "mutedUsernames", - pending_count: "pendingCount", - pending_posts_count: "pendingPostsCount", - post_count: "postCount", - primary_group_id: "primaryGroupId", - primary_group_name: "primaryGroupName", - profile_view_count: "profileViewCount", - recent_time_read: "recentTimeRead", - regular_category_ids: "regularCategoryIds", - second_factor_backup_enabled: "secondFactorBackupEnabled", - second_factor_enabled: "secondFactorEnabled", - sidebar_category_ids: "sidebarCategoryIds", - sidebar_tags: "sidebarTags", - system_avatar_template: "systemAvatarTemplate", - system_avatar_upload_id: "systemAvatarUploadId", - time_read: "timeRead", - tracked_category_ids: "trackedCategoryIds", - tracked_tags: "trackedTags", - trust_level: "trustLevel", - uploaded_avatar_id: "uploadedAvatarId", - use_logo_small_as_avatar: "useLogoSmallAsAvatar", - user_api_keys: "userApiKeys", - user_auth_tokens: "userAuthTokens", - user_fields: "userFields", - user_notification_schedule: "userNotificationSchedule", - user_option: "userOption", - watched_category_ids: "watchedCategoryIds", - watched_first_post_category_ids: "watchedFirstPostCategoryIds", - watched_tags: "watchedTags", - watching_first_post_tags: "watchingFirstPostTags", - }); - }); + GetUserIdentiyProviderExternalIdUser, + z.ZodTypeDef, + unknown +> = z.object({ + admin: z.boolean(), + allowed_pm_usernames: z.array(z.any()), + avatar_template: z.string(), + badge_count: z.number().int(), + can_be_deleted: z.boolean(), + can_change_bio: z.boolean(), + can_change_location: z.boolean(), + can_change_tracking_preferences: z.boolean(), + can_change_website: z.boolean(), + can_delete_all_posts: z.boolean(), + can_edit: z.boolean(), + can_edit_email: z.boolean(), + can_edit_name: z.boolean(), + can_edit_username: z.boolean(), + can_ignore_user: z.boolean(), + can_mute_user: z.boolean(), + can_send_private_message_to_user: z.boolean(), + can_send_private_messages: z.boolean(), + can_upload_profile_header: z.boolean(), + can_upload_user_card_background: z.boolean(), + created_at: z.string(), + custom_fields: z.lazy(() => + GetUserIdentiyProviderExternalIdCustomFields$inboundSchema + ), + display_sidebar_tags: z.boolean().optional(), + featured_topic: z.nullable(z.string()), + featured_user_badge_ids: z.array(z.any()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + group_users: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdGroupUsers$inboundSchema), + ), + groups: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdGroups$inboundSchema), + ), + has_title_badges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignored_usernames: z.array(z.any()), + invited_by: z.nullable(z.string()), + last_posted_at: z.nullable(z.string()), + last_seen_at: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailing_list_posts_per_day: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + muted_category_ids: z.array(z.any()), + muted_tags: z.array(z.any()), + muted_usernames: z.array(z.any()), + name: z.string(), + pending_count: z.number().int(), + pending_posts_count: z.number().int().optional(), + post_count: z.number().int(), + primary_group_id: z.nullable(z.string()), + primary_group_name: z.nullable(z.string()), + profile_view_count: z.number().int(), + recent_time_read: z.number().int(), + regular_category_ids: z.array(z.any()), + second_factor_backup_enabled: z.boolean().optional(), + second_factor_enabled: z.boolean(), + sidebar_category_ids: z.array(z.any()).optional(), + sidebar_tags: z.array(z.any()).optional(), + staged: z.boolean(), + system_avatar_template: z.string(), + system_avatar_upload_id: z.nullable(z.string()), + time_read: z.number().int(), + title: z.nullable(z.string()), + tracked_category_ids: z.array(z.any()), + tracked_tags: z.array(z.any()), + trust_level: z.number().int(), + uploaded_avatar_id: z.nullable(z.string()), + use_logo_small_as_avatar: z.boolean(), + user_api_keys: z.nullable(z.string()), + user_auth_tokens: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdUserAuthTokens$inboundSchema), + ), + user_fields: z.lazy(() => + GetUserIdentiyProviderExternalIdUserFields$inboundSchema + ).optional(), + user_notification_schedule: z.lazy(() => + GetUserIdentiyProviderExternalIdUserNotificationSchedule$inboundSchema + ), + user_option: z.lazy(() => + GetUserIdentiyProviderExternalIdUserOption$inboundSchema + ), + username: z.string(), + watched_category_ids: z.array(z.any()), + watched_first_post_category_ids: z.array(z.any()), + watched_tags: z.array(z.any()), + watching_first_post_tags: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "allowed_pm_usernames": "allowedPmUsernames", + "avatar_template": "avatarTemplate", + "badge_count": "badgeCount", + "can_be_deleted": "canBeDeleted", + "can_change_bio": "canChangeBio", + "can_change_location": "canChangeLocation", + "can_change_tracking_preferences": "canChangeTrackingPreferences", + "can_change_website": "canChangeWebsite", + "can_delete_all_posts": "canDeleteAllPosts", + "can_edit": "canEdit", + "can_edit_email": "canEditEmail", + "can_edit_name": "canEditName", + "can_edit_username": "canEditUsername", + "can_ignore_user": "canIgnoreUser", + "can_mute_user": "canMuteUser", + "can_send_private_message_to_user": "canSendPrivateMessageToUser", + "can_send_private_messages": "canSendPrivateMessages", + "can_upload_profile_header": "canUploadProfileHeader", + "can_upload_user_card_background": "canUploadUserCardBackground", + "created_at": "createdAt", + "custom_fields": "customFields", + "display_sidebar_tags": "displaySidebarTags", + "featured_topic": "featuredTopic", + "featured_user_badge_ids": "featuredUserBadgeIds", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "group_users": "groupUsers", + "has_title_badges": "hasTitleBadges", + "ignored_usernames": "ignoredUsernames", + "invited_by": "invitedBy", + "last_posted_at": "lastPostedAt", + "last_seen_at": "lastSeenAt", + "mailing_list_posts_per_day": "mailingListPostsPerDay", + "muted_category_ids": "mutedCategoryIds", + "muted_tags": "mutedTags", + "muted_usernames": "mutedUsernames", + "pending_count": "pendingCount", + "pending_posts_count": "pendingPostsCount", + "post_count": "postCount", + "primary_group_id": "primaryGroupId", + "primary_group_name": "primaryGroupName", + "profile_view_count": "profileViewCount", + "recent_time_read": "recentTimeRead", + "regular_category_ids": "regularCategoryIds", + "second_factor_backup_enabled": "secondFactorBackupEnabled", + "second_factor_enabled": "secondFactorEnabled", + "sidebar_category_ids": "sidebarCategoryIds", + "sidebar_tags": "sidebarTags", + "system_avatar_template": "systemAvatarTemplate", + "system_avatar_upload_id": "systemAvatarUploadId", + "time_read": "timeRead", + "tracked_category_ids": "trackedCategoryIds", + "tracked_tags": "trackedTags", + "trust_level": "trustLevel", + "uploaded_avatar_id": "uploadedAvatarId", + "use_logo_small_as_avatar": "useLogoSmallAsAvatar", + "user_api_keys": "userApiKeys", + "user_auth_tokens": "userAuthTokens", + "user_fields": "userFields", + "user_notification_schedule": "userNotificationSchedule", + "user_option": "userOption", + "watched_category_ids": "watchedCategoryIds", + "watched_first_post_category_ids": "watchedFirstPostCategoryIds", + "watched_tags": "watchedTags", + "watching_first_post_tags": "watchingFirstPostTags", + }); +}); /** @internal */ export type GetUserIdentiyProviderExternalIdUser$Outbound = { - admin: boolean; - allowed_pm_usernames: Array; - avatar_template: string; - badge_count: number; - can_be_deleted: boolean; - can_change_bio: boolean; - can_change_location: boolean; - can_change_tracking_preferences: boolean; - can_change_website: boolean; - can_delete_all_posts: boolean; - can_edit: boolean; - can_edit_email: boolean; - can_edit_name: boolean; - can_edit_username: boolean; - can_ignore_user: boolean; - can_mute_user: boolean; - can_send_private_message_to_user: boolean; - can_send_private_messages: boolean; - can_upload_profile_header: boolean; - can_upload_user_card_background: boolean; - created_at: string; - custom_fields: GetUserIdentiyProviderExternalIdCustomFields$Outbound; - display_sidebar_tags?: boolean | undefined; - featured_topic: string | null; - featured_user_badge_ids: Array; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id: string | null; - flair_name: string | null; - flair_url: string | null; - group_users: Array; - groups: Array; - has_title_badges: boolean; - id: number; - ignored: boolean; - ignored_usernames: Array; - invited_by: string | null; - last_posted_at: string | null; - last_seen_at: string | null; - locale: string | null; - mailing_list_posts_per_day: number; - moderator: boolean; - muted: boolean; - muted_category_ids: Array; - muted_tags: Array; - muted_usernames: Array; - name: string; - pending_count: number; - pending_posts_count?: number | undefined; - post_count: number; - primary_group_id: string | null; - primary_group_name: string | null; - profile_view_count: number; - recent_time_read: number; - regular_category_ids: Array; - second_factor_backup_enabled?: boolean | undefined; - second_factor_enabled: boolean; - sidebar_category_ids?: Array | undefined; - sidebar_tags?: Array | undefined; - staged: boolean; - system_avatar_template: string; - system_avatar_upload_id: string | null; - time_read: number; - title: string | null; - tracked_category_ids: Array; - tracked_tags: Array; - trust_level: number; - uploaded_avatar_id: string | null; - use_logo_small_as_avatar: boolean; - user_api_keys: string | null; - user_auth_tokens: Array; - user_fields?: GetUserIdentiyProviderExternalIdUserFields$Outbound | undefined; - user_notification_schedule: GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound; - user_option: GetUserIdentiyProviderExternalIdUserOption$Outbound; - username: string; - watched_category_ids: Array; - watched_first_post_category_ids: Array; - watched_tags: Array; - watching_first_post_tags: Array; + admin: boolean; + allowed_pm_usernames: Array; + avatar_template: string; + badge_count: number; + can_be_deleted: boolean; + can_change_bio: boolean; + can_change_location: boolean; + can_change_tracking_preferences: boolean; + can_change_website: boolean; + can_delete_all_posts: boolean; + can_edit: boolean; + can_edit_email: boolean; + can_edit_name: boolean; + can_edit_username: boolean; + can_ignore_user: boolean; + can_mute_user: boolean; + can_send_private_message_to_user: boolean; + can_send_private_messages: boolean; + can_upload_profile_header: boolean; + can_upload_user_card_background: boolean; + created_at: string; + custom_fields: GetUserIdentiyProviderExternalIdCustomFields$Outbound; + display_sidebar_tags?: boolean | undefined; + featured_topic: string | null; + featured_user_badge_ids: Array; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id: string | null; + flair_name: string | null; + flair_url: string | null; + group_users: Array; + groups: Array; + has_title_badges: boolean; + id: number; + ignored: boolean; + ignored_usernames: Array; + invited_by: string | null; + last_posted_at: string | null; + last_seen_at: string | null; + locale: string | null; + mailing_list_posts_per_day: number; + moderator: boolean; + muted: boolean; + muted_category_ids: Array; + muted_tags: Array; + muted_usernames: Array; + name: string; + pending_count: number; + pending_posts_count?: number | undefined; + post_count: number; + primary_group_id: string | null; + primary_group_name: string | null; + profile_view_count: number; + recent_time_read: number; + regular_category_ids: Array; + second_factor_backup_enabled?: boolean | undefined; + second_factor_enabled: boolean; + sidebar_category_ids?: Array | undefined; + sidebar_tags?: Array | undefined; + staged: boolean; + system_avatar_template: string; + system_avatar_upload_id: string | null; + time_read: number; + title: string | null; + tracked_category_ids: Array; + tracked_tags: Array; + trust_level: number; + uploaded_avatar_id: string | null; + use_logo_small_as_avatar: boolean; + user_api_keys: string | null; + user_auth_tokens: Array< + GetUserIdentiyProviderExternalIdUserAuthTokens$Outbound + >; + user_fields?: GetUserIdentiyProviderExternalIdUserFields$Outbound | undefined; + user_notification_schedule: + GetUserIdentiyProviderExternalIdUserNotificationSchedule$Outbound; + user_option: GetUserIdentiyProviderExternalIdUserOption$Outbound; + username: string; + watched_category_ids: Array; + watched_first_post_category_ids: Array; + watched_tags: Array; + watching_first_post_tags: Array; }; /** @internal */ export const GetUserIdentiyProviderExternalIdUser$outboundSchema: z.ZodType< - GetUserIdentiyProviderExternalIdUser$Outbound, - z.ZodTypeDef, - GetUserIdentiyProviderExternalIdUser -> = z - .object({ - admin: z.boolean(), - allowedPmUsernames: z.array(z.any()), - avatarTemplate: z.string(), - badgeCount: z.number().int(), - canBeDeleted: z.boolean(), - canChangeBio: z.boolean(), - canChangeLocation: z.boolean(), - canChangeTrackingPreferences: z.boolean(), - canChangeWebsite: z.boolean(), - canDeleteAllPosts: z.boolean(), - canEdit: z.boolean(), - canEditEmail: z.boolean(), - canEditName: z.boolean(), - canEditUsername: z.boolean(), - canIgnoreUser: z.boolean(), - canMuteUser: z.boolean(), - canSendPrivateMessageToUser: z.boolean(), - canSendPrivateMessages: z.boolean(), - canUploadProfileHeader: z.boolean(), - canUploadUserCardBackground: z.boolean(), - createdAt: z.string(), - customFields: z.lazy(() => GetUserIdentiyProviderExternalIdCustomFields$outboundSchema), - displaySidebarTags: z.boolean().optional(), - featuredTopic: z.nullable(z.string()), - featuredUserBadgeIds: z.array(z.any()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - groupUsers: z.array( - z.lazy(() => GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema) - ), - groups: z.array(z.lazy(() => GetUserIdentiyProviderExternalIdGroups$outboundSchema)), - hasTitleBadges: z.boolean(), - id: z.number().int(), - ignored: z.boolean(), - ignoredUsernames: z.array(z.any()), - invitedBy: z.nullable(z.string()), - lastPostedAt: z.nullable(z.string()), - lastSeenAt: z.nullable(z.string()), - locale: z.nullable(z.string()), - mailingListPostsPerDay: z.number().int(), - moderator: z.boolean(), - muted: z.boolean(), - mutedCategoryIds: z.array(z.any()), - mutedTags: z.array(z.any()), - mutedUsernames: z.array(z.any()), - name: z.string(), - pendingCount: z.number().int(), - pendingPostsCount: z.number().int().optional(), - postCount: z.number().int(), - primaryGroupId: z.nullable(z.string()), - primaryGroupName: z.nullable(z.string()), - profileViewCount: z.number().int(), - recentTimeRead: z.number().int(), - regularCategoryIds: z.array(z.any()), - secondFactorBackupEnabled: z.boolean().optional(), - secondFactorEnabled: z.boolean(), - sidebarCategoryIds: z.array(z.any()).optional(), - sidebarTags: z.array(z.any()).optional(), - staged: z.boolean(), - systemAvatarTemplate: z.string(), - systemAvatarUploadId: z.nullable(z.string()), - timeRead: z.number().int(), - title: z.nullable(z.string()), - trackedCategoryIds: z.array(z.any()), - trackedTags: z.array(z.any()), - trustLevel: z.number().int(), - uploadedAvatarId: z.nullable(z.string()), - useLogoSmallAsAvatar: z.boolean(), - userApiKeys: z.nullable(z.string()), - userAuthTokens: z.array( - z.lazy(() => GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema) - ), - userFields: z - .lazy(() => GetUserIdentiyProviderExternalIdUserFields$outboundSchema) - .optional(), - userNotificationSchedule: z.lazy( - () => GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema - ), - userOption: z.lazy(() => GetUserIdentiyProviderExternalIdUserOption$outboundSchema), - username: z.string(), - watchedCategoryIds: z.array(z.any()), - watchedFirstPostCategoryIds: z.array(z.any()), - watchedTags: z.array(z.any()), - watchingFirstPostTags: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - allowedPmUsernames: "allowed_pm_usernames", - avatarTemplate: "avatar_template", - badgeCount: "badge_count", - canBeDeleted: "can_be_deleted", - canChangeBio: "can_change_bio", - canChangeLocation: "can_change_location", - canChangeTrackingPreferences: "can_change_tracking_preferences", - canChangeWebsite: "can_change_website", - canDeleteAllPosts: "can_delete_all_posts", - canEdit: "can_edit", - canEditEmail: "can_edit_email", - canEditName: "can_edit_name", - canEditUsername: "can_edit_username", - canIgnoreUser: "can_ignore_user", - canMuteUser: "can_mute_user", - canSendPrivateMessageToUser: "can_send_private_message_to_user", - canSendPrivateMessages: "can_send_private_messages", - canUploadProfileHeader: "can_upload_profile_header", - canUploadUserCardBackground: "can_upload_user_card_background", - createdAt: "created_at", - customFields: "custom_fields", - displaySidebarTags: "display_sidebar_tags", - featuredTopic: "featured_topic", - featuredUserBadgeIds: "featured_user_badge_ids", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - groupUsers: "group_users", - hasTitleBadges: "has_title_badges", - ignoredUsernames: "ignored_usernames", - invitedBy: "invited_by", - lastPostedAt: "last_posted_at", - lastSeenAt: "last_seen_at", - mailingListPostsPerDay: "mailing_list_posts_per_day", - mutedCategoryIds: "muted_category_ids", - mutedTags: "muted_tags", - mutedUsernames: "muted_usernames", - pendingCount: "pending_count", - pendingPostsCount: "pending_posts_count", - postCount: "post_count", - primaryGroupId: "primary_group_id", - primaryGroupName: "primary_group_name", - profileViewCount: "profile_view_count", - recentTimeRead: "recent_time_read", - regularCategoryIds: "regular_category_ids", - secondFactorBackupEnabled: "second_factor_backup_enabled", - secondFactorEnabled: "second_factor_enabled", - sidebarCategoryIds: "sidebar_category_ids", - sidebarTags: "sidebar_tags", - systemAvatarTemplate: "system_avatar_template", - systemAvatarUploadId: "system_avatar_upload_id", - timeRead: "time_read", - trackedCategoryIds: "tracked_category_ids", - trackedTags: "tracked_tags", - trustLevel: "trust_level", - uploadedAvatarId: "uploaded_avatar_id", - useLogoSmallAsAvatar: "use_logo_small_as_avatar", - userApiKeys: "user_api_keys", - userAuthTokens: "user_auth_tokens", - userFields: "user_fields", - userNotificationSchedule: "user_notification_schedule", - userOption: "user_option", - watchedCategoryIds: "watched_category_ids", - watchedFirstPostCategoryIds: "watched_first_post_category_ids", - watchedTags: "watched_tags", - watchingFirstPostTags: "watching_first_post_tags", - }); - }); + GetUserIdentiyProviderExternalIdUser$Outbound, + z.ZodTypeDef, + GetUserIdentiyProviderExternalIdUser +> = z.object({ + admin: z.boolean(), + allowedPmUsernames: z.array(z.any()), + avatarTemplate: z.string(), + badgeCount: z.number().int(), + canBeDeleted: z.boolean(), + canChangeBio: z.boolean(), + canChangeLocation: z.boolean(), + canChangeTrackingPreferences: z.boolean(), + canChangeWebsite: z.boolean(), + canDeleteAllPosts: z.boolean(), + canEdit: z.boolean(), + canEditEmail: z.boolean(), + canEditName: z.boolean(), + canEditUsername: z.boolean(), + canIgnoreUser: z.boolean(), + canMuteUser: z.boolean(), + canSendPrivateMessageToUser: z.boolean(), + canSendPrivateMessages: z.boolean(), + canUploadProfileHeader: z.boolean(), + canUploadUserCardBackground: z.boolean(), + createdAt: z.string(), + customFields: z.lazy(() => + GetUserIdentiyProviderExternalIdCustomFields$outboundSchema + ), + displaySidebarTags: z.boolean().optional(), + featuredTopic: z.nullable(z.string()), + featuredUserBadgeIds: z.array(z.any()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + groupUsers: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdGroupUsers$outboundSchema), + ), + groups: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdGroups$outboundSchema), + ), + hasTitleBadges: z.boolean(), + id: z.number().int(), + ignored: z.boolean(), + ignoredUsernames: z.array(z.any()), + invitedBy: z.nullable(z.string()), + lastPostedAt: z.nullable(z.string()), + lastSeenAt: z.nullable(z.string()), + locale: z.nullable(z.string()), + mailingListPostsPerDay: z.number().int(), + moderator: z.boolean(), + muted: z.boolean(), + mutedCategoryIds: z.array(z.any()), + mutedTags: z.array(z.any()), + mutedUsernames: z.array(z.any()), + name: z.string(), + pendingCount: z.number().int(), + pendingPostsCount: z.number().int().optional(), + postCount: z.number().int(), + primaryGroupId: z.nullable(z.string()), + primaryGroupName: z.nullable(z.string()), + profileViewCount: z.number().int(), + recentTimeRead: z.number().int(), + regularCategoryIds: z.array(z.any()), + secondFactorBackupEnabled: z.boolean().optional(), + secondFactorEnabled: z.boolean(), + sidebarCategoryIds: z.array(z.any()).optional(), + sidebarTags: z.array(z.any()).optional(), + staged: z.boolean(), + systemAvatarTemplate: z.string(), + systemAvatarUploadId: z.nullable(z.string()), + timeRead: z.number().int(), + title: z.nullable(z.string()), + trackedCategoryIds: z.array(z.any()), + trackedTags: z.array(z.any()), + trustLevel: z.number().int(), + uploadedAvatarId: z.nullable(z.string()), + useLogoSmallAsAvatar: z.boolean(), + userApiKeys: z.nullable(z.string()), + userAuthTokens: z.array( + z.lazy(() => GetUserIdentiyProviderExternalIdUserAuthTokens$outboundSchema), + ), + userFields: z.lazy(() => + GetUserIdentiyProviderExternalIdUserFields$outboundSchema + ).optional(), + userNotificationSchedule: z.lazy(() => + GetUserIdentiyProviderExternalIdUserNotificationSchedule$outboundSchema + ), + userOption: z.lazy(() => + GetUserIdentiyProviderExternalIdUserOption$outboundSchema + ), + username: z.string(), + watchedCategoryIds: z.array(z.any()), + watchedFirstPostCategoryIds: z.array(z.any()), + watchedTags: z.array(z.any()), + watchingFirstPostTags: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + allowedPmUsernames: "allowed_pm_usernames", + avatarTemplate: "avatar_template", + badgeCount: "badge_count", + canBeDeleted: "can_be_deleted", + canChangeBio: "can_change_bio", + canChangeLocation: "can_change_location", + canChangeTrackingPreferences: "can_change_tracking_preferences", + canChangeWebsite: "can_change_website", + canDeleteAllPosts: "can_delete_all_posts", + canEdit: "can_edit", + canEditEmail: "can_edit_email", + canEditName: "can_edit_name", + canEditUsername: "can_edit_username", + canIgnoreUser: "can_ignore_user", + canMuteUser: "can_mute_user", + canSendPrivateMessageToUser: "can_send_private_message_to_user", + canSendPrivateMessages: "can_send_private_messages", + canUploadProfileHeader: "can_upload_profile_header", + canUploadUserCardBackground: "can_upload_user_card_background", + createdAt: "created_at", + customFields: "custom_fields", + displaySidebarTags: "display_sidebar_tags", + featuredTopic: "featured_topic", + featuredUserBadgeIds: "featured_user_badge_ids", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + groupUsers: "group_users", + hasTitleBadges: "has_title_badges", + ignoredUsernames: "ignored_usernames", + invitedBy: "invited_by", + lastPostedAt: "last_posted_at", + lastSeenAt: "last_seen_at", + mailingListPostsPerDay: "mailing_list_posts_per_day", + mutedCategoryIds: "muted_category_ids", + mutedTags: "muted_tags", + mutedUsernames: "muted_usernames", + pendingCount: "pending_count", + pendingPostsCount: "pending_posts_count", + postCount: "post_count", + primaryGroupId: "primary_group_id", + primaryGroupName: "primary_group_name", + profileViewCount: "profile_view_count", + recentTimeRead: "recent_time_read", + regularCategoryIds: "regular_category_ids", + secondFactorBackupEnabled: "second_factor_backup_enabled", + secondFactorEnabled: "second_factor_enabled", + sidebarCategoryIds: "sidebar_category_ids", + sidebarTags: "sidebar_tags", + systemAvatarTemplate: "system_avatar_template", + systemAvatarUploadId: "system_avatar_upload_id", + timeRead: "time_read", + trackedCategoryIds: "tracked_category_ids", + trackedTags: "tracked_tags", + trustLevel: "trust_level", + uploadedAvatarId: "uploaded_avatar_id", + useLogoSmallAsAvatar: "use_logo_small_as_avatar", + userApiKeys: "user_api_keys", + userAuthTokens: "user_auth_tokens", + userFields: "user_fields", + userNotificationSchedule: "user_notification_schedule", + userOption: "user_option", + watchedCategoryIds: "watched_category_ids", + watchedFirstPostCategoryIds: "watched_first_post_category_ids", + watchedTags: "watched_tags", + watchingFirstPostTags: "watching_first_post_tags", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdUser$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdUser$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdUser$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUser$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdUser$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdUser$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdUser$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdUser$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdUser$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUser$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdUser$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdUser$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdUser$Outbound; } /** @internal */ -export const GetUserIdentiyProviderExternalIdResponseBody$inboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdResponseBody$inboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdResponseBody, z.ZodTypeDef, unknown -> = z - .object({ - user: z.lazy(() => GetUserIdentiyProviderExternalIdUser$inboundSchema), - user_badges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - user_badges: "userBadges", - }); + > = z.object({ + user: z.lazy(() => GetUserIdentiyProviderExternalIdUser$inboundSchema), + user_badges: z.array(z.any()), + }).transform((v) => { + return remap$(v, { + "user_badges": "userBadges", }); + }); /** @internal */ export type GetUserIdentiyProviderExternalIdResponseBody$Outbound = { - user: GetUserIdentiyProviderExternalIdUser$Outbound; - user_badges: Array; + user: GetUserIdentiyProviderExternalIdUser$Outbound; + user_badges: Array; }; /** @internal */ -export const GetUserIdentiyProviderExternalIdResponseBody$outboundSchema: z.ZodType< +export const GetUserIdentiyProviderExternalIdResponseBody$outboundSchema: + z.ZodType< GetUserIdentiyProviderExternalIdResponseBody$Outbound, z.ZodTypeDef, GetUserIdentiyProviderExternalIdResponseBody -> = z - .object({ - user: z.lazy(() => GetUserIdentiyProviderExternalIdUser$outboundSchema), - userBadges: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - userBadges: "user_badges", - }); + > = z.object({ + user: z.lazy(() => GetUserIdentiyProviderExternalIdUser$outboundSchema), + userBadges: z.array(z.any()), + }).transform((v) => { + return remap$(v, { + userBadges: "user_badges", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserIdentiyProviderExternalIdResponseBody$ { - /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserIdentiyProviderExternalIdResponseBody$inboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserIdentiyProviderExternalIdResponseBody$outboundSchema; - /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$Outbound` instead. */ - export type Outbound = GetUserIdentiyProviderExternalIdResponseBody$Outbound; + /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = + GetUserIdentiyProviderExternalIdResponseBody$inboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetUserIdentiyProviderExternalIdResponseBody$outboundSchema; + /** @deprecated use `GetUserIdentiyProviderExternalIdResponseBody$Outbound` instead. */ + export type Outbound = GetUserIdentiyProviderExternalIdResponseBody$Outbound; } diff --git a/src/sdk/models/operations/getusersentprivatemessages.ts b/src/sdk/models/operations/getusersentprivatemessages.ts index b4a887f..f19831d 100644 --- a/src/sdk/models/operations/getusersentprivatemessages.ts +++ b/src/sdk/models/operations/getusersentprivatemessages.ts @@ -2,103 +2,103 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserSentPrivateMessagesRequest = { - username: string; + username: string; }; export type GetUserSentPrivateMessagesPosters = { - description?: string | undefined; - extras?: string | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type GetUserSentPrivateMessagesTopics = { - allowedUserCount?: number | undefined; - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumpedAt?: string | undefined; - categoryId?: string | null | undefined; - closed?: boolean | undefined; - createdAt?: string | undefined; - fancyTitle?: string | undefined; - featuredLink?: string | null | undefined; - hasSummary?: boolean | undefined; - highestPostNumber?: number | undefined; - id?: number | undefined; - imageUrl?: string | null | undefined; - lastPostedAt?: string | undefined; - lastPosterUsername?: string | undefined; - lastReadPostNumber?: number | undefined; - likeCount?: number | undefined; - liked?: boolean | undefined; - notificationLevel?: number | undefined; - participants?: Array | undefined; - pinned?: boolean | undefined; - pinnedGlobally?: boolean | undefined; - posters?: Array | undefined; - postsCount?: number | undefined; - replyCount?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unreadPosts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + allowedUserCount?: number | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumpedAt?: string | undefined; + categoryId?: string | null | undefined; + closed?: boolean | undefined; + createdAt?: string | undefined; + fancyTitle?: string | undefined; + featuredLink?: string | null | undefined; + hasSummary?: boolean | undefined; + highestPostNumber?: number | undefined; + id?: number | undefined; + imageUrl?: string | null | undefined; + lastPostedAt?: string | undefined; + lastPosterUsername?: string | undefined; + lastReadPostNumber?: number | undefined; + likeCount?: number | undefined; + liked?: boolean | undefined; + notificationLevel?: number | undefined; + participants?: Array | undefined; + pinned?: boolean | undefined; + pinnedGlobally?: boolean | undefined; + posters?: Array | undefined; + postsCount?: number | undefined; + replyCount?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unreadPosts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; export type GetUserSentPrivateMessagesTopicList = { - canCreateTopic?: boolean | undefined; - draft?: string | null | undefined; - draftKey?: string | undefined; - draftSequence?: number | undefined; - perPage?: number | undefined; - topics?: Array | undefined; + canCreateTopic?: boolean | undefined; + draft?: string | null | undefined; + draftKey?: string | undefined; + draftSequence?: number | undefined; + perPage?: number | undefined; + topics?: Array | undefined; }; export type GetUserSentPrivateMessagesUsers = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** * private messages */ export type GetUserSentPrivateMessagesResponseBody = { - primaryGroups?: Array | undefined; - topicList?: GetUserSentPrivateMessagesTopicList | undefined; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList?: GetUserSentPrivateMessagesTopicList | undefined; + users?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesRequest$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesRequest, - z.ZodTypeDef, - unknown + GetUserSentPrivateMessagesRequest, + z.ZodTypeDef, + unknown > = z.object({ - username: z.string(), + username: z.string(), }); /** @internal */ export type GetUserSentPrivateMessagesRequest$Outbound = { - username: string; + username: string; }; /** @internal */ export const GetUserSentPrivateMessagesRequest$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesRequest$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesRequest + GetUserSentPrivateMessagesRequest$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesRequest > = z.object({ - username: z.string(), + username: z.string(), }); /** @@ -106,432 +106,428 @@ export const GetUserSentPrivateMessagesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesRequest$ { - /** @deprecated use `GetUserSentPrivateMessagesRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesRequest$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesRequest$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesRequest$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesRequest$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesRequest$inboundSchema` instead. */ + export const inboundSchema = GetUserSentPrivateMessagesRequest$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesRequest$outboundSchema` instead. */ + export const outboundSchema = + GetUserSentPrivateMessagesRequest$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesRequest$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesRequest$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesPosters$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesPosters, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + GetUserSentPrivateMessagesPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type GetUserSentPrivateMessagesPosters$Outbound = { - description?: string | undefined; - extras?: string | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesPosters$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesPosters$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesPosters -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + GetUserSentPrivateMessagesPosters$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesPosters +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesPosters$ { - /** @deprecated use `GetUserSentPrivateMessagesPosters$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesPosters$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesPosters$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesPosters$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesPosters$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesPosters$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesPosters$inboundSchema` instead. */ + export const inboundSchema = GetUserSentPrivateMessagesPosters$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesPosters$outboundSchema` instead. */ + export const outboundSchema = + GetUserSentPrivateMessagesPosters$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesPosters$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesPosters$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesTopics$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesTopics, - z.ZodTypeDef, - unknown -> = z - .object({ - allowed_user_count: z.number().int().optional(), - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumped_at: z.string().optional(), - category_id: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - created_at: z.string().optional(), - fancy_title: z.string().optional(), - featured_link: z.nullable(z.string()).optional(), - has_summary: z.boolean().optional(), - highest_post_number: z.number().int().optional(), - id: z.number().int().optional(), - image_url: z.nullable(z.string()).optional(), - last_posted_at: z.string().optional(), - last_poster_username: z.string().optional(), - last_read_post_number: z.number().int().optional(), - like_count: z.number().int().optional(), - liked: z.boolean().optional(), - notification_level: z.number().int().optional(), - participants: z.array(z.any()).optional(), - pinned: z.boolean().optional(), - pinned_globally: z.boolean().optional(), - posters: z.array(z.lazy(() => GetUserSentPrivateMessagesPosters$inboundSchema)).optional(), - posts_count: z.number().int().optional(), - reply_count: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unread_posts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowed_user_count: "allowedUserCount", - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - last_read_post_number: "lastReadPostNumber", - like_count: "likeCount", - notification_level: "notificationLevel", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - unread_posts: "unreadPosts", - }); - }); + GetUserSentPrivateMessagesTopics, + z.ZodTypeDef, + unknown +> = z.object({ + allowed_user_count: z.number().int().optional(), + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumped_at: z.string().optional(), + category_id: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + created_at: z.string().optional(), + fancy_title: z.string().optional(), + featured_link: z.nullable(z.string()).optional(), + has_summary: z.boolean().optional(), + highest_post_number: z.number().int().optional(), + id: z.number().int().optional(), + image_url: z.nullable(z.string()).optional(), + last_posted_at: z.string().optional(), + last_poster_username: z.string().optional(), + last_read_post_number: z.number().int().optional(), + like_count: z.number().int().optional(), + liked: z.boolean().optional(), + notification_level: z.number().int().optional(), + participants: z.array(z.any()).optional(), + pinned: z.boolean().optional(), + pinned_globally: z.boolean().optional(), + posters: z.array( + z.lazy(() => GetUserSentPrivateMessagesPosters$inboundSchema), + ).optional(), + posts_count: z.number().int().optional(), + reply_count: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unread_posts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "allowed_user_count": "allowedUserCount", + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "last_read_post_number": "lastReadPostNumber", + "like_count": "likeCount", + "notification_level": "notificationLevel", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", + "unread_posts": "unreadPosts", + }); +}); /** @internal */ export type GetUserSentPrivateMessagesTopics$Outbound = { - allowed_user_count?: number | undefined; - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumped_at?: string | undefined; - category_id?: string | null | undefined; - closed?: boolean | undefined; - created_at?: string | undefined; - fancy_title?: string | undefined; - featured_link?: string | null | undefined; - has_summary?: boolean | undefined; - highest_post_number?: number | undefined; - id?: number | undefined; - image_url?: string | null | undefined; - last_posted_at?: string | undefined; - last_poster_username?: string | undefined; - last_read_post_number?: number | undefined; - like_count?: number | undefined; - liked?: boolean | undefined; - notification_level?: number | undefined; - participants?: Array | undefined; - pinned?: boolean | undefined; - pinned_globally?: boolean | undefined; - posters?: Array | undefined; - posts_count?: number | undefined; - reply_count?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unread_posts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + allowed_user_count?: number | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumped_at?: string | undefined; + category_id?: string | null | undefined; + closed?: boolean | undefined; + created_at?: string | undefined; + fancy_title?: string | undefined; + featured_link?: string | null | undefined; + has_summary?: boolean | undefined; + highest_post_number?: number | undefined; + id?: number | undefined; + image_url?: string | null | undefined; + last_posted_at?: string | undefined; + last_poster_username?: string | undefined; + last_read_post_number?: number | undefined; + like_count?: number | undefined; + liked?: boolean | undefined; + notification_level?: number | undefined; + participants?: Array | undefined; + pinned?: boolean | undefined; + pinned_globally?: boolean | undefined; + posters?: Array | undefined; + posts_count?: number | undefined; + reply_count?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unread_posts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesTopics$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesTopics$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesTopics -> = z - .object({ - allowedUserCount: z.number().int().optional(), - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumpedAt: z.string().optional(), - categoryId: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - createdAt: z.string().optional(), - fancyTitle: z.string().optional(), - featuredLink: z.nullable(z.string()).optional(), - hasSummary: z.boolean().optional(), - highestPostNumber: z.number().int().optional(), - id: z.number().int().optional(), - imageUrl: z.nullable(z.string()).optional(), - lastPostedAt: z.string().optional(), - lastPosterUsername: z.string().optional(), - lastReadPostNumber: z.number().int().optional(), - likeCount: z.number().int().optional(), - liked: z.boolean().optional(), - notificationLevel: z.number().int().optional(), - participants: z.array(z.any()).optional(), - pinned: z.boolean().optional(), - pinnedGlobally: z.boolean().optional(), - posters: z.array(z.lazy(() => GetUserSentPrivateMessagesPosters$outboundSchema)).optional(), - postsCount: z.number().int().optional(), - replyCount: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unreadPosts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowedUserCount: "allowed_user_count", - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - lastReadPostNumber: "last_read_post_number", - likeCount: "like_count", - notificationLevel: "notification_level", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - unreadPosts: "unread_posts", - }); - }); + GetUserSentPrivateMessagesTopics$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesTopics +> = z.object({ + allowedUserCount: z.number().int().optional(), + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumpedAt: z.string().optional(), + categoryId: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + createdAt: z.string().optional(), + fancyTitle: z.string().optional(), + featuredLink: z.nullable(z.string()).optional(), + hasSummary: z.boolean().optional(), + highestPostNumber: z.number().int().optional(), + id: z.number().int().optional(), + imageUrl: z.nullable(z.string()).optional(), + lastPostedAt: z.string().optional(), + lastPosterUsername: z.string().optional(), + lastReadPostNumber: z.number().int().optional(), + likeCount: z.number().int().optional(), + liked: z.boolean().optional(), + notificationLevel: z.number().int().optional(), + participants: z.array(z.any()).optional(), + pinned: z.boolean().optional(), + pinnedGlobally: z.boolean().optional(), + posters: z.array( + z.lazy(() => GetUserSentPrivateMessagesPosters$outboundSchema), + ).optional(), + postsCount: z.number().int().optional(), + replyCount: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unreadPosts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + allowedUserCount: "allowed_user_count", + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + lastReadPostNumber: "last_read_post_number", + likeCount: "like_count", + notificationLevel: "notification_level", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + unreadPosts: "unread_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesTopics$ { - /** @deprecated use `GetUserSentPrivateMessagesTopics$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesTopics$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesTopics$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesTopics$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesTopics$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesTopics$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesTopics$inboundSchema` instead. */ + export const inboundSchema = GetUserSentPrivateMessagesTopics$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesTopics$outboundSchema` instead. */ + export const outboundSchema = GetUserSentPrivateMessagesTopics$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesTopics$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesTopics$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesTopicList$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesTopicList, - z.ZodTypeDef, - unknown -> = z - .object({ - can_create_topic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draft_key: z.string().optional(), - draft_sequence: z.number().int().optional(), - per_page: z.number().int().optional(), - topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - draft_key: "draftKey", - draft_sequence: "draftSequence", - per_page: "perPage", - }); - }); + GetUserSentPrivateMessagesTopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draft_key: z.string().optional(), + draft_sequence: z.number().int().optional(), + per_page: z.number().int().optional(), + topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "per_page": "perPage", + }); +}); /** @internal */ export type GetUserSentPrivateMessagesTopicList$Outbound = { - can_create_topic?: boolean | undefined; - draft?: string | null | undefined; - draft_key?: string | undefined; - draft_sequence?: number | undefined; - per_page?: number | undefined; - topics?: Array | undefined; + can_create_topic?: boolean | undefined; + draft?: string | null | undefined; + draft_key?: string | undefined; + draft_sequence?: number | undefined; + per_page?: number | undefined; + topics?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesTopicList$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesTopicList$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesTopicList -> = z - .object({ - canCreateTopic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draftKey: z.string().optional(), - draftSequence: z.number().int().optional(), - perPage: z.number().int().optional(), - topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - draftKey: "draft_key", - draftSequence: "draft_sequence", - perPage: "per_page", - }); - }); + GetUserSentPrivateMessagesTopicList$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesTopicList +> = z.object({ + canCreateTopic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draftKey: z.string().optional(), + draftSequence: z.number().int().optional(), + perPage: z.number().int().optional(), + topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + draftKey: "draft_key", + draftSequence: "draft_sequence", + perPage: "per_page", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesTopicList$ { - /** @deprecated use `GetUserSentPrivateMessagesTopicList$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesTopicList$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesTopicList$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesTopicList$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesTopicList$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesTopicList$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesTopicList$inboundSchema` instead. */ + export const inboundSchema = + GetUserSentPrivateMessagesTopicList$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesTopicList$outboundSchema` instead. */ + export const outboundSchema = + GetUserSentPrivateMessagesTopicList$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesTopicList$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesTopicList$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesUsers$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); + GetUserSentPrivateMessagesUsers, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type GetUserSentPrivateMessagesUsers$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesUsers$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesUsers$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesUsers -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + GetUserSentPrivateMessagesUsers$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesUsers +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesUsers$ { - /** @deprecated use `GetUserSentPrivateMessagesUsers$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesUsers$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesUsers$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesUsers$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesUsers$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesUsers$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesUsers$inboundSchema` instead. */ + export const inboundSchema = GetUserSentPrivateMessagesUsers$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesUsers$outboundSchema` instead. */ + export const outboundSchema = GetUserSentPrivateMessagesUsers$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesUsers$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesUsers$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesResponseBody$inboundSchema: z.ZodType< - GetUserSentPrivateMessagesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => GetUserSentPrivateMessagesTopicList$inboundSchema).optional(), - users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + GetUserSentPrivateMessagesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => GetUserSentPrivateMessagesTopicList$inboundSchema) + .optional(), + users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type GetUserSentPrivateMessagesResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list?: GetUserSentPrivateMessagesTopicList$Outbound | undefined; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list?: GetUserSentPrivateMessagesTopicList$Outbound | undefined; + users?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesResponseBody$outboundSchema: z.ZodType< - GetUserSentPrivateMessagesResponseBody$Outbound, - z.ZodTypeDef, - GetUserSentPrivateMessagesResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => GetUserSentPrivateMessagesTopicList$outboundSchema).optional(), - users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + GetUserSentPrivateMessagesResponseBody$Outbound, + z.ZodTypeDef, + GetUserSentPrivateMessagesResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => GetUserSentPrivateMessagesTopicList$outboundSchema) + .optional(), + users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesResponseBody$ { - /** @deprecated use `GetUserSentPrivateMessagesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserSentPrivateMessagesResponseBody$inboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserSentPrivateMessagesResponseBody$outboundSchema; - /** @deprecated use `GetUserSentPrivateMessagesResponseBody$Outbound` instead. */ - export type Outbound = GetUserSentPrivateMessagesResponseBody$Outbound; + /** @deprecated use `GetUserSentPrivateMessagesResponseBody$inboundSchema` instead. */ + export const inboundSchema = + GetUserSentPrivateMessagesResponseBody$inboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetUserSentPrivateMessagesResponseBody$outboundSchema; + /** @deprecated use `GetUserSentPrivateMessagesResponseBody$Outbound` instead. */ + export type Outbound = GetUserSentPrivateMessagesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/invitetotopic.ts b/src/sdk/models/operations/invitetotopic.ts index 5de0e7a..a1e4384 100644 --- a/src/sdk/models/operations/invitetotopic.ts +++ b/src/sdk/models/operations/invitetotopic.ts @@ -2,59 +2,59 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type InviteToTopicRequestBody = { - email?: string | undefined; - user?: string | undefined; + email?: string | undefined; + user?: string | undefined; }; export type InviteToTopicRequest = { - apiKey: string; - apiUsername: string; - requestBody?: InviteToTopicRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: InviteToTopicRequestBody | undefined; + id: string; }; export type InviteToTopicUser = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** * topic updated */ export type InviteToTopicResponseBody = { - user?: InviteToTopicUser | undefined; + user?: InviteToTopicUser | undefined; }; /** @internal */ export const InviteToTopicRequestBody$inboundSchema: z.ZodType< - InviteToTopicRequestBody, - z.ZodTypeDef, - unknown + InviteToTopicRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - email: z.string().optional(), - user: z.string().optional(), + email: z.string().optional(), + user: z.string().optional(), }); /** @internal */ export type InviteToTopicRequestBody$Outbound = { - email?: string | undefined; - user?: string | undefined; + email?: string | undefined; + user?: string | undefined; }; /** @internal */ export const InviteToTopicRequestBody$outboundSchema: z.ZodType< - InviteToTopicRequestBody$Outbound, - z.ZodTypeDef, - InviteToTopicRequestBody + InviteToTopicRequestBody$Outbound, + z.ZodTypeDef, + InviteToTopicRequestBody > = z.object({ - email: z.string().optional(), - user: z.string().optional(), + email: z.string().optional(), + user: z.string().optional(), }); /** @@ -62,150 +62,145 @@ export const InviteToTopicRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InviteToTopicRequestBody$ { - /** @deprecated use `InviteToTopicRequestBody$inboundSchema` instead. */ - export const inboundSchema = InviteToTopicRequestBody$inboundSchema; - /** @deprecated use `InviteToTopicRequestBody$outboundSchema` instead. */ - export const outboundSchema = InviteToTopicRequestBody$outboundSchema; - /** @deprecated use `InviteToTopicRequestBody$Outbound` instead. */ - export type Outbound = InviteToTopicRequestBody$Outbound; + /** @deprecated use `InviteToTopicRequestBody$inboundSchema` instead. */ + export const inboundSchema = InviteToTopicRequestBody$inboundSchema; + /** @deprecated use `InviteToTopicRequestBody$outboundSchema` instead. */ + export const outboundSchema = InviteToTopicRequestBody$outboundSchema; + /** @deprecated use `InviteToTopicRequestBody$Outbound` instead. */ + export type Outbound = InviteToTopicRequestBody$Outbound; } /** @internal */ export const InviteToTopicRequest$inboundSchema: z.ZodType< - InviteToTopicRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => InviteToTopicRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + InviteToTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => InviteToTopicRequestBody$inboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type InviteToTopicRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: InviteToTopicRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: InviteToTopicRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const InviteToTopicRequest$outboundSchema: z.ZodType< - InviteToTopicRequest$Outbound, - z.ZodTypeDef, - InviteToTopicRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => InviteToTopicRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + InviteToTopicRequest$Outbound, + z.ZodTypeDef, + InviteToTopicRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => InviteToTopicRequestBody$outboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InviteToTopicRequest$ { - /** @deprecated use `InviteToTopicRequest$inboundSchema` instead. */ - export const inboundSchema = InviteToTopicRequest$inboundSchema; - /** @deprecated use `InviteToTopicRequest$outboundSchema` instead. */ - export const outboundSchema = InviteToTopicRequest$outboundSchema; - /** @deprecated use `InviteToTopicRequest$Outbound` instead. */ - export type Outbound = InviteToTopicRequest$Outbound; + /** @deprecated use `InviteToTopicRequest$inboundSchema` instead. */ + export const inboundSchema = InviteToTopicRequest$inboundSchema; + /** @deprecated use `InviteToTopicRequest$outboundSchema` instead. */ + export const outboundSchema = InviteToTopicRequest$outboundSchema; + /** @deprecated use `InviteToTopicRequest$Outbound` instead. */ + export type Outbound = InviteToTopicRequest$Outbound; } /** @internal */ -export const InviteToTopicUser$inboundSchema: z.ZodType = - z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const InviteToTopicUser$inboundSchema: z.ZodType< + InviteToTopicUser, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type InviteToTopicUser$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** @internal */ export const InviteToTopicUser$outboundSchema: z.ZodType< - InviteToTopicUser$Outbound, - z.ZodTypeDef, - InviteToTopicUser -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + InviteToTopicUser$Outbound, + z.ZodTypeDef, + InviteToTopicUser +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InviteToTopicUser$ { - /** @deprecated use `InviteToTopicUser$inboundSchema` instead. */ - export const inboundSchema = InviteToTopicUser$inboundSchema; - /** @deprecated use `InviteToTopicUser$outboundSchema` instead. */ - export const outboundSchema = InviteToTopicUser$outboundSchema; - /** @deprecated use `InviteToTopicUser$Outbound` instead. */ - export type Outbound = InviteToTopicUser$Outbound; + /** @deprecated use `InviteToTopicUser$inboundSchema` instead. */ + export const inboundSchema = InviteToTopicUser$inboundSchema; + /** @deprecated use `InviteToTopicUser$outboundSchema` instead. */ + export const outboundSchema = InviteToTopicUser$outboundSchema; + /** @deprecated use `InviteToTopicUser$Outbound` instead. */ + export type Outbound = InviteToTopicUser$Outbound; } /** @internal */ export const InviteToTopicResponseBody$inboundSchema: z.ZodType< - InviteToTopicResponseBody, - z.ZodTypeDef, - unknown + InviteToTopicResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - user: z.lazy(() => InviteToTopicUser$inboundSchema).optional(), + user: z.lazy(() => InviteToTopicUser$inboundSchema).optional(), }); /** @internal */ export type InviteToTopicResponseBody$Outbound = { - user?: InviteToTopicUser$Outbound | undefined; + user?: InviteToTopicUser$Outbound | undefined; }; /** @internal */ export const InviteToTopicResponseBody$outboundSchema: z.ZodType< - InviteToTopicResponseBody$Outbound, - z.ZodTypeDef, - InviteToTopicResponseBody + InviteToTopicResponseBody$Outbound, + z.ZodTypeDef, + InviteToTopicResponseBody > = z.object({ - user: z.lazy(() => InviteToTopicUser$outboundSchema).optional(), + user: z.lazy(() => InviteToTopicUser$outboundSchema).optional(), }); /** @@ -213,10 +208,10 @@ export const InviteToTopicResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InviteToTopicResponseBody$ { - /** @deprecated use `InviteToTopicResponseBody$inboundSchema` instead. */ - export const inboundSchema = InviteToTopicResponseBody$inboundSchema; - /** @deprecated use `InviteToTopicResponseBody$outboundSchema` instead. */ - export const outboundSchema = InviteToTopicResponseBody$outboundSchema; - /** @deprecated use `InviteToTopicResponseBody$Outbound` instead. */ - export type Outbound = InviteToTopicResponseBody$Outbound; + /** @deprecated use `InviteToTopicResponseBody$inboundSchema` instead. */ + export const inboundSchema = InviteToTopicResponseBody$inboundSchema; + /** @deprecated use `InviteToTopicResponseBody$outboundSchema` instead. */ + export const outboundSchema = InviteToTopicResponseBody$outboundSchema; + /** @deprecated use `InviteToTopicResponseBody$Outbound` instead. */ + export type Outbound = InviteToTopicResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listcategories.ts b/src/sdk/models/operations/listcategories.ts index c1f70be..c05f1a5 100644 --- a/src/sdk/models/operations/listcategories.ts +++ b/src/sdk/models/operations/listcategories.ts @@ -2,434 +2,430 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListCategoriesRequest = { - includeSubcategories?: boolean | undefined; + includeSubcategories?: boolean | undefined; }; export type Categories = { - canEdit: boolean; - color: string; - defaultListFilter: string; - defaultTopPeriod: string; - defaultView: string | null; - description: string | null; - descriptionExcerpt: string | null; - descriptionText: string | null; - hasChildren: boolean; - id: number; - isUncategorized?: boolean | undefined; - minimumRequiredTags: number; - name: string; - navigateToFirstPostAfterRead: boolean; - notificationLevel: number; - numFeaturedTopics: number; - permission: number; - position: number; - postCount: number; - readRestricted: boolean; - showSubcategoryList: boolean; - slug: string; - sortAscending: string | null; - sortOrder: string | null; - subcategoryIds: Array; - subcategoryList?: Array | null | undefined; - subcategoryListStyle: string; - textColor: string; - topicCount: number; - topicTemplate: string | null; - topicUrl: string | null; - topicsAllTime: number; - topicsDay: number; - topicsMonth: number; - topicsWeek: number; - topicsYear: number; - uploadedBackground: string | null; - uploadedBackgroundDark: string | null; - uploadedLogo: string | null; - uploadedLogoDark: string | null; + canEdit: boolean; + color: string; + defaultListFilter: string; + defaultTopPeriod: string; + defaultView: string | null; + description: string | null; + descriptionExcerpt: string | null; + descriptionText: string | null; + hasChildren: boolean; + id: number; + isUncategorized?: boolean | undefined; + minimumRequiredTags: number; + name: string; + navigateToFirstPostAfterRead: boolean; + notificationLevel: number; + numFeaturedTopics: number; + permission: number; + position: number; + postCount: number; + readRestricted: boolean; + showSubcategoryList: boolean; + slug: string; + sortAscending: string | null; + sortOrder: string | null; + subcategoryIds: Array; + subcategoryList?: Array | null | undefined; + subcategoryListStyle: string; + textColor: string; + topicCount: number; + topicTemplate: string | null; + topicUrl: string | null; + topicsAllTime: number; + topicsDay: number; + topicsMonth: number; + topicsWeek: number; + topicsYear: number; + uploadedBackground: string | null; + uploadedBackgroundDark: string | null; + uploadedLogo: string | null; + uploadedLogoDark: string | null; }; export type CategoryList = { - canCreateCategory: boolean; - canCreateTopic: boolean; - categories: Array; + canCreateCategory: boolean; + canCreateTopic: boolean; + categories: Array; }; /** * success response */ export type ListCategoriesResponseBody = { - categoryList: CategoryList; + categoryList: CategoryList; }; /** @internal */ export const ListCategoriesRequest$inboundSchema: z.ZodType< - ListCategoriesRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - include_subcategories: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - include_subcategories: "includeSubcategories", - }); - }); + ListCategoriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + include_subcategories: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "include_subcategories": "includeSubcategories", + }); +}); /** @internal */ export type ListCategoriesRequest$Outbound = { - include_subcategories?: boolean | undefined; + include_subcategories?: boolean | undefined; }; /** @internal */ export const ListCategoriesRequest$outboundSchema: z.ZodType< - ListCategoriesRequest$Outbound, - z.ZodTypeDef, - ListCategoriesRequest -> = z - .object({ - includeSubcategories: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - includeSubcategories: "include_subcategories", - }); - }); + ListCategoriesRequest$Outbound, + z.ZodTypeDef, + ListCategoriesRequest +> = z.object({ + includeSubcategories: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + includeSubcategories: "include_subcategories", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCategoriesRequest$ { - /** @deprecated use `ListCategoriesRequest$inboundSchema` instead. */ - export const inboundSchema = ListCategoriesRequest$inboundSchema; - /** @deprecated use `ListCategoriesRequest$outboundSchema` instead. */ - export const outboundSchema = ListCategoriesRequest$outboundSchema; - /** @deprecated use `ListCategoriesRequest$Outbound` instead. */ - export type Outbound = ListCategoriesRequest$Outbound; + /** @deprecated use `ListCategoriesRequest$inboundSchema` instead. */ + export const inboundSchema = ListCategoriesRequest$inboundSchema; + /** @deprecated use `ListCategoriesRequest$outboundSchema` instead. */ + export const outboundSchema = ListCategoriesRequest$outboundSchema; + /** @deprecated use `ListCategoriesRequest$Outbound` instead. */ + export type Outbound = ListCategoriesRequest$Outbound; } /** @internal */ -export const Categories$inboundSchema: z.ZodType = z - .object({ - can_edit: z.boolean(), - color: z.string(), - default_list_filter: z.string(), - default_top_period: z.string(), - default_view: z.nullable(z.string()), - description: z.nullable(z.string()), - description_excerpt: z.nullable(z.string()), - description_text: z.nullable(z.string()), - has_children: z.boolean(), - id: z.number().int(), - is_uncategorized: z.boolean().optional(), - minimum_required_tags: z.number().int(), - name: z.string(), - navigate_to_first_post_after_read: z.boolean(), - notification_level: z.number().int(), - num_featured_topics: z.number().int(), - permission: z.number().int(), - position: z.number().int(), - post_count: z.number().int(), - read_restricted: z.boolean(), - show_subcategory_list: z.boolean(), - slug: z.string(), - sort_ascending: z.nullable(z.string()), - sort_order: z.nullable(z.string()), - subcategory_ids: z.array(z.any()), - subcategory_list: z.nullable(z.array(z.any())).optional(), - subcategory_list_style: z.string(), - text_color: z.string(), - topic_count: z.number().int(), - topic_template: z.nullable(z.string()), - topic_url: z.nullable(z.string()), - topics_all_time: z.number().int(), - topics_day: z.number().int(), - topics_month: z.number().int(), - topics_week: z.number().int(), - topics_year: z.number().int(), - uploaded_background: z.nullable(z.string()), - uploaded_background_dark: z.nullable(z.string()), - uploaded_logo: z.nullable(z.string()), - uploaded_logo_dark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - can_edit: "canEdit", - default_list_filter: "defaultListFilter", - default_top_period: "defaultTopPeriod", - default_view: "defaultView", - description_excerpt: "descriptionExcerpt", - description_text: "descriptionText", - has_children: "hasChildren", - is_uncategorized: "isUncategorized", - minimum_required_tags: "minimumRequiredTags", - navigate_to_first_post_after_read: "navigateToFirstPostAfterRead", - notification_level: "notificationLevel", - num_featured_topics: "numFeaturedTopics", - post_count: "postCount", - read_restricted: "readRestricted", - show_subcategory_list: "showSubcategoryList", - sort_ascending: "sortAscending", - sort_order: "sortOrder", - subcategory_ids: "subcategoryIds", - subcategory_list: "subcategoryList", - subcategory_list_style: "subcategoryListStyle", - text_color: "textColor", - topic_count: "topicCount", - topic_template: "topicTemplate", - topic_url: "topicUrl", - topics_all_time: "topicsAllTime", - topics_day: "topicsDay", - topics_month: "topicsMonth", - topics_week: "topicsWeek", - topics_year: "topicsYear", - uploaded_background: "uploadedBackground", - uploaded_background_dark: "uploadedBackgroundDark", - uploaded_logo: "uploadedLogo", - uploaded_logo_dark: "uploadedLogoDark", - }); - }); +export const Categories$inboundSchema: z.ZodType< + Categories, + z.ZodTypeDef, + unknown +> = z.object({ + can_edit: z.boolean(), + color: z.string(), + default_list_filter: z.string(), + default_top_period: z.string(), + default_view: z.nullable(z.string()), + description: z.nullable(z.string()), + description_excerpt: z.nullable(z.string()), + description_text: z.nullable(z.string()), + has_children: z.boolean(), + id: z.number().int(), + is_uncategorized: z.boolean().optional(), + minimum_required_tags: z.number().int(), + name: z.string(), + navigate_to_first_post_after_read: z.boolean(), + notification_level: z.number().int(), + num_featured_topics: z.number().int(), + permission: z.number().int(), + position: z.number().int(), + post_count: z.number().int(), + read_restricted: z.boolean(), + show_subcategory_list: z.boolean(), + slug: z.string(), + sort_ascending: z.nullable(z.string()), + sort_order: z.nullable(z.string()), + subcategory_ids: z.array(z.any()), + subcategory_list: z.nullable(z.array(z.any())).optional(), + subcategory_list_style: z.string(), + text_color: z.string(), + topic_count: z.number().int(), + topic_template: z.nullable(z.string()), + topic_url: z.nullable(z.string()), + topics_all_time: z.number().int(), + topics_day: z.number().int(), + topics_month: z.number().int(), + topics_week: z.number().int(), + topics_year: z.number().int(), + uploaded_background: z.nullable(z.string()), + uploaded_background_dark: z.nullable(z.string()), + uploaded_logo: z.nullable(z.string()), + uploaded_logo_dark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "can_edit": "canEdit", + "default_list_filter": "defaultListFilter", + "default_top_period": "defaultTopPeriod", + "default_view": "defaultView", + "description_excerpt": "descriptionExcerpt", + "description_text": "descriptionText", + "has_children": "hasChildren", + "is_uncategorized": "isUncategorized", + "minimum_required_tags": "minimumRequiredTags", + "navigate_to_first_post_after_read": "navigateToFirstPostAfterRead", + "notification_level": "notificationLevel", + "num_featured_topics": "numFeaturedTopics", + "post_count": "postCount", + "read_restricted": "readRestricted", + "show_subcategory_list": "showSubcategoryList", + "sort_ascending": "sortAscending", + "sort_order": "sortOrder", + "subcategory_ids": "subcategoryIds", + "subcategory_list": "subcategoryList", + "subcategory_list_style": "subcategoryListStyle", + "text_color": "textColor", + "topic_count": "topicCount", + "topic_template": "topicTemplate", + "topic_url": "topicUrl", + "topics_all_time": "topicsAllTime", + "topics_day": "topicsDay", + "topics_month": "topicsMonth", + "topics_week": "topicsWeek", + "topics_year": "topicsYear", + "uploaded_background": "uploadedBackground", + "uploaded_background_dark": "uploadedBackgroundDark", + "uploaded_logo": "uploadedLogo", + "uploaded_logo_dark": "uploadedLogoDark", + }); +}); /** @internal */ export type Categories$Outbound = { - can_edit: boolean; - color: string; - default_list_filter: string; - default_top_period: string; - default_view: string | null; - description: string | null; - description_excerpt: string | null; - description_text: string | null; - has_children: boolean; - id: number; - is_uncategorized?: boolean | undefined; - minimum_required_tags: number; - name: string; - navigate_to_first_post_after_read: boolean; - notification_level: number; - num_featured_topics: number; - permission: number; - position: number; - post_count: number; - read_restricted: boolean; - show_subcategory_list: boolean; - slug: string; - sort_ascending: string | null; - sort_order: string | null; - subcategory_ids: Array; - subcategory_list?: Array | null | undefined; - subcategory_list_style: string; - text_color: string; - topic_count: number; - topic_template: string | null; - topic_url: string | null; - topics_all_time: number; - topics_day: number; - topics_month: number; - topics_week: number; - topics_year: number; - uploaded_background: string | null; - uploaded_background_dark: string | null; - uploaded_logo: string | null; - uploaded_logo_dark: string | null; + can_edit: boolean; + color: string; + default_list_filter: string; + default_top_period: string; + default_view: string | null; + description: string | null; + description_excerpt: string | null; + description_text: string | null; + has_children: boolean; + id: number; + is_uncategorized?: boolean | undefined; + minimum_required_tags: number; + name: string; + navigate_to_first_post_after_read: boolean; + notification_level: number; + num_featured_topics: number; + permission: number; + position: number; + post_count: number; + read_restricted: boolean; + show_subcategory_list: boolean; + slug: string; + sort_ascending: string | null; + sort_order: string | null; + subcategory_ids: Array; + subcategory_list?: Array | null | undefined; + subcategory_list_style: string; + text_color: string; + topic_count: number; + topic_template: string | null; + topic_url: string | null; + topics_all_time: number; + topics_day: number; + topics_month: number; + topics_week: number; + topics_year: number; + uploaded_background: string | null; + uploaded_background_dark: string | null; + uploaded_logo: string | null; + uploaded_logo_dark: string | null; }; /** @internal */ -export const Categories$outboundSchema: z.ZodType = z - .object({ - canEdit: z.boolean(), - color: z.string(), - defaultListFilter: z.string(), - defaultTopPeriod: z.string(), - defaultView: z.nullable(z.string()), - description: z.nullable(z.string()), - descriptionExcerpt: z.nullable(z.string()), - descriptionText: z.nullable(z.string()), - hasChildren: z.boolean(), - id: z.number().int(), - isUncategorized: z.boolean().optional(), - minimumRequiredTags: z.number().int(), - name: z.string(), - navigateToFirstPostAfterRead: z.boolean(), - notificationLevel: z.number().int(), - numFeaturedTopics: z.number().int(), - permission: z.number().int(), - position: z.number().int(), - postCount: z.number().int(), - readRestricted: z.boolean(), - showSubcategoryList: z.boolean(), - slug: z.string(), - sortAscending: z.nullable(z.string()), - sortOrder: z.nullable(z.string()), - subcategoryIds: z.array(z.any()), - subcategoryList: z.nullable(z.array(z.any())).optional(), - subcategoryListStyle: z.string(), - textColor: z.string(), - topicCount: z.number().int(), - topicTemplate: z.nullable(z.string()), - topicUrl: z.nullable(z.string()), - topicsAllTime: z.number().int(), - topicsDay: z.number().int(), - topicsMonth: z.number().int(), - topicsWeek: z.number().int(), - topicsYear: z.number().int(), - uploadedBackground: z.nullable(z.string()), - uploadedBackgroundDark: z.nullable(z.string()), - uploadedLogo: z.nullable(z.string()), - uploadedLogoDark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - canEdit: "can_edit", - defaultListFilter: "default_list_filter", - defaultTopPeriod: "default_top_period", - defaultView: "default_view", - descriptionExcerpt: "description_excerpt", - descriptionText: "description_text", - hasChildren: "has_children", - isUncategorized: "is_uncategorized", - minimumRequiredTags: "minimum_required_tags", - navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", - notificationLevel: "notification_level", - numFeaturedTopics: "num_featured_topics", - postCount: "post_count", - readRestricted: "read_restricted", - showSubcategoryList: "show_subcategory_list", - sortAscending: "sort_ascending", - sortOrder: "sort_order", - subcategoryIds: "subcategory_ids", - subcategoryList: "subcategory_list", - subcategoryListStyle: "subcategory_list_style", - textColor: "text_color", - topicCount: "topic_count", - topicTemplate: "topic_template", - topicUrl: "topic_url", - topicsAllTime: "topics_all_time", - topicsDay: "topics_day", - topicsMonth: "topics_month", - topicsWeek: "topics_week", - topicsYear: "topics_year", - uploadedBackground: "uploaded_background", - uploadedBackgroundDark: "uploaded_background_dark", - uploadedLogo: "uploaded_logo", - uploadedLogoDark: "uploaded_logo_dark", - }); - }); +export const Categories$outboundSchema: z.ZodType< + Categories$Outbound, + z.ZodTypeDef, + Categories +> = z.object({ + canEdit: z.boolean(), + color: z.string(), + defaultListFilter: z.string(), + defaultTopPeriod: z.string(), + defaultView: z.nullable(z.string()), + description: z.nullable(z.string()), + descriptionExcerpt: z.nullable(z.string()), + descriptionText: z.nullable(z.string()), + hasChildren: z.boolean(), + id: z.number().int(), + isUncategorized: z.boolean().optional(), + minimumRequiredTags: z.number().int(), + name: z.string(), + navigateToFirstPostAfterRead: z.boolean(), + notificationLevel: z.number().int(), + numFeaturedTopics: z.number().int(), + permission: z.number().int(), + position: z.number().int(), + postCount: z.number().int(), + readRestricted: z.boolean(), + showSubcategoryList: z.boolean(), + slug: z.string(), + sortAscending: z.nullable(z.string()), + sortOrder: z.nullable(z.string()), + subcategoryIds: z.array(z.any()), + subcategoryList: z.nullable(z.array(z.any())).optional(), + subcategoryListStyle: z.string(), + textColor: z.string(), + topicCount: z.number().int(), + topicTemplate: z.nullable(z.string()), + topicUrl: z.nullable(z.string()), + topicsAllTime: z.number().int(), + topicsDay: z.number().int(), + topicsMonth: z.number().int(), + topicsWeek: z.number().int(), + topicsYear: z.number().int(), + uploadedBackground: z.nullable(z.string()), + uploadedBackgroundDark: z.nullable(z.string()), + uploadedLogo: z.nullable(z.string()), + uploadedLogoDark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + canEdit: "can_edit", + defaultListFilter: "default_list_filter", + defaultTopPeriod: "default_top_period", + defaultView: "default_view", + descriptionExcerpt: "description_excerpt", + descriptionText: "description_text", + hasChildren: "has_children", + isUncategorized: "is_uncategorized", + minimumRequiredTags: "minimum_required_tags", + navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", + notificationLevel: "notification_level", + numFeaturedTopics: "num_featured_topics", + postCount: "post_count", + readRestricted: "read_restricted", + showSubcategoryList: "show_subcategory_list", + sortAscending: "sort_ascending", + sortOrder: "sort_order", + subcategoryIds: "subcategory_ids", + subcategoryList: "subcategory_list", + subcategoryListStyle: "subcategory_list_style", + textColor: "text_color", + topicCount: "topic_count", + topicTemplate: "topic_template", + topicUrl: "topic_url", + topicsAllTime: "topics_all_time", + topicsDay: "topics_day", + topicsMonth: "topics_month", + topicsWeek: "topics_week", + topicsYear: "topics_year", + uploadedBackground: "uploaded_background", + uploadedBackgroundDark: "uploaded_background_dark", + uploadedLogo: "uploaded_logo", + uploadedLogoDark: "uploaded_logo_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Categories$ { - /** @deprecated use `Categories$inboundSchema` instead. */ - export const inboundSchema = Categories$inboundSchema; - /** @deprecated use `Categories$outboundSchema` instead. */ - export const outboundSchema = Categories$outboundSchema; - /** @deprecated use `Categories$Outbound` instead. */ - export type Outbound = Categories$Outbound; + /** @deprecated use `Categories$inboundSchema` instead. */ + export const inboundSchema = Categories$inboundSchema; + /** @deprecated use `Categories$outboundSchema` instead. */ + export const outboundSchema = Categories$outboundSchema; + /** @deprecated use `Categories$Outbound` instead. */ + export type Outbound = Categories$Outbound; } /** @internal */ -export const CategoryList$inboundSchema: z.ZodType = z - .object({ - can_create_category: z.boolean(), - can_create_topic: z.boolean(), - categories: z.array(z.lazy(() => Categories$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - can_create_category: "canCreateCategory", - can_create_topic: "canCreateTopic", - }); - }); +export const CategoryList$inboundSchema: z.ZodType< + CategoryList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_category: z.boolean(), + can_create_topic: z.boolean(), + categories: z.array(z.lazy(() => Categories$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "can_create_category": "canCreateCategory", + "can_create_topic": "canCreateTopic", + }); +}); /** @internal */ export type CategoryList$Outbound = { - can_create_category: boolean; - can_create_topic: boolean; - categories: Array; + can_create_category: boolean; + can_create_topic: boolean; + categories: Array; }; /** @internal */ export const CategoryList$outboundSchema: z.ZodType< - CategoryList$Outbound, - z.ZodTypeDef, - CategoryList -> = z - .object({ - canCreateCategory: z.boolean(), - canCreateTopic: z.boolean(), - categories: z.array(z.lazy(() => Categories$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - canCreateCategory: "can_create_category", - canCreateTopic: "can_create_topic", - }); - }); + CategoryList$Outbound, + z.ZodTypeDef, + CategoryList +> = z.object({ + canCreateCategory: z.boolean(), + canCreateTopic: z.boolean(), + categories: z.array(z.lazy(() => Categories$outboundSchema)), +}).transform((v) => { + return remap$(v, { + canCreateCategory: "can_create_category", + canCreateTopic: "can_create_topic", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CategoryList$ { - /** @deprecated use `CategoryList$inboundSchema` instead. */ - export const inboundSchema = CategoryList$inboundSchema; - /** @deprecated use `CategoryList$outboundSchema` instead. */ - export const outboundSchema = CategoryList$outboundSchema; - /** @deprecated use `CategoryList$Outbound` instead. */ - export type Outbound = CategoryList$Outbound; + /** @deprecated use `CategoryList$inboundSchema` instead. */ + export const inboundSchema = CategoryList$inboundSchema; + /** @deprecated use `CategoryList$outboundSchema` instead. */ + export const outboundSchema = CategoryList$outboundSchema; + /** @deprecated use `CategoryList$Outbound` instead. */ + export type Outbound = CategoryList$Outbound; } /** @internal */ export const ListCategoriesResponseBody$inboundSchema: z.ZodType< - ListCategoriesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - category_list: z.lazy(() => CategoryList$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - category_list: "categoryList", - }); - }); + ListCategoriesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + category_list: z.lazy(() => CategoryList$inboundSchema), +}).transform((v) => { + return remap$(v, { + "category_list": "categoryList", + }); +}); /** @internal */ export type ListCategoriesResponseBody$Outbound = { - category_list: CategoryList$Outbound; + category_list: CategoryList$Outbound; }; /** @internal */ export const ListCategoriesResponseBody$outboundSchema: z.ZodType< - ListCategoriesResponseBody$Outbound, - z.ZodTypeDef, - ListCategoriesResponseBody -> = z - .object({ - categoryList: z.lazy(() => CategoryList$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - categoryList: "category_list", - }); - }); + ListCategoriesResponseBody$Outbound, + z.ZodTypeDef, + ListCategoriesResponseBody +> = z.object({ + categoryList: z.lazy(() => CategoryList$outboundSchema), +}).transform((v) => { + return remap$(v, { + categoryList: "category_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCategoriesResponseBody$ { - /** @deprecated use `ListCategoriesResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListCategoriesResponseBody$inboundSchema; - /** @deprecated use `ListCategoriesResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListCategoriesResponseBody$outboundSchema; - /** @deprecated use `ListCategoriesResponseBody$Outbound` instead. */ - export type Outbound = ListCategoriesResponseBody$Outbound; + /** @deprecated use `ListCategoriesResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListCategoriesResponseBody$inboundSchema; + /** @deprecated use `ListCategoriesResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListCategoriesResponseBody$outboundSchema; + /** @deprecated use `ListCategoriesResponseBody$Outbound` instead. */ + export type Outbound = ListCategoriesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listcategorytopics.ts b/src/sdk/models/operations/listcategorytopics.ts index cc30f9b..19be0ff 100644 --- a/src/sdk/models/operations/listcategorytopics.ts +++ b/src/sdk/models/operations/listcategorytopics.ts @@ -2,101 +2,101 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListCategoryTopicsRequest = { - id: number; - slug: string; + id: number; + slug: string; }; export type ListCategoryTopicsPosters = { - description: string; - extras: string; - primaryGroupId: string | null; - userId: number; + description: string; + extras: string; + primaryGroupId: string | null; + userId: number; }; export type Topics = { - archetype: string; - archived: boolean; - bookmarked: string | null; - bumped: boolean; - bumpedAt: string; - categoryId: number; - closed: boolean; - createdAt: string; - excerpt: string; - fancyTitle: string; - featuredLink: string | null; - hasSummary: boolean; - highestPostNumber: number; - id: number; - imageUrl: string | null; - lastPostedAt: string; - lastPosterUsername: string; - likeCount: number; - liked: string | null; - pinned: boolean; - pinnedGlobally: boolean; - posters: Array; - postsCount: number; - replyCount: number; - slug: string; - title: string; - unpinned: string | null; - unseen: boolean; - views: number; - visible: boolean; + archetype: string; + archived: boolean; + bookmarked: string | null; + bumped: boolean; + bumpedAt: string; + categoryId: number; + closed: boolean; + createdAt: string; + excerpt: string; + fancyTitle: string; + featuredLink: string | null; + hasSummary: boolean; + highestPostNumber: number; + id: number; + imageUrl: string | null; + lastPostedAt: string; + lastPosterUsername: string; + likeCount: number; + liked: string | null; + pinned: boolean; + pinnedGlobally: boolean; + posters: Array; + postsCount: number; + replyCount: number; + slug: string; + title: string; + unpinned: string | null; + unseen: boolean; + views: number; + visible: boolean; }; export type TopicList = { - canCreateTopic: boolean; - perPage: number; - topTags?: Array | undefined; - topics: Array; + canCreateTopic: boolean; + perPage: number; + topTags?: Array | undefined; + topics: Array; }; export type Users = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; /** * success response */ export type ListCategoryTopicsResponseBody = { - primaryGroups?: Array | undefined; - topicList: TopicList; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList: TopicList; + users?: Array | undefined; }; /** @internal */ export const ListCategoryTopicsRequest$inboundSchema: z.ZodType< - ListCategoryTopicsRequest, - z.ZodTypeDef, - unknown + ListCategoryTopicsRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), - slug: z.string(), + id: z.number().int(), + slug: z.string(), }); /** @internal */ export type ListCategoryTopicsRequest$Outbound = { - id: number; - slug: string; + id: number; + slug: string; }; /** @internal */ export const ListCategoryTopicsRequest$outboundSchema: z.ZodType< - ListCategoryTopicsRequest$Outbound, - z.ZodTypeDef, - ListCategoryTopicsRequest + ListCategoryTopicsRequest$Outbound, + z.ZodTypeDef, + ListCategoryTopicsRequest > = z.object({ - id: z.number().int(), - slug: z.string(), + id: z.number().int(), + slug: z.string(), }); /** @@ -104,380 +104,378 @@ export const ListCategoryTopicsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCategoryTopicsRequest$ { - /** @deprecated use `ListCategoryTopicsRequest$inboundSchema` instead. */ - export const inboundSchema = ListCategoryTopicsRequest$inboundSchema; - /** @deprecated use `ListCategoryTopicsRequest$outboundSchema` instead. */ - export const outboundSchema = ListCategoryTopicsRequest$outboundSchema; - /** @deprecated use `ListCategoryTopicsRequest$Outbound` instead. */ - export type Outbound = ListCategoryTopicsRequest$Outbound; + /** @deprecated use `ListCategoryTopicsRequest$inboundSchema` instead. */ + export const inboundSchema = ListCategoryTopicsRequest$inboundSchema; + /** @deprecated use `ListCategoryTopicsRequest$outboundSchema` instead. */ + export const outboundSchema = ListCategoryTopicsRequest$outboundSchema; + /** @deprecated use `ListCategoryTopicsRequest$Outbound` instead. */ + export type Outbound = ListCategoryTopicsRequest$Outbound; } /** @internal */ export const ListCategoryTopicsPosters$inboundSchema: z.ZodType< - ListCategoryTopicsPosters, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string(), - extras: z.string(), - primary_group_id: z.nullable(z.string()), - user_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + ListCategoryTopicsPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string(), + extras: z.string(), + primary_group_id: z.nullable(z.string()), + user_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type ListCategoryTopicsPosters$Outbound = { - description: string; - extras: string; - primary_group_id: string | null; - user_id: number; + description: string; + extras: string; + primary_group_id: string | null; + user_id: number; }; /** @internal */ export const ListCategoryTopicsPosters$outboundSchema: z.ZodType< - ListCategoryTopicsPosters$Outbound, - z.ZodTypeDef, - ListCategoryTopicsPosters -> = z - .object({ - description: z.string(), - extras: z.string(), - primaryGroupId: z.nullable(z.string()), - userId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + ListCategoryTopicsPosters$Outbound, + z.ZodTypeDef, + ListCategoryTopicsPosters +> = z.object({ + description: z.string(), + extras: z.string(), + primaryGroupId: z.nullable(z.string()), + userId: z.number().int(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCategoryTopicsPosters$ { - /** @deprecated use `ListCategoryTopicsPosters$inboundSchema` instead. */ - export const inboundSchema = ListCategoryTopicsPosters$inboundSchema; - /** @deprecated use `ListCategoryTopicsPosters$outboundSchema` instead. */ - export const outboundSchema = ListCategoryTopicsPosters$outboundSchema; - /** @deprecated use `ListCategoryTopicsPosters$Outbound` instead. */ - export type Outbound = ListCategoryTopicsPosters$Outbound; + /** @deprecated use `ListCategoryTopicsPosters$inboundSchema` instead. */ + export const inboundSchema = ListCategoryTopicsPosters$inboundSchema; + /** @deprecated use `ListCategoryTopicsPosters$outboundSchema` instead. */ + export const outboundSchema = ListCategoryTopicsPosters$outboundSchema; + /** @deprecated use `ListCategoryTopicsPosters$Outbound` instead. */ + export type Outbound = ListCategoryTopicsPosters$Outbound; } /** @internal */ export const Topics$inboundSchema: z.ZodType = z - .object({ - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.nullable(z.string()), - bumped: z.boolean(), - bumped_at: z.string(), - category_id: z.number().int(), - closed: z.boolean(), - created_at: z.string(), - excerpt: z.string(), - fancy_title: z.string(), - featured_link: z.nullable(z.string()), - has_summary: z.boolean(), - highest_post_number: z.number().int(), - id: z.number().int(), - image_url: z.nullable(z.string()), - last_posted_at: z.string(), - last_poster_username: z.string(), - like_count: z.number().int(), - liked: z.nullable(z.string()), - pinned: z.boolean(), - pinned_globally: z.boolean(), - posters: z.array(z.lazy(() => ListCategoryTopicsPosters$inboundSchema)), - posts_count: z.number().int(), - reply_count: z.number().int(), - slug: z.string(), - title: z.string(), - unpinned: z.nullable(z.string()), - unseen: z.boolean(), - views: z.number().int(), - visible: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - like_count: "likeCount", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - }); + .object({ + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.nullable(z.string()), + bumped: z.boolean(), + bumped_at: z.string(), + category_id: z.number().int(), + closed: z.boolean(), + created_at: z.string(), + excerpt: z.string(), + fancy_title: z.string(), + featured_link: z.nullable(z.string()), + has_summary: z.boolean(), + highest_post_number: z.number().int(), + id: z.number().int(), + image_url: z.nullable(z.string()), + last_posted_at: z.string(), + last_poster_username: z.string(), + like_count: z.number().int(), + liked: z.nullable(z.string()), + pinned: z.boolean(), + pinned_globally: z.boolean(), + posters: z.array(z.lazy(() => ListCategoryTopicsPosters$inboundSchema)), + posts_count: z.number().int(), + reply_count: z.number().int(), + slug: z.string(), + title: z.string(), + unpinned: z.nullable(z.string()), + unseen: z.boolean(), + views: z.number().int(), + visible: z.boolean(), + }).transform((v) => { + return remap$(v, { + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "like_count": "likeCount", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", }); + }); /** @internal */ export type Topics$Outbound = { - archetype: string; - archived: boolean; - bookmarked: string | null; - bumped: boolean; - bumped_at: string; - category_id: number; - closed: boolean; - created_at: string; - excerpt: string; - fancy_title: string; - featured_link: string | null; - has_summary: boolean; - highest_post_number: number; - id: number; - image_url: string | null; - last_posted_at: string; - last_poster_username: string; - like_count: number; - liked: string | null; - pinned: boolean; - pinned_globally: boolean; - posters: Array; - posts_count: number; - reply_count: number; - slug: string; - title: string; - unpinned: string | null; - unseen: boolean; - views: number; - visible: boolean; + archetype: string; + archived: boolean; + bookmarked: string | null; + bumped: boolean; + bumped_at: string; + category_id: number; + closed: boolean; + created_at: string; + excerpt: string; + fancy_title: string; + featured_link: string | null; + has_summary: boolean; + highest_post_number: number; + id: number; + image_url: string | null; + last_posted_at: string; + last_poster_username: string; + like_count: number; + liked: string | null; + pinned: boolean; + pinned_globally: boolean; + posters: Array; + posts_count: number; + reply_count: number; + slug: string; + title: string; + unpinned: string | null; + unseen: boolean; + views: number; + visible: boolean; }; /** @internal */ -export const Topics$outboundSchema: z.ZodType = z - .object({ - archetype: z.string(), - archived: z.boolean(), - bookmarked: z.nullable(z.string()), - bumped: z.boolean(), - bumpedAt: z.string(), - categoryId: z.number().int(), - closed: z.boolean(), - createdAt: z.string(), - excerpt: z.string(), - fancyTitle: z.string(), - featuredLink: z.nullable(z.string()), - hasSummary: z.boolean(), - highestPostNumber: z.number().int(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - lastPostedAt: z.string(), - lastPosterUsername: z.string(), - likeCount: z.number().int(), - liked: z.nullable(z.string()), - pinned: z.boolean(), - pinnedGlobally: z.boolean(), - posters: z.array(z.lazy(() => ListCategoryTopicsPosters$outboundSchema)), - postsCount: z.number().int(), - replyCount: z.number().int(), - slug: z.string(), - title: z.string(), - unpinned: z.nullable(z.string()), - unseen: z.boolean(), - views: z.number().int(), - visible: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - likeCount: "like_count", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - }); - }); +export const Topics$outboundSchema: z.ZodType< + Topics$Outbound, + z.ZodTypeDef, + Topics +> = z.object({ + archetype: z.string(), + archived: z.boolean(), + bookmarked: z.nullable(z.string()), + bumped: z.boolean(), + bumpedAt: z.string(), + categoryId: z.number().int(), + closed: z.boolean(), + createdAt: z.string(), + excerpt: z.string(), + fancyTitle: z.string(), + featuredLink: z.nullable(z.string()), + hasSummary: z.boolean(), + highestPostNumber: z.number().int(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + lastPostedAt: z.string(), + lastPosterUsername: z.string(), + likeCount: z.number().int(), + liked: z.nullable(z.string()), + pinned: z.boolean(), + pinnedGlobally: z.boolean(), + posters: z.array(z.lazy(() => ListCategoryTopicsPosters$outboundSchema)), + postsCount: z.number().int(), + replyCount: z.number().int(), + slug: z.string(), + title: z.string(), + unpinned: z.nullable(z.string()), + unseen: z.boolean(), + views: z.number().int(), + visible: z.boolean(), +}).transform((v) => { + return remap$(v, { + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + likeCount: "like_count", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Topics$ { - /** @deprecated use `Topics$inboundSchema` instead. */ - export const inboundSchema = Topics$inboundSchema; - /** @deprecated use `Topics$outboundSchema` instead. */ - export const outboundSchema = Topics$outboundSchema; - /** @deprecated use `Topics$Outbound` instead. */ - export type Outbound = Topics$Outbound; + /** @deprecated use `Topics$inboundSchema` instead. */ + export const inboundSchema = Topics$inboundSchema; + /** @deprecated use `Topics$outboundSchema` instead. */ + export const outboundSchema = Topics$outboundSchema; + /** @deprecated use `Topics$Outbound` instead. */ + export type Outbound = Topics$Outbound; } /** @internal */ -export const TopicList$inboundSchema: z.ZodType = z - .object({ - can_create_topic: z.boolean(), - per_page: z.number().int(), - top_tags: z.array(z.any()).optional(), - topics: z.array(z.lazy(() => Topics$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - per_page: "perPage", - top_tags: "topTags", - }); - }); +export const TopicList$inboundSchema: z.ZodType< + TopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean(), + per_page: z.number().int(), + top_tags: z.array(z.any()).optional(), + topics: z.array(z.lazy(() => Topics$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "per_page": "perPage", + "top_tags": "topTags", + }); +}); /** @internal */ export type TopicList$Outbound = { - can_create_topic: boolean; - per_page: number; - top_tags?: Array | undefined; - topics: Array; + can_create_topic: boolean; + per_page: number; + top_tags?: Array | undefined; + topics: Array; }; /** @internal */ -export const TopicList$outboundSchema: z.ZodType = z - .object({ - canCreateTopic: z.boolean(), - perPage: z.number().int(), - topTags: z.array(z.any()).optional(), - topics: z.array(z.lazy(() => Topics$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - perPage: "per_page", - topTags: "top_tags", - }); - }); +export const TopicList$outboundSchema: z.ZodType< + TopicList$Outbound, + z.ZodTypeDef, + TopicList +> = z.object({ + canCreateTopic: z.boolean(), + perPage: z.number().int(), + topTags: z.array(z.any()).optional(), + topics: z.array(z.lazy(() => Topics$outboundSchema)), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + perPage: "per_page", + topTags: "top_tags", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TopicList$ { - /** @deprecated use `TopicList$inboundSchema` instead. */ - export const inboundSchema = TopicList$inboundSchema; - /** @deprecated use `TopicList$outboundSchema` instead. */ - export const outboundSchema = TopicList$outboundSchema; - /** @deprecated use `TopicList$Outbound` instead. */ - export type Outbound = TopicList$Outbound; + /** @deprecated use `TopicList$inboundSchema` instead. */ + export const inboundSchema = TopicList$inboundSchema; + /** @deprecated use `TopicList$outboundSchema` instead. */ + export const outboundSchema = TopicList$outboundSchema; + /** @deprecated use `TopicList$Outbound` instead. */ + export type Outbound = TopicList$Outbound; } /** @internal */ export const Users$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); + .object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), + }).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", }); + }); /** @internal */ export type Users$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ -export const Users$outboundSchema: z.ZodType = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); +export const Users$outboundSchema: z.ZodType< + Users$Outbound, + z.ZodTypeDef, + Users +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Users$ { - /** @deprecated use `Users$inboundSchema` instead. */ - export const inboundSchema = Users$inboundSchema; - /** @deprecated use `Users$outboundSchema` instead. */ - export const outboundSchema = Users$outboundSchema; - /** @deprecated use `Users$Outbound` instead. */ - export type Outbound = Users$Outbound; + /** @deprecated use `Users$inboundSchema` instead. */ + export const inboundSchema = Users$inboundSchema; + /** @deprecated use `Users$outboundSchema` instead. */ + export const outboundSchema = Users$outboundSchema; + /** @deprecated use `Users$Outbound` instead. */ + export type Outbound = Users$Outbound; } /** @internal */ export const ListCategoryTopicsResponseBody$inboundSchema: z.ZodType< - ListCategoryTopicsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => TopicList$inboundSchema), - users: z.array(z.lazy(() => Users$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + ListCategoryTopicsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => TopicList$inboundSchema), + users: z.array(z.lazy(() => Users$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type ListCategoryTopicsResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list: TopicList$Outbound; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list: TopicList$Outbound; + users?: Array | undefined; }; /** @internal */ export const ListCategoryTopicsResponseBody$outboundSchema: z.ZodType< - ListCategoryTopicsResponseBody$Outbound, - z.ZodTypeDef, - ListCategoryTopicsResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => TopicList$outboundSchema), - users: z.array(z.lazy(() => Users$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + ListCategoryTopicsResponseBody$Outbound, + z.ZodTypeDef, + ListCategoryTopicsResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => TopicList$outboundSchema), + users: z.array(z.lazy(() => Users$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCategoryTopicsResponseBody$ { - /** @deprecated use `ListCategoryTopicsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListCategoryTopicsResponseBody$inboundSchema; - /** @deprecated use `ListCategoryTopicsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListCategoryTopicsResponseBody$outboundSchema; - /** @deprecated use `ListCategoryTopicsResponseBody$Outbound` instead. */ - export type Outbound = ListCategoryTopicsResponseBody$Outbound; + /** @deprecated use `ListCategoryTopicsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListCategoryTopicsResponseBody$inboundSchema; + /** @deprecated use `ListCategoryTopicsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListCategoryTopicsResponseBody$outboundSchema; + /** @deprecated use `ListCategoryTopicsResponseBody$Outbound` instead. */ + export type Outbound = ListCategoryTopicsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listgroupmembers.ts b/src/sdk/models/operations/listgroupmembers.ts index e17dbc4..9ffc701 100644 --- a/src/sdk/models/operations/listgroupmembers.ts +++ b/src/sdk/models/operations/listgroupmembers.ts @@ -2,76 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListGroupMembersRequest = { - /** - * Use group name instead of id - */ - id: string; + /** + * Use group name instead of id + */ + id: string; }; export type Members = { - addedAt: string; - avatarTemplate: string; - id: number; - lastPostedAt: string; - lastSeenAt: string; - name: string | null; - timezone: string; - title: string | null; - username: string; + addedAt: string; + avatarTemplate: string; + id: number; + lastPostedAt: string; + lastSeenAt: string; + name: string | null; + timezone: string; + title: string | null; + username: string; }; export type Meta = { - limit: number; - offset: number; - total: number; + limit: number; + offset: number; + total: number; }; export type Owners = { - addedAt: string; - avatarTemplate: string; - id: number; - lastPostedAt: string; - lastSeenAt: string; - name: string | null; - timezone: string; - title: string | null; - username: string; + addedAt: string; + avatarTemplate: string; + id: number; + lastPostedAt: string; + lastSeenAt: string; + name: string | null; + timezone: string; + title: string | null; + username: string; }; /** * success response */ export type ListGroupMembersResponseBody = { - members: Array; - meta: Meta; - owners: Array; + members: Array; + meta: Meta; + owners: Array; }; /** @internal */ export const ListGroupMembersRequest$inboundSchema: z.ZodType< - ListGroupMembersRequest, - z.ZodTypeDef, - unknown + ListGroupMembersRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type ListGroupMembersRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const ListGroupMembersRequest$outboundSchema: z.ZodType< - ListGroupMembersRequest$Outbound, - z.ZodTypeDef, - ListGroupMembersRequest + ListGroupMembersRequest$Outbound, + z.ZodTypeDef, + ListGroupMembersRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -79,215 +79,219 @@ export const ListGroupMembersRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListGroupMembersRequest$ { - /** @deprecated use `ListGroupMembersRequest$inboundSchema` instead. */ - export const inboundSchema = ListGroupMembersRequest$inboundSchema; - /** @deprecated use `ListGroupMembersRequest$outboundSchema` instead. */ - export const outboundSchema = ListGroupMembersRequest$outboundSchema; - /** @deprecated use `ListGroupMembersRequest$Outbound` instead. */ - export type Outbound = ListGroupMembersRequest$Outbound; + /** @deprecated use `ListGroupMembersRequest$inboundSchema` instead. */ + export const inboundSchema = ListGroupMembersRequest$inboundSchema; + /** @deprecated use `ListGroupMembersRequest$outboundSchema` instead. */ + export const outboundSchema = ListGroupMembersRequest$outboundSchema; + /** @deprecated use `ListGroupMembersRequest$Outbound` instead. */ + export type Outbound = ListGroupMembersRequest$Outbound; } /** @internal */ -export const Members$inboundSchema: z.ZodType = z - .object({ - added_at: z.string(), - avatar_template: z.string(), - id: z.number().int(), - last_posted_at: z.string(), - last_seen_at: z.string(), - name: z.nullable(z.string()), - timezone: z.string(), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - added_at: "addedAt", - avatar_template: "avatarTemplate", - last_posted_at: "lastPostedAt", - last_seen_at: "lastSeenAt", - }); +export const Members$inboundSchema: z.ZodType = + z.object({ + added_at: z.string(), + avatar_template: z.string(), + id: z.number().int(), + last_posted_at: z.string(), + last_seen_at: z.string(), + name: z.nullable(z.string()), + timezone: z.string(), + title: z.nullable(z.string()), + username: z.string(), + }).transform((v) => { + return remap$(v, { + "added_at": "addedAt", + "avatar_template": "avatarTemplate", + "last_posted_at": "lastPostedAt", + "last_seen_at": "lastSeenAt", }); + }); /** @internal */ export type Members$Outbound = { - added_at: string; - avatar_template: string; - id: number; - last_posted_at: string; - last_seen_at: string; - name: string | null; - timezone: string; - title: string | null; - username: string; + added_at: string; + avatar_template: string; + id: number; + last_posted_at: string; + last_seen_at: string; + name: string | null; + timezone: string; + title: string | null; + username: string; }; /** @internal */ -export const Members$outboundSchema: z.ZodType = z - .object({ - addedAt: z.string(), - avatarTemplate: z.string(), - id: z.number().int(), - lastPostedAt: z.string(), - lastSeenAt: z.string(), - name: z.nullable(z.string()), - timezone: z.string(), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - addedAt: "added_at", - avatarTemplate: "avatar_template", - lastPostedAt: "last_posted_at", - lastSeenAt: "last_seen_at", - }); - }); +export const Members$outboundSchema: z.ZodType< + Members$Outbound, + z.ZodTypeDef, + Members +> = z.object({ + addedAt: z.string(), + avatarTemplate: z.string(), + id: z.number().int(), + lastPostedAt: z.string(), + lastSeenAt: z.string(), + name: z.nullable(z.string()), + timezone: z.string(), + title: z.nullable(z.string()), + username: z.string(), +}).transform((v) => { + return remap$(v, { + addedAt: "added_at", + avatarTemplate: "avatar_template", + lastPostedAt: "last_posted_at", + lastSeenAt: "last_seen_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Members$ { - /** @deprecated use `Members$inboundSchema` instead. */ - export const inboundSchema = Members$inboundSchema; - /** @deprecated use `Members$outboundSchema` instead. */ - export const outboundSchema = Members$outboundSchema; - /** @deprecated use `Members$Outbound` instead. */ - export type Outbound = Members$Outbound; + /** @deprecated use `Members$inboundSchema` instead. */ + export const inboundSchema = Members$inboundSchema; + /** @deprecated use `Members$outboundSchema` instead. */ + export const outboundSchema = Members$outboundSchema; + /** @deprecated use `Members$Outbound` instead. */ + export type Outbound = Members$Outbound; } /** @internal */ -export const Meta$inboundSchema: z.ZodType = z.object({ +export const Meta$inboundSchema: z.ZodType = z + .object({ limit: z.number().int(), offset: z.number().int(), total: z.number().int(), -}); + }); /** @internal */ export type Meta$Outbound = { - limit: number; - offset: number; - total: number; + limit: number; + offset: number; + total: number; }; /** @internal */ -export const Meta$outboundSchema: z.ZodType = z.object({ +export const Meta$outboundSchema: z.ZodType = + z.object({ limit: z.number().int(), offset: z.number().int(), total: z.number().int(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Meta$ { - /** @deprecated use `Meta$inboundSchema` instead. */ - export const inboundSchema = Meta$inboundSchema; - /** @deprecated use `Meta$outboundSchema` instead. */ - export const outboundSchema = Meta$outboundSchema; - /** @deprecated use `Meta$Outbound` instead. */ - export type Outbound = Meta$Outbound; + /** @deprecated use `Meta$inboundSchema` instead. */ + export const inboundSchema = Meta$inboundSchema; + /** @deprecated use `Meta$outboundSchema` instead. */ + export const outboundSchema = Meta$outboundSchema; + /** @deprecated use `Meta$Outbound` instead. */ + export type Outbound = Meta$Outbound; } /** @internal */ export const Owners$inboundSchema: z.ZodType = z - .object({ - added_at: z.string(), - avatar_template: z.string(), - id: z.number().int(), - last_posted_at: z.string(), - last_seen_at: z.string(), - name: z.nullable(z.string()), - timezone: z.string(), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - added_at: "addedAt", - avatar_template: "avatarTemplate", - last_posted_at: "lastPostedAt", - last_seen_at: "lastSeenAt", - }); + .object({ + added_at: z.string(), + avatar_template: z.string(), + id: z.number().int(), + last_posted_at: z.string(), + last_seen_at: z.string(), + name: z.nullable(z.string()), + timezone: z.string(), + title: z.nullable(z.string()), + username: z.string(), + }).transform((v) => { + return remap$(v, { + "added_at": "addedAt", + "avatar_template": "avatarTemplate", + "last_posted_at": "lastPostedAt", + "last_seen_at": "lastSeenAt", }); + }); /** @internal */ export type Owners$Outbound = { - added_at: string; - avatar_template: string; - id: number; - last_posted_at: string; - last_seen_at: string; - name: string | null; - timezone: string; - title: string | null; - username: string; + added_at: string; + avatar_template: string; + id: number; + last_posted_at: string; + last_seen_at: string; + name: string | null; + timezone: string; + title: string | null; + username: string; }; /** @internal */ -export const Owners$outboundSchema: z.ZodType = z - .object({ - addedAt: z.string(), - avatarTemplate: z.string(), - id: z.number().int(), - lastPostedAt: z.string(), - lastSeenAt: z.string(), - name: z.nullable(z.string()), - timezone: z.string(), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - addedAt: "added_at", - avatarTemplate: "avatar_template", - lastPostedAt: "last_posted_at", - lastSeenAt: "last_seen_at", - }); - }); +export const Owners$outboundSchema: z.ZodType< + Owners$Outbound, + z.ZodTypeDef, + Owners +> = z.object({ + addedAt: z.string(), + avatarTemplate: z.string(), + id: z.number().int(), + lastPostedAt: z.string(), + lastSeenAt: z.string(), + name: z.nullable(z.string()), + timezone: z.string(), + title: z.nullable(z.string()), + username: z.string(), +}).transform((v) => { + return remap$(v, { + addedAt: "added_at", + avatarTemplate: "avatar_template", + lastPostedAt: "last_posted_at", + lastSeenAt: "last_seen_at", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Owners$ { - /** @deprecated use `Owners$inboundSchema` instead. */ - export const inboundSchema = Owners$inboundSchema; - /** @deprecated use `Owners$outboundSchema` instead. */ - export const outboundSchema = Owners$outboundSchema; - /** @deprecated use `Owners$Outbound` instead. */ - export type Outbound = Owners$Outbound; + /** @deprecated use `Owners$inboundSchema` instead. */ + export const inboundSchema = Owners$inboundSchema; + /** @deprecated use `Owners$outboundSchema` instead. */ + export const outboundSchema = Owners$outboundSchema; + /** @deprecated use `Owners$Outbound` instead. */ + export type Outbound = Owners$Outbound; } /** @internal */ export const ListGroupMembersResponseBody$inboundSchema: z.ZodType< - ListGroupMembersResponseBody, - z.ZodTypeDef, - unknown + ListGroupMembersResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - members: z.array(z.lazy(() => Members$inboundSchema)), - meta: z.lazy(() => Meta$inboundSchema), - owners: z.array(z.lazy(() => Owners$inboundSchema)), + members: z.array(z.lazy(() => Members$inboundSchema)), + meta: z.lazy(() => Meta$inboundSchema), + owners: z.array(z.lazy(() => Owners$inboundSchema)), }); /** @internal */ export type ListGroupMembersResponseBody$Outbound = { - members: Array; - meta: Meta$Outbound; - owners: Array; + members: Array; + meta: Meta$Outbound; + owners: Array; }; /** @internal */ export const ListGroupMembersResponseBody$outboundSchema: z.ZodType< - ListGroupMembersResponseBody$Outbound, - z.ZodTypeDef, - ListGroupMembersResponseBody + ListGroupMembersResponseBody$Outbound, + z.ZodTypeDef, + ListGroupMembersResponseBody > = z.object({ - members: z.array(z.lazy(() => Members$outboundSchema)), - meta: z.lazy(() => Meta$outboundSchema), - owners: z.array(z.lazy(() => Owners$outboundSchema)), + members: z.array(z.lazy(() => Members$outboundSchema)), + meta: z.lazy(() => Meta$outboundSchema), + owners: z.array(z.lazy(() => Owners$outboundSchema)), }); /** @@ -295,10 +299,10 @@ export const ListGroupMembersResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListGroupMembersResponseBody$ { - /** @deprecated use `ListGroupMembersResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListGroupMembersResponseBody$inboundSchema; - /** @deprecated use `ListGroupMembersResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListGroupMembersResponseBody$outboundSchema; - /** @deprecated use `ListGroupMembersResponseBody$Outbound` instead. */ - export type Outbound = ListGroupMembersResponseBody$Outbound; + /** @deprecated use `ListGroupMembersResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListGroupMembersResponseBody$inboundSchema; + /** @deprecated use `ListGroupMembersResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListGroupMembersResponseBody$outboundSchema; + /** @deprecated use `ListGroupMembersResponseBody$Outbound` instead. */ + export type Outbound = ListGroupMembersResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listgroups.ts b/src/sdk/models/operations/listgroups.ts index e806601..ab47a43 100644 --- a/src/sdk/models/operations/listgroups.ts +++ b/src/sdk/models/operations/listgroups.ts @@ -2,344 +2,341 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListGroupsExtras = { - typeFilters: Array; + typeFilters: Array; }; export type Groups = { - allowMembershipRequests: boolean; - automatic: boolean; - bioCooked: string | null; - bioExcerpt: string | null; - bioRaw: string | null; - canAdminGroup: boolean; - canEditGroup?: boolean | undefined; - canSeeMembers: boolean; - defaultNotificationLevel: number; - displayName: string; - flairBgColor: string | null; - flairColor: string | null; - flairUrl: string | null; - fullName: string | null; - grantTrustLevel: string | null; - hasMessages: boolean; - id: number; - incomingEmail: string | null; - isGroupOwner?: boolean | undefined; - isGroupUser?: boolean | undefined; - membersVisibilityLevel: number; - membershipRequestTemplate: string | null; - mentionableLevel: number; - messageableLevel: number; - name: string; - primaryGroup: boolean; - publicAdmission: boolean; - publicExit: boolean; - publishReadState: boolean; - title: string | null; - userCount: number; - visibilityLevel: number; + allowMembershipRequests: boolean; + automatic: boolean; + bioCooked: string | null; + bioExcerpt: string | null; + bioRaw: string | null; + canAdminGroup: boolean; + canEditGroup?: boolean | undefined; + canSeeMembers: boolean; + defaultNotificationLevel: number; + displayName: string; + flairBgColor: string | null; + flairColor: string | null; + flairUrl: string | null; + fullName: string | null; + grantTrustLevel: string | null; + hasMessages: boolean; + id: number; + incomingEmail: string | null; + isGroupOwner?: boolean | undefined; + isGroupUser?: boolean | undefined; + membersVisibilityLevel: number; + membershipRequestTemplate: string | null; + mentionableLevel: number; + messageableLevel: number; + name: string; + primaryGroup: boolean; + publicAdmission: boolean; + publicExit: boolean; + publishReadState: boolean; + title: string | null; + userCount: number; + visibilityLevel: number; }; /** * response */ export type ListGroupsResponseBody = { - extras: ListGroupsExtras; - groups: Array; - loadMoreGroups: string; - totalRowsGroups: number; + extras: ListGroupsExtras; + groups: Array; + loadMoreGroups: string; + totalRowsGroups: number; }; /** @internal */ -export const ListGroupsExtras$inboundSchema: z.ZodType = z - .object({ - type_filters: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - type_filters: "typeFilters", - }); - }); +export const ListGroupsExtras$inboundSchema: z.ZodType< + ListGroupsExtras, + z.ZodTypeDef, + unknown +> = z.object({ + type_filters: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "type_filters": "typeFilters", + }); +}); /** @internal */ export type ListGroupsExtras$Outbound = { - type_filters: Array; + type_filters: Array; }; /** @internal */ export const ListGroupsExtras$outboundSchema: z.ZodType< - ListGroupsExtras$Outbound, - z.ZodTypeDef, - ListGroupsExtras -> = z - .object({ - typeFilters: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - typeFilters: "type_filters", - }); - }); + ListGroupsExtras$Outbound, + z.ZodTypeDef, + ListGroupsExtras +> = z.object({ + typeFilters: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + typeFilters: "type_filters", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListGroupsExtras$ { - /** @deprecated use `ListGroupsExtras$inboundSchema` instead. */ - export const inboundSchema = ListGroupsExtras$inboundSchema; - /** @deprecated use `ListGroupsExtras$outboundSchema` instead. */ - export const outboundSchema = ListGroupsExtras$outboundSchema; - /** @deprecated use `ListGroupsExtras$Outbound` instead. */ - export type Outbound = ListGroupsExtras$Outbound; + /** @deprecated use `ListGroupsExtras$inboundSchema` instead. */ + export const inboundSchema = ListGroupsExtras$inboundSchema; + /** @deprecated use `ListGroupsExtras$outboundSchema` instead. */ + export const outboundSchema = ListGroupsExtras$outboundSchema; + /** @deprecated use `ListGroupsExtras$Outbound` instead. */ + export type Outbound = ListGroupsExtras$Outbound; } /** @internal */ export const Groups$inboundSchema: z.ZodType = z - .object({ - allow_membership_requests: z.boolean(), - automatic: z.boolean(), - bio_cooked: z.nullable(z.string()), - bio_excerpt: z.nullable(z.string()), - bio_raw: z.nullable(z.string()), - can_admin_group: z.boolean(), - can_edit_group: z.boolean().optional(), - can_see_members: z.boolean(), - default_notification_level: z.number().int(), - display_name: z.string(), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - full_name: z.nullable(z.string()), - grant_trust_level: z.nullable(z.string()), - has_messages: z.boolean(), - id: z.number().int(), - incoming_email: z.nullable(z.string()), - is_group_owner: z.boolean().optional(), - is_group_user: z.boolean().optional(), - members_visibility_level: z.number().int(), - membership_request_template: z.nullable(z.string()), - mentionable_level: z.number().int(), - messageable_level: z.number().int(), - name: z.string(), - primary_group: z.boolean(), - public_admission: z.boolean(), - public_exit: z.boolean(), - publish_read_state: z.boolean(), - title: z.nullable(z.string()), - user_count: z.number().int(), - visibility_level: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allow_membership_requests: "allowMembershipRequests", - bio_cooked: "bioCooked", - bio_excerpt: "bioExcerpt", - bio_raw: "bioRaw", - can_admin_group: "canAdminGroup", - can_edit_group: "canEditGroup", - can_see_members: "canSeeMembers", - default_notification_level: "defaultNotificationLevel", - display_name: "displayName", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_url: "flairUrl", - full_name: "fullName", - grant_trust_level: "grantTrustLevel", - has_messages: "hasMessages", - incoming_email: "incomingEmail", - is_group_owner: "isGroupOwner", - is_group_user: "isGroupUser", - members_visibility_level: "membersVisibilityLevel", - membership_request_template: "membershipRequestTemplate", - mentionable_level: "mentionableLevel", - messageable_level: "messageableLevel", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - publish_read_state: "publishReadState", - user_count: "userCount", - visibility_level: "visibilityLevel", - }); + .object({ + allow_membership_requests: z.boolean(), + automatic: z.boolean(), + bio_cooked: z.nullable(z.string()), + bio_excerpt: z.nullable(z.string()), + bio_raw: z.nullable(z.string()), + can_admin_group: z.boolean(), + can_edit_group: z.boolean().optional(), + can_see_members: z.boolean(), + default_notification_level: z.number().int(), + display_name: z.string(), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + full_name: z.nullable(z.string()), + grant_trust_level: z.nullable(z.string()), + has_messages: z.boolean(), + id: z.number().int(), + incoming_email: z.nullable(z.string()), + is_group_owner: z.boolean().optional(), + is_group_user: z.boolean().optional(), + members_visibility_level: z.number().int(), + membership_request_template: z.nullable(z.string()), + mentionable_level: z.number().int(), + messageable_level: z.number().int(), + name: z.string(), + primary_group: z.boolean(), + public_admission: z.boolean(), + public_exit: z.boolean(), + publish_read_state: z.boolean(), + title: z.nullable(z.string()), + user_count: z.number().int(), + visibility_level: z.number().int(), + }).transform((v) => { + return remap$(v, { + "allow_membership_requests": "allowMembershipRequests", + "bio_cooked": "bioCooked", + "bio_excerpt": "bioExcerpt", + "bio_raw": "bioRaw", + "can_admin_group": "canAdminGroup", + "can_edit_group": "canEditGroup", + "can_see_members": "canSeeMembers", + "default_notification_level": "defaultNotificationLevel", + "display_name": "displayName", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_url": "flairUrl", + "full_name": "fullName", + "grant_trust_level": "grantTrustLevel", + "has_messages": "hasMessages", + "incoming_email": "incomingEmail", + "is_group_owner": "isGroupOwner", + "is_group_user": "isGroupUser", + "members_visibility_level": "membersVisibilityLevel", + "membership_request_template": "membershipRequestTemplate", + "mentionable_level": "mentionableLevel", + "messageable_level": "messageableLevel", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "publish_read_state": "publishReadState", + "user_count": "userCount", + "visibility_level": "visibilityLevel", }); + }); /** @internal */ export type Groups$Outbound = { - allow_membership_requests: boolean; - automatic: boolean; - bio_cooked: string | null; - bio_excerpt: string | null; - bio_raw: string | null; - can_admin_group: boolean; - can_edit_group?: boolean | undefined; - can_see_members: boolean; - default_notification_level: number; - display_name: string; - flair_bg_color: string | null; - flair_color: string | null; - flair_url: string | null; - full_name: string | null; - grant_trust_level: string | null; - has_messages: boolean; - id: number; - incoming_email: string | null; - is_group_owner?: boolean | undefined; - is_group_user?: boolean | undefined; - members_visibility_level: number; - membership_request_template: string | null; - mentionable_level: number; - messageable_level: number; - name: string; - primary_group: boolean; - public_admission: boolean; - public_exit: boolean; - publish_read_state: boolean; - title: string | null; - user_count: number; - visibility_level: number; + allow_membership_requests: boolean; + automatic: boolean; + bio_cooked: string | null; + bio_excerpt: string | null; + bio_raw: string | null; + can_admin_group: boolean; + can_edit_group?: boolean | undefined; + can_see_members: boolean; + default_notification_level: number; + display_name: string; + flair_bg_color: string | null; + flair_color: string | null; + flair_url: string | null; + full_name: string | null; + grant_trust_level: string | null; + has_messages: boolean; + id: number; + incoming_email: string | null; + is_group_owner?: boolean | undefined; + is_group_user?: boolean | undefined; + members_visibility_level: number; + membership_request_template: string | null; + mentionable_level: number; + messageable_level: number; + name: string; + primary_group: boolean; + public_admission: boolean; + public_exit: boolean; + publish_read_state: boolean; + title: string | null; + user_count: number; + visibility_level: number; }; /** @internal */ -export const Groups$outboundSchema: z.ZodType = z - .object({ - allowMembershipRequests: z.boolean(), - automatic: z.boolean(), - bioCooked: z.nullable(z.string()), - bioExcerpt: z.nullable(z.string()), - bioRaw: z.nullable(z.string()), - canAdminGroup: z.boolean(), - canEditGroup: z.boolean().optional(), - canSeeMembers: z.boolean(), - defaultNotificationLevel: z.number().int(), - displayName: z.string(), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - fullName: z.nullable(z.string()), - grantTrustLevel: z.nullable(z.string()), - hasMessages: z.boolean(), - id: z.number().int(), - incomingEmail: z.nullable(z.string()), - isGroupOwner: z.boolean().optional(), - isGroupUser: z.boolean().optional(), - membersVisibilityLevel: z.number().int(), - membershipRequestTemplate: z.nullable(z.string()), - mentionableLevel: z.number().int(), - messageableLevel: z.number().int(), - name: z.string(), - primaryGroup: z.boolean(), - publicAdmission: z.boolean(), - publicExit: z.boolean(), - publishReadState: z.boolean(), - title: z.nullable(z.string()), - userCount: z.number().int(), - visibilityLevel: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - allowMembershipRequests: "allow_membership_requests", - bioCooked: "bio_cooked", - bioExcerpt: "bio_excerpt", - bioRaw: "bio_raw", - canAdminGroup: "can_admin_group", - canEditGroup: "can_edit_group", - canSeeMembers: "can_see_members", - defaultNotificationLevel: "default_notification_level", - displayName: "display_name", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairUrl: "flair_url", - fullName: "full_name", - grantTrustLevel: "grant_trust_level", - hasMessages: "has_messages", - incomingEmail: "incoming_email", - isGroupOwner: "is_group_owner", - isGroupUser: "is_group_user", - membersVisibilityLevel: "members_visibility_level", - membershipRequestTemplate: "membership_request_template", - mentionableLevel: "mentionable_level", - messageableLevel: "messageable_level", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - publishReadState: "publish_read_state", - userCount: "user_count", - visibilityLevel: "visibility_level", - }); - }); +export const Groups$outboundSchema: z.ZodType< + Groups$Outbound, + z.ZodTypeDef, + Groups +> = z.object({ + allowMembershipRequests: z.boolean(), + automatic: z.boolean(), + bioCooked: z.nullable(z.string()), + bioExcerpt: z.nullable(z.string()), + bioRaw: z.nullable(z.string()), + canAdminGroup: z.boolean(), + canEditGroup: z.boolean().optional(), + canSeeMembers: z.boolean(), + defaultNotificationLevel: z.number().int(), + displayName: z.string(), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + fullName: z.nullable(z.string()), + grantTrustLevel: z.nullable(z.string()), + hasMessages: z.boolean(), + id: z.number().int(), + incomingEmail: z.nullable(z.string()), + isGroupOwner: z.boolean().optional(), + isGroupUser: z.boolean().optional(), + membersVisibilityLevel: z.number().int(), + membershipRequestTemplate: z.nullable(z.string()), + mentionableLevel: z.number().int(), + messageableLevel: z.number().int(), + name: z.string(), + primaryGroup: z.boolean(), + publicAdmission: z.boolean(), + publicExit: z.boolean(), + publishReadState: z.boolean(), + title: z.nullable(z.string()), + userCount: z.number().int(), + visibilityLevel: z.number().int(), +}).transform((v) => { + return remap$(v, { + allowMembershipRequests: "allow_membership_requests", + bioCooked: "bio_cooked", + bioExcerpt: "bio_excerpt", + bioRaw: "bio_raw", + canAdminGroup: "can_admin_group", + canEditGroup: "can_edit_group", + canSeeMembers: "can_see_members", + defaultNotificationLevel: "default_notification_level", + displayName: "display_name", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairUrl: "flair_url", + fullName: "full_name", + grantTrustLevel: "grant_trust_level", + hasMessages: "has_messages", + incomingEmail: "incoming_email", + isGroupOwner: "is_group_owner", + isGroupUser: "is_group_user", + membersVisibilityLevel: "members_visibility_level", + membershipRequestTemplate: "membership_request_template", + mentionableLevel: "mentionable_level", + messageableLevel: "messageable_level", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + publishReadState: "publish_read_state", + userCount: "user_count", + visibilityLevel: "visibility_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Groups$ { - /** @deprecated use `Groups$inboundSchema` instead. */ - export const inboundSchema = Groups$inboundSchema; - /** @deprecated use `Groups$outboundSchema` instead. */ - export const outboundSchema = Groups$outboundSchema; - /** @deprecated use `Groups$Outbound` instead. */ - export type Outbound = Groups$Outbound; + /** @deprecated use `Groups$inboundSchema` instead. */ + export const inboundSchema = Groups$inboundSchema; + /** @deprecated use `Groups$outboundSchema` instead. */ + export const outboundSchema = Groups$outboundSchema; + /** @deprecated use `Groups$Outbound` instead. */ + export type Outbound = Groups$Outbound; } /** @internal */ export const ListGroupsResponseBody$inboundSchema: z.ZodType< - ListGroupsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - extras: z.lazy(() => ListGroupsExtras$inboundSchema), - groups: z.array(z.lazy(() => Groups$inboundSchema)), - load_more_groups: z.string(), - total_rows_groups: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - load_more_groups: "loadMoreGroups", - total_rows_groups: "totalRowsGroups", - }); - }); + ListGroupsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + extras: z.lazy(() => ListGroupsExtras$inboundSchema), + groups: z.array(z.lazy(() => Groups$inboundSchema)), + load_more_groups: z.string(), + total_rows_groups: z.number().int(), +}).transform((v) => { + return remap$(v, { + "load_more_groups": "loadMoreGroups", + "total_rows_groups": "totalRowsGroups", + }); +}); /** @internal */ export type ListGroupsResponseBody$Outbound = { - extras: ListGroupsExtras$Outbound; - groups: Array; - load_more_groups: string; - total_rows_groups: number; + extras: ListGroupsExtras$Outbound; + groups: Array; + load_more_groups: string; + total_rows_groups: number; }; /** @internal */ export const ListGroupsResponseBody$outboundSchema: z.ZodType< - ListGroupsResponseBody$Outbound, - z.ZodTypeDef, - ListGroupsResponseBody -> = z - .object({ - extras: z.lazy(() => ListGroupsExtras$outboundSchema), - groups: z.array(z.lazy(() => Groups$outboundSchema)), - loadMoreGroups: z.string(), - totalRowsGroups: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - loadMoreGroups: "load_more_groups", - totalRowsGroups: "total_rows_groups", - }); - }); + ListGroupsResponseBody$Outbound, + z.ZodTypeDef, + ListGroupsResponseBody +> = z.object({ + extras: z.lazy(() => ListGroupsExtras$outboundSchema), + groups: z.array(z.lazy(() => Groups$outboundSchema)), + loadMoreGroups: z.string(), + totalRowsGroups: z.number().int(), +}).transform((v) => { + return remap$(v, { + loadMoreGroups: "load_more_groups", + totalRowsGroups: "total_rows_groups", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListGroupsResponseBody$ { - /** @deprecated use `ListGroupsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListGroupsResponseBody$inboundSchema; - /** @deprecated use `ListGroupsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListGroupsResponseBody$outboundSchema; - /** @deprecated use `ListGroupsResponseBody$Outbound` instead. */ - export type Outbound = ListGroupsResponseBody$Outbound; + /** @deprecated use `ListGroupsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListGroupsResponseBody$inboundSchema; + /** @deprecated use `ListGroupsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListGroupsResponseBody$outboundSchema; + /** @deprecated use `ListGroupsResponseBody$Outbound` instead. */ + export type Outbound = ListGroupsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listlatesttopics.ts b/src/sdk/models/operations/listlatesttopics.ts index 84c1f26..e0ec505 100644 --- a/src/sdk/models/operations/listlatesttopics.ts +++ b/src/sdk/models/operations/listlatesttopics.ts @@ -2,564 +2,544 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListLatestTopicsRequest = { - apiKey: string; - apiUsername: string; - /** - * Defaults to `desc`, add `ascending=true` to sort asc - */ - ascending?: string | undefined; - /** - * Enum: `default`, `created`, `activity`, `views`, `posts`, `category`, `likes`, `op_likes`, `posters` - */ - order?: string | undefined; + apiKey: string; + apiUsername: string; + /** + * Defaults to `desc`, add `ascending=true` to sort asc + */ + ascending?: string | undefined; + /** + * Enum: `default`, `created`, `activity`, `views`, `posts`, `category`, `likes`, `op_likes`, `posters` + */ + order?: string | undefined; }; export type ListLatestTopicsPosters = { - description?: string | undefined; - extras?: string | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type ListLatestTopicsTopics = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumpedAt?: string | undefined; - categoryId?: number | undefined; - closed?: boolean | undefined; - createdAt?: string | undefined; - fancyTitle?: string | undefined; - featuredLink?: string | null | undefined; - hasSummary?: boolean | undefined; - highestPostNumber?: number | undefined; - id?: number | undefined; - imageUrl?: string | undefined; - lastPostedAt?: string | undefined; - lastPosterUsername?: string | undefined; - lastReadPostNumber?: number | undefined; - likeCount?: number | undefined; - liked?: boolean | undefined; - notificationLevel?: number | undefined; - opLikeCount?: number | undefined; - pinned?: boolean | undefined; - pinnedGlobally?: boolean | undefined; - posters?: Array | undefined; - postsCount?: number | undefined; - replyCount?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unreadPosts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumpedAt?: string | undefined; + categoryId?: number | undefined; + closed?: boolean | undefined; + createdAt?: string | undefined; + fancyTitle?: string | undefined; + featuredLink?: string | null | undefined; + hasSummary?: boolean | undefined; + highestPostNumber?: number | undefined; + id?: number | undefined; + imageUrl?: string | undefined; + lastPostedAt?: string | undefined; + lastPosterUsername?: string | undefined; + lastReadPostNumber?: number | undefined; + likeCount?: number | undefined; + liked?: boolean | undefined; + notificationLevel?: number | undefined; + opLikeCount?: number | undefined; + pinned?: boolean | undefined; + pinnedGlobally?: boolean | undefined; + posters?: Array | undefined; + postsCount?: number | undefined; + replyCount?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unreadPosts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; export type ListLatestTopicsTopicList = { - canCreateTopic?: boolean | undefined; - draft?: string | null | undefined; - draftKey?: string | undefined; - draftSequence?: number | undefined; - perPage?: number | undefined; - topics?: Array | undefined; + canCreateTopic?: boolean | undefined; + draft?: string | null | undefined; + draftKey?: string | undefined; + draftSequence?: number | undefined; + perPage?: number | undefined; + topics?: Array | undefined; }; export type ListLatestTopicsUsers = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** * topic updated */ export type ListLatestTopicsResponseBody = { - primaryGroups?: Array | undefined; - topicList?: ListLatestTopicsTopicList | undefined; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList?: ListLatestTopicsTopicList | undefined; + users?: Array | undefined; }; /** @internal */ export const ListLatestTopicsRequest$inboundSchema: z.ZodType< - ListLatestTopicsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - ascending: z.string().optional(), - order: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); + ListLatestTopicsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + ascending: z.string().optional(), + order: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type ListLatestTopicsRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - ascending?: string | undefined; - order?: string | undefined; + "Api-Key": string; + "Api-Username": string; + ascending?: string | undefined; + order?: string | undefined; }; /** @internal */ export const ListLatestTopicsRequest$outboundSchema: z.ZodType< - ListLatestTopicsRequest$Outbound, - z.ZodTypeDef, - ListLatestTopicsRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - ascending: z.string().optional(), - order: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + ListLatestTopicsRequest$Outbound, + z.ZodTypeDef, + ListLatestTopicsRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + ascending: z.string().optional(), + order: z.string().optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsRequest$ { - /** @deprecated use `ListLatestTopicsRequest$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsRequest$inboundSchema; - /** @deprecated use `ListLatestTopicsRequest$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsRequest$outboundSchema; - /** @deprecated use `ListLatestTopicsRequest$Outbound` instead. */ - export type Outbound = ListLatestTopicsRequest$Outbound; + /** @deprecated use `ListLatestTopicsRequest$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsRequest$inboundSchema; + /** @deprecated use `ListLatestTopicsRequest$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsRequest$outboundSchema; + /** @deprecated use `ListLatestTopicsRequest$Outbound` instead. */ + export type Outbound = ListLatestTopicsRequest$Outbound; } /** @internal */ export const ListLatestTopicsPosters$inboundSchema: z.ZodType< - ListLatestTopicsPosters, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + ListLatestTopicsPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type ListLatestTopicsPosters$Outbound = { - description?: string | undefined; - extras?: string | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const ListLatestTopicsPosters$outboundSchema: z.ZodType< - ListLatestTopicsPosters$Outbound, - z.ZodTypeDef, - ListLatestTopicsPosters -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + ListLatestTopicsPosters$Outbound, + z.ZodTypeDef, + ListLatestTopicsPosters +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsPosters$ { - /** @deprecated use `ListLatestTopicsPosters$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsPosters$inboundSchema; - /** @deprecated use `ListLatestTopicsPosters$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsPosters$outboundSchema; - /** @deprecated use `ListLatestTopicsPosters$Outbound` instead. */ - export type Outbound = ListLatestTopicsPosters$Outbound; + /** @deprecated use `ListLatestTopicsPosters$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsPosters$inboundSchema; + /** @deprecated use `ListLatestTopicsPosters$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsPosters$outboundSchema; + /** @deprecated use `ListLatestTopicsPosters$Outbound` instead. */ + export type Outbound = ListLatestTopicsPosters$Outbound; } /** @internal */ export const ListLatestTopicsTopics$inboundSchema: z.ZodType< - ListLatestTopicsTopics, - z.ZodTypeDef, - unknown -> = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumped_at: z.string().optional(), - category_id: z.number().int().optional(), - closed: z.boolean().optional(), - created_at: z.string().optional(), - fancy_title: z.string().optional(), - featured_link: z.nullable(z.string()).optional(), - has_summary: z.boolean().optional(), - highest_post_number: z.number().int().optional(), - id: z.number().int().optional(), - image_url: z.string().optional(), - last_posted_at: z.string().optional(), - last_poster_username: z.string().optional(), - last_read_post_number: z.number().int().optional(), - like_count: z.number().int().optional(), - liked: z.boolean().optional(), - notification_level: z.number().int().optional(), - op_like_count: z.number().int().optional(), - pinned: z.boolean().optional(), - pinned_globally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListLatestTopicsPosters$inboundSchema)).optional(), - posts_count: z.number().int().optional(), - reply_count: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unread_posts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - last_read_post_number: "lastReadPostNumber", - like_count: "likeCount", - notification_level: "notificationLevel", - op_like_count: "opLikeCount", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - unread_posts: "unreadPosts", - }); - }); + ListLatestTopicsTopics, + z.ZodTypeDef, + unknown +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumped_at: z.string().optional(), + category_id: z.number().int().optional(), + closed: z.boolean().optional(), + created_at: z.string().optional(), + fancy_title: z.string().optional(), + featured_link: z.nullable(z.string()).optional(), + has_summary: z.boolean().optional(), + highest_post_number: z.number().int().optional(), + id: z.number().int().optional(), + image_url: z.string().optional(), + last_posted_at: z.string().optional(), + last_poster_username: z.string().optional(), + last_read_post_number: z.number().int().optional(), + like_count: z.number().int().optional(), + liked: z.boolean().optional(), + notification_level: z.number().int().optional(), + op_like_count: z.number().int().optional(), + pinned: z.boolean().optional(), + pinned_globally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListLatestTopicsPosters$inboundSchema)) + .optional(), + posts_count: z.number().int().optional(), + reply_count: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unread_posts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "last_read_post_number": "lastReadPostNumber", + "like_count": "likeCount", + "notification_level": "notificationLevel", + "op_like_count": "opLikeCount", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", + "unread_posts": "unreadPosts", + }); +}); /** @internal */ export type ListLatestTopicsTopics$Outbound = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumped_at?: string | undefined; - category_id?: number | undefined; - closed?: boolean | undefined; - created_at?: string | undefined; - fancy_title?: string | undefined; - featured_link?: string | null | undefined; - has_summary?: boolean | undefined; - highest_post_number?: number | undefined; - id?: number | undefined; - image_url?: string | undefined; - last_posted_at?: string | undefined; - last_poster_username?: string | undefined; - last_read_post_number?: number | undefined; - like_count?: number | undefined; - liked?: boolean | undefined; - notification_level?: number | undefined; - op_like_count?: number | undefined; - pinned?: boolean | undefined; - pinned_globally?: boolean | undefined; - posters?: Array | undefined; - posts_count?: number | undefined; - reply_count?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unread_posts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumped_at?: string | undefined; + category_id?: number | undefined; + closed?: boolean | undefined; + created_at?: string | undefined; + fancy_title?: string | undefined; + featured_link?: string | null | undefined; + has_summary?: boolean | undefined; + highest_post_number?: number | undefined; + id?: number | undefined; + image_url?: string | undefined; + last_posted_at?: string | undefined; + last_poster_username?: string | undefined; + last_read_post_number?: number | undefined; + like_count?: number | undefined; + liked?: boolean | undefined; + notification_level?: number | undefined; + op_like_count?: number | undefined; + pinned?: boolean | undefined; + pinned_globally?: boolean | undefined; + posters?: Array | undefined; + posts_count?: number | undefined; + reply_count?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unread_posts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; /** @internal */ export const ListLatestTopicsTopics$outboundSchema: z.ZodType< - ListLatestTopicsTopics$Outbound, - z.ZodTypeDef, - ListLatestTopicsTopics -> = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumpedAt: z.string().optional(), - categoryId: z.number().int().optional(), - closed: z.boolean().optional(), - createdAt: z.string().optional(), - fancyTitle: z.string().optional(), - featuredLink: z.nullable(z.string()).optional(), - hasSummary: z.boolean().optional(), - highestPostNumber: z.number().int().optional(), - id: z.number().int().optional(), - imageUrl: z.string().optional(), - lastPostedAt: z.string().optional(), - lastPosterUsername: z.string().optional(), - lastReadPostNumber: z.number().int().optional(), - likeCount: z.number().int().optional(), - liked: z.boolean().optional(), - notificationLevel: z.number().int().optional(), - opLikeCount: z.number().int().optional(), - pinned: z.boolean().optional(), - pinnedGlobally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListLatestTopicsPosters$outboundSchema)).optional(), - postsCount: z.number().int().optional(), - replyCount: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unreadPosts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - lastReadPostNumber: "last_read_post_number", - likeCount: "like_count", - notificationLevel: "notification_level", - opLikeCount: "op_like_count", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - unreadPosts: "unread_posts", - }); - }); + ListLatestTopicsTopics$Outbound, + z.ZodTypeDef, + ListLatestTopicsTopics +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumpedAt: z.string().optional(), + categoryId: z.number().int().optional(), + closed: z.boolean().optional(), + createdAt: z.string().optional(), + fancyTitle: z.string().optional(), + featuredLink: z.nullable(z.string()).optional(), + hasSummary: z.boolean().optional(), + highestPostNumber: z.number().int().optional(), + id: z.number().int().optional(), + imageUrl: z.string().optional(), + lastPostedAt: z.string().optional(), + lastPosterUsername: z.string().optional(), + lastReadPostNumber: z.number().int().optional(), + likeCount: z.number().int().optional(), + liked: z.boolean().optional(), + notificationLevel: z.number().int().optional(), + opLikeCount: z.number().int().optional(), + pinned: z.boolean().optional(), + pinnedGlobally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListLatestTopicsPosters$outboundSchema)) + .optional(), + postsCount: z.number().int().optional(), + replyCount: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unreadPosts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + lastReadPostNumber: "last_read_post_number", + likeCount: "like_count", + notificationLevel: "notification_level", + opLikeCount: "op_like_count", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + unreadPosts: "unread_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsTopics$ { - /** @deprecated use `ListLatestTopicsTopics$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsTopics$inboundSchema; - /** @deprecated use `ListLatestTopicsTopics$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsTopics$outboundSchema; - /** @deprecated use `ListLatestTopicsTopics$Outbound` instead. */ - export type Outbound = ListLatestTopicsTopics$Outbound; + /** @deprecated use `ListLatestTopicsTopics$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsTopics$inboundSchema; + /** @deprecated use `ListLatestTopicsTopics$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsTopics$outboundSchema; + /** @deprecated use `ListLatestTopicsTopics$Outbound` instead. */ + export type Outbound = ListLatestTopicsTopics$Outbound; } /** @internal */ export const ListLatestTopicsTopicList$inboundSchema: z.ZodType< - ListLatestTopicsTopicList, - z.ZodTypeDef, - unknown -> = z - .object({ - can_create_topic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draft_key: z.string().optional(), - draft_sequence: z.number().int().optional(), - per_page: z.number().int().optional(), - topics: z.array(z.lazy(() => ListLatestTopicsTopics$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - draft_key: "draftKey", - draft_sequence: "draftSequence", - per_page: "perPage", - }); - }); + ListLatestTopicsTopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draft_key: z.string().optional(), + draft_sequence: z.number().int().optional(), + per_page: z.number().int().optional(), + topics: z.array(z.lazy(() => ListLatestTopicsTopics$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "per_page": "perPage", + }); +}); /** @internal */ export type ListLatestTopicsTopicList$Outbound = { - can_create_topic?: boolean | undefined; - draft?: string | null | undefined; - draft_key?: string | undefined; - draft_sequence?: number | undefined; - per_page?: number | undefined; - topics?: Array | undefined; + can_create_topic?: boolean | undefined; + draft?: string | null | undefined; + draft_key?: string | undefined; + draft_sequence?: number | undefined; + per_page?: number | undefined; + topics?: Array | undefined; }; /** @internal */ export const ListLatestTopicsTopicList$outboundSchema: z.ZodType< - ListLatestTopicsTopicList$Outbound, - z.ZodTypeDef, - ListLatestTopicsTopicList -> = z - .object({ - canCreateTopic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draftKey: z.string().optional(), - draftSequence: z.number().int().optional(), - perPage: z.number().int().optional(), - topics: z.array(z.lazy(() => ListLatestTopicsTopics$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - draftKey: "draft_key", - draftSequence: "draft_sequence", - perPage: "per_page", - }); - }); + ListLatestTopicsTopicList$Outbound, + z.ZodTypeDef, + ListLatestTopicsTopicList +> = z.object({ + canCreateTopic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draftKey: z.string().optional(), + draftSequence: z.number().int().optional(), + perPage: z.number().int().optional(), + topics: z.array(z.lazy(() => ListLatestTopicsTopics$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + draftKey: "draft_key", + draftSequence: "draft_sequence", + perPage: "per_page", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsTopicList$ { - /** @deprecated use `ListLatestTopicsTopicList$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsTopicList$inboundSchema; - /** @deprecated use `ListLatestTopicsTopicList$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsTopicList$outboundSchema; - /** @deprecated use `ListLatestTopicsTopicList$Outbound` instead. */ - export type Outbound = ListLatestTopicsTopicList$Outbound; + /** @deprecated use `ListLatestTopicsTopicList$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsTopicList$inboundSchema; + /** @deprecated use `ListLatestTopicsTopicList$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsTopicList$outboundSchema; + /** @deprecated use `ListLatestTopicsTopicList$Outbound` instead. */ + export type Outbound = ListLatestTopicsTopicList$Outbound; } /** @internal */ export const ListLatestTopicsUsers$inboundSchema: z.ZodType< - ListLatestTopicsUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); + ListLatestTopicsUsers, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ListLatestTopicsUsers$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | null | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | null | undefined; + username?: string | undefined; }; /** @internal */ export const ListLatestTopicsUsers$outboundSchema: z.ZodType< - ListLatestTopicsUsers$Outbound, - z.ZodTypeDef, - ListLatestTopicsUsers -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.nullable(z.string()).optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + ListLatestTopicsUsers$Outbound, + z.ZodTypeDef, + ListLatestTopicsUsers +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsUsers$ { - /** @deprecated use `ListLatestTopicsUsers$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsUsers$inboundSchema; - /** @deprecated use `ListLatestTopicsUsers$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsUsers$outboundSchema; - /** @deprecated use `ListLatestTopicsUsers$Outbound` instead. */ - export type Outbound = ListLatestTopicsUsers$Outbound; + /** @deprecated use `ListLatestTopicsUsers$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsUsers$inboundSchema; + /** @deprecated use `ListLatestTopicsUsers$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsUsers$outboundSchema; + /** @deprecated use `ListLatestTopicsUsers$Outbound` instead. */ + export type Outbound = ListLatestTopicsUsers$Outbound; } /** @internal */ export const ListLatestTopicsResponseBody$inboundSchema: z.ZodType< - ListLatestTopicsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => ListLatestTopicsTopicList$inboundSchema).optional(), - users: z.array(z.lazy(() => ListLatestTopicsUsers$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + ListLatestTopicsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => ListLatestTopicsTopicList$inboundSchema).optional(), + users: z.array(z.lazy(() => ListLatestTopicsUsers$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type ListLatestTopicsResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list?: ListLatestTopicsTopicList$Outbound | undefined; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list?: ListLatestTopicsTopicList$Outbound | undefined; + users?: Array | undefined; }; /** @internal */ export const ListLatestTopicsResponseBody$outboundSchema: z.ZodType< - ListLatestTopicsResponseBody$Outbound, - z.ZodTypeDef, - ListLatestTopicsResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => ListLatestTopicsTopicList$outboundSchema).optional(), - users: z.array(z.lazy(() => ListLatestTopicsUsers$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + ListLatestTopicsResponseBody$Outbound, + z.ZodTypeDef, + ListLatestTopicsResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => ListLatestTopicsTopicList$outboundSchema).optional(), + users: z.array(z.lazy(() => ListLatestTopicsUsers$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsResponseBody$ { - /** @deprecated use `ListLatestTopicsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListLatestTopicsResponseBody$inboundSchema; - /** @deprecated use `ListLatestTopicsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListLatestTopicsResponseBody$outboundSchema; - /** @deprecated use `ListLatestTopicsResponseBody$Outbound` instead. */ - export type Outbound = ListLatestTopicsResponseBody$Outbound; + /** @deprecated use `ListLatestTopicsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListLatestTopicsResponseBody$inboundSchema; + /** @deprecated use `ListLatestTopicsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListLatestTopicsResponseBody$outboundSchema; + /** @deprecated use `ListLatestTopicsResponseBody$Outbound` instead. */ + export type Outbound = ListLatestTopicsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listposts.ts b/src/sdk/models/operations/listposts.ts index 78fabb1..f578361 100644 --- a/src/sdk/models/operations/listposts.ts +++ b/src/sdk/models/operations/listposts.ts @@ -2,503 +2,497 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListPostsRequest = { - apiKey: string; - apiUsername: string; - /** - * Load posts with an id lower than this value. Useful for pagination. - */ - before?: string | undefined; + apiKey: string; + apiUsername: string; + /** + * Load posts with an id lower than this value. Useful for pagination. + */ + before?: string | undefined; }; export type ListPostsActionsSummary = { - canAct?: boolean | undefined; - id?: number | undefined; + canAct?: boolean | undefined; + id?: number | undefined; }; export type LatestPosts = { - actionsSummary?: Array | undefined; - admin?: boolean | undefined; - avatarTemplate?: string | undefined; - canDelete?: boolean | undefined; - canEdit?: boolean | undefined; - canRecover?: boolean | undefined; - canSeeHiddenPost?: boolean | undefined; - canViewEditHistory?: boolean | undefined; - canWiki?: boolean | undefined; - categoryId?: number | undefined; - cooked?: string | undefined; - createdAt?: string | undefined; - deletedAt?: string | null | undefined; - displayUsername?: string | undefined; - editReason?: string | null | undefined; - flairBgColor?: string | null | undefined; - flairColor?: string | null | undefined; - flairGroupId?: string | null | undefined; - flairName?: string | null | undefined; - flairUrl?: string | null | undefined; - hidden?: boolean | undefined; - id?: number | undefined; - incomingLinkCount?: number | undefined; - moderator?: boolean | undefined; - name?: string | undefined; - postNumber?: number | undefined; - postType?: number | undefined; - primaryGroupName?: string | null | undefined; - quoteCount?: number | undefined; - raw?: string | undefined; - readersCount?: number | undefined; - reads?: number | undefined; - replyCount?: number | undefined; - replyToPostNumber?: string | null | undefined; - reviewableId?: string | null | undefined; - reviewableScoreCount?: number | undefined; - reviewableScorePendingCount?: number | undefined; - score?: number | undefined; - staff?: boolean | undefined; - topicHtmlTitle?: string | undefined; - topicId?: number | undefined; - topicSlug?: string | undefined; - topicTitle?: string | undefined; - trustLevel?: number | undefined; - updatedAt?: string | undefined; - userDeleted?: boolean | undefined; - userId?: number | undefined; - userTitle?: string | null | undefined; - username?: string | undefined; - version?: number | undefined; - wiki?: boolean | undefined; - yours?: boolean | undefined; + actionsSummary?: Array | undefined; + admin?: boolean | undefined; + avatarTemplate?: string | undefined; + canDelete?: boolean | undefined; + canEdit?: boolean | undefined; + canRecover?: boolean | undefined; + canSeeHiddenPost?: boolean | undefined; + canViewEditHistory?: boolean | undefined; + canWiki?: boolean | undefined; + categoryId?: number | undefined; + cooked?: string | undefined; + createdAt?: string | undefined; + deletedAt?: string | null | undefined; + displayUsername?: string | undefined; + editReason?: string | null | undefined; + flairBgColor?: string | null | undefined; + flairColor?: string | null | undefined; + flairGroupId?: string | null | undefined; + flairName?: string | null | undefined; + flairUrl?: string | null | undefined; + hidden?: boolean | undefined; + id?: number | undefined; + incomingLinkCount?: number | undefined; + moderator?: boolean | undefined; + name?: string | undefined; + postNumber?: number | undefined; + postType?: number | undefined; + primaryGroupName?: string | null | undefined; + quoteCount?: number | undefined; + raw?: string | undefined; + readersCount?: number | undefined; + reads?: number | undefined; + replyCount?: number | undefined; + replyToPostNumber?: string | null | undefined; + reviewableId?: string | null | undefined; + reviewableScoreCount?: number | undefined; + reviewableScorePendingCount?: number | undefined; + score?: number | undefined; + staff?: boolean | undefined; + topicHtmlTitle?: string | undefined; + topicId?: number | undefined; + topicSlug?: string | undefined; + topicTitle?: string | undefined; + trustLevel?: number | undefined; + updatedAt?: string | undefined; + userDeleted?: boolean | undefined; + userId?: number | undefined; + userTitle?: string | null | undefined; + username?: string | undefined; + version?: number | undefined; + wiki?: boolean | undefined; + yours?: boolean | undefined; }; /** * latest posts */ export type ListPostsResponseBody = { - latestPosts?: Array | undefined; + latestPosts?: Array | undefined; }; /** @internal */ -export const ListPostsRequest$inboundSchema: z.ZodType = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - before: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); +export const ListPostsRequest$inboundSchema: z.ZodType< + ListPostsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + before: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type ListPostsRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - before?: string | undefined; + "Api-Key": string; + "Api-Username": string; + before?: string | undefined; }; /** @internal */ export const ListPostsRequest$outboundSchema: z.ZodType< - ListPostsRequest$Outbound, - z.ZodTypeDef, - ListPostsRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - before: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + ListPostsRequest$Outbound, + z.ZodTypeDef, + ListPostsRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + before: z.string().optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPostsRequest$ { - /** @deprecated use `ListPostsRequest$inboundSchema` instead. */ - export const inboundSchema = ListPostsRequest$inboundSchema; - /** @deprecated use `ListPostsRequest$outboundSchema` instead. */ - export const outboundSchema = ListPostsRequest$outboundSchema; - /** @deprecated use `ListPostsRequest$Outbound` instead. */ - export type Outbound = ListPostsRequest$Outbound; + /** @deprecated use `ListPostsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPostsRequest$inboundSchema; + /** @deprecated use `ListPostsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPostsRequest$outboundSchema; + /** @deprecated use `ListPostsRequest$Outbound` instead. */ + export type Outbound = ListPostsRequest$Outbound; } /** @internal */ export const ListPostsActionsSummary$inboundSchema: z.ZodType< - ListPostsActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean().optional(), - id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + ListPostsActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean().optional(), + id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type ListPostsActionsSummary$Outbound = { - can_act?: boolean | undefined; - id?: number | undefined; + can_act?: boolean | undefined; + id?: number | undefined; }; /** @internal */ export const ListPostsActionsSummary$outboundSchema: z.ZodType< - ListPostsActionsSummary$Outbound, - z.ZodTypeDef, - ListPostsActionsSummary -> = z - .object({ - canAct: z.boolean().optional(), - id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + ListPostsActionsSummary$Outbound, + z.ZodTypeDef, + ListPostsActionsSummary +> = z.object({ + canAct: z.boolean().optional(), + id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPostsActionsSummary$ { - /** @deprecated use `ListPostsActionsSummary$inboundSchema` instead. */ - export const inboundSchema = ListPostsActionsSummary$inboundSchema; - /** @deprecated use `ListPostsActionsSummary$outboundSchema` instead. */ - export const outboundSchema = ListPostsActionsSummary$outboundSchema; - /** @deprecated use `ListPostsActionsSummary$Outbound` instead. */ - export type Outbound = ListPostsActionsSummary$Outbound; + /** @deprecated use `ListPostsActionsSummary$inboundSchema` instead. */ + export const inboundSchema = ListPostsActionsSummary$inboundSchema; + /** @deprecated use `ListPostsActionsSummary$outboundSchema` instead. */ + export const outboundSchema = ListPostsActionsSummary$outboundSchema; + /** @deprecated use `ListPostsActionsSummary$Outbound` instead. */ + export type Outbound = ListPostsActionsSummary$Outbound; } /** @internal */ -export const LatestPosts$inboundSchema: z.ZodType = z - .object({ - actions_summary: z.array(z.lazy(() => ListPostsActionsSummary$inboundSchema)).optional(), - admin: z.boolean().optional(), - avatar_template: z.string().optional(), - can_delete: z.boolean().optional(), - can_edit: z.boolean().optional(), - can_recover: z.boolean().optional(), - can_see_hidden_post: z.boolean().optional(), - can_view_edit_history: z.boolean().optional(), - can_wiki: z.boolean().optional(), - category_id: z.number().int().optional(), - cooked: z.string().optional(), - created_at: z.string().optional(), - deleted_at: z.nullable(z.string()).optional(), - display_username: z.string().optional(), - edit_reason: z.nullable(z.string()).optional(), - flair_bg_color: z.nullable(z.string()).optional(), - flair_color: z.nullable(z.string()).optional(), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()).optional(), - flair_url: z.nullable(z.string()).optional(), - hidden: z.boolean().optional(), - id: z.number().int().optional(), - incoming_link_count: z.number().int().optional(), - moderator: z.boolean().optional(), - name: z.string().optional(), - post_number: z.number().int().optional(), - post_type: z.number().int().optional(), - primary_group_name: z.nullable(z.string()).optional(), - quote_count: z.number().int().optional(), - raw: z.string().optional(), - readers_count: z.number().int().optional(), - reads: z.number().int().optional(), - reply_count: z.number().int().optional(), - reply_to_post_number: z.nullable(z.string()).optional(), - reviewable_id: z.nullable(z.string()).optional(), - reviewable_score_count: z.number().int().optional(), - reviewable_score_pending_count: z.number().int().optional(), - score: z.number().optional(), - staff: z.boolean().optional(), - topic_html_title: z.string().optional(), - topic_id: z.number().int().optional(), - topic_slug: z.string().optional(), - topic_title: z.string().optional(), - trust_level: z.number().int().optional(), - updated_at: z.string().optional(), - user_deleted: z.boolean().optional(), - user_id: z.number().int().optional(), - user_title: z.nullable(z.string()).optional(), - username: z.string().optional(), - version: z.number().int().optional(), - wiki: z.boolean().optional(), - yours: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - category_id: "categoryId", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_html_title: "topicHtmlTitle", - topic_id: "topicId", - topic_slug: "topicSlug", - topic_title: "topicTitle", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); - }); +export const LatestPosts$inboundSchema: z.ZodType< + LatestPosts, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array(z.lazy(() => ListPostsActionsSummary$inboundSchema)) + .optional(), + admin: z.boolean().optional(), + avatar_template: z.string().optional(), + can_delete: z.boolean().optional(), + can_edit: z.boolean().optional(), + can_recover: z.boolean().optional(), + can_see_hidden_post: z.boolean().optional(), + can_view_edit_history: z.boolean().optional(), + can_wiki: z.boolean().optional(), + category_id: z.number().int().optional(), + cooked: z.string().optional(), + created_at: z.string().optional(), + deleted_at: z.nullable(z.string()).optional(), + display_username: z.string().optional(), + edit_reason: z.nullable(z.string()).optional(), + flair_bg_color: z.nullable(z.string()).optional(), + flair_color: z.nullable(z.string()).optional(), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()).optional(), + flair_url: z.nullable(z.string()).optional(), + hidden: z.boolean().optional(), + id: z.number().int().optional(), + incoming_link_count: z.number().int().optional(), + moderator: z.boolean().optional(), + name: z.string().optional(), + post_number: z.number().int().optional(), + post_type: z.number().int().optional(), + primary_group_name: z.nullable(z.string()).optional(), + quote_count: z.number().int().optional(), + raw: z.string().optional(), + readers_count: z.number().int().optional(), + reads: z.number().int().optional(), + reply_count: z.number().int().optional(), + reply_to_post_number: z.nullable(z.string()).optional(), + reviewable_id: z.nullable(z.string()).optional(), + reviewable_score_count: z.number().int().optional(), + reviewable_score_pending_count: z.number().int().optional(), + score: z.number().optional(), + staff: z.boolean().optional(), + topic_html_title: z.string().optional(), + topic_id: z.number().int().optional(), + topic_slug: z.string().optional(), + topic_title: z.string().optional(), + trust_level: z.number().int().optional(), + updated_at: z.string().optional(), + user_deleted: z.boolean().optional(), + user_id: z.number().int().optional(), + user_title: z.nullable(z.string()).optional(), + username: z.string().optional(), + version: z.number().int().optional(), + wiki: z.boolean().optional(), + yours: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "category_id": "categoryId", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_html_title": "topicHtmlTitle", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "topic_title": "topicTitle", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); +}); /** @internal */ export type LatestPosts$Outbound = { - actions_summary?: Array | undefined; - admin?: boolean | undefined; - avatar_template?: string | undefined; - can_delete?: boolean | undefined; - can_edit?: boolean | undefined; - can_recover?: boolean | undefined; - can_see_hidden_post?: boolean | undefined; - can_view_edit_history?: boolean | undefined; - can_wiki?: boolean | undefined; - category_id?: number | undefined; - cooked?: string | undefined; - created_at?: string | undefined; - deleted_at?: string | null | undefined; - display_username?: string | undefined; - edit_reason?: string | null | undefined; - flair_bg_color?: string | null | undefined; - flair_color?: string | null | undefined; - flair_group_id?: string | null | undefined; - flair_name?: string | null | undefined; - flair_url?: string | null | undefined; - hidden?: boolean | undefined; - id?: number | undefined; - incoming_link_count?: number | undefined; - moderator?: boolean | undefined; - name?: string | undefined; - post_number?: number | undefined; - post_type?: number | undefined; - primary_group_name?: string | null | undefined; - quote_count?: number | undefined; - raw?: string | undefined; - readers_count?: number | undefined; - reads?: number | undefined; - reply_count?: number | undefined; - reply_to_post_number?: string | null | undefined; - reviewable_id?: string | null | undefined; - reviewable_score_count?: number | undefined; - reviewable_score_pending_count?: number | undefined; - score?: number | undefined; - staff?: boolean | undefined; - topic_html_title?: string | undefined; - topic_id?: number | undefined; - topic_slug?: string | undefined; - topic_title?: string | undefined; - trust_level?: number | undefined; - updated_at?: string | undefined; - user_deleted?: boolean | undefined; - user_id?: number | undefined; - user_title?: string | null | undefined; - username?: string | undefined; - version?: number | undefined; - wiki?: boolean | undefined; - yours?: boolean | undefined; + actions_summary?: Array | undefined; + admin?: boolean | undefined; + avatar_template?: string | undefined; + can_delete?: boolean | undefined; + can_edit?: boolean | undefined; + can_recover?: boolean | undefined; + can_see_hidden_post?: boolean | undefined; + can_view_edit_history?: boolean | undefined; + can_wiki?: boolean | undefined; + category_id?: number | undefined; + cooked?: string | undefined; + created_at?: string | undefined; + deleted_at?: string | null | undefined; + display_username?: string | undefined; + edit_reason?: string | null | undefined; + flair_bg_color?: string | null | undefined; + flair_color?: string | null | undefined; + flair_group_id?: string | null | undefined; + flair_name?: string | null | undefined; + flair_url?: string | null | undefined; + hidden?: boolean | undefined; + id?: number | undefined; + incoming_link_count?: number | undefined; + moderator?: boolean | undefined; + name?: string | undefined; + post_number?: number | undefined; + post_type?: number | undefined; + primary_group_name?: string | null | undefined; + quote_count?: number | undefined; + raw?: string | undefined; + readers_count?: number | undefined; + reads?: number | undefined; + reply_count?: number | undefined; + reply_to_post_number?: string | null | undefined; + reviewable_id?: string | null | undefined; + reviewable_score_count?: number | undefined; + reviewable_score_pending_count?: number | undefined; + score?: number | undefined; + staff?: boolean | undefined; + topic_html_title?: string | undefined; + topic_id?: number | undefined; + topic_slug?: string | undefined; + topic_title?: string | undefined; + trust_level?: number | undefined; + updated_at?: string | undefined; + user_deleted?: boolean | undefined; + user_id?: number | undefined; + user_title?: string | null | undefined; + username?: string | undefined; + version?: number | undefined; + wiki?: boolean | undefined; + yours?: boolean | undefined; }; /** @internal */ export const LatestPosts$outboundSchema: z.ZodType< - LatestPosts$Outbound, - z.ZodTypeDef, - LatestPosts -> = z - .object({ - actionsSummary: z.array(z.lazy(() => ListPostsActionsSummary$outboundSchema)).optional(), - admin: z.boolean().optional(), - avatarTemplate: z.string().optional(), - canDelete: z.boolean().optional(), - canEdit: z.boolean().optional(), - canRecover: z.boolean().optional(), - canSeeHiddenPost: z.boolean().optional(), - canViewEditHistory: z.boolean().optional(), - canWiki: z.boolean().optional(), - categoryId: z.number().int().optional(), - cooked: z.string().optional(), - createdAt: z.string().optional(), - deletedAt: z.nullable(z.string()).optional(), - displayUsername: z.string().optional(), - editReason: z.nullable(z.string()).optional(), - flairBgColor: z.nullable(z.string()).optional(), - flairColor: z.nullable(z.string()).optional(), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()).optional(), - flairUrl: z.nullable(z.string()).optional(), - hidden: z.boolean().optional(), - id: z.number().int().optional(), - incomingLinkCount: z.number().int().optional(), - moderator: z.boolean().optional(), - name: z.string().optional(), - postNumber: z.number().int().optional(), - postType: z.number().int().optional(), - primaryGroupName: z.nullable(z.string()).optional(), - quoteCount: z.number().int().optional(), - raw: z.string().optional(), - readersCount: z.number().int().optional(), - reads: z.number().int().optional(), - replyCount: z.number().int().optional(), - replyToPostNumber: z.nullable(z.string()).optional(), - reviewableId: z.nullable(z.string()).optional(), - reviewableScoreCount: z.number().int().optional(), - reviewableScorePendingCount: z.number().int().optional(), - score: z.number().optional(), - staff: z.boolean().optional(), - topicHtmlTitle: z.string().optional(), - topicId: z.number().int().optional(), - topicSlug: z.string().optional(), - topicTitle: z.string().optional(), - trustLevel: z.number().int().optional(), - updatedAt: z.string().optional(), - userDeleted: z.boolean().optional(), - userId: z.number().int().optional(), - userTitle: z.nullable(z.string()).optional(), - username: z.string().optional(), - version: z.number().int().optional(), - wiki: z.boolean().optional(), - yours: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - categoryId: "category_id", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicHtmlTitle: "topic_html_title", - topicId: "topic_id", - topicSlug: "topic_slug", - topicTitle: "topic_title", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); + LatestPosts$Outbound, + z.ZodTypeDef, + LatestPosts +> = z.object({ + actionsSummary: z.array(z.lazy(() => ListPostsActionsSummary$outboundSchema)) + .optional(), + admin: z.boolean().optional(), + avatarTemplate: z.string().optional(), + canDelete: z.boolean().optional(), + canEdit: z.boolean().optional(), + canRecover: z.boolean().optional(), + canSeeHiddenPost: z.boolean().optional(), + canViewEditHistory: z.boolean().optional(), + canWiki: z.boolean().optional(), + categoryId: z.number().int().optional(), + cooked: z.string().optional(), + createdAt: z.string().optional(), + deletedAt: z.nullable(z.string()).optional(), + displayUsername: z.string().optional(), + editReason: z.nullable(z.string()).optional(), + flairBgColor: z.nullable(z.string()).optional(), + flairColor: z.nullable(z.string()).optional(), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()).optional(), + flairUrl: z.nullable(z.string()).optional(), + hidden: z.boolean().optional(), + id: z.number().int().optional(), + incomingLinkCount: z.number().int().optional(), + moderator: z.boolean().optional(), + name: z.string().optional(), + postNumber: z.number().int().optional(), + postType: z.number().int().optional(), + primaryGroupName: z.nullable(z.string()).optional(), + quoteCount: z.number().int().optional(), + raw: z.string().optional(), + readersCount: z.number().int().optional(), + reads: z.number().int().optional(), + replyCount: z.number().int().optional(), + replyToPostNumber: z.nullable(z.string()).optional(), + reviewableId: z.nullable(z.string()).optional(), + reviewableScoreCount: z.number().int().optional(), + reviewableScorePendingCount: z.number().int().optional(), + score: z.number().optional(), + staff: z.boolean().optional(), + topicHtmlTitle: z.string().optional(), + topicId: z.number().int().optional(), + topicSlug: z.string().optional(), + topicTitle: z.string().optional(), + trustLevel: z.number().int().optional(), + updatedAt: z.string().optional(), + userDeleted: z.boolean().optional(), + userId: z.number().int().optional(), + userTitle: z.nullable(z.string()).optional(), + username: z.string().optional(), + version: z.number().int().optional(), + wiki: z.boolean().optional(), + yours: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + categoryId: "category_id", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicHtmlTitle: "topic_html_title", + topicId: "topic_id", + topicSlug: "topic_slug", + topicTitle: "topic_title", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestPosts$ { - /** @deprecated use `LatestPosts$inboundSchema` instead. */ - export const inboundSchema = LatestPosts$inboundSchema; - /** @deprecated use `LatestPosts$outboundSchema` instead. */ - export const outboundSchema = LatestPosts$outboundSchema; - /** @deprecated use `LatestPosts$Outbound` instead. */ - export type Outbound = LatestPosts$Outbound; + /** @deprecated use `LatestPosts$inboundSchema` instead. */ + export const inboundSchema = LatestPosts$inboundSchema; + /** @deprecated use `LatestPosts$outboundSchema` instead. */ + export const outboundSchema = LatestPosts$outboundSchema; + /** @deprecated use `LatestPosts$Outbound` instead. */ + export type Outbound = LatestPosts$Outbound; } /** @internal */ export const ListPostsResponseBody$inboundSchema: z.ZodType< - ListPostsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - latest_posts: z.array(z.lazy(() => LatestPosts$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - latest_posts: "latestPosts", - }); - }); + ListPostsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + latest_posts: z.array(z.lazy(() => LatestPosts$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "latest_posts": "latestPosts", + }); +}); /** @internal */ export type ListPostsResponseBody$Outbound = { - latest_posts?: Array | undefined; + latest_posts?: Array | undefined; }; /** @internal */ export const ListPostsResponseBody$outboundSchema: z.ZodType< - ListPostsResponseBody$Outbound, - z.ZodTypeDef, - ListPostsResponseBody -> = z - .object({ - latestPosts: z.array(z.lazy(() => LatestPosts$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - latestPosts: "latest_posts", - }); - }); + ListPostsResponseBody$Outbound, + z.ZodTypeDef, + ListPostsResponseBody +> = z.object({ + latestPosts: z.array(z.lazy(() => LatestPosts$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + latestPosts: "latest_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPostsResponseBody$ { - /** @deprecated use `ListPostsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListPostsResponseBody$inboundSchema; - /** @deprecated use `ListPostsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListPostsResponseBody$outboundSchema; - /** @deprecated use `ListPostsResponseBody$Outbound` instead. */ - export type Outbound = ListPostsResponseBody$Outbound; + /** @deprecated use `ListPostsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListPostsResponseBody$inboundSchema; + /** @deprecated use `ListPostsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListPostsResponseBody$outboundSchema; + /** @deprecated use `ListPostsResponseBody$Outbound` instead. */ + export type Outbound = ListPostsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listtaggroups.ts b/src/sdk/models/operations/listtaggroups.ts index 01f858c..3d58293 100644 --- a/src/sdk/models/operations/listtaggroups.ts +++ b/src/sdk/models/operations/listtaggroups.ts @@ -2,50 +2,50 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListTagGroupsPermissions = { - staff?: number | undefined; + staff?: number | undefined; }; export type TagGroups = { - id?: number | undefined; - name?: string | undefined; - onePerTopic?: boolean | undefined; - parentTagName?: Array | undefined; - permissions?: ListTagGroupsPermissions | undefined; - tagNames?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + onePerTopic?: boolean | undefined; + parentTagName?: Array | undefined; + permissions?: ListTagGroupsPermissions | undefined; + tagNames?: Array | undefined; }; /** * tags */ export type ListTagGroupsResponseBody = { - tagGroups?: Array | undefined; + tagGroups?: Array | undefined; }; /** @internal */ export const ListTagGroupsPermissions$inboundSchema: z.ZodType< - ListTagGroupsPermissions, - z.ZodTypeDef, - unknown + ListTagGroupsPermissions, + z.ZodTypeDef, + unknown > = z.object({ - staff: z.number().int().optional(), + staff: z.number().int().optional(), }); /** @internal */ export type ListTagGroupsPermissions$Outbound = { - staff?: number | undefined; + staff?: number | undefined; }; /** @internal */ export const ListTagGroupsPermissions$outboundSchema: z.ZodType< - ListTagGroupsPermissions$Outbound, - z.ZodTypeDef, - ListTagGroupsPermissions + ListTagGroupsPermissions$Outbound, + z.ZodTypeDef, + ListTagGroupsPermissions > = z.object({ - staff: z.number().int().optional(), + staff: z.number().int().optional(), }); /** @@ -53,117 +53,117 @@ export const ListTagGroupsPermissions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTagGroupsPermissions$ { - /** @deprecated use `ListTagGroupsPermissions$inboundSchema` instead. */ - export const inboundSchema = ListTagGroupsPermissions$inboundSchema; - /** @deprecated use `ListTagGroupsPermissions$outboundSchema` instead. */ - export const outboundSchema = ListTagGroupsPermissions$outboundSchema; - /** @deprecated use `ListTagGroupsPermissions$Outbound` instead. */ - export type Outbound = ListTagGroupsPermissions$Outbound; + /** @deprecated use `ListTagGroupsPermissions$inboundSchema` instead. */ + export const inboundSchema = ListTagGroupsPermissions$inboundSchema; + /** @deprecated use `ListTagGroupsPermissions$outboundSchema` instead. */ + export const outboundSchema = ListTagGroupsPermissions$outboundSchema; + /** @deprecated use `ListTagGroupsPermissions$Outbound` instead. */ + export type Outbound = ListTagGroupsPermissions$Outbound; } /** @internal */ -export const TagGroups$inboundSchema: z.ZodType = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - one_per_topic: z.boolean().optional(), - parent_tag_name: z.array(z.any()).optional(), - permissions: z.lazy(() => ListTagGroupsPermissions$inboundSchema).optional(), - tag_names: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - one_per_topic: "onePerTopic", - parent_tag_name: "parentTagName", - tag_names: "tagNames", - }); - }); +export const TagGroups$inboundSchema: z.ZodType< + TagGroups, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + one_per_topic: z.boolean().optional(), + parent_tag_name: z.array(z.any()).optional(), + permissions: z.lazy(() => ListTagGroupsPermissions$inboundSchema).optional(), + tag_names: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "one_per_topic": "onePerTopic", + "parent_tag_name": "parentTagName", + "tag_names": "tagNames", + }); +}); /** @internal */ export type TagGroups$Outbound = { - id?: number | undefined; - name?: string | undefined; - one_per_topic?: boolean | undefined; - parent_tag_name?: Array | undefined; - permissions?: ListTagGroupsPermissions$Outbound | undefined; - tag_names?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + one_per_topic?: boolean | undefined; + parent_tag_name?: Array | undefined; + permissions?: ListTagGroupsPermissions$Outbound | undefined; + tag_names?: Array | undefined; }; /** @internal */ -export const TagGroups$outboundSchema: z.ZodType = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - onePerTopic: z.boolean().optional(), - parentTagName: z.array(z.any()).optional(), - permissions: z.lazy(() => ListTagGroupsPermissions$outboundSchema).optional(), - tagNames: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - onePerTopic: "one_per_topic", - parentTagName: "parent_tag_name", - tagNames: "tag_names", - }); - }); +export const TagGroups$outboundSchema: z.ZodType< + TagGroups$Outbound, + z.ZodTypeDef, + TagGroups +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + onePerTopic: z.boolean().optional(), + parentTagName: z.array(z.any()).optional(), + permissions: z.lazy(() => ListTagGroupsPermissions$outboundSchema).optional(), + tagNames: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + onePerTopic: "one_per_topic", + parentTagName: "parent_tag_name", + tagNames: "tag_names", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TagGroups$ { - /** @deprecated use `TagGroups$inboundSchema` instead. */ - export const inboundSchema = TagGroups$inboundSchema; - /** @deprecated use `TagGroups$outboundSchema` instead. */ - export const outboundSchema = TagGroups$outboundSchema; - /** @deprecated use `TagGroups$Outbound` instead. */ - export type Outbound = TagGroups$Outbound; + /** @deprecated use `TagGroups$inboundSchema` instead. */ + export const inboundSchema = TagGroups$inboundSchema; + /** @deprecated use `TagGroups$outboundSchema` instead. */ + export const outboundSchema = TagGroups$outboundSchema; + /** @deprecated use `TagGroups$Outbound` instead. */ + export type Outbound = TagGroups$Outbound; } /** @internal */ export const ListTagGroupsResponseBody$inboundSchema: z.ZodType< - ListTagGroupsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - tag_groups: z.array(z.lazy(() => TagGroups$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - tag_groups: "tagGroups", - }); - }); + ListTagGroupsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + tag_groups: z.array(z.lazy(() => TagGroups$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "tag_groups": "tagGroups", + }); +}); /** @internal */ export type ListTagGroupsResponseBody$Outbound = { - tag_groups?: Array | undefined; + tag_groups?: Array | undefined; }; /** @internal */ export const ListTagGroupsResponseBody$outboundSchema: z.ZodType< - ListTagGroupsResponseBody$Outbound, - z.ZodTypeDef, - ListTagGroupsResponseBody -> = z - .object({ - tagGroups: z.array(z.lazy(() => TagGroups$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - tagGroups: "tag_groups", - }); - }); + ListTagGroupsResponseBody$Outbound, + z.ZodTypeDef, + ListTagGroupsResponseBody +> = z.object({ + tagGroups: z.array(z.lazy(() => TagGroups$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + tagGroups: "tag_groups", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTagGroupsResponseBody$ { - /** @deprecated use `ListTagGroupsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListTagGroupsResponseBody$inboundSchema; - /** @deprecated use `ListTagGroupsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListTagGroupsResponseBody$outboundSchema; - /** @deprecated use `ListTagGroupsResponseBody$Outbound` instead. */ - export type Outbound = ListTagGroupsResponseBody$Outbound; + /** @deprecated use `ListTagGroupsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListTagGroupsResponseBody$inboundSchema; + /** @deprecated use `ListTagGroupsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListTagGroupsResponseBody$outboundSchema; + /** @deprecated use `ListTagGroupsResponseBody$Outbound` instead. */ + export type Outbound = ListTagGroupsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listtags.ts b/src/sdk/models/operations/listtags.ts index 6a914b3..bf0aea0 100644 --- a/src/sdk/models/operations/listtags.ts +++ b/src/sdk/models/operations/listtags.ts @@ -2,47 +2,50 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListTagsExtras = { - categories?: Array | undefined; + categories?: Array | undefined; }; export type Tags = { - count?: number | undefined; - id?: string | undefined; - pmCount?: number | undefined; - targetTag?: string | null | undefined; - text?: string | undefined; + count?: number | undefined; + id?: string | undefined; + pmCount?: number | undefined; + targetTag?: string | null | undefined; + text?: string | undefined; }; /** * notifications */ export type ListTagsResponseBody = { - extras?: ListTagsExtras | undefined; - tags?: Array | undefined; + extras?: ListTagsExtras | undefined; + tags?: Array | undefined; }; /** @internal */ -export const ListTagsExtras$inboundSchema: z.ZodType = - z.object({ - categories: z.array(z.any()).optional(), - }); +export const ListTagsExtras$inboundSchema: z.ZodType< + ListTagsExtras, + z.ZodTypeDef, + unknown +> = z.object({ + categories: z.array(z.any()).optional(), +}); /** @internal */ export type ListTagsExtras$Outbound = { - categories?: Array | undefined; + categories?: Array | undefined; }; /** @internal */ export const ListTagsExtras$outboundSchema: z.ZodType< - ListTagsExtras$Outbound, - z.ZodTypeDef, - ListTagsExtras + ListTagsExtras$Outbound, + z.ZodTypeDef, + ListTagsExtras > = z.object({ - categories: z.array(z.any()).optional(), + categories: z.array(z.any()).optional(), }); /** @@ -50,92 +53,90 @@ export const ListTagsExtras$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTagsExtras$ { - /** @deprecated use `ListTagsExtras$inboundSchema` instead. */ - export const inboundSchema = ListTagsExtras$inboundSchema; - /** @deprecated use `ListTagsExtras$outboundSchema` instead. */ - export const outboundSchema = ListTagsExtras$outboundSchema; - /** @deprecated use `ListTagsExtras$Outbound` instead. */ - export type Outbound = ListTagsExtras$Outbound; + /** @deprecated use `ListTagsExtras$inboundSchema` instead. */ + export const inboundSchema = ListTagsExtras$inboundSchema; + /** @deprecated use `ListTagsExtras$outboundSchema` instead. */ + export const outboundSchema = ListTagsExtras$outboundSchema; + /** @deprecated use `ListTagsExtras$Outbound` instead. */ + export type Outbound = ListTagsExtras$Outbound; } /** @internal */ export const Tags$inboundSchema: z.ZodType = z - .object({ - count: z.number().int().optional(), - id: z.string().optional(), - pm_count: z.number().int().optional(), - target_tag: z.nullable(z.string()).optional(), - text: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - pm_count: "pmCount", - target_tag: "targetTag", - }); + .object({ + count: z.number().int().optional(), + id: z.string().optional(), + pm_count: z.number().int().optional(), + target_tag: z.nullable(z.string()).optional(), + text: z.string().optional(), + }).transform((v) => { + return remap$(v, { + "pm_count": "pmCount", + "target_tag": "targetTag", }); + }); /** @internal */ export type Tags$Outbound = { - count?: number | undefined; - id?: string | undefined; - pm_count?: number | undefined; - target_tag?: string | null | undefined; - text?: string | undefined; + count?: number | undefined; + id?: string | undefined; + pm_count?: number | undefined; + target_tag?: string | null | undefined; + text?: string | undefined; }; /** @internal */ -export const Tags$outboundSchema: z.ZodType = z - .object({ - count: z.number().int().optional(), - id: z.string().optional(), - pmCount: z.number().int().optional(), - targetTag: z.nullable(z.string()).optional(), - text: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - pmCount: "pm_count", - targetTag: "target_tag", - }); +export const Tags$outboundSchema: z.ZodType = + z.object({ + count: z.number().int().optional(), + id: z.string().optional(), + pmCount: z.number().int().optional(), + targetTag: z.nullable(z.string()).optional(), + text: z.string().optional(), + }).transform((v) => { + return remap$(v, { + pmCount: "pm_count", + targetTag: "target_tag", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Tags$ { - /** @deprecated use `Tags$inboundSchema` instead. */ - export const inboundSchema = Tags$inboundSchema; - /** @deprecated use `Tags$outboundSchema` instead. */ - export const outboundSchema = Tags$outboundSchema; - /** @deprecated use `Tags$Outbound` instead. */ - export type Outbound = Tags$Outbound; + /** @deprecated use `Tags$inboundSchema` instead. */ + export const inboundSchema = Tags$inboundSchema; + /** @deprecated use `Tags$outboundSchema` instead. */ + export const outboundSchema = Tags$outboundSchema; + /** @deprecated use `Tags$Outbound` instead. */ + export type Outbound = Tags$Outbound; } /** @internal */ export const ListTagsResponseBody$inboundSchema: z.ZodType< - ListTagsResponseBody, - z.ZodTypeDef, - unknown + ListTagsResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - extras: z.lazy(() => ListTagsExtras$inboundSchema).optional(), - tags: z.array(z.lazy(() => Tags$inboundSchema)).optional(), + extras: z.lazy(() => ListTagsExtras$inboundSchema).optional(), + tags: z.array(z.lazy(() => Tags$inboundSchema)).optional(), }); /** @internal */ export type ListTagsResponseBody$Outbound = { - extras?: ListTagsExtras$Outbound | undefined; - tags?: Array | undefined; + extras?: ListTagsExtras$Outbound | undefined; + tags?: Array | undefined; }; /** @internal */ export const ListTagsResponseBody$outboundSchema: z.ZodType< - ListTagsResponseBody$Outbound, - z.ZodTypeDef, - ListTagsResponseBody + ListTagsResponseBody$Outbound, + z.ZodTypeDef, + ListTagsResponseBody > = z.object({ - extras: z.lazy(() => ListTagsExtras$outboundSchema).optional(), - tags: z.array(z.lazy(() => Tags$outboundSchema)).optional(), + extras: z.lazy(() => ListTagsExtras$outboundSchema).optional(), + tags: z.array(z.lazy(() => Tags$outboundSchema)).optional(), }); /** @@ -143,10 +144,10 @@ export const ListTagsResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTagsResponseBody$ { - /** @deprecated use `ListTagsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListTagsResponseBody$inboundSchema; - /** @deprecated use `ListTagsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListTagsResponseBody$outboundSchema; - /** @deprecated use `ListTagsResponseBody$Outbound` instead. */ - export type Outbound = ListTagsResponseBody$Outbound; + /** @deprecated use `ListTagsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListTagsResponseBody$inboundSchema; + /** @deprecated use `ListTagsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListTagsResponseBody$outboundSchema; + /** @deprecated use `ListTagsResponseBody$Outbound` instead. */ + export type Outbound = ListTagsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listtoptopics.ts b/src/sdk/models/operations/listtoptopics.ts index 526c280..1d3d9aa 100644 --- a/src/sdk/models/operations/listtoptopics.ts +++ b/src/sdk/models/operations/listtoptopics.ts @@ -2,563 +2,540 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListTopTopicsRequest = { - apiKey: string; - apiUsername: string; - /** - * Enum: `all`, `yearly`, `quarterly`, `monthly`, `weekly`, `daily` - */ - period?: string | undefined; + apiKey: string; + apiUsername: string; + /** + * Enum: `all`, `yearly`, `quarterly`, `monthly`, `weekly`, `daily` + */ + period?: string | undefined; }; export type ListTopTopicsPosters = { - description?: string | undefined; - extras?: string | null | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | undefined; + extras?: string | null | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type ListTopTopicsTopics = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumpedAt?: string | undefined; - categoryId?: number | undefined; - closed?: boolean | undefined; - createdAt?: string | undefined; - fancyTitle?: string | undefined; - featuredLink?: string | null | undefined; - hasSummary?: boolean | undefined; - highestPostNumber?: number | undefined; - id?: number | undefined; - imageUrl?: string | null | undefined; - lastPostedAt?: string | undefined; - lastPosterUsername?: string | undefined; - lastReadPostNumber?: number | undefined; - likeCount?: number | undefined; - liked?: boolean | undefined; - notificationLevel?: number | undefined; - opLikeCount?: number | undefined; - pinned?: boolean | undefined; - pinnedGlobally?: boolean | undefined; - posters?: Array | undefined; - postsCount?: number | undefined; - replyCount?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: boolean | undefined; - unreadPosts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumpedAt?: string | undefined; + categoryId?: number | undefined; + closed?: boolean | undefined; + createdAt?: string | undefined; + fancyTitle?: string | undefined; + featuredLink?: string | null | undefined; + hasSummary?: boolean | undefined; + highestPostNumber?: number | undefined; + id?: number | undefined; + imageUrl?: string | null | undefined; + lastPostedAt?: string | undefined; + lastPosterUsername?: string | undefined; + lastReadPostNumber?: number | undefined; + likeCount?: number | undefined; + liked?: boolean | undefined; + notificationLevel?: number | undefined; + opLikeCount?: number | undefined; + pinned?: boolean | undefined; + pinnedGlobally?: boolean | undefined; + posters?: Array | undefined; + postsCount?: number | undefined; + replyCount?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: boolean | undefined; + unreadPosts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; export type ListTopTopicsTopicList = { - canCreateTopic?: boolean | undefined; - draft?: string | null | undefined; - draftKey?: string | undefined; - draftSequence?: number | undefined; - forPeriod?: string | undefined; - perPage?: number | undefined; - topics?: Array | undefined; + canCreateTopic?: boolean | undefined; + draft?: string | null | undefined; + draftKey?: string | undefined; + draftSequence?: number | undefined; + forPeriod?: string | undefined; + perPage?: number | undefined; + topics?: Array | undefined; }; export type ListTopTopicsUsers = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** * response */ export type ListTopTopicsResponseBody = { - primaryGroups?: Array | undefined; - topicList?: ListTopTopicsTopicList | undefined; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList?: ListTopTopicsTopicList | undefined; + users?: Array | undefined; }; /** @internal */ export const ListTopTopicsRequest$inboundSchema: z.ZodType< - ListTopTopicsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - period: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); + ListTopTopicsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + period: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type ListTopTopicsRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - period?: string | undefined; + "Api-Key": string; + "Api-Username": string; + period?: string | undefined; }; /** @internal */ export const ListTopTopicsRequest$outboundSchema: z.ZodType< - ListTopTopicsRequest$Outbound, - z.ZodTypeDef, - ListTopTopicsRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - period: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + ListTopTopicsRequest$Outbound, + z.ZodTypeDef, + ListTopTopicsRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + period: z.string().optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsRequest$ { - /** @deprecated use `ListTopTopicsRequest$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsRequest$inboundSchema; - /** @deprecated use `ListTopTopicsRequest$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsRequest$outboundSchema; - /** @deprecated use `ListTopTopicsRequest$Outbound` instead. */ - export type Outbound = ListTopTopicsRequest$Outbound; + /** @deprecated use `ListTopTopicsRequest$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsRequest$inboundSchema; + /** @deprecated use `ListTopTopicsRequest$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsRequest$outboundSchema; + /** @deprecated use `ListTopTopicsRequest$Outbound` instead. */ + export type Outbound = ListTopTopicsRequest$Outbound; } /** @internal */ export const ListTopTopicsPosters$inboundSchema: z.ZodType< - ListTopTopicsPosters, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string().optional(), - extras: z.nullable(z.string()).optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + ListTopTopicsPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + extras: z.nullable(z.string()).optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type ListTopTopicsPosters$Outbound = { - description?: string | undefined; - extras?: string | null | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | undefined; + extras?: string | null | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const ListTopTopicsPosters$outboundSchema: z.ZodType< - ListTopTopicsPosters$Outbound, - z.ZodTypeDef, - ListTopTopicsPosters -> = z - .object({ - description: z.string().optional(), - extras: z.nullable(z.string()).optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + ListTopTopicsPosters$Outbound, + z.ZodTypeDef, + ListTopTopicsPosters +> = z.object({ + description: z.string().optional(), + extras: z.nullable(z.string()).optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsPosters$ { - /** @deprecated use `ListTopTopicsPosters$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsPosters$inboundSchema; - /** @deprecated use `ListTopTopicsPosters$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsPosters$outboundSchema; - /** @deprecated use `ListTopTopicsPosters$Outbound` instead. */ - export type Outbound = ListTopTopicsPosters$Outbound; + /** @deprecated use `ListTopTopicsPosters$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsPosters$inboundSchema; + /** @deprecated use `ListTopTopicsPosters$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsPosters$outboundSchema; + /** @deprecated use `ListTopTopicsPosters$Outbound` instead. */ + export type Outbound = ListTopTopicsPosters$Outbound; } /** @internal */ export const ListTopTopicsTopics$inboundSchema: z.ZodType< - ListTopTopicsTopics, - z.ZodTypeDef, - unknown -> = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumped_at: z.string().optional(), - category_id: z.number().int().optional(), - closed: z.boolean().optional(), - created_at: z.string().optional(), - fancy_title: z.string().optional(), - featured_link: z.nullable(z.string()).optional(), - has_summary: z.boolean().optional(), - highest_post_number: z.number().int().optional(), - id: z.number().int().optional(), - image_url: z.nullable(z.string()).optional(), - last_posted_at: z.string().optional(), - last_poster_username: z.string().optional(), - last_read_post_number: z.number().int().optional(), - like_count: z.number().int().optional(), - liked: z.boolean().optional(), - notification_level: z.number().int().optional(), - op_like_count: z.number().int().optional(), - pinned: z.boolean().optional(), - pinned_globally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListTopTopicsPosters$inboundSchema)).optional(), - posts_count: z.number().int().optional(), - reply_count: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.boolean().optional(), - unread_posts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - last_read_post_number: "lastReadPostNumber", - like_count: "likeCount", - notification_level: "notificationLevel", - op_like_count: "opLikeCount", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - unread_posts: "unreadPosts", - }); - }); + ListTopTopicsTopics, + z.ZodTypeDef, + unknown +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumped_at: z.string().optional(), + category_id: z.number().int().optional(), + closed: z.boolean().optional(), + created_at: z.string().optional(), + fancy_title: z.string().optional(), + featured_link: z.nullable(z.string()).optional(), + has_summary: z.boolean().optional(), + highest_post_number: z.number().int().optional(), + id: z.number().int().optional(), + image_url: z.nullable(z.string()).optional(), + last_posted_at: z.string().optional(), + last_poster_username: z.string().optional(), + last_read_post_number: z.number().int().optional(), + like_count: z.number().int().optional(), + liked: z.boolean().optional(), + notification_level: z.number().int().optional(), + op_like_count: z.number().int().optional(), + pinned: z.boolean().optional(), + pinned_globally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListTopTopicsPosters$inboundSchema)).optional(), + posts_count: z.number().int().optional(), + reply_count: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.boolean().optional(), + unread_posts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "last_read_post_number": "lastReadPostNumber", + "like_count": "likeCount", + "notification_level": "notificationLevel", + "op_like_count": "opLikeCount", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", + "unread_posts": "unreadPosts", + }); +}); /** @internal */ export type ListTopTopicsTopics$Outbound = { - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumped_at?: string | undefined; - category_id?: number | undefined; - closed?: boolean | undefined; - created_at?: string | undefined; - fancy_title?: string | undefined; - featured_link?: string | null | undefined; - has_summary?: boolean | undefined; - highest_post_number?: number | undefined; - id?: number | undefined; - image_url?: string | null | undefined; - last_posted_at?: string | undefined; - last_poster_username?: string | undefined; - last_read_post_number?: number | undefined; - like_count?: number | undefined; - liked?: boolean | undefined; - notification_level?: number | undefined; - op_like_count?: number | undefined; - pinned?: boolean | undefined; - pinned_globally?: boolean | undefined; - posters?: Array | undefined; - posts_count?: number | undefined; - reply_count?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: boolean | undefined; - unread_posts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumped_at?: string | undefined; + category_id?: number | undefined; + closed?: boolean | undefined; + created_at?: string | undefined; + fancy_title?: string | undefined; + featured_link?: string | null | undefined; + has_summary?: boolean | undefined; + highest_post_number?: number | undefined; + id?: number | undefined; + image_url?: string | null | undefined; + last_posted_at?: string | undefined; + last_poster_username?: string | undefined; + last_read_post_number?: number | undefined; + like_count?: number | undefined; + liked?: boolean | undefined; + notification_level?: number | undefined; + op_like_count?: number | undefined; + pinned?: boolean | undefined; + pinned_globally?: boolean | undefined; + posters?: Array | undefined; + posts_count?: number | undefined; + reply_count?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: boolean | undefined; + unread_posts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; /** @internal */ export const ListTopTopicsTopics$outboundSchema: z.ZodType< - ListTopTopicsTopics$Outbound, - z.ZodTypeDef, - ListTopTopicsTopics -> = z - .object({ - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumpedAt: z.string().optional(), - categoryId: z.number().int().optional(), - closed: z.boolean().optional(), - createdAt: z.string().optional(), - fancyTitle: z.string().optional(), - featuredLink: z.nullable(z.string()).optional(), - hasSummary: z.boolean().optional(), - highestPostNumber: z.number().int().optional(), - id: z.number().int().optional(), - imageUrl: z.nullable(z.string()).optional(), - lastPostedAt: z.string().optional(), - lastPosterUsername: z.string().optional(), - lastReadPostNumber: z.number().int().optional(), - likeCount: z.number().int().optional(), - liked: z.boolean().optional(), - notificationLevel: z.number().int().optional(), - opLikeCount: z.number().int().optional(), - pinned: z.boolean().optional(), - pinnedGlobally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListTopTopicsPosters$outboundSchema)).optional(), - postsCount: z.number().int().optional(), - replyCount: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.boolean().optional(), - unreadPosts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - lastReadPostNumber: "last_read_post_number", - likeCount: "like_count", - notificationLevel: "notification_level", - opLikeCount: "op_like_count", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - unreadPosts: "unread_posts", - }); - }); + ListTopTopicsTopics$Outbound, + z.ZodTypeDef, + ListTopTopicsTopics +> = z.object({ + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumpedAt: z.string().optional(), + categoryId: z.number().int().optional(), + closed: z.boolean().optional(), + createdAt: z.string().optional(), + fancyTitle: z.string().optional(), + featuredLink: z.nullable(z.string()).optional(), + hasSummary: z.boolean().optional(), + highestPostNumber: z.number().int().optional(), + id: z.number().int().optional(), + imageUrl: z.nullable(z.string()).optional(), + lastPostedAt: z.string().optional(), + lastPosterUsername: z.string().optional(), + lastReadPostNumber: z.number().int().optional(), + likeCount: z.number().int().optional(), + liked: z.boolean().optional(), + notificationLevel: z.number().int().optional(), + opLikeCount: z.number().int().optional(), + pinned: z.boolean().optional(), + pinnedGlobally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListTopTopicsPosters$outboundSchema)) + .optional(), + postsCount: z.number().int().optional(), + replyCount: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.boolean().optional(), + unreadPosts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + lastReadPostNumber: "last_read_post_number", + likeCount: "like_count", + notificationLevel: "notification_level", + opLikeCount: "op_like_count", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + unreadPosts: "unread_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsTopics$ { - /** @deprecated use `ListTopTopicsTopics$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsTopics$inboundSchema; - /** @deprecated use `ListTopTopicsTopics$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsTopics$outboundSchema; - /** @deprecated use `ListTopTopicsTopics$Outbound` instead. */ - export type Outbound = ListTopTopicsTopics$Outbound; + /** @deprecated use `ListTopTopicsTopics$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsTopics$inboundSchema; + /** @deprecated use `ListTopTopicsTopics$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsTopics$outboundSchema; + /** @deprecated use `ListTopTopicsTopics$Outbound` instead. */ + export type Outbound = ListTopTopicsTopics$Outbound; } /** @internal */ export const ListTopTopicsTopicList$inboundSchema: z.ZodType< - ListTopTopicsTopicList, - z.ZodTypeDef, - unknown -> = z - .object({ - can_create_topic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draft_key: z.string().optional(), - draft_sequence: z.number().int().optional(), - for_period: z.string().optional(), - per_page: z.number().int().optional(), - topics: z.array(z.lazy(() => ListTopTopicsTopics$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - draft_key: "draftKey", - draft_sequence: "draftSequence", - for_period: "forPeriod", - per_page: "perPage", - }); - }); + ListTopTopicsTopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draft_key: z.string().optional(), + draft_sequence: z.number().int().optional(), + for_period: z.string().optional(), + per_page: z.number().int().optional(), + topics: z.array(z.lazy(() => ListTopTopicsTopics$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "for_period": "forPeriod", + "per_page": "perPage", + }); +}); /** @internal */ export type ListTopTopicsTopicList$Outbound = { - can_create_topic?: boolean | undefined; - draft?: string | null | undefined; - draft_key?: string | undefined; - draft_sequence?: number | undefined; - for_period?: string | undefined; - per_page?: number | undefined; - topics?: Array | undefined; + can_create_topic?: boolean | undefined; + draft?: string | null | undefined; + draft_key?: string | undefined; + draft_sequence?: number | undefined; + for_period?: string | undefined; + per_page?: number | undefined; + topics?: Array | undefined; }; /** @internal */ export const ListTopTopicsTopicList$outboundSchema: z.ZodType< - ListTopTopicsTopicList$Outbound, - z.ZodTypeDef, - ListTopTopicsTopicList -> = z - .object({ - canCreateTopic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draftKey: z.string().optional(), - draftSequence: z.number().int().optional(), - forPeriod: z.string().optional(), - perPage: z.number().int().optional(), - topics: z.array(z.lazy(() => ListTopTopicsTopics$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - draftKey: "draft_key", - draftSequence: "draft_sequence", - forPeriod: "for_period", - perPage: "per_page", - }); - }); + ListTopTopicsTopicList$Outbound, + z.ZodTypeDef, + ListTopTopicsTopicList +> = z.object({ + canCreateTopic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draftKey: z.string().optional(), + draftSequence: z.number().int().optional(), + forPeriod: z.string().optional(), + perPage: z.number().int().optional(), + topics: z.array(z.lazy(() => ListTopTopicsTopics$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + draftKey: "draft_key", + draftSequence: "draft_sequence", + forPeriod: "for_period", + perPage: "per_page", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsTopicList$ { - /** @deprecated use `ListTopTopicsTopicList$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsTopicList$inboundSchema; - /** @deprecated use `ListTopTopicsTopicList$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsTopicList$outboundSchema; - /** @deprecated use `ListTopTopicsTopicList$Outbound` instead. */ - export type Outbound = ListTopTopicsTopicList$Outbound; + /** @deprecated use `ListTopTopicsTopicList$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsTopicList$inboundSchema; + /** @deprecated use `ListTopTopicsTopicList$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsTopicList$outboundSchema; + /** @deprecated use `ListTopTopicsTopicList$Outbound` instead. */ + export type Outbound = ListTopTopicsTopicList$Outbound; } /** @internal */ export const ListTopTopicsUsers$inboundSchema: z.ZodType< - ListTopTopicsUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); + ListTopTopicsUsers, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ListTopTopicsUsers$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** @internal */ export const ListTopTopicsUsers$outboundSchema: z.ZodType< - ListTopTopicsUsers$Outbound, - z.ZodTypeDef, - ListTopTopicsUsers -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + ListTopTopicsUsers$Outbound, + z.ZodTypeDef, + ListTopTopicsUsers +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsUsers$ { - /** @deprecated use `ListTopTopicsUsers$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsUsers$inboundSchema; - /** @deprecated use `ListTopTopicsUsers$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsUsers$outboundSchema; - /** @deprecated use `ListTopTopicsUsers$Outbound` instead. */ - export type Outbound = ListTopTopicsUsers$Outbound; + /** @deprecated use `ListTopTopicsUsers$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsUsers$inboundSchema; + /** @deprecated use `ListTopTopicsUsers$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsUsers$outboundSchema; + /** @deprecated use `ListTopTopicsUsers$Outbound` instead. */ + export type Outbound = ListTopTopicsUsers$Outbound; } /** @internal */ export const ListTopTopicsResponseBody$inboundSchema: z.ZodType< - ListTopTopicsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => ListTopTopicsTopicList$inboundSchema).optional(), - users: z.array(z.lazy(() => ListTopTopicsUsers$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + ListTopTopicsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => ListTopTopicsTopicList$inboundSchema).optional(), + users: z.array(z.lazy(() => ListTopTopicsUsers$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type ListTopTopicsResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list?: ListTopTopicsTopicList$Outbound | undefined; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list?: ListTopTopicsTopicList$Outbound | undefined; + users?: Array | undefined; }; /** @internal */ export const ListTopTopicsResponseBody$outboundSchema: z.ZodType< - ListTopTopicsResponseBody$Outbound, - z.ZodTypeDef, - ListTopTopicsResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => ListTopTopicsTopicList$outboundSchema).optional(), - users: z.array(z.lazy(() => ListTopTopicsUsers$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + ListTopTopicsResponseBody$Outbound, + z.ZodTypeDef, + ListTopTopicsResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => ListTopTopicsTopicList$outboundSchema).optional(), + users: z.array(z.lazy(() => ListTopTopicsUsers$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTopTopicsResponseBody$ { - /** @deprecated use `ListTopTopicsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListTopTopicsResponseBody$inboundSchema; - /** @deprecated use `ListTopTopicsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListTopTopicsResponseBody$outboundSchema; - /** @deprecated use `ListTopTopicsResponseBody$Outbound` instead. */ - export type Outbound = ListTopTopicsResponseBody$Outbound; + /** @deprecated use `ListTopTopicsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListTopTopicsResponseBody$inboundSchema; + /** @deprecated use `ListTopTopicsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListTopTopicsResponseBody$outboundSchema; + /** @deprecated use `ListTopTopicsResponseBody$Outbound` instead. */ + export type Outbound = ListTopTopicsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listuseractions.ts b/src/sdk/models/operations/listuseractions.ts index 3b9ac91..3df277d 100644 --- a/src/sdk/models/operations/listuseractions.ts +++ b/src/sdk/models/operations/listuseractions.ts @@ -2,78 +2,78 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListUserActionsRequest = { - filter: string; - offset: number; - username: string; + filter: string; + offset: number; + username: string; }; export type UserActions = { - actingAvatarTemplate: string; - actingName: string | null; - actingUserId: number; - actingUsername: string; - actionCode: string | null; - actionType: number; - archived: boolean; - avatarTemplate: string; - categoryId: number; - closed: boolean; - createdAt: string; - deleted: boolean; - excerpt: string; - hidden: string | null; - name: string | null; - postId: string | null; - postNumber: number; - postType: string | null; - slug: string; - targetName: string | null; - targetUserId: number; - targetUsername: string; - title: string; - topicId: number; - userId: number; - username: string; + actingAvatarTemplate: string; + actingName: string | null; + actingUserId: number; + actingUsername: string; + actionCode: string | null; + actionType: number; + archived: boolean; + avatarTemplate: string; + categoryId: number; + closed: boolean; + createdAt: string; + deleted: boolean; + excerpt: string; + hidden: string | null; + name: string | null; + postId: string | null; + postNumber: number; + postType: string | null; + slug: string; + targetName: string | null; + targetUserId: number; + targetUsername: string; + title: string; + topicId: number; + userId: number; + username: string; }; /** * response */ export type ListUserActionsResponseBody = { - userActions: Array; + userActions: Array; }; /** @internal */ export const ListUserActionsRequest$inboundSchema: z.ZodType< - ListUserActionsRequest, - z.ZodTypeDef, - unknown + ListUserActionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - filter: z.string(), - offset: z.number().int(), - username: z.string(), + filter: z.string(), + offset: z.number().int(), + username: z.string(), }); /** @internal */ export type ListUserActionsRequest$Outbound = { - filter: string; - offset: number; - username: string; + filter: string; + offset: number; + username: string; }; /** @internal */ export const ListUserActionsRequest$outboundSchema: z.ZodType< - ListUserActionsRequest$Outbound, - z.ZodTypeDef, - ListUserActionsRequest + ListUserActionsRequest$Outbound, + z.ZodTypeDef, + ListUserActionsRequest > = z.object({ - filter: z.string(), - offset: z.number().int(), - username: z.string(), + filter: z.string(), + offset: z.number().int(), + username: z.string(), }); /** @@ -81,209 +81,205 @@ export const ListUserActionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserActionsRequest$ { - /** @deprecated use `ListUserActionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListUserActionsRequest$inboundSchema; - /** @deprecated use `ListUserActionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListUserActionsRequest$outboundSchema; - /** @deprecated use `ListUserActionsRequest$Outbound` instead. */ - export type Outbound = ListUserActionsRequest$Outbound; + /** @deprecated use `ListUserActionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListUserActionsRequest$inboundSchema; + /** @deprecated use `ListUserActionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListUserActionsRequest$outboundSchema; + /** @deprecated use `ListUserActionsRequest$Outbound` instead. */ + export type Outbound = ListUserActionsRequest$Outbound; } /** @internal */ -export const UserActions$inboundSchema: z.ZodType = z - .object({ - acting_avatar_template: z.string(), - acting_name: z.nullable(z.string()), - acting_user_id: z.number().int(), - acting_username: z.string(), - action_code: z.nullable(z.string()), - action_type: z.number().int(), - archived: z.boolean(), - avatar_template: z.string(), - category_id: z.number().int(), - closed: z.boolean(), - created_at: z.string(), - deleted: z.boolean(), - excerpt: z.string(), - hidden: z.nullable(z.string()), - name: z.nullable(z.string()), - post_id: z.nullable(z.string()), - post_number: z.number().int(), - post_type: z.nullable(z.string()), - slug: z.string(), - target_name: z.nullable(z.string()), - target_user_id: z.number().int(), - target_username: z.string(), - title: z.string(), - topic_id: z.number().int(), - user_id: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - acting_avatar_template: "actingAvatarTemplate", - acting_name: "actingName", - acting_user_id: "actingUserId", - acting_username: "actingUsername", - action_code: "actionCode", - action_type: "actionType", - avatar_template: "avatarTemplate", - category_id: "categoryId", - created_at: "createdAt", - post_id: "postId", - post_number: "postNumber", - post_type: "postType", - target_name: "targetName", - target_user_id: "targetUserId", - target_username: "targetUsername", - topic_id: "topicId", - user_id: "userId", - }); - }); +export const UserActions$inboundSchema: z.ZodType< + UserActions, + z.ZodTypeDef, + unknown +> = z.object({ + acting_avatar_template: z.string(), + acting_name: z.nullable(z.string()), + acting_user_id: z.number().int(), + acting_username: z.string(), + action_code: z.nullable(z.string()), + action_type: z.number().int(), + archived: z.boolean(), + avatar_template: z.string(), + category_id: z.number().int(), + closed: z.boolean(), + created_at: z.string(), + deleted: z.boolean(), + excerpt: z.string(), + hidden: z.nullable(z.string()), + name: z.nullable(z.string()), + post_id: z.nullable(z.string()), + post_number: z.number().int(), + post_type: z.nullable(z.string()), + slug: z.string(), + target_name: z.nullable(z.string()), + target_user_id: z.number().int(), + target_username: z.string(), + title: z.string(), + topic_id: z.number().int(), + user_id: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "acting_avatar_template": "actingAvatarTemplate", + "acting_name": "actingName", + "acting_user_id": "actingUserId", + "acting_username": "actingUsername", + "action_code": "actionCode", + "action_type": "actionType", + "avatar_template": "avatarTemplate", + "category_id": "categoryId", + "created_at": "createdAt", + "post_id": "postId", + "post_number": "postNumber", + "post_type": "postType", + "target_name": "targetName", + "target_user_id": "targetUserId", + "target_username": "targetUsername", + "topic_id": "topicId", + "user_id": "userId", + }); +}); /** @internal */ export type UserActions$Outbound = { - acting_avatar_template: string; - acting_name: string | null; - acting_user_id: number; - acting_username: string; - action_code: string | null; - action_type: number; - archived: boolean; - avatar_template: string; - category_id: number; - closed: boolean; - created_at: string; - deleted: boolean; - excerpt: string; - hidden: string | null; - name: string | null; - post_id: string | null; - post_number: number; - post_type: string | null; - slug: string; - target_name: string | null; - target_user_id: number; - target_username: string; - title: string; - topic_id: number; - user_id: number; - username: string; + acting_avatar_template: string; + acting_name: string | null; + acting_user_id: number; + acting_username: string; + action_code: string | null; + action_type: number; + archived: boolean; + avatar_template: string; + category_id: number; + closed: boolean; + created_at: string; + deleted: boolean; + excerpt: string; + hidden: string | null; + name: string | null; + post_id: string | null; + post_number: number; + post_type: string | null; + slug: string; + target_name: string | null; + target_user_id: number; + target_username: string; + title: string; + topic_id: number; + user_id: number; + username: string; }; /** @internal */ export const UserActions$outboundSchema: z.ZodType< - UserActions$Outbound, - z.ZodTypeDef, - UserActions -> = z - .object({ - actingAvatarTemplate: z.string(), - actingName: z.nullable(z.string()), - actingUserId: z.number().int(), - actingUsername: z.string(), - actionCode: z.nullable(z.string()), - actionType: z.number().int(), - archived: z.boolean(), - avatarTemplate: z.string(), - categoryId: z.number().int(), - closed: z.boolean(), - createdAt: z.string(), - deleted: z.boolean(), - excerpt: z.string(), - hidden: z.nullable(z.string()), - name: z.nullable(z.string()), - postId: z.nullable(z.string()), - postNumber: z.number().int(), - postType: z.nullable(z.string()), - slug: z.string(), - targetName: z.nullable(z.string()), - targetUserId: z.number().int(), - targetUsername: z.string(), - title: z.string(), - topicId: z.number().int(), - userId: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - actingAvatarTemplate: "acting_avatar_template", - actingName: "acting_name", - actingUserId: "acting_user_id", - actingUsername: "acting_username", - actionCode: "action_code", - actionType: "action_type", - avatarTemplate: "avatar_template", - categoryId: "category_id", - createdAt: "created_at", - postId: "post_id", - postNumber: "post_number", - postType: "post_type", - targetName: "target_name", - targetUserId: "target_user_id", - targetUsername: "target_username", - topicId: "topic_id", - userId: "user_id", - }); - }); + UserActions$Outbound, + z.ZodTypeDef, + UserActions +> = z.object({ + actingAvatarTemplate: z.string(), + actingName: z.nullable(z.string()), + actingUserId: z.number().int(), + actingUsername: z.string(), + actionCode: z.nullable(z.string()), + actionType: z.number().int(), + archived: z.boolean(), + avatarTemplate: z.string(), + categoryId: z.number().int(), + closed: z.boolean(), + createdAt: z.string(), + deleted: z.boolean(), + excerpt: z.string(), + hidden: z.nullable(z.string()), + name: z.nullable(z.string()), + postId: z.nullable(z.string()), + postNumber: z.number().int(), + postType: z.nullable(z.string()), + slug: z.string(), + targetName: z.nullable(z.string()), + targetUserId: z.number().int(), + targetUsername: z.string(), + title: z.string(), + topicId: z.number().int(), + userId: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + actingAvatarTemplate: "acting_avatar_template", + actingName: "acting_name", + actingUserId: "acting_user_id", + actingUsername: "acting_username", + actionCode: "action_code", + actionType: "action_type", + avatarTemplate: "avatar_template", + categoryId: "category_id", + createdAt: "created_at", + postId: "post_id", + postNumber: "post_number", + postType: "post_type", + targetName: "target_name", + targetUserId: "target_user_id", + targetUsername: "target_username", + topicId: "topic_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserActions$ { - /** @deprecated use `UserActions$inboundSchema` instead. */ - export const inboundSchema = UserActions$inboundSchema; - /** @deprecated use `UserActions$outboundSchema` instead. */ - export const outboundSchema = UserActions$outboundSchema; - /** @deprecated use `UserActions$Outbound` instead. */ - export type Outbound = UserActions$Outbound; + /** @deprecated use `UserActions$inboundSchema` instead. */ + export const inboundSchema = UserActions$inboundSchema; + /** @deprecated use `UserActions$outboundSchema` instead. */ + export const outboundSchema = UserActions$outboundSchema; + /** @deprecated use `UserActions$Outbound` instead. */ + export type Outbound = UserActions$Outbound; } /** @internal */ export const ListUserActionsResponseBody$inboundSchema: z.ZodType< - ListUserActionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - user_actions: z.array(z.lazy(() => UserActions$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - user_actions: "userActions", - }); - }); + ListUserActionsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + user_actions: z.array(z.lazy(() => UserActions$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "user_actions": "userActions", + }); +}); /** @internal */ export type ListUserActionsResponseBody$Outbound = { - user_actions: Array; + user_actions: Array; }; /** @internal */ export const ListUserActionsResponseBody$outboundSchema: z.ZodType< - ListUserActionsResponseBody$Outbound, - z.ZodTypeDef, - ListUserActionsResponseBody -> = z - .object({ - userActions: z.array(z.lazy(() => UserActions$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - userActions: "user_actions", - }); - }); + ListUserActionsResponseBody$Outbound, + z.ZodTypeDef, + ListUserActionsResponseBody +> = z.object({ + userActions: z.array(z.lazy(() => UserActions$outboundSchema)), +}).transform((v) => { + return remap$(v, { + userActions: "user_actions", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserActionsResponseBody$ { - /** @deprecated use `ListUserActionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListUserActionsResponseBody$inboundSchema; - /** @deprecated use `ListUserActionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListUserActionsResponseBody$outboundSchema; - /** @deprecated use `ListUserActionsResponseBody$Outbound` instead. */ - export type Outbound = ListUserActionsResponseBody$Outbound; + /** @deprecated use `ListUserActionsResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListUserActionsResponseBody$inboundSchema; + /** @deprecated use `ListUserActionsResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListUserActionsResponseBody$outboundSchema; + /** @deprecated use `ListUserActionsResponseBody$Outbound` instead. */ + export type Outbound = ListUserActionsResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listuserbadges.ts b/src/sdk/models/operations/listuserbadges.ts index c6dc655..b9e53d2 100644 --- a/src/sdk/models/operations/listuserbadges.ts +++ b/src/sdk/models/operations/listuserbadges.ts @@ -2,89 +2,89 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListUserBadgesRequest = { - username: string; + username: string; }; export type ListUserBadgesBadgeTypes = { - id: number; - name: string; - sortOrder: number; + id: number; + name: string; + sortOrder: number; }; export type ListUserBadgesBadges = { - allowTitle: boolean; - badgeGroupingId: number; - badgeTypeId: number; - description: string; - enabled: boolean; - grantCount: number; - icon: string; - id: number; - imageUrl: string | null; - listable: boolean; - manuallyGrantable: boolean; - multipleGrant: boolean; - name: string; - slug: string; - system: boolean; + allowTitle: boolean; + badgeGroupingId: number; + badgeTypeId: number; + description: string; + enabled: boolean; + grantCount: number; + icon: string; + id: number; + imageUrl: string | null; + listable: boolean; + manuallyGrantable: boolean; + multipleGrant: boolean; + name: string; + slug: string; + system: boolean; }; export type GrantedBies = { - admin: boolean; - avatarTemplate: string; - flairName: string | null; - id: number; - moderator: boolean; - name: string; - trustLevel: number; - username: string; + admin: boolean; + avatarTemplate: string; + flairName: string | null; + id: number; + moderator: boolean; + name: string; + trustLevel: number; + username: string; }; export type UserBadges = { - badgeId: number; - canFavorite: boolean; - grantedAt: string; - grantedById: number; - groupingPosition: number; - id: number; - isFavorite: string | null; + badgeId: number; + canFavorite: boolean; + grantedAt: string; + grantedById: number; + groupingPosition: number; + id: number; + isFavorite: string | null; }; /** * success response */ export type ListUserBadgesResponseBody = { - badgeTypes?: Array | undefined; - badges?: Array | undefined; - grantedBies?: Array | undefined; - userBadges: Array; + badgeTypes?: Array | undefined; + badges?: Array | undefined; + grantedBies?: Array | undefined; + userBadges: Array; }; /** @internal */ export const ListUserBadgesRequest$inboundSchema: z.ZodType< - ListUserBadgesRequest, - z.ZodTypeDef, - unknown + ListUserBadgesRequest, + z.ZodTypeDef, + unknown > = z.object({ - username: z.string(), + username: z.string(), }); /** @internal */ export type ListUserBadgesRequest$Outbound = { - username: string; + username: string; }; /** @internal */ export const ListUserBadgesRequest$outboundSchema: z.ZodType< - ListUserBadgesRequest$Outbound, - z.ZodTypeDef, - ListUserBadgesRequest + ListUserBadgesRequest$Outbound, + z.ZodTypeDef, + ListUserBadgesRequest > = z.object({ - username: z.string(), + username: z.string(), }); /** @@ -92,364 +92,358 @@ export const ListUserBadgesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserBadgesRequest$ { - /** @deprecated use `ListUserBadgesRequest$inboundSchema` instead. */ - export const inboundSchema = ListUserBadgesRequest$inboundSchema; - /** @deprecated use `ListUserBadgesRequest$outboundSchema` instead. */ - export const outboundSchema = ListUserBadgesRequest$outboundSchema; - /** @deprecated use `ListUserBadgesRequest$Outbound` instead. */ - export type Outbound = ListUserBadgesRequest$Outbound; + /** @deprecated use `ListUserBadgesRequest$inboundSchema` instead. */ + export const inboundSchema = ListUserBadgesRequest$inboundSchema; + /** @deprecated use `ListUserBadgesRequest$outboundSchema` instead. */ + export const outboundSchema = ListUserBadgesRequest$outboundSchema; + /** @deprecated use `ListUserBadgesRequest$Outbound` instead. */ + export type Outbound = ListUserBadgesRequest$Outbound; } /** @internal */ export const ListUserBadgesBadgeTypes$inboundSchema: z.ZodType< - ListUserBadgesBadgeTypes, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int(), - name: z.string(), - sort_order: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sort_order: "sortOrder", - }); - }); + ListUserBadgesBadgeTypes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + name: z.string(), + sort_order: z.number().int(), +}).transform((v) => { + return remap$(v, { + "sort_order": "sortOrder", + }); +}); /** @internal */ export type ListUserBadgesBadgeTypes$Outbound = { - id: number; - name: string; - sort_order: number; + id: number; + name: string; + sort_order: number; }; /** @internal */ export const ListUserBadgesBadgeTypes$outboundSchema: z.ZodType< - ListUserBadgesBadgeTypes$Outbound, - z.ZodTypeDef, - ListUserBadgesBadgeTypes -> = z - .object({ - id: z.number().int(), - name: z.string(), - sortOrder: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sortOrder: "sort_order", - }); - }); + ListUserBadgesBadgeTypes$Outbound, + z.ZodTypeDef, + ListUserBadgesBadgeTypes +> = z.object({ + id: z.number().int(), + name: z.string(), + sortOrder: z.number().int(), +}).transform((v) => { + return remap$(v, { + sortOrder: "sort_order", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserBadgesBadgeTypes$ { - /** @deprecated use `ListUserBadgesBadgeTypes$inboundSchema` instead. */ - export const inboundSchema = ListUserBadgesBadgeTypes$inboundSchema; - /** @deprecated use `ListUserBadgesBadgeTypes$outboundSchema` instead. */ - export const outboundSchema = ListUserBadgesBadgeTypes$outboundSchema; - /** @deprecated use `ListUserBadgesBadgeTypes$Outbound` instead. */ - export type Outbound = ListUserBadgesBadgeTypes$Outbound; + /** @deprecated use `ListUserBadgesBadgeTypes$inboundSchema` instead. */ + export const inboundSchema = ListUserBadgesBadgeTypes$inboundSchema; + /** @deprecated use `ListUserBadgesBadgeTypes$outboundSchema` instead. */ + export const outboundSchema = ListUserBadgesBadgeTypes$outboundSchema; + /** @deprecated use `ListUserBadgesBadgeTypes$Outbound` instead. */ + export type Outbound = ListUserBadgesBadgeTypes$Outbound; } /** @internal */ export const ListUserBadgesBadges$inboundSchema: z.ZodType< - ListUserBadgesBadges, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_title: z.boolean(), - badge_grouping_id: z.number().int(), - badge_type_id: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grant_count: z.number().int(), - icon: z.string(), - id: z.number().int(), - image_url: z.nullable(z.string()), - listable: z.boolean(), - manually_grantable: z.boolean(), - multiple_grant: z.boolean(), - name: z.string(), - slug: z.string(), - system: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - allow_title: "allowTitle", - badge_grouping_id: "badgeGroupingId", - badge_type_id: "badgeTypeId", - grant_count: "grantCount", - image_url: "imageUrl", - manually_grantable: "manuallyGrantable", - multiple_grant: "multipleGrant", - }); - }); + ListUserBadgesBadges, + z.ZodTypeDef, + unknown +> = z.object({ + allow_title: z.boolean(), + badge_grouping_id: z.number().int(), + badge_type_id: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grant_count: z.number().int(), + icon: z.string(), + id: z.number().int(), + image_url: z.nullable(z.string()), + listable: z.boolean(), + manually_grantable: z.boolean(), + multiple_grant: z.boolean(), + name: z.string(), + slug: z.string(), + system: z.boolean(), +}).transform((v) => { + return remap$(v, { + "allow_title": "allowTitle", + "badge_grouping_id": "badgeGroupingId", + "badge_type_id": "badgeTypeId", + "grant_count": "grantCount", + "image_url": "imageUrl", + "manually_grantable": "manuallyGrantable", + "multiple_grant": "multipleGrant", + }); +}); /** @internal */ export type ListUserBadgesBadges$Outbound = { - allow_title: boolean; - badge_grouping_id: number; - badge_type_id: number; - description: string; - enabled: boolean; - grant_count: number; - icon: string; - id: number; - image_url: string | null; - listable: boolean; - manually_grantable: boolean; - multiple_grant: boolean; - name: string; - slug: string; - system: boolean; + allow_title: boolean; + badge_grouping_id: number; + badge_type_id: number; + description: string; + enabled: boolean; + grant_count: number; + icon: string; + id: number; + image_url: string | null; + listable: boolean; + manually_grantable: boolean; + multiple_grant: boolean; + name: string; + slug: string; + system: boolean; }; /** @internal */ export const ListUserBadgesBadges$outboundSchema: z.ZodType< - ListUserBadgesBadges$Outbound, - z.ZodTypeDef, - ListUserBadgesBadges -> = z - .object({ - allowTitle: z.boolean(), - badgeGroupingId: z.number().int(), - badgeTypeId: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grantCount: z.number().int(), - icon: z.string(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - listable: z.boolean(), - manuallyGrantable: z.boolean(), - multipleGrant: z.boolean(), - name: z.string(), - slug: z.string(), - system: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - allowTitle: "allow_title", - badgeGroupingId: "badge_grouping_id", - badgeTypeId: "badge_type_id", - grantCount: "grant_count", - imageUrl: "image_url", - manuallyGrantable: "manually_grantable", - multipleGrant: "multiple_grant", - }); - }); + ListUserBadgesBadges$Outbound, + z.ZodTypeDef, + ListUserBadgesBadges +> = z.object({ + allowTitle: z.boolean(), + badgeGroupingId: z.number().int(), + badgeTypeId: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grantCount: z.number().int(), + icon: z.string(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + listable: z.boolean(), + manuallyGrantable: z.boolean(), + multipleGrant: z.boolean(), + name: z.string(), + slug: z.string(), + system: z.boolean(), +}).transform((v) => { + return remap$(v, { + allowTitle: "allow_title", + badgeGroupingId: "badge_grouping_id", + badgeTypeId: "badge_type_id", + grantCount: "grant_count", + imageUrl: "image_url", + manuallyGrantable: "manually_grantable", + multipleGrant: "multiple_grant", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserBadgesBadges$ { - /** @deprecated use `ListUserBadgesBadges$inboundSchema` instead. */ - export const inboundSchema = ListUserBadgesBadges$inboundSchema; - /** @deprecated use `ListUserBadgesBadges$outboundSchema` instead. */ - export const outboundSchema = ListUserBadgesBadges$outboundSchema; - /** @deprecated use `ListUserBadgesBadges$Outbound` instead. */ - export type Outbound = ListUserBadgesBadges$Outbound; + /** @deprecated use `ListUserBadgesBadges$inboundSchema` instead. */ + export const inboundSchema = ListUserBadgesBadges$inboundSchema; + /** @deprecated use `ListUserBadgesBadges$outboundSchema` instead. */ + export const outboundSchema = ListUserBadgesBadges$outboundSchema; + /** @deprecated use `ListUserBadgesBadges$Outbound` instead. */ + export type Outbound = ListUserBadgesBadges$Outbound; } /** @internal */ -export const GrantedBies$inboundSchema: z.ZodType = z - .object({ - admin: z.boolean(), - avatar_template: z.string(), - flair_name: z.nullable(z.string()), - id: z.number().int(), - moderator: z.boolean(), - name: z.string(), - trust_level: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - flair_name: "flairName", - trust_level: "trustLevel", - }); - }); +export const GrantedBies$inboundSchema: z.ZodType< + GrantedBies, + z.ZodTypeDef, + unknown +> = z.object({ + admin: z.boolean(), + avatar_template: z.string(), + flair_name: z.nullable(z.string()), + id: z.number().int(), + moderator: z.boolean(), + name: z.string(), + trust_level: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + "flair_name": "flairName", + "trust_level": "trustLevel", + }); +}); /** @internal */ export type GrantedBies$Outbound = { - admin: boolean; - avatar_template: string; - flair_name: string | null; - id: number; - moderator: boolean; - name: string; - trust_level: number; - username: string; + admin: boolean; + avatar_template: string; + flair_name: string | null; + id: number; + moderator: boolean; + name: string; + trust_level: number; + username: string; }; /** @internal */ export const GrantedBies$outboundSchema: z.ZodType< - GrantedBies$Outbound, - z.ZodTypeDef, - GrantedBies -> = z - .object({ - admin: z.boolean(), - avatarTemplate: z.string(), - flairName: z.nullable(z.string()), - id: z.number().int(), - moderator: z.boolean(), - name: z.string(), - trustLevel: z.number().int(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - flairName: "flair_name", - trustLevel: "trust_level", - }); - }); + GrantedBies$Outbound, + z.ZodTypeDef, + GrantedBies +> = z.object({ + admin: z.boolean(), + avatarTemplate: z.string(), + flairName: z.nullable(z.string()), + id: z.number().int(), + moderator: z.boolean(), + name: z.string(), + trustLevel: z.number().int(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + flairName: "flair_name", + trustLevel: "trust_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GrantedBies$ { - /** @deprecated use `GrantedBies$inboundSchema` instead. */ - export const inboundSchema = GrantedBies$inboundSchema; - /** @deprecated use `GrantedBies$outboundSchema` instead. */ - export const outboundSchema = GrantedBies$outboundSchema; - /** @deprecated use `GrantedBies$Outbound` instead. */ - export type Outbound = GrantedBies$Outbound; + /** @deprecated use `GrantedBies$inboundSchema` instead. */ + export const inboundSchema = GrantedBies$inboundSchema; + /** @deprecated use `GrantedBies$outboundSchema` instead. */ + export const outboundSchema = GrantedBies$outboundSchema; + /** @deprecated use `GrantedBies$Outbound` instead. */ + export type Outbound = GrantedBies$Outbound; } /** @internal */ -export const UserBadges$inboundSchema: z.ZodType = z - .object({ - badge_id: z.number().int(), - can_favorite: z.boolean(), - granted_at: z.string(), - granted_by_id: z.number().int(), - grouping_position: z.number().int(), - id: z.number().int(), - is_favorite: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - badge_id: "badgeId", - can_favorite: "canFavorite", - granted_at: "grantedAt", - granted_by_id: "grantedById", - grouping_position: "groupingPosition", - is_favorite: "isFavorite", - }); - }); +export const UserBadges$inboundSchema: z.ZodType< + UserBadges, + z.ZodTypeDef, + unknown +> = z.object({ + badge_id: z.number().int(), + can_favorite: z.boolean(), + granted_at: z.string(), + granted_by_id: z.number().int(), + grouping_position: z.number().int(), + id: z.number().int(), + is_favorite: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "badge_id": "badgeId", + "can_favorite": "canFavorite", + "granted_at": "grantedAt", + "granted_by_id": "grantedById", + "grouping_position": "groupingPosition", + "is_favorite": "isFavorite", + }); +}); /** @internal */ export type UserBadges$Outbound = { - badge_id: number; - can_favorite: boolean; - granted_at: string; - granted_by_id: number; - grouping_position: number; - id: number; - is_favorite: string | null; + badge_id: number; + can_favorite: boolean; + granted_at: string; + granted_by_id: number; + grouping_position: number; + id: number; + is_favorite: string | null; }; /** @internal */ -export const UserBadges$outboundSchema: z.ZodType = z - .object({ - badgeId: z.number().int(), - canFavorite: z.boolean(), - grantedAt: z.string(), - grantedById: z.number().int(), - groupingPosition: z.number().int(), - id: z.number().int(), - isFavorite: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - badgeId: "badge_id", - canFavorite: "can_favorite", - grantedAt: "granted_at", - grantedById: "granted_by_id", - groupingPosition: "grouping_position", - isFavorite: "is_favorite", - }); - }); +export const UserBadges$outboundSchema: z.ZodType< + UserBadges$Outbound, + z.ZodTypeDef, + UserBadges +> = z.object({ + badgeId: z.number().int(), + canFavorite: z.boolean(), + grantedAt: z.string(), + grantedById: z.number().int(), + groupingPosition: z.number().int(), + id: z.number().int(), + isFavorite: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + badgeId: "badge_id", + canFavorite: "can_favorite", + grantedAt: "granted_at", + grantedById: "granted_by_id", + groupingPosition: "grouping_position", + isFavorite: "is_favorite", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UserBadges$ { - /** @deprecated use `UserBadges$inboundSchema` instead. */ - export const inboundSchema = UserBadges$inboundSchema; - /** @deprecated use `UserBadges$outboundSchema` instead. */ - export const outboundSchema = UserBadges$outboundSchema; - /** @deprecated use `UserBadges$Outbound` instead. */ - export type Outbound = UserBadges$Outbound; + /** @deprecated use `UserBadges$inboundSchema` instead. */ + export const inboundSchema = UserBadges$inboundSchema; + /** @deprecated use `UserBadges$outboundSchema` instead. */ + export const outboundSchema = UserBadges$outboundSchema; + /** @deprecated use `UserBadges$Outbound` instead. */ + export type Outbound = UserBadges$Outbound; } /** @internal */ export const ListUserBadgesResponseBody$inboundSchema: z.ZodType< - ListUserBadgesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - badge_types: z.array(z.lazy(() => ListUserBadgesBadgeTypes$inboundSchema)).optional(), - badges: z.array(z.lazy(() => ListUserBadgesBadges$inboundSchema)).optional(), - granted_bies: z.array(z.lazy(() => GrantedBies$inboundSchema)).optional(), - user_badges: z.array(z.lazy(() => UserBadges$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badge_types: "badgeTypes", - granted_bies: "grantedBies", - user_badges: "userBadges", - }); - }); + ListUserBadgesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + badge_types: z.array(z.lazy(() => ListUserBadgesBadgeTypes$inboundSchema)) + .optional(), + badges: z.array(z.lazy(() => ListUserBadgesBadges$inboundSchema)).optional(), + granted_bies: z.array(z.lazy(() => GrantedBies$inboundSchema)).optional(), + user_badges: z.array(z.lazy(() => UserBadges$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "badge_types": "badgeTypes", + "granted_bies": "grantedBies", + "user_badges": "userBadges", + }); +}); /** @internal */ export type ListUserBadgesResponseBody$Outbound = { - badge_types?: Array | undefined; - badges?: Array | undefined; - granted_bies?: Array | undefined; - user_badges: Array; + badge_types?: Array | undefined; + badges?: Array | undefined; + granted_bies?: Array | undefined; + user_badges: Array; }; /** @internal */ export const ListUserBadgesResponseBody$outboundSchema: z.ZodType< - ListUserBadgesResponseBody$Outbound, - z.ZodTypeDef, - ListUserBadgesResponseBody -> = z - .object({ - badgeTypes: z.array(z.lazy(() => ListUserBadgesBadgeTypes$outboundSchema)).optional(), - badges: z.array(z.lazy(() => ListUserBadgesBadges$outboundSchema)).optional(), - grantedBies: z.array(z.lazy(() => GrantedBies$outboundSchema)).optional(), - userBadges: z.array(z.lazy(() => UserBadges$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badgeTypes: "badge_types", - grantedBies: "granted_bies", - userBadges: "user_badges", - }); - }); + ListUserBadgesResponseBody$Outbound, + z.ZodTypeDef, + ListUserBadgesResponseBody +> = z.object({ + badgeTypes: z.array(z.lazy(() => ListUserBadgesBadgeTypes$outboundSchema)) + .optional(), + badges: z.array(z.lazy(() => ListUserBadgesBadges$outboundSchema)).optional(), + grantedBies: z.array(z.lazy(() => GrantedBies$outboundSchema)).optional(), + userBadges: z.array(z.lazy(() => UserBadges$outboundSchema)), +}).transform((v) => { + return remap$(v, { + badgeTypes: "badge_types", + grantedBies: "granted_bies", + userBadges: "user_badges", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserBadgesResponseBody$ { - /** @deprecated use `ListUserBadgesResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListUserBadgesResponseBody$inboundSchema; - /** @deprecated use `ListUserBadgesResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListUserBadgesResponseBody$outboundSchema; - /** @deprecated use `ListUserBadgesResponseBody$Outbound` instead. */ - export type Outbound = ListUserBadgesResponseBody$Outbound; + /** @deprecated use `ListUserBadgesResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListUserBadgesResponseBody$inboundSchema; + /** @deprecated use `ListUserBadgesResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListUserBadgesResponseBody$outboundSchema; + /** @deprecated use `ListUserBadgesResponseBody$Outbound` instead. */ + export type Outbound = ListUserBadgesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listuserprivatemessages.ts b/src/sdk/models/operations/listuserprivatemessages.ts index 6ce9008..9fdc75a 100644 --- a/src/sdk/models/operations/listuserprivatemessages.ts +++ b/src/sdk/models/operations/listuserprivatemessages.ts @@ -2,110 +2,110 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ListUserPrivateMessagesRequest = { - username: string; + username: string; }; export type ListUserPrivateMessagesParticipants = { - description?: string | null | undefined; - extras?: string | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | null | undefined; + extras?: string | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type ListUserPrivateMessagesPosters = { - description?: string | undefined; - extras?: string | undefined; - primaryGroupId?: string | null | undefined; - userId?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primaryGroupId?: string | null | undefined; + userId?: number | undefined; }; export type ListUserPrivateMessagesTopics = { - allowedUserCount?: number | undefined; - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumpedAt?: string | undefined; - categoryId?: string | null | undefined; - closed?: boolean | undefined; - createdAt?: string | undefined; - fancyTitle?: string | undefined; - featuredLink?: string | null | undefined; - hasSummary?: boolean | undefined; - highestPostNumber?: number | undefined; - id?: number | undefined; - imageUrl?: string | null | undefined; - lastPostedAt?: string | undefined; - lastPosterUsername?: string | undefined; - lastReadPostNumber?: number | undefined; - likeCount?: number | undefined; - liked?: boolean | undefined; - notificationLevel?: number | undefined; - participants?: Array | undefined; - pinned?: boolean | undefined; - pinnedGlobally?: boolean | undefined; - posters?: Array | undefined; - postsCount?: number | undefined; - replyCount?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unreadPosts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + allowedUserCount?: number | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumpedAt?: string | undefined; + categoryId?: string | null | undefined; + closed?: boolean | undefined; + createdAt?: string | undefined; + fancyTitle?: string | undefined; + featuredLink?: string | null | undefined; + hasSummary?: boolean | undefined; + highestPostNumber?: number | undefined; + id?: number | undefined; + imageUrl?: string | null | undefined; + lastPostedAt?: string | undefined; + lastPosterUsername?: string | undefined; + lastReadPostNumber?: number | undefined; + likeCount?: number | undefined; + liked?: boolean | undefined; + notificationLevel?: number | undefined; + participants?: Array | undefined; + pinned?: boolean | undefined; + pinnedGlobally?: boolean | undefined; + posters?: Array | undefined; + postsCount?: number | undefined; + replyCount?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unreadPosts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; export type ListUserPrivateMessagesTopicList = { - canCreateTopic?: boolean | undefined; - draft?: string | null | undefined; - draftKey?: string | undefined; - draftSequence?: number | undefined; - perPage?: number | undefined; - topics?: Array | undefined; + canCreateTopic?: boolean | undefined; + draft?: string | null | undefined; + draftKey?: string | undefined; + draftSequence?: number | undefined; + perPage?: number | undefined; + topics?: Array | undefined; }; export type ListUserPrivateMessagesUsers = { - avatarTemplate?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatarTemplate?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** * private messages */ export type ListUserPrivateMessagesResponseBody = { - primaryGroups?: Array | undefined; - topicList?: ListUserPrivateMessagesTopicList | undefined; - users?: Array | undefined; + primaryGroups?: Array | undefined; + topicList?: ListUserPrivateMessagesTopicList | undefined; + users?: Array | undefined; }; /** @internal */ export const ListUserPrivateMessagesRequest$inboundSchema: z.ZodType< - ListUserPrivateMessagesRequest, - z.ZodTypeDef, - unknown + ListUserPrivateMessagesRequest, + z.ZodTypeDef, + unknown > = z.object({ - username: z.string(), + username: z.string(), }); /** @internal */ export type ListUserPrivateMessagesRequest$Outbound = { - username: string; + username: string; }; /** @internal */ export const ListUserPrivateMessagesRequest$outboundSchema: z.ZodType< - ListUserPrivateMessagesRequest$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesRequest + ListUserPrivateMessagesRequest$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesRequest > = z.object({ - username: z.string(), + username: z.string(), }); /** @@ -113,495 +113,485 @@ export const ListUserPrivateMessagesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesRequest$ { - /** @deprecated use `ListUserPrivateMessagesRequest$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesRequest$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesRequest$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesRequest$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesRequest$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesRequest$Outbound; + /** @deprecated use `ListUserPrivateMessagesRequest$inboundSchema` instead. */ + export const inboundSchema = ListUserPrivateMessagesRequest$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesRequest$outboundSchema` instead. */ + export const outboundSchema = ListUserPrivateMessagesRequest$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesRequest$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesRequest$Outbound; } /** @internal */ export const ListUserPrivateMessagesParticipants$inboundSchema: z.ZodType< - ListUserPrivateMessagesParticipants, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.nullable(z.string()).optional(), - extras: z.string().optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + ListUserPrivateMessagesParticipants, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + extras: z.string().optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type ListUserPrivateMessagesParticipants$Outbound = { - description?: string | null | undefined; - extras?: string | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | null | undefined; + extras?: string | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const ListUserPrivateMessagesParticipants$outboundSchema: z.ZodType< - ListUserPrivateMessagesParticipants$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesParticipants -> = z - .object({ - description: z.nullable(z.string()).optional(), - extras: z.string().optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + ListUserPrivateMessagesParticipants$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesParticipants +> = z.object({ + description: z.nullable(z.string()).optional(), + extras: z.string().optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesParticipants$ { - /** @deprecated use `ListUserPrivateMessagesParticipants$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesParticipants$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesParticipants$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesParticipants$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesParticipants$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesParticipants$Outbound; + /** @deprecated use `ListUserPrivateMessagesParticipants$inboundSchema` instead. */ + export const inboundSchema = + ListUserPrivateMessagesParticipants$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesParticipants$outboundSchema` instead. */ + export const outboundSchema = + ListUserPrivateMessagesParticipants$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesParticipants$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesParticipants$Outbound; } /** @internal */ export const ListUserPrivateMessagesPosters$inboundSchema: z.ZodType< - ListUserPrivateMessagesPosters, - z.ZodTypeDef, - unknown -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primary_group_id: z.nullable(z.string()).optional(), - user_id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primary_group_id: "primaryGroupId", - user_id: "userId", - }); - }); + ListUserPrivateMessagesPosters, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primary_group_id: z.nullable(z.string()).optional(), + user_id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "primary_group_id": "primaryGroupId", + "user_id": "userId", + }); +}); /** @internal */ export type ListUserPrivateMessagesPosters$Outbound = { - description?: string | undefined; - extras?: string | undefined; - primary_group_id?: string | null | undefined; - user_id?: number | undefined; + description?: string | undefined; + extras?: string | undefined; + primary_group_id?: string | null | undefined; + user_id?: number | undefined; }; /** @internal */ export const ListUserPrivateMessagesPosters$outboundSchema: z.ZodType< - ListUserPrivateMessagesPosters$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesPosters -> = z - .object({ - description: z.string().optional(), - extras: z.string().optional(), - primaryGroupId: z.nullable(z.string()).optional(), - userId: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroupId: "primary_group_id", - userId: "user_id", - }); - }); + ListUserPrivateMessagesPosters$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesPosters +> = z.object({ + description: z.string().optional(), + extras: z.string().optional(), + primaryGroupId: z.nullable(z.string()).optional(), + userId: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + primaryGroupId: "primary_group_id", + userId: "user_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesPosters$ { - /** @deprecated use `ListUserPrivateMessagesPosters$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesPosters$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesPosters$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesPosters$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesPosters$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesPosters$Outbound; + /** @deprecated use `ListUserPrivateMessagesPosters$inboundSchema` instead. */ + export const inboundSchema = ListUserPrivateMessagesPosters$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesPosters$outboundSchema` instead. */ + export const outboundSchema = ListUserPrivateMessagesPosters$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesPosters$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesPosters$Outbound; } /** @internal */ export const ListUserPrivateMessagesTopics$inboundSchema: z.ZodType< - ListUserPrivateMessagesTopics, - z.ZodTypeDef, - unknown -> = z - .object({ - allowed_user_count: z.number().int().optional(), - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumped_at: z.string().optional(), - category_id: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - created_at: z.string().optional(), - fancy_title: z.string().optional(), - featured_link: z.nullable(z.string()).optional(), - has_summary: z.boolean().optional(), - highest_post_number: z.number().int().optional(), - id: z.number().int().optional(), - image_url: z.nullable(z.string()).optional(), - last_posted_at: z.string().optional(), - last_poster_username: z.string().optional(), - last_read_post_number: z.number().int().optional(), - like_count: z.number().int().optional(), - liked: z.boolean().optional(), - notification_level: z.number().int().optional(), - participants: z - .array(z.lazy(() => ListUserPrivateMessagesParticipants$inboundSchema)) - .optional(), - pinned: z.boolean().optional(), - pinned_globally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$inboundSchema)).optional(), - posts_count: z.number().int().optional(), - reply_count: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unread_posts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowed_user_count: "allowedUserCount", - bumped_at: "bumpedAt", - category_id: "categoryId", - created_at: "createdAt", - fancy_title: "fancyTitle", - featured_link: "featuredLink", - has_summary: "hasSummary", - highest_post_number: "highestPostNumber", - image_url: "imageUrl", - last_posted_at: "lastPostedAt", - last_poster_username: "lastPosterUsername", - last_read_post_number: "lastReadPostNumber", - like_count: "likeCount", - notification_level: "notificationLevel", - pinned_globally: "pinnedGlobally", - posts_count: "postsCount", - reply_count: "replyCount", - unread_posts: "unreadPosts", - }); - }); + ListUserPrivateMessagesTopics, + z.ZodTypeDef, + unknown +> = z.object({ + allowed_user_count: z.number().int().optional(), + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumped_at: z.string().optional(), + category_id: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + created_at: z.string().optional(), + fancy_title: z.string().optional(), + featured_link: z.nullable(z.string()).optional(), + has_summary: z.boolean().optional(), + highest_post_number: z.number().int().optional(), + id: z.number().int().optional(), + image_url: z.nullable(z.string()).optional(), + last_posted_at: z.string().optional(), + last_poster_username: z.string().optional(), + last_read_post_number: z.number().int().optional(), + like_count: z.number().int().optional(), + liked: z.boolean().optional(), + notification_level: z.number().int().optional(), + participants: z.array( + z.lazy(() => ListUserPrivateMessagesParticipants$inboundSchema), + ).optional(), + pinned: z.boolean().optional(), + pinned_globally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$inboundSchema)) + .optional(), + posts_count: z.number().int().optional(), + reply_count: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unread_posts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "allowed_user_count": "allowedUserCount", + "bumped_at": "bumpedAt", + "category_id": "categoryId", + "created_at": "createdAt", + "fancy_title": "fancyTitle", + "featured_link": "featuredLink", + "has_summary": "hasSummary", + "highest_post_number": "highestPostNumber", + "image_url": "imageUrl", + "last_posted_at": "lastPostedAt", + "last_poster_username": "lastPosterUsername", + "last_read_post_number": "lastReadPostNumber", + "like_count": "likeCount", + "notification_level": "notificationLevel", + "pinned_globally": "pinnedGlobally", + "posts_count": "postsCount", + "reply_count": "replyCount", + "unread_posts": "unreadPosts", + }); +}); /** @internal */ export type ListUserPrivateMessagesTopics$Outbound = { - allowed_user_count?: number | undefined; - archetype?: string | undefined; - archived?: boolean | undefined; - bookmarked?: boolean | undefined; - bumped?: boolean | undefined; - bumped_at?: string | undefined; - category_id?: string | null | undefined; - closed?: boolean | undefined; - created_at?: string | undefined; - fancy_title?: string | undefined; - featured_link?: string | null | undefined; - has_summary?: boolean | undefined; - highest_post_number?: number | undefined; - id?: number | undefined; - image_url?: string | null | undefined; - last_posted_at?: string | undefined; - last_poster_username?: string | undefined; - last_read_post_number?: number | undefined; - like_count?: number | undefined; - liked?: boolean | undefined; - notification_level?: number | undefined; - participants?: Array | undefined; - pinned?: boolean | undefined; - pinned_globally?: boolean | undefined; - posters?: Array | undefined; - posts_count?: number | undefined; - reply_count?: number | undefined; - slug?: string | undefined; - title?: string | undefined; - unpinned?: string | null | undefined; - unread_posts?: number | undefined; - unseen?: boolean | undefined; - views?: number | undefined; - visible?: boolean | undefined; + allowed_user_count?: number | undefined; + archetype?: string | undefined; + archived?: boolean | undefined; + bookmarked?: boolean | undefined; + bumped?: boolean | undefined; + bumped_at?: string | undefined; + category_id?: string | null | undefined; + closed?: boolean | undefined; + created_at?: string | undefined; + fancy_title?: string | undefined; + featured_link?: string | null | undefined; + has_summary?: boolean | undefined; + highest_post_number?: number | undefined; + id?: number | undefined; + image_url?: string | null | undefined; + last_posted_at?: string | undefined; + last_poster_username?: string | undefined; + last_read_post_number?: number | undefined; + like_count?: number | undefined; + liked?: boolean | undefined; + notification_level?: number | undefined; + participants?: + | Array + | undefined; + pinned?: boolean | undefined; + pinned_globally?: boolean | undefined; + posters?: Array | undefined; + posts_count?: number | undefined; + reply_count?: number | undefined; + slug?: string | undefined; + title?: string | undefined; + unpinned?: string | null | undefined; + unread_posts?: number | undefined; + unseen?: boolean | undefined; + views?: number | undefined; + visible?: boolean | undefined; }; /** @internal */ export const ListUserPrivateMessagesTopics$outboundSchema: z.ZodType< - ListUserPrivateMessagesTopics$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesTopics -> = z - .object({ - allowedUserCount: z.number().int().optional(), - archetype: z.string().optional(), - archived: z.boolean().optional(), - bookmarked: z.boolean().optional(), - bumped: z.boolean().optional(), - bumpedAt: z.string().optional(), - categoryId: z.nullable(z.string()).optional(), - closed: z.boolean().optional(), - createdAt: z.string().optional(), - fancyTitle: z.string().optional(), - featuredLink: z.nullable(z.string()).optional(), - hasSummary: z.boolean().optional(), - highestPostNumber: z.number().int().optional(), - id: z.number().int().optional(), - imageUrl: z.nullable(z.string()).optional(), - lastPostedAt: z.string().optional(), - lastPosterUsername: z.string().optional(), - lastReadPostNumber: z.number().int().optional(), - likeCount: z.number().int().optional(), - liked: z.boolean().optional(), - notificationLevel: z.number().int().optional(), - participants: z - .array(z.lazy(() => ListUserPrivateMessagesParticipants$outboundSchema)) - .optional(), - pinned: z.boolean().optional(), - pinnedGlobally: z.boolean().optional(), - posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$outboundSchema)).optional(), - postsCount: z.number().int().optional(), - replyCount: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - unpinned: z.nullable(z.string()).optional(), - unreadPosts: z.number().int().optional(), - unseen: z.boolean().optional(), - views: z.number().int().optional(), - visible: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowedUserCount: "allowed_user_count", - bumpedAt: "bumped_at", - categoryId: "category_id", - createdAt: "created_at", - fancyTitle: "fancy_title", - featuredLink: "featured_link", - hasSummary: "has_summary", - highestPostNumber: "highest_post_number", - imageUrl: "image_url", - lastPostedAt: "last_posted_at", - lastPosterUsername: "last_poster_username", - lastReadPostNumber: "last_read_post_number", - likeCount: "like_count", - notificationLevel: "notification_level", - pinnedGlobally: "pinned_globally", - postsCount: "posts_count", - replyCount: "reply_count", - unreadPosts: "unread_posts", - }); - }); + ListUserPrivateMessagesTopics$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesTopics +> = z.object({ + allowedUserCount: z.number().int().optional(), + archetype: z.string().optional(), + archived: z.boolean().optional(), + bookmarked: z.boolean().optional(), + bumped: z.boolean().optional(), + bumpedAt: z.string().optional(), + categoryId: z.nullable(z.string()).optional(), + closed: z.boolean().optional(), + createdAt: z.string().optional(), + fancyTitle: z.string().optional(), + featuredLink: z.nullable(z.string()).optional(), + hasSummary: z.boolean().optional(), + highestPostNumber: z.number().int().optional(), + id: z.number().int().optional(), + imageUrl: z.nullable(z.string()).optional(), + lastPostedAt: z.string().optional(), + lastPosterUsername: z.string().optional(), + lastReadPostNumber: z.number().int().optional(), + likeCount: z.number().int().optional(), + liked: z.boolean().optional(), + notificationLevel: z.number().int().optional(), + participants: z.array( + z.lazy(() => ListUserPrivateMessagesParticipants$outboundSchema), + ).optional(), + pinned: z.boolean().optional(), + pinnedGlobally: z.boolean().optional(), + posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$outboundSchema)) + .optional(), + postsCount: z.number().int().optional(), + replyCount: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), + unpinned: z.nullable(z.string()).optional(), + unreadPosts: z.number().int().optional(), + unseen: z.boolean().optional(), + views: z.number().int().optional(), + visible: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + allowedUserCount: "allowed_user_count", + bumpedAt: "bumped_at", + categoryId: "category_id", + createdAt: "created_at", + fancyTitle: "fancy_title", + featuredLink: "featured_link", + hasSummary: "has_summary", + highestPostNumber: "highest_post_number", + imageUrl: "image_url", + lastPostedAt: "last_posted_at", + lastPosterUsername: "last_poster_username", + lastReadPostNumber: "last_read_post_number", + likeCount: "like_count", + notificationLevel: "notification_level", + pinnedGlobally: "pinned_globally", + postsCount: "posts_count", + replyCount: "reply_count", + unreadPosts: "unread_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesTopics$ { - /** @deprecated use `ListUserPrivateMessagesTopics$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesTopics$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesTopics$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesTopics$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesTopics$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesTopics$Outbound; + /** @deprecated use `ListUserPrivateMessagesTopics$inboundSchema` instead. */ + export const inboundSchema = ListUserPrivateMessagesTopics$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesTopics$outboundSchema` instead. */ + export const outboundSchema = ListUserPrivateMessagesTopics$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesTopics$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesTopics$Outbound; } /** @internal */ export const ListUserPrivateMessagesTopicList$inboundSchema: z.ZodType< - ListUserPrivateMessagesTopicList, - z.ZodTypeDef, - unknown -> = z - .object({ - can_create_topic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draft_key: z.string().optional(), - draft_sequence: z.number().int().optional(), - per_page: z.number().int().optional(), - topics: z.array(z.lazy(() => ListUserPrivateMessagesTopics$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - draft_key: "draftKey", - draft_sequence: "draftSequence", - per_page: "perPage", - }); - }); + ListUserPrivateMessagesTopicList, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draft_key: z.string().optional(), + draft_sequence: z.number().int().optional(), + per_page: z.number().int().optional(), + topics: z.array(z.lazy(() => ListUserPrivateMessagesTopics$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "draft_key": "draftKey", + "draft_sequence": "draftSequence", + "per_page": "perPage", + }); +}); /** @internal */ export type ListUserPrivateMessagesTopicList$Outbound = { - can_create_topic?: boolean | undefined; - draft?: string | null | undefined; - draft_key?: string | undefined; - draft_sequence?: number | undefined; - per_page?: number | undefined; - topics?: Array | undefined; + can_create_topic?: boolean | undefined; + draft?: string | null | undefined; + draft_key?: string | undefined; + draft_sequence?: number | undefined; + per_page?: number | undefined; + topics?: Array | undefined; }; /** @internal */ export const ListUserPrivateMessagesTopicList$outboundSchema: z.ZodType< - ListUserPrivateMessagesTopicList$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesTopicList -> = z - .object({ - canCreateTopic: z.boolean().optional(), - draft: z.nullable(z.string()).optional(), - draftKey: z.string().optional(), - draftSequence: z.number().int().optional(), - perPage: z.number().int().optional(), - topics: z.array(z.lazy(() => ListUserPrivateMessagesTopics$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - draftKey: "draft_key", - draftSequence: "draft_sequence", - perPage: "per_page", - }); - }); + ListUserPrivateMessagesTopicList$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesTopicList +> = z.object({ + canCreateTopic: z.boolean().optional(), + draft: z.nullable(z.string()).optional(), + draftKey: z.string().optional(), + draftSequence: z.number().int().optional(), + perPage: z.number().int().optional(), + topics: z.array(z.lazy(() => ListUserPrivateMessagesTopics$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + draftKey: "draft_key", + draftSequence: "draft_sequence", + perPage: "per_page", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesTopicList$ { - /** @deprecated use `ListUserPrivateMessagesTopicList$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesTopicList$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesTopicList$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesTopicList$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesTopicList$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesTopicList$Outbound; + /** @deprecated use `ListUserPrivateMessagesTopicList$inboundSchema` instead. */ + export const inboundSchema = ListUserPrivateMessagesTopicList$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesTopicList$outboundSchema` instead. */ + export const outboundSchema = ListUserPrivateMessagesTopicList$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesTopicList$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesTopicList$Outbound; } /** @internal */ export const ListUserPrivateMessagesUsers$inboundSchema: z.ZodType< - ListUserPrivateMessagesUsers, - z.ZodTypeDef, - unknown -> = z - .object({ - avatar_template: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); + ListUserPrivateMessagesUsers, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ListUserPrivateMessagesUsers$Outbound = { - avatar_template?: string | undefined; - id?: number | undefined; - name?: string | undefined; - username?: string | undefined; + avatar_template?: string | undefined; + id?: number | undefined; + name?: string | undefined; + username?: string | undefined; }; /** @internal */ export const ListUserPrivateMessagesUsers$outboundSchema: z.ZodType< - ListUserPrivateMessagesUsers$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesUsers -> = z - .object({ - avatarTemplate: z.string().optional(), - id: z.number().int().optional(), - name: z.string().optional(), - username: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + ListUserPrivateMessagesUsers$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesUsers +> = z.object({ + avatarTemplate: z.string().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + username: z.string().optional(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesUsers$ { - /** @deprecated use `ListUserPrivateMessagesUsers$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesUsers$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesUsers$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesUsers$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesUsers$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesUsers$Outbound; + /** @deprecated use `ListUserPrivateMessagesUsers$inboundSchema` instead. */ + export const inboundSchema = ListUserPrivateMessagesUsers$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesUsers$outboundSchema` instead. */ + export const outboundSchema = ListUserPrivateMessagesUsers$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesUsers$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesUsers$Outbound; } /** @internal */ export const ListUserPrivateMessagesResponseBody$inboundSchema: z.ZodType< - ListUserPrivateMessagesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - primary_groups: z.array(z.any()).optional(), - topic_list: z.lazy(() => ListUserPrivateMessagesTopicList$inboundSchema).optional(), - users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primary_groups: "primaryGroups", - topic_list: "topicList", - }); - }); + ListUserPrivateMessagesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + primary_groups: z.array(z.any()).optional(), + topic_list: z.lazy(() => ListUserPrivateMessagesTopicList$inboundSchema) + .optional(), + users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "primary_groups": "primaryGroups", + "topic_list": "topicList", + }); +}); /** @internal */ export type ListUserPrivateMessagesResponseBody$Outbound = { - primary_groups?: Array | undefined; - topic_list?: ListUserPrivateMessagesTopicList$Outbound | undefined; - users?: Array | undefined; + primary_groups?: Array | undefined; + topic_list?: ListUserPrivateMessagesTopicList$Outbound | undefined; + users?: Array | undefined; }; /** @internal */ export const ListUserPrivateMessagesResponseBody$outboundSchema: z.ZodType< - ListUserPrivateMessagesResponseBody$Outbound, - z.ZodTypeDef, - ListUserPrivateMessagesResponseBody -> = z - .object({ - primaryGroups: z.array(z.any()).optional(), - topicList: z.lazy(() => ListUserPrivateMessagesTopicList$outboundSchema).optional(), - users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - primaryGroups: "primary_groups", - topicList: "topic_list", - }); - }); + ListUserPrivateMessagesResponseBody$Outbound, + z.ZodTypeDef, + ListUserPrivateMessagesResponseBody +> = z.object({ + primaryGroups: z.array(z.any()).optional(), + topicList: z.lazy(() => ListUserPrivateMessagesTopicList$outboundSchema) + .optional(), + users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + primaryGroups: "primary_groups", + topicList: "topic_list", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUserPrivateMessagesResponseBody$ { - /** @deprecated use `ListUserPrivateMessagesResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListUserPrivateMessagesResponseBody$inboundSchema; - /** @deprecated use `ListUserPrivateMessagesResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListUserPrivateMessagesResponseBody$outboundSchema; - /** @deprecated use `ListUserPrivateMessagesResponseBody$Outbound` instead. */ - export type Outbound = ListUserPrivateMessagesResponseBody$Outbound; + /** @deprecated use `ListUserPrivateMessagesResponseBody$inboundSchema` instead. */ + export const inboundSchema = + ListUserPrivateMessagesResponseBody$inboundSchema; + /** @deprecated use `ListUserPrivateMessagesResponseBody$outboundSchema` instead. */ + export const outboundSchema = + ListUserPrivateMessagesResponseBody$outboundSchema; + /** @deprecated use `ListUserPrivateMessagesResponseBody$Outbound` instead. */ + export type Outbound = ListUserPrivateMessagesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/listuserspublic.ts b/src/sdk/models/operations/listuserspublic.ts index e8e2cd0..1cbaddb 100644 --- a/src/sdk/models/operations/listuserspublic.ts +++ b/src/sdk/models/operations/listuserspublic.ts @@ -2,158 +2,164 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const Asc = { - True: "true", + True: "true", } as const; export type Asc = ClosedEnum; export const Order = { - LikesReceived: "likes_received", - LikesGiven: "likes_given", - TopicCount: "topic_count", - PostCount: "post_count", - TopicsEntered: "topics_entered", - PostsRead: "posts_read", - DaysVisited: "days_visited", + LikesReceived: "likes_received", + LikesGiven: "likes_given", + TopicCount: "topic_count", + PostCount: "post_count", + TopicsEntered: "topics_entered", + PostsRead: "posts_read", + DaysVisited: "days_visited", } as const; export type Order = ClosedEnum; export const Period = { - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", - Quarterly: "quarterly", - Yearly: "yearly", - All: "all", + Daily: "daily", + Weekly: "weekly", + Monthly: "monthly", + Quarterly: "quarterly", + Yearly: "yearly", + All: "all", } as const; export type Period = ClosedEnum; export type ListUsersPublicRequest = { - asc?: Asc | undefined; - order: Order; - page?: number | undefined; - period: Period; + asc?: Asc | undefined; + order: Order; + page?: number | undefined; + period: Period; }; export type ListUsersPublicUser = { - avatarTemplate: string; - id: number; - name: string | null; - title: string | null; - username: string; + avatarTemplate: string; + id: number; + name: string | null; + title: string | null; + username: string; }; export type DirectoryItems = { - daysVisited: number; - id: number; - likesGiven: number; - likesReceived: number; - postCount: number; - postsRead: number; - topicCount: number; - topicsEntered: number; - user: ListUsersPublicUser; + daysVisited: number; + id: number; + likesGiven: number; + likesReceived: number; + postCount: number; + postsRead: number; + topicCount: number; + topicsEntered: number; + user: ListUsersPublicUser; }; export type ListUsersPublicMeta = { - lastUpdatedAt: string | null; - loadMoreDirectoryItems: string; - totalRowsDirectoryItems: number; + lastUpdatedAt: string | null; + loadMoreDirectoryItems: string; + totalRowsDirectoryItems: number; }; /** * directory items response */ export type ListUsersPublicResponseBody = { - directoryItems: Array; - meta: ListUsersPublicMeta; + directoryItems: Array; + meta: ListUsersPublicMeta; }; /** @internal */ export const Asc$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Asc); /** @internal */ -export const Asc$outboundSchema: z.ZodNativeEnum = Asc$inboundSchema; +export const Asc$outboundSchema: z.ZodNativeEnum = + Asc$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Asc$ { - /** @deprecated use `Asc$inboundSchema` instead. */ - export const inboundSchema = Asc$inboundSchema; - /** @deprecated use `Asc$outboundSchema` instead. */ - export const outboundSchema = Asc$outboundSchema; + /** @deprecated use `Asc$inboundSchema` instead. */ + export const inboundSchema = Asc$inboundSchema; + /** @deprecated use `Asc$outboundSchema` instead. */ + export const outboundSchema = Asc$outboundSchema; } /** @internal */ -export const Order$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Order); +export const Order$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Order, +); /** @internal */ -export const Order$outboundSchema: z.ZodNativeEnum = Order$inboundSchema; +export const Order$outboundSchema: z.ZodNativeEnum = + Order$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Order$ { - /** @deprecated use `Order$inboundSchema` instead. */ - export const inboundSchema = Order$inboundSchema; - /** @deprecated use `Order$outboundSchema` instead. */ - export const outboundSchema = Order$outboundSchema; + /** @deprecated use `Order$inboundSchema` instead. */ + export const inboundSchema = Order$inboundSchema; + /** @deprecated use `Order$outboundSchema` instead. */ + export const outboundSchema = Order$outboundSchema; } /** @internal */ -export const Period$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Period); +export const Period$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Period); /** @internal */ -export const Period$outboundSchema: z.ZodNativeEnum = Period$inboundSchema; +export const Period$outboundSchema: z.ZodNativeEnum = + Period$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Period$ { - /** @deprecated use `Period$inboundSchema` instead. */ - export const inboundSchema = Period$inboundSchema; - /** @deprecated use `Period$outboundSchema` instead. */ - export const outboundSchema = Period$outboundSchema; + /** @deprecated use `Period$inboundSchema` instead. */ + export const inboundSchema = Period$inboundSchema; + /** @deprecated use `Period$outboundSchema` instead. */ + export const outboundSchema = Period$outboundSchema; } /** @internal */ export const ListUsersPublicRequest$inboundSchema: z.ZodType< - ListUsersPublicRequest, - z.ZodTypeDef, - unknown + ListUsersPublicRequest, + z.ZodTypeDef, + unknown > = z.object({ - asc: Asc$inboundSchema.optional(), - order: Order$inboundSchema, - page: z.number().int().optional(), - period: Period$inboundSchema, + asc: Asc$inboundSchema.optional(), + order: Order$inboundSchema, + page: z.number().int().optional(), + period: Period$inboundSchema, }); /** @internal */ export type ListUsersPublicRequest$Outbound = { - asc?: string | undefined; - order: string; - page?: number | undefined; - period: string; + asc?: string | undefined; + order: string; + page?: number | undefined; + period: string; }; /** @internal */ export const ListUsersPublicRequest$outboundSchema: z.ZodType< - ListUsersPublicRequest$Outbound, - z.ZodTypeDef, - ListUsersPublicRequest + ListUsersPublicRequest$Outbound, + z.ZodTypeDef, + ListUsersPublicRequest > = z.object({ - asc: Asc$outboundSchema.optional(), - order: Order$outboundSchema, - page: z.number().int().optional(), - period: Period$outboundSchema, + asc: Asc$outboundSchema.optional(), + order: Order$outboundSchema, + page: z.number().int().optional(), + period: Period$outboundSchema, }); /** @@ -161,259 +167,247 @@ export const ListUsersPublicRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicRequest$ { - /** @deprecated use `ListUsersPublicRequest$inboundSchema` instead. */ - export const inboundSchema = ListUsersPublicRequest$inboundSchema; - /** @deprecated use `ListUsersPublicRequest$outboundSchema` instead. */ - export const outboundSchema = ListUsersPublicRequest$outboundSchema; - /** @deprecated use `ListUsersPublicRequest$Outbound` instead. */ - export type Outbound = ListUsersPublicRequest$Outbound; + /** @deprecated use `ListUsersPublicRequest$inboundSchema` instead. */ + export const inboundSchema = ListUsersPublicRequest$inboundSchema; + /** @deprecated use `ListUsersPublicRequest$outboundSchema` instead. */ + export const outboundSchema = ListUsersPublicRequest$outboundSchema; + /** @deprecated use `ListUsersPublicRequest$Outbound` instead. */ + export type Outbound = ListUsersPublicRequest$Outbound; } /** @internal */ export const ListUsersPublicUser$inboundSchema: z.ZodType< - ListUsersPublicUser, - z.ZodTypeDef, - unknown -> = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.nullable(z.string()), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); + ListUsersPublicUser, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.nullable(z.string()), + title: z.nullable(z.string()), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ListUsersPublicUser$Outbound = { - avatar_template: string; - id: number; - name: string | null; - title: string | null; - username: string; + avatar_template: string; + id: number; + name: string | null; + title: string | null; + username: string; }; /** @internal */ export const ListUsersPublicUser$outboundSchema: z.ZodType< - ListUsersPublicUser$Outbound, - z.ZodTypeDef, - ListUsersPublicUser -> = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.nullable(z.string()), - title: z.nullable(z.string()), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + ListUsersPublicUser$Outbound, + z.ZodTypeDef, + ListUsersPublicUser +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.nullable(z.string()), + title: z.nullable(z.string()), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicUser$ { - /** @deprecated use `ListUsersPublicUser$inboundSchema` instead. */ - export const inboundSchema = ListUsersPublicUser$inboundSchema; - /** @deprecated use `ListUsersPublicUser$outboundSchema` instead. */ - export const outboundSchema = ListUsersPublicUser$outboundSchema; - /** @deprecated use `ListUsersPublicUser$Outbound` instead. */ - export type Outbound = ListUsersPublicUser$Outbound; + /** @deprecated use `ListUsersPublicUser$inboundSchema` instead. */ + export const inboundSchema = ListUsersPublicUser$inboundSchema; + /** @deprecated use `ListUsersPublicUser$outboundSchema` instead. */ + export const outboundSchema = ListUsersPublicUser$outboundSchema; + /** @deprecated use `ListUsersPublicUser$Outbound` instead. */ + export type Outbound = ListUsersPublicUser$Outbound; } /** @internal */ -export const DirectoryItems$inboundSchema: z.ZodType = z - .object({ - days_visited: z.number().int(), - id: z.number().int(), - likes_given: z.number().int(), - likes_received: z.number().int(), - post_count: z.number().int(), - posts_read: z.number().int(), - topic_count: z.number().int(), - topics_entered: z.number().int(), - user: z.lazy(() => ListUsersPublicUser$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - days_visited: "daysVisited", - likes_given: "likesGiven", - likes_received: "likesReceived", - post_count: "postCount", - posts_read: "postsRead", - topic_count: "topicCount", - topics_entered: "topicsEntered", - }); - }); +export const DirectoryItems$inboundSchema: z.ZodType< + DirectoryItems, + z.ZodTypeDef, + unknown +> = z.object({ + days_visited: z.number().int(), + id: z.number().int(), + likes_given: z.number().int(), + likes_received: z.number().int(), + post_count: z.number().int(), + posts_read: z.number().int(), + topic_count: z.number().int(), + topics_entered: z.number().int(), + user: z.lazy(() => ListUsersPublicUser$inboundSchema), +}).transform((v) => { + return remap$(v, { + "days_visited": "daysVisited", + "likes_given": "likesGiven", + "likes_received": "likesReceived", + "post_count": "postCount", + "posts_read": "postsRead", + "topic_count": "topicCount", + "topics_entered": "topicsEntered", + }); +}); /** @internal */ export type DirectoryItems$Outbound = { - days_visited: number; - id: number; - likes_given: number; - likes_received: number; - post_count: number; - posts_read: number; - topic_count: number; - topics_entered: number; - user: ListUsersPublicUser$Outbound; + days_visited: number; + id: number; + likes_given: number; + likes_received: number; + post_count: number; + posts_read: number; + topic_count: number; + topics_entered: number; + user: ListUsersPublicUser$Outbound; }; /** @internal */ export const DirectoryItems$outboundSchema: z.ZodType< - DirectoryItems$Outbound, - z.ZodTypeDef, - DirectoryItems -> = z - .object({ - daysVisited: z.number().int(), - id: z.number().int(), - likesGiven: z.number().int(), - likesReceived: z.number().int(), - postCount: z.number().int(), - postsRead: z.number().int(), - topicCount: z.number().int(), - topicsEntered: z.number().int(), - user: z.lazy(() => ListUsersPublicUser$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - daysVisited: "days_visited", - likesGiven: "likes_given", - likesReceived: "likes_received", - postCount: "post_count", - postsRead: "posts_read", - topicCount: "topic_count", - topicsEntered: "topics_entered", - }); - }); + DirectoryItems$Outbound, + z.ZodTypeDef, + DirectoryItems +> = z.object({ + daysVisited: z.number().int(), + id: z.number().int(), + likesGiven: z.number().int(), + likesReceived: z.number().int(), + postCount: z.number().int(), + postsRead: z.number().int(), + topicCount: z.number().int(), + topicsEntered: z.number().int(), + user: z.lazy(() => ListUsersPublicUser$outboundSchema), +}).transform((v) => { + return remap$(v, { + daysVisited: "days_visited", + likesGiven: "likes_given", + likesReceived: "likes_received", + postCount: "post_count", + postsRead: "posts_read", + topicCount: "topic_count", + topicsEntered: "topics_entered", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DirectoryItems$ { - /** @deprecated use `DirectoryItems$inboundSchema` instead. */ - export const inboundSchema = DirectoryItems$inboundSchema; - /** @deprecated use `DirectoryItems$outboundSchema` instead. */ - export const outboundSchema = DirectoryItems$outboundSchema; - /** @deprecated use `DirectoryItems$Outbound` instead. */ - export type Outbound = DirectoryItems$Outbound; + /** @deprecated use `DirectoryItems$inboundSchema` instead. */ + export const inboundSchema = DirectoryItems$inboundSchema; + /** @deprecated use `DirectoryItems$outboundSchema` instead. */ + export const outboundSchema = DirectoryItems$outboundSchema; + /** @deprecated use `DirectoryItems$Outbound` instead. */ + export type Outbound = DirectoryItems$Outbound; } /** @internal */ export const ListUsersPublicMeta$inboundSchema: z.ZodType< - ListUsersPublicMeta, - z.ZodTypeDef, - unknown -> = z - .object({ - last_updated_at: z.nullable(z.string()), - load_more_directory_items: z.string(), - total_rows_directory_items: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - last_updated_at: "lastUpdatedAt", - load_more_directory_items: "loadMoreDirectoryItems", - total_rows_directory_items: "totalRowsDirectoryItems", - }); - }); + ListUsersPublicMeta, + z.ZodTypeDef, + unknown +> = z.object({ + last_updated_at: z.nullable(z.string()), + load_more_directory_items: z.string(), + total_rows_directory_items: z.number().int(), +}).transform((v) => { + return remap$(v, { + "last_updated_at": "lastUpdatedAt", + "load_more_directory_items": "loadMoreDirectoryItems", + "total_rows_directory_items": "totalRowsDirectoryItems", + }); +}); /** @internal */ export type ListUsersPublicMeta$Outbound = { - last_updated_at: string | null; - load_more_directory_items: string; - total_rows_directory_items: number; + last_updated_at: string | null; + load_more_directory_items: string; + total_rows_directory_items: number; }; /** @internal */ export const ListUsersPublicMeta$outboundSchema: z.ZodType< - ListUsersPublicMeta$Outbound, - z.ZodTypeDef, - ListUsersPublicMeta -> = z - .object({ - lastUpdatedAt: z.nullable(z.string()), - loadMoreDirectoryItems: z.string(), - totalRowsDirectoryItems: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - lastUpdatedAt: "last_updated_at", - loadMoreDirectoryItems: "load_more_directory_items", - totalRowsDirectoryItems: "total_rows_directory_items", - }); - }); + ListUsersPublicMeta$Outbound, + z.ZodTypeDef, + ListUsersPublicMeta +> = z.object({ + lastUpdatedAt: z.nullable(z.string()), + loadMoreDirectoryItems: z.string(), + totalRowsDirectoryItems: z.number().int(), +}).transform((v) => { + return remap$(v, { + lastUpdatedAt: "last_updated_at", + loadMoreDirectoryItems: "load_more_directory_items", + totalRowsDirectoryItems: "total_rows_directory_items", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicMeta$ { - /** @deprecated use `ListUsersPublicMeta$inboundSchema` instead. */ - export const inboundSchema = ListUsersPublicMeta$inboundSchema; - /** @deprecated use `ListUsersPublicMeta$outboundSchema` instead. */ - export const outboundSchema = ListUsersPublicMeta$outboundSchema; - /** @deprecated use `ListUsersPublicMeta$Outbound` instead. */ - export type Outbound = ListUsersPublicMeta$Outbound; + /** @deprecated use `ListUsersPublicMeta$inboundSchema` instead. */ + export const inboundSchema = ListUsersPublicMeta$inboundSchema; + /** @deprecated use `ListUsersPublicMeta$outboundSchema` instead. */ + export const outboundSchema = ListUsersPublicMeta$outboundSchema; + /** @deprecated use `ListUsersPublicMeta$Outbound` instead. */ + export type Outbound = ListUsersPublicMeta$Outbound; } /** @internal */ export const ListUsersPublicResponseBody$inboundSchema: z.ZodType< - ListUsersPublicResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - directory_items: z.array(z.lazy(() => DirectoryItems$inboundSchema)), - meta: z.lazy(() => ListUsersPublicMeta$inboundSchema), - }) - .transform((v) => { - return remap$(v, { - directory_items: "directoryItems", - }); - }); + ListUsersPublicResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + directory_items: z.array(z.lazy(() => DirectoryItems$inboundSchema)), + meta: z.lazy(() => ListUsersPublicMeta$inboundSchema), +}).transform((v) => { + return remap$(v, { + "directory_items": "directoryItems", + }); +}); /** @internal */ export type ListUsersPublicResponseBody$Outbound = { - directory_items: Array; - meta: ListUsersPublicMeta$Outbound; + directory_items: Array; + meta: ListUsersPublicMeta$Outbound; }; /** @internal */ export const ListUsersPublicResponseBody$outboundSchema: z.ZodType< - ListUsersPublicResponseBody$Outbound, - z.ZodTypeDef, - ListUsersPublicResponseBody -> = z - .object({ - directoryItems: z.array(z.lazy(() => DirectoryItems$outboundSchema)), - meta: z.lazy(() => ListUsersPublicMeta$outboundSchema), - }) - .transform((v) => { - return remap$(v, { - directoryItems: "directory_items", - }); - }); + ListUsersPublicResponseBody$Outbound, + z.ZodTypeDef, + ListUsersPublicResponseBody +> = z.object({ + directoryItems: z.array(z.lazy(() => DirectoryItems$outboundSchema)), + meta: z.lazy(() => ListUsersPublicMeta$outboundSchema), +}).transform((v) => { + return remap$(v, { + directoryItems: "directory_items", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicResponseBody$ { - /** @deprecated use `ListUsersPublicResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListUsersPublicResponseBody$inboundSchema; - /** @deprecated use `ListUsersPublicResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListUsersPublicResponseBody$outboundSchema; - /** @deprecated use `ListUsersPublicResponseBody$Outbound` instead. */ - export type Outbound = ListUsersPublicResponseBody$Outbound; + /** @deprecated use `ListUsersPublicResponseBody$inboundSchema` instead. */ + export const inboundSchema = ListUsersPublicResponseBody$inboundSchema; + /** @deprecated use `ListUsersPublicResponseBody$outboundSchema` instead. */ + export const outboundSchema = ListUsersPublicResponseBody$outboundSchema; + /** @deprecated use `ListUsersPublicResponseBody$Outbound` instead. */ + export type Outbound = ListUsersPublicResponseBody$Outbound; } diff --git a/src/sdk/models/operations/lockpost.ts b/src/sdk/models/operations/lockpost.ts index 1995d76..7c4de76 100644 --- a/src/sdk/models/operations/lockpost.ts +++ b/src/sdk/models/operations/lockpost.ts @@ -2,48 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type LockPostRequestBody = { - locked: string; + locked: string; }; export type LockPostRequest = { - apiKey: string; - apiUsername: string; - requestBody?: LockPostRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: LockPostRequestBody | undefined; + id: string; }; /** * post updated */ export type LockPostResponseBody = { - locked?: boolean | undefined; + locked?: boolean | undefined; }; /** @internal */ export const LockPostRequestBody$inboundSchema: z.ZodType< - LockPostRequestBody, - z.ZodTypeDef, - unknown + LockPostRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - locked: z.string(), + locked: z.string(), }); /** @internal */ export type LockPostRequestBody$Outbound = { - locked: string; + locked: string; }; /** @internal */ export const LockPostRequestBody$outboundSchema: z.ZodType< - LockPostRequestBody$Outbound, - z.ZodTypeDef, - LockPostRequestBody + LockPostRequestBody$Outbound, + z.ZodTypeDef, + LockPostRequestBody > = z.object({ - locked: z.string(), + locked: z.string(), }); /** @@ -51,92 +51,92 @@ export const LockPostRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LockPostRequestBody$ { - /** @deprecated use `LockPostRequestBody$inboundSchema` instead. */ - export const inboundSchema = LockPostRequestBody$inboundSchema; - /** @deprecated use `LockPostRequestBody$outboundSchema` instead. */ - export const outboundSchema = LockPostRequestBody$outboundSchema; - /** @deprecated use `LockPostRequestBody$Outbound` instead. */ - export type Outbound = LockPostRequestBody$Outbound; + /** @deprecated use `LockPostRequestBody$inboundSchema` instead. */ + export const inboundSchema = LockPostRequestBody$inboundSchema; + /** @deprecated use `LockPostRequestBody$outboundSchema` instead. */ + export const outboundSchema = LockPostRequestBody$outboundSchema; + /** @deprecated use `LockPostRequestBody$Outbound` instead. */ + export type Outbound = LockPostRequestBody$Outbound; } /** @internal */ -export const LockPostRequest$inboundSchema: z.ZodType = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => LockPostRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); +export const LockPostRequest$inboundSchema: z.ZodType< + LockPostRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => LockPostRequestBody$inboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type LockPostRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: LockPostRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: LockPostRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const LockPostRequest$outboundSchema: z.ZodType< - LockPostRequest$Outbound, - z.ZodTypeDef, - LockPostRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => LockPostRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + LockPostRequest$Outbound, + z.ZodTypeDef, + LockPostRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => LockPostRequestBody$outboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LockPostRequest$ { - /** @deprecated use `LockPostRequest$inboundSchema` instead. */ - export const inboundSchema = LockPostRequest$inboundSchema; - /** @deprecated use `LockPostRequest$outboundSchema` instead. */ - export const outboundSchema = LockPostRequest$outboundSchema; - /** @deprecated use `LockPostRequest$Outbound` instead. */ - export type Outbound = LockPostRequest$Outbound; + /** @deprecated use `LockPostRequest$inboundSchema` instead. */ + export const inboundSchema = LockPostRequest$inboundSchema; + /** @deprecated use `LockPostRequest$outboundSchema` instead. */ + export const outboundSchema = LockPostRequest$outboundSchema; + /** @deprecated use `LockPostRequest$Outbound` instead. */ + export type Outbound = LockPostRequest$Outbound; } /** @internal */ export const LockPostResponseBody$inboundSchema: z.ZodType< - LockPostResponseBody, - z.ZodTypeDef, - unknown + LockPostResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - locked: z.boolean().optional(), + locked: z.boolean().optional(), }); /** @internal */ export type LockPostResponseBody$Outbound = { - locked?: boolean | undefined; + locked?: boolean | undefined; }; /** @internal */ export const LockPostResponseBody$outboundSchema: z.ZodType< - LockPostResponseBody$Outbound, - z.ZodTypeDef, - LockPostResponseBody + LockPostResponseBody$Outbound, + z.ZodTypeDef, + LockPostResponseBody > = z.object({ - locked: z.boolean().optional(), + locked: z.boolean().optional(), }); /** @@ -144,10 +144,10 @@ export const LockPostResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LockPostResponseBody$ { - /** @deprecated use `LockPostResponseBody$inboundSchema` instead. */ - export const inboundSchema = LockPostResponseBody$inboundSchema; - /** @deprecated use `LockPostResponseBody$outboundSchema` instead. */ - export const outboundSchema = LockPostResponseBody$outboundSchema; - /** @deprecated use `LockPostResponseBody$Outbound` instead. */ - export type Outbound = LockPostResponseBody$Outbound; + /** @deprecated use `LockPostResponseBody$inboundSchema` instead. */ + export const inboundSchema = LockPostResponseBody$inboundSchema; + /** @deprecated use `LockPostResponseBody$outboundSchema` instead. */ + export const outboundSchema = LockPostResponseBody$outboundSchema; + /** @deprecated use `LockPostResponseBody$Outbound` instead. */ + export type Outbound = LockPostResponseBody$Outbound; } diff --git a/src/sdk/models/operations/logoutuser.ts b/src/sdk/models/operations/logoutuser.ts index ef2372d..5080d6e 100644 --- a/src/sdk/models/operations/logoutuser.ts +++ b/src/sdk/models/operations/logoutuser.ts @@ -5,34 +5,37 @@ import * as z from "zod"; export type LogOutUserRequest = { - id: number; + id: number; }; /** * response */ export type LogOutUserResponseBody = { - success: string; + success: string; }; /** @internal */ -export const LogOutUserRequest$inboundSchema: z.ZodType = - z.object({ - id: z.number().int(), - }); +export const LogOutUserRequest$inboundSchema: z.ZodType< + LogOutUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); /** @internal */ export type LogOutUserRequest$Outbound = { - id: number; + id: number; }; /** @internal */ export const LogOutUserRequest$outboundSchema: z.ZodType< - LogOutUserRequest$Outbound, - z.ZodTypeDef, - LogOutUserRequest + LogOutUserRequest$Outbound, + z.ZodTypeDef, + LogOutUserRequest > = z.object({ - id: z.number().int(), + id: z.number().int(), }); /** @@ -40,35 +43,35 @@ export const LogOutUserRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogOutUserRequest$ { - /** @deprecated use `LogOutUserRequest$inboundSchema` instead. */ - export const inboundSchema = LogOutUserRequest$inboundSchema; - /** @deprecated use `LogOutUserRequest$outboundSchema` instead. */ - export const outboundSchema = LogOutUserRequest$outboundSchema; - /** @deprecated use `LogOutUserRequest$Outbound` instead. */ - export type Outbound = LogOutUserRequest$Outbound; + /** @deprecated use `LogOutUserRequest$inboundSchema` instead. */ + export const inboundSchema = LogOutUserRequest$inboundSchema; + /** @deprecated use `LogOutUserRequest$outboundSchema` instead. */ + export const outboundSchema = LogOutUserRequest$outboundSchema; + /** @deprecated use `LogOutUserRequest$Outbound` instead. */ + export type Outbound = LogOutUserRequest$Outbound; } /** @internal */ export const LogOutUserResponseBody$inboundSchema: z.ZodType< - LogOutUserResponseBody, - z.ZodTypeDef, - unknown + LogOutUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type LogOutUserResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const LogOutUserResponseBody$outboundSchema: z.ZodType< - LogOutUserResponseBody$Outbound, - z.ZodTypeDef, - LogOutUserResponseBody + LogOutUserResponseBody$Outbound, + z.ZodTypeDef, + LogOutUserResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -76,10 +79,10 @@ export const LogOutUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogOutUserResponseBody$ { - /** @deprecated use `LogOutUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = LogOutUserResponseBody$inboundSchema; - /** @deprecated use `LogOutUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = LogOutUserResponseBody$outboundSchema; - /** @deprecated use `LogOutUserResponseBody$Outbound` instead. */ - export type Outbound = LogOutUserResponseBody$Outbound; + /** @deprecated use `LogOutUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = LogOutUserResponseBody$inboundSchema; + /** @deprecated use `LogOutUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = LogOutUserResponseBody$outboundSchema; + /** @deprecated use `LogOutUserResponseBody$Outbound` instead. */ + export type Outbound = LogOutUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/marknotificationsasread.ts b/src/sdk/models/operations/marknotificationsasread.ts index b0bc531..20361bd 100644 --- a/src/sdk/models/operations/marknotificationsasread.ts +++ b/src/sdk/models/operations/marknotificationsasread.ts @@ -5,40 +5,40 @@ import * as z from "zod"; export type MarkNotificationsAsReadRequestBody = { - /** - * (optional) Leave off to mark all notifications as read - */ - id?: number | undefined; + /** + * (optional) Leave off to mark all notifications as read + */ + id?: number | undefined; }; /** * notifications marked read */ export type MarkNotificationsAsReadResponseBody = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const MarkNotificationsAsReadRequestBody$inboundSchema: z.ZodType< - MarkNotificationsAsReadRequestBody, - z.ZodTypeDef, - unknown + MarkNotificationsAsReadRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), + id: z.number().int().optional(), }); /** @internal */ export type MarkNotificationsAsReadRequestBody$Outbound = { - id?: number | undefined; + id?: number | undefined; }; /** @internal */ export const MarkNotificationsAsReadRequestBody$outboundSchema: z.ZodType< - MarkNotificationsAsReadRequestBody$Outbound, - z.ZodTypeDef, - MarkNotificationsAsReadRequestBody + MarkNotificationsAsReadRequestBody$Outbound, + z.ZodTypeDef, + MarkNotificationsAsReadRequestBody > = z.object({ - id: z.number().int().optional(), + id: z.number().int().optional(), }); /** @@ -46,35 +46,36 @@ export const MarkNotificationsAsReadRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkNotificationsAsReadRequestBody$ { - /** @deprecated use `MarkNotificationsAsReadRequestBody$inboundSchema` instead. */ - export const inboundSchema = MarkNotificationsAsReadRequestBody$inboundSchema; - /** @deprecated use `MarkNotificationsAsReadRequestBody$outboundSchema` instead. */ - export const outboundSchema = MarkNotificationsAsReadRequestBody$outboundSchema; - /** @deprecated use `MarkNotificationsAsReadRequestBody$Outbound` instead. */ - export type Outbound = MarkNotificationsAsReadRequestBody$Outbound; + /** @deprecated use `MarkNotificationsAsReadRequestBody$inboundSchema` instead. */ + export const inboundSchema = MarkNotificationsAsReadRequestBody$inboundSchema; + /** @deprecated use `MarkNotificationsAsReadRequestBody$outboundSchema` instead. */ + export const outboundSchema = + MarkNotificationsAsReadRequestBody$outboundSchema; + /** @deprecated use `MarkNotificationsAsReadRequestBody$Outbound` instead. */ + export type Outbound = MarkNotificationsAsReadRequestBody$Outbound; } /** @internal */ export const MarkNotificationsAsReadResponseBody$inboundSchema: z.ZodType< - MarkNotificationsAsReadResponseBody, - z.ZodTypeDef, - unknown + MarkNotificationsAsReadResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @internal */ export type MarkNotificationsAsReadResponseBody$Outbound = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const MarkNotificationsAsReadResponseBody$outboundSchema: z.ZodType< - MarkNotificationsAsReadResponseBody$Outbound, - z.ZodTypeDef, - MarkNotificationsAsReadResponseBody + MarkNotificationsAsReadResponseBody$Outbound, + z.ZodTypeDef, + MarkNotificationsAsReadResponseBody > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @@ -82,10 +83,12 @@ export const MarkNotificationsAsReadResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkNotificationsAsReadResponseBody$ { - /** @deprecated use `MarkNotificationsAsReadResponseBody$inboundSchema` instead. */ - export const inboundSchema = MarkNotificationsAsReadResponseBody$inboundSchema; - /** @deprecated use `MarkNotificationsAsReadResponseBody$outboundSchema` instead. */ - export const outboundSchema = MarkNotificationsAsReadResponseBody$outboundSchema; - /** @deprecated use `MarkNotificationsAsReadResponseBody$Outbound` instead. */ - export type Outbound = MarkNotificationsAsReadResponseBody$Outbound; + /** @deprecated use `MarkNotificationsAsReadResponseBody$inboundSchema` instead. */ + export const inboundSchema = + MarkNotificationsAsReadResponseBody$inboundSchema; + /** @deprecated use `MarkNotificationsAsReadResponseBody$outboundSchema` instead. */ + export const outboundSchema = + MarkNotificationsAsReadResponseBody$outboundSchema; + /** @deprecated use `MarkNotificationsAsReadResponseBody$Outbound` instead. */ + export type Outbound = MarkNotificationsAsReadResponseBody$Outbound; } diff --git a/src/sdk/models/operations/performpostaction.ts b/src/sdk/models/operations/performpostaction.ts index 608d8b5..aee0a40 100644 --- a/src/sdk/models/operations/performpostaction.ts +++ b/src/sdk/models/operations/performpostaction.ts @@ -2,26 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PerformPostActionRequestBody = { - flagTopic?: boolean | undefined; - id: number; - postActionTypeId: number; + flagTopic?: boolean | undefined; + id: number; + postActionTypeId: number; }; export type PerformPostActionRequest = { - apiKey: string; - apiUsername: string; - requestBody?: PerformPostActionRequestBody | undefined; + apiKey: string; + apiUsername: string; + requestBody?: PerformPostActionRequestBody | undefined; }; export type PerformPostActionActionsSummary = { - acted?: boolean | undefined; - canUndo?: boolean | undefined; - count?: number | undefined; - id?: number | undefined; + acted?: boolean | undefined; + canUndo?: boolean | undefined; + count?: number | undefined; + id?: number | undefined; }; export type Notice = {}; @@ -30,498 +30,489 @@ export type Notice = {}; * post updated */ export type PerformPostActionResponseBody = { - actionsSummary?: Array | undefined; - admin?: boolean | undefined; - avatarTemplate?: string | undefined; - canDelete?: boolean | undefined; - canEdit?: boolean | undefined; - canRecover?: boolean | undefined; - canViewEditHistory?: boolean | undefined; - canWiki?: boolean | undefined; - cooked?: string | undefined; - createdAt?: string | undefined; - deletedAt?: string | null | undefined; - displayUsername?: string | undefined; - editReason?: string | null | undefined; - flairBgColor?: string | null | undefined; - flairColor?: string | null | undefined; - flairName?: string | null | undefined; - flairUrl?: string | null | undefined; - hidden?: boolean | undefined; - id?: number | undefined; - incomingLinkCount?: number | undefined; - moderator?: boolean | undefined; - name?: string | undefined; - notice?: Notice | undefined; - postNumber?: number | undefined; - postType?: number | undefined; - primaryGroupName?: string | null | undefined; - quoteCount?: number | undefined; - readersCount?: number | undefined; - reads?: number | undefined; - replyCount?: number | undefined; - replyToPostNumber?: string | null | undefined; - reviewableId?: string | null | undefined; - reviewableScoreCount?: number | undefined; - reviewableScorePendingCount?: number | undefined; - score?: number | undefined; - staff?: boolean | undefined; - topicId?: number | undefined; - topicSlug?: string | undefined; - trustLevel?: number | undefined; - updatedAt?: string | undefined; - userDeleted?: boolean | undefined; - userId?: number | undefined; - userTitle?: string | null | undefined; - username?: string | undefined; - version?: number | undefined; - wiki?: boolean | undefined; - yours?: boolean | undefined; + actionsSummary?: Array | undefined; + admin?: boolean | undefined; + avatarTemplate?: string | undefined; + canDelete?: boolean | undefined; + canEdit?: boolean | undefined; + canRecover?: boolean | undefined; + canViewEditHistory?: boolean | undefined; + canWiki?: boolean | undefined; + cooked?: string | undefined; + createdAt?: string | undefined; + deletedAt?: string | null | undefined; + displayUsername?: string | undefined; + editReason?: string | null | undefined; + flairBgColor?: string | null | undefined; + flairColor?: string | null | undefined; + flairName?: string | null | undefined; + flairUrl?: string | null | undefined; + hidden?: boolean | undefined; + id?: number | undefined; + incomingLinkCount?: number | undefined; + moderator?: boolean | undefined; + name?: string | undefined; + notice?: Notice | undefined; + postNumber?: number | undefined; + postType?: number | undefined; + primaryGroupName?: string | null | undefined; + quoteCount?: number | undefined; + readersCount?: number | undefined; + reads?: number | undefined; + replyCount?: number | undefined; + replyToPostNumber?: string | null | undefined; + reviewableId?: string | null | undefined; + reviewableScoreCount?: number | undefined; + reviewableScorePendingCount?: number | undefined; + score?: number | undefined; + staff?: boolean | undefined; + topicId?: number | undefined; + topicSlug?: string | undefined; + trustLevel?: number | undefined; + updatedAt?: string | undefined; + userDeleted?: boolean | undefined; + userId?: number | undefined; + userTitle?: string | null | undefined; + username?: string | undefined; + version?: number | undefined; + wiki?: boolean | undefined; + yours?: boolean | undefined; }; /** @internal */ export const PerformPostActionRequestBody$inboundSchema: z.ZodType< - PerformPostActionRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - flag_topic: z.boolean().optional(), - id: z.number().int(), - post_action_type_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - flag_topic: "flagTopic", - post_action_type_id: "postActionTypeId", - }); - }); + PerformPostActionRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + flag_topic: z.boolean().optional(), + id: z.number().int(), + post_action_type_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "flag_topic": "flagTopic", + "post_action_type_id": "postActionTypeId", + }); +}); /** @internal */ export type PerformPostActionRequestBody$Outbound = { - flag_topic?: boolean | undefined; - id: number; - post_action_type_id: number; + flag_topic?: boolean | undefined; + id: number; + post_action_type_id: number; }; /** @internal */ export const PerformPostActionRequestBody$outboundSchema: z.ZodType< - PerformPostActionRequestBody$Outbound, - z.ZodTypeDef, - PerformPostActionRequestBody -> = z - .object({ - flagTopic: z.boolean().optional(), - id: z.number().int(), - postActionTypeId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - flagTopic: "flag_topic", - postActionTypeId: "post_action_type_id", - }); - }); + PerformPostActionRequestBody$Outbound, + z.ZodTypeDef, + PerformPostActionRequestBody +> = z.object({ + flagTopic: z.boolean().optional(), + id: z.number().int(), + postActionTypeId: z.number().int(), +}).transform((v) => { + return remap$(v, { + flagTopic: "flag_topic", + postActionTypeId: "post_action_type_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformPostActionRequestBody$ { - /** @deprecated use `PerformPostActionRequestBody$inboundSchema` instead. */ - export const inboundSchema = PerformPostActionRequestBody$inboundSchema; - /** @deprecated use `PerformPostActionRequestBody$outboundSchema` instead. */ - export const outboundSchema = PerformPostActionRequestBody$outboundSchema; - /** @deprecated use `PerformPostActionRequestBody$Outbound` instead. */ - export type Outbound = PerformPostActionRequestBody$Outbound; + /** @deprecated use `PerformPostActionRequestBody$inboundSchema` instead. */ + export const inboundSchema = PerformPostActionRequestBody$inboundSchema; + /** @deprecated use `PerformPostActionRequestBody$outboundSchema` instead. */ + export const outboundSchema = PerformPostActionRequestBody$outboundSchema; + /** @deprecated use `PerformPostActionRequestBody$Outbound` instead. */ + export type Outbound = PerformPostActionRequestBody$Outbound; } /** @internal */ export const PerformPostActionRequest$inboundSchema: z.ZodType< - PerformPostActionRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => PerformPostActionRequestBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + PerformPostActionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => PerformPostActionRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type PerformPostActionRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: PerformPostActionRequestBody$Outbound | undefined; + "Api-Key": string; + "Api-Username": string; + RequestBody?: PerformPostActionRequestBody$Outbound | undefined; }; /** @internal */ export const PerformPostActionRequest$outboundSchema: z.ZodType< - PerformPostActionRequest$Outbound, - z.ZodTypeDef, - PerformPostActionRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => PerformPostActionRequestBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + PerformPostActionRequest$Outbound, + z.ZodTypeDef, + PerformPostActionRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => PerformPostActionRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformPostActionRequest$ { - /** @deprecated use `PerformPostActionRequest$inboundSchema` instead. */ - export const inboundSchema = PerformPostActionRequest$inboundSchema; - /** @deprecated use `PerformPostActionRequest$outboundSchema` instead. */ - export const outboundSchema = PerformPostActionRequest$outboundSchema; - /** @deprecated use `PerformPostActionRequest$Outbound` instead. */ - export type Outbound = PerformPostActionRequest$Outbound; + /** @deprecated use `PerformPostActionRequest$inboundSchema` instead. */ + export const inboundSchema = PerformPostActionRequest$inboundSchema; + /** @deprecated use `PerformPostActionRequest$outboundSchema` instead. */ + export const outboundSchema = PerformPostActionRequest$outboundSchema; + /** @deprecated use `PerformPostActionRequest$Outbound` instead. */ + export type Outbound = PerformPostActionRequest$Outbound; } /** @internal */ export const PerformPostActionActionsSummary$inboundSchema: z.ZodType< - PerformPostActionActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - acted: z.boolean().optional(), - can_undo: z.boolean().optional(), - count: z.number().int().optional(), - id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - can_undo: "canUndo", - }); - }); + PerformPostActionActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + acted: z.boolean().optional(), + can_undo: z.boolean().optional(), + count: z.number().int().optional(), + id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "can_undo": "canUndo", + }); +}); /** @internal */ export type PerformPostActionActionsSummary$Outbound = { - acted?: boolean | undefined; - can_undo?: boolean | undefined; - count?: number | undefined; - id?: number | undefined; + acted?: boolean | undefined; + can_undo?: boolean | undefined; + count?: number | undefined; + id?: number | undefined; }; /** @internal */ export const PerformPostActionActionsSummary$outboundSchema: z.ZodType< - PerformPostActionActionsSummary$Outbound, - z.ZodTypeDef, - PerformPostActionActionsSummary -> = z - .object({ - acted: z.boolean().optional(), - canUndo: z.boolean().optional(), - count: z.number().int().optional(), - id: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - canUndo: "can_undo", - }); - }); + PerformPostActionActionsSummary$Outbound, + z.ZodTypeDef, + PerformPostActionActionsSummary +> = z.object({ + acted: z.boolean().optional(), + canUndo: z.boolean().optional(), + count: z.number().int().optional(), + id: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + canUndo: "can_undo", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformPostActionActionsSummary$ { - /** @deprecated use `PerformPostActionActionsSummary$inboundSchema` instead. */ - export const inboundSchema = PerformPostActionActionsSummary$inboundSchema; - /** @deprecated use `PerformPostActionActionsSummary$outboundSchema` instead. */ - export const outboundSchema = PerformPostActionActionsSummary$outboundSchema; - /** @deprecated use `PerformPostActionActionsSummary$Outbound` instead. */ - export type Outbound = PerformPostActionActionsSummary$Outbound; + /** @deprecated use `PerformPostActionActionsSummary$inboundSchema` instead. */ + export const inboundSchema = PerformPostActionActionsSummary$inboundSchema; + /** @deprecated use `PerformPostActionActionsSummary$outboundSchema` instead. */ + export const outboundSchema = PerformPostActionActionsSummary$outboundSchema; + /** @deprecated use `PerformPostActionActionsSummary$Outbound` instead. */ + export type Outbound = PerformPostActionActionsSummary$Outbound; } /** @internal */ -export const Notice$inboundSchema: z.ZodType = z.object({}); +export const Notice$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type Notice$Outbound = {}; /** @internal */ -export const Notice$outboundSchema: z.ZodType = z.object({}); +export const Notice$outboundSchema: z.ZodType< + Notice$Outbound, + z.ZodTypeDef, + Notice +> = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Notice$ { - /** @deprecated use `Notice$inboundSchema` instead. */ - export const inboundSchema = Notice$inboundSchema; - /** @deprecated use `Notice$outboundSchema` instead. */ - export const outboundSchema = Notice$outboundSchema; - /** @deprecated use `Notice$Outbound` instead. */ - export type Outbound = Notice$Outbound; + /** @deprecated use `Notice$inboundSchema` instead. */ + export const inboundSchema = Notice$inboundSchema; + /** @deprecated use `Notice$outboundSchema` instead. */ + export const outboundSchema = Notice$outboundSchema; + /** @deprecated use `Notice$Outbound` instead. */ + export type Outbound = Notice$Outbound; } /** @internal */ export const PerformPostActionResponseBody$inboundSchema: z.ZodType< - PerformPostActionResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - actions_summary: z - .array(z.lazy(() => PerformPostActionActionsSummary$inboundSchema)) - .optional(), - admin: z.boolean().optional(), - avatar_template: z.string().optional(), - can_delete: z.boolean().optional(), - can_edit: z.boolean().optional(), - can_recover: z.boolean().optional(), - can_view_edit_history: z.boolean().optional(), - can_wiki: z.boolean().optional(), - cooked: z.string().optional(), - created_at: z.string().optional(), - deleted_at: z.nullable(z.string()).optional(), - display_username: z.string().optional(), - edit_reason: z.nullable(z.string()).optional(), - flair_bg_color: z.nullable(z.string()).optional(), - flair_color: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()).optional(), - flair_url: z.nullable(z.string()).optional(), - hidden: z.boolean().optional(), - id: z.number().int().optional(), - incoming_link_count: z.number().int().optional(), - moderator: z.boolean().optional(), - name: z.string().optional(), - notice: z.lazy(() => Notice$inboundSchema).optional(), - post_number: z.number().int().optional(), - post_type: z.number().int().optional(), - primary_group_name: z.nullable(z.string()).optional(), - quote_count: z.number().int().optional(), - readers_count: z.number().int().optional(), - reads: z.number().int().optional(), - reply_count: z.number().int().optional(), - reply_to_post_number: z.nullable(z.string()).optional(), - reviewable_id: z.nullable(z.string()).optional(), - reviewable_score_count: z.number().int().optional(), - reviewable_score_pending_count: z.number().int().optional(), - score: z.number().optional(), - staff: z.boolean().optional(), - topic_id: z.number().int().optional(), - topic_slug: z.string().optional(), - trust_level: z.number().int().optional(), - updated_at: z.string().optional(), - user_deleted: z.boolean().optional(), - user_id: z.number().int().optional(), - user_title: z.nullable(z.string()).optional(), - username: z.string().optional(), - version: z.number().int().optional(), - wiki: z.boolean().optional(), - yours: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); - }); + PerformPostActionResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array( + z.lazy(() => PerformPostActionActionsSummary$inboundSchema), + ).optional(), + admin: z.boolean().optional(), + avatar_template: z.string().optional(), + can_delete: z.boolean().optional(), + can_edit: z.boolean().optional(), + can_recover: z.boolean().optional(), + can_view_edit_history: z.boolean().optional(), + can_wiki: z.boolean().optional(), + cooked: z.string().optional(), + created_at: z.string().optional(), + deleted_at: z.nullable(z.string()).optional(), + display_username: z.string().optional(), + edit_reason: z.nullable(z.string()).optional(), + flair_bg_color: z.nullable(z.string()).optional(), + flair_color: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()).optional(), + flair_url: z.nullable(z.string()).optional(), + hidden: z.boolean().optional(), + id: z.number().int().optional(), + incoming_link_count: z.number().int().optional(), + moderator: z.boolean().optional(), + name: z.string().optional(), + notice: z.lazy(() => Notice$inboundSchema).optional(), + post_number: z.number().int().optional(), + post_type: z.number().int().optional(), + primary_group_name: z.nullable(z.string()).optional(), + quote_count: z.number().int().optional(), + readers_count: z.number().int().optional(), + reads: z.number().int().optional(), + reply_count: z.number().int().optional(), + reply_to_post_number: z.nullable(z.string()).optional(), + reviewable_id: z.nullable(z.string()).optional(), + reviewable_score_count: z.number().int().optional(), + reviewable_score_pending_count: z.number().int().optional(), + score: z.number().optional(), + staff: z.boolean().optional(), + topic_id: z.number().int().optional(), + topic_slug: z.string().optional(), + trust_level: z.number().int().optional(), + updated_at: z.string().optional(), + user_deleted: z.boolean().optional(), + user_id: z.number().int().optional(), + user_title: z.nullable(z.string()).optional(), + username: z.string().optional(), + version: z.number().int().optional(), + wiki: z.boolean().optional(), + yours: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); +}); /** @internal */ export type PerformPostActionResponseBody$Outbound = { - actions_summary?: Array | undefined; - admin?: boolean | undefined; - avatar_template?: string | undefined; - can_delete?: boolean | undefined; - can_edit?: boolean | undefined; - can_recover?: boolean | undefined; - can_view_edit_history?: boolean | undefined; - can_wiki?: boolean | undefined; - cooked?: string | undefined; - created_at?: string | undefined; - deleted_at?: string | null | undefined; - display_username?: string | undefined; - edit_reason?: string | null | undefined; - flair_bg_color?: string | null | undefined; - flair_color?: string | null | undefined; - flair_name?: string | null | undefined; - flair_url?: string | null | undefined; - hidden?: boolean | undefined; - id?: number | undefined; - incoming_link_count?: number | undefined; - moderator?: boolean | undefined; - name?: string | undefined; - notice?: Notice$Outbound | undefined; - post_number?: number | undefined; - post_type?: number | undefined; - primary_group_name?: string | null | undefined; - quote_count?: number | undefined; - readers_count?: number | undefined; - reads?: number | undefined; - reply_count?: number | undefined; - reply_to_post_number?: string | null | undefined; - reviewable_id?: string | null | undefined; - reviewable_score_count?: number | undefined; - reviewable_score_pending_count?: number | undefined; - score?: number | undefined; - staff?: boolean | undefined; - topic_id?: number | undefined; - topic_slug?: string | undefined; - trust_level?: number | undefined; - updated_at?: string | undefined; - user_deleted?: boolean | undefined; - user_id?: number | undefined; - user_title?: string | null | undefined; - username?: string | undefined; - version?: number | undefined; - wiki?: boolean | undefined; - yours?: boolean | undefined; + actions_summary?: Array | undefined; + admin?: boolean | undefined; + avatar_template?: string | undefined; + can_delete?: boolean | undefined; + can_edit?: boolean | undefined; + can_recover?: boolean | undefined; + can_view_edit_history?: boolean | undefined; + can_wiki?: boolean | undefined; + cooked?: string | undefined; + created_at?: string | undefined; + deleted_at?: string | null | undefined; + display_username?: string | undefined; + edit_reason?: string | null | undefined; + flair_bg_color?: string | null | undefined; + flair_color?: string | null | undefined; + flair_name?: string | null | undefined; + flair_url?: string | null | undefined; + hidden?: boolean | undefined; + id?: number | undefined; + incoming_link_count?: number | undefined; + moderator?: boolean | undefined; + name?: string | undefined; + notice?: Notice$Outbound | undefined; + post_number?: number | undefined; + post_type?: number | undefined; + primary_group_name?: string | null | undefined; + quote_count?: number | undefined; + readers_count?: number | undefined; + reads?: number | undefined; + reply_count?: number | undefined; + reply_to_post_number?: string | null | undefined; + reviewable_id?: string | null | undefined; + reviewable_score_count?: number | undefined; + reviewable_score_pending_count?: number | undefined; + score?: number | undefined; + staff?: boolean | undefined; + topic_id?: number | undefined; + topic_slug?: string | undefined; + trust_level?: number | undefined; + updated_at?: string | undefined; + user_deleted?: boolean | undefined; + user_id?: number | undefined; + user_title?: string | null | undefined; + username?: string | undefined; + version?: number | undefined; + wiki?: boolean | undefined; + yours?: boolean | undefined; }; /** @internal */ export const PerformPostActionResponseBody$outboundSchema: z.ZodType< - PerformPostActionResponseBody$Outbound, - z.ZodTypeDef, - PerformPostActionResponseBody -> = z - .object({ - actionsSummary: z - .array(z.lazy(() => PerformPostActionActionsSummary$outboundSchema)) - .optional(), - admin: z.boolean().optional(), - avatarTemplate: z.string().optional(), - canDelete: z.boolean().optional(), - canEdit: z.boolean().optional(), - canRecover: z.boolean().optional(), - canViewEditHistory: z.boolean().optional(), - canWiki: z.boolean().optional(), - cooked: z.string().optional(), - createdAt: z.string().optional(), - deletedAt: z.nullable(z.string()).optional(), - displayUsername: z.string().optional(), - editReason: z.nullable(z.string()).optional(), - flairBgColor: z.nullable(z.string()).optional(), - flairColor: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()).optional(), - flairUrl: z.nullable(z.string()).optional(), - hidden: z.boolean().optional(), - id: z.number().int().optional(), - incomingLinkCount: z.number().int().optional(), - moderator: z.boolean().optional(), - name: z.string().optional(), - notice: z.lazy(() => Notice$outboundSchema).optional(), - postNumber: z.number().int().optional(), - postType: z.number().int().optional(), - primaryGroupName: z.nullable(z.string()).optional(), - quoteCount: z.number().int().optional(), - readersCount: z.number().int().optional(), - reads: z.number().int().optional(), - replyCount: z.number().int().optional(), - replyToPostNumber: z.nullable(z.string()).optional(), - reviewableId: z.nullable(z.string()).optional(), - reviewableScoreCount: z.number().int().optional(), - reviewableScorePendingCount: z.number().int().optional(), - score: z.number().optional(), - staff: z.boolean().optional(), - topicId: z.number().int().optional(), - topicSlug: z.string().optional(), - trustLevel: z.number().int().optional(), - updatedAt: z.string().optional(), - userDeleted: z.boolean().optional(), - userId: z.number().int().optional(), - userTitle: z.nullable(z.string()).optional(), - username: z.string().optional(), - version: z.number().int().optional(), - wiki: z.boolean().optional(), - yours: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); + PerformPostActionResponseBody$Outbound, + z.ZodTypeDef, + PerformPostActionResponseBody +> = z.object({ + actionsSummary: z.array( + z.lazy(() => PerformPostActionActionsSummary$outboundSchema), + ).optional(), + admin: z.boolean().optional(), + avatarTemplate: z.string().optional(), + canDelete: z.boolean().optional(), + canEdit: z.boolean().optional(), + canRecover: z.boolean().optional(), + canViewEditHistory: z.boolean().optional(), + canWiki: z.boolean().optional(), + cooked: z.string().optional(), + createdAt: z.string().optional(), + deletedAt: z.nullable(z.string()).optional(), + displayUsername: z.string().optional(), + editReason: z.nullable(z.string()).optional(), + flairBgColor: z.nullable(z.string()).optional(), + flairColor: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()).optional(), + flairUrl: z.nullable(z.string()).optional(), + hidden: z.boolean().optional(), + id: z.number().int().optional(), + incomingLinkCount: z.number().int().optional(), + moderator: z.boolean().optional(), + name: z.string().optional(), + notice: z.lazy(() => Notice$outboundSchema).optional(), + postNumber: z.number().int().optional(), + postType: z.number().int().optional(), + primaryGroupName: z.nullable(z.string()).optional(), + quoteCount: z.number().int().optional(), + readersCount: z.number().int().optional(), + reads: z.number().int().optional(), + replyCount: z.number().int().optional(), + replyToPostNumber: z.nullable(z.string()).optional(), + reviewableId: z.nullable(z.string()).optional(), + reviewableScoreCount: z.number().int().optional(), + reviewableScorePendingCount: z.number().int().optional(), + score: z.number().optional(), + staff: z.boolean().optional(), + topicId: z.number().int().optional(), + topicSlug: z.string().optional(), + trustLevel: z.number().int().optional(), + updatedAt: z.string().optional(), + userDeleted: z.boolean().optional(), + userId: z.number().int().optional(), + userTitle: z.nullable(z.string()).optional(), + username: z.string().optional(), + version: z.number().int().optional(), + wiki: z.boolean().optional(), + yours: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformPostActionResponseBody$ { - /** @deprecated use `PerformPostActionResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformPostActionResponseBody$inboundSchema; - /** @deprecated use `PerformPostActionResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformPostActionResponseBody$outboundSchema; - /** @deprecated use `PerformPostActionResponseBody$Outbound` instead. */ - export type Outbound = PerformPostActionResponseBody$Outbound; + /** @deprecated use `PerformPostActionResponseBody$inboundSchema` instead. */ + export const inboundSchema = PerformPostActionResponseBody$inboundSchema; + /** @deprecated use `PerformPostActionResponseBody$outboundSchema` instead. */ + export const outboundSchema = PerformPostActionResponseBody$outboundSchema; + /** @deprecated use `PerformPostActionResponseBody$Outbound` instead. */ + export type Outbound = PerformPostActionResponseBody$Outbound; } diff --git a/src/sdk/models/operations/postreplies.ts b/src/sdk/models/operations/postreplies.ts index f1a8a3f..45c4d24 100644 --- a/src/sdk/models/operations/postreplies.ts +++ b/src/sdk/models/operations/postreplies.ts @@ -2,98 +2,98 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PostRepliesRequest = { - id: string; + id: string; }; export type PostRepliesActionsSummary = { - canAct: boolean; - id: number; + canAct: boolean; + id: number; }; export type ReplyToUser = { - avatarTemplate: string; - name?: string | undefined; - username: string; + avatarTemplate: string; + name?: string | undefined; + username: string; }; export type PostRepliesResponseBody = { - actionsSummary: Array; - admin: boolean; - avatarTemplate: string; - bookmarked: boolean; - canDelete: boolean; - canEdit: boolean; - canRecover: boolean; - canSeeHiddenPost: boolean; - canViewEditHistory: boolean; - canWiki: boolean; - cooked: string; - createdAt: string; - deletedAt: string | null; - displayUsername: string | null; - editReason: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairName: string | null; - flairUrl: string | null; - hidden: boolean; - id: number; - incomingLinkCount: number; - moderator: boolean; - name: string | null; - postNumber: number; - postType: number; - primaryGroupName: string | null; - quoteCount: number; - readersCount: number; - reads: number; - replyCount: number; - replyToPostNumber: number; - replyToUser: ReplyToUser; - reviewableId: string | null; - reviewableScoreCount: number; - reviewableScorePendingCount: number; - score: number; - staff: boolean; - topicId: number; - topicSlug: string; - trustLevel: number; - updatedAt: string; - userDeleted: boolean; - userId: number; - userTitle: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actionsSummary: Array; + admin: boolean; + avatarTemplate: string; + bookmarked: boolean; + canDelete: boolean; + canEdit: boolean; + canRecover: boolean; + canSeeHiddenPost: boolean; + canViewEditHistory: boolean; + canWiki: boolean; + cooked: string; + createdAt: string; + deletedAt: string | null; + displayUsername: string | null; + editReason: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairName: string | null; + flairUrl: string | null; + hidden: boolean; + id: number; + incomingLinkCount: number; + moderator: boolean; + name: string | null; + postNumber: number; + postType: number; + primaryGroupName: string | null; + quoteCount: number; + readersCount: number; + reads: number; + replyCount: number; + replyToPostNumber: number; + replyToUser: ReplyToUser; + reviewableId: string | null; + reviewableScoreCount: number; + reviewableScorePendingCount: number; + score: number; + staff: boolean; + topicId: number; + topicSlug: string; + trustLevel: number; + updatedAt: string; + userDeleted: boolean; + userId: number; + userTitle: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ export const PostRepliesRequest$inboundSchema: z.ZodType< - PostRepliesRequest, - z.ZodTypeDef, - unknown + PostRepliesRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type PostRepliesRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const PostRepliesRequest$outboundSchema: z.ZodType< - PostRepliesRequest$Outbound, - z.ZodTypeDef, - PostRepliesRequest + PostRepliesRequest$Outbound, + z.ZodTypeDef, + PostRepliesRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -101,376 +101,372 @@ export const PostRepliesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostRepliesRequest$ { - /** @deprecated use `PostRepliesRequest$inboundSchema` instead. */ - export const inboundSchema = PostRepliesRequest$inboundSchema; - /** @deprecated use `PostRepliesRequest$outboundSchema` instead. */ - export const outboundSchema = PostRepliesRequest$outboundSchema; - /** @deprecated use `PostRepliesRequest$Outbound` instead. */ - export type Outbound = PostRepliesRequest$Outbound; + /** @deprecated use `PostRepliesRequest$inboundSchema` instead. */ + export const inboundSchema = PostRepliesRequest$inboundSchema; + /** @deprecated use `PostRepliesRequest$outboundSchema` instead. */ + export const outboundSchema = PostRepliesRequest$outboundSchema; + /** @deprecated use `PostRepliesRequest$Outbound` instead. */ + export type Outbound = PostRepliesRequest$Outbound; } /** @internal */ export const PostRepliesActionsSummary$inboundSchema: z.ZodType< - PostRepliesActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + PostRepliesActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type PostRepliesActionsSummary$Outbound = { - can_act: boolean; - id: number; + can_act: boolean; + id: number; }; /** @internal */ export const PostRepliesActionsSummary$outboundSchema: z.ZodType< - PostRepliesActionsSummary$Outbound, - z.ZodTypeDef, - PostRepliesActionsSummary -> = z - .object({ - canAct: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + PostRepliesActionsSummary$Outbound, + z.ZodTypeDef, + PostRepliesActionsSummary +> = z.object({ + canAct: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostRepliesActionsSummary$ { - /** @deprecated use `PostRepliesActionsSummary$inboundSchema` instead. */ - export const inboundSchema = PostRepliesActionsSummary$inboundSchema; - /** @deprecated use `PostRepliesActionsSummary$outboundSchema` instead. */ - export const outboundSchema = PostRepliesActionsSummary$outboundSchema; - /** @deprecated use `PostRepliesActionsSummary$Outbound` instead. */ - export type Outbound = PostRepliesActionsSummary$Outbound; + /** @deprecated use `PostRepliesActionsSummary$inboundSchema` instead. */ + export const inboundSchema = PostRepliesActionsSummary$inboundSchema; + /** @deprecated use `PostRepliesActionsSummary$outboundSchema` instead. */ + export const outboundSchema = PostRepliesActionsSummary$outboundSchema; + /** @deprecated use `PostRepliesActionsSummary$Outbound` instead. */ + export type Outbound = PostRepliesActionsSummary$Outbound; } /** @internal */ -export const ReplyToUser$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - name: z.string().optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const ReplyToUser$inboundSchema: z.ZodType< + ReplyToUser, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + name: z.string().optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type ReplyToUser$Outbound = { - avatar_template: string; - name?: string | undefined; - username: string; + avatar_template: string; + name?: string | undefined; + username: string; }; /** @internal */ export const ReplyToUser$outboundSchema: z.ZodType< - ReplyToUser$Outbound, - z.ZodTypeDef, - ReplyToUser -> = z - .object({ - avatarTemplate: z.string(), - name: z.string().optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + ReplyToUser$Outbound, + z.ZodTypeDef, + ReplyToUser +> = z.object({ + avatarTemplate: z.string(), + name: z.string().optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ReplyToUser$ { - /** @deprecated use `ReplyToUser$inboundSchema` instead. */ - export const inboundSchema = ReplyToUser$inboundSchema; - /** @deprecated use `ReplyToUser$outboundSchema` instead. */ - export const outboundSchema = ReplyToUser$outboundSchema; - /** @deprecated use `ReplyToUser$Outbound` instead. */ - export type Outbound = ReplyToUser$Outbound; + /** @deprecated use `ReplyToUser$inboundSchema` instead. */ + export const inboundSchema = ReplyToUser$inboundSchema; + /** @deprecated use `ReplyToUser$outboundSchema` instead. */ + export const outboundSchema = ReplyToUser$outboundSchema; + /** @deprecated use `ReplyToUser$Outbound` instead. */ + export type Outbound = ReplyToUser$Outbound; } /** @internal */ export const PostRepliesResponseBody$inboundSchema: z.ZodType< - PostRepliesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - actions_summary: z.array(z.lazy(() => PostRepliesActionsSummary$inboundSchema)), - admin: z.boolean(), - avatar_template: z.string(), - bookmarked: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_recover: z.boolean(), - can_see_hidden_post: z.boolean(), - can_view_edit_history: z.boolean(), - can_wiki: z.boolean(), - cooked: z.string(), - created_at: z.string(), - deleted_at: z.nullable(z.string()), - display_username: z.nullable(z.string()), - edit_reason: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incoming_link_count: z.number().int(), - moderator: z.boolean(), - name: z.nullable(z.string()), - post_number: z.number().int(), - post_type: z.number().int(), - primary_group_name: z.nullable(z.string()), - quote_count: z.number().int(), - readers_count: z.number().int(), - reads: z.number().int(), - reply_count: z.number().int(), - reply_to_post_number: z.number().int(), - reply_to_user: z.lazy(() => ReplyToUser$inboundSchema), - reviewable_id: z.nullable(z.string()), - reviewable_score_count: z.number().int(), - reviewable_score_pending_count: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topic_id: z.number().int(), - topic_slug: z.string(), - trust_level: z.number().int(), - updated_at: z.string(), - user_deleted: z.boolean(), - user_id: z.number().int(), - user_title: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reply_to_user: "replyToUser", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); - }); + PostRepliesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array( + z.lazy(() => PostRepliesActionsSummary$inboundSchema), + ), + admin: z.boolean(), + avatar_template: z.string(), + bookmarked: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_recover: z.boolean(), + can_see_hidden_post: z.boolean(), + can_view_edit_history: z.boolean(), + can_wiki: z.boolean(), + cooked: z.string(), + created_at: z.string(), + deleted_at: z.nullable(z.string()), + display_username: z.nullable(z.string()), + edit_reason: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incoming_link_count: z.number().int(), + moderator: z.boolean(), + name: z.nullable(z.string()), + post_number: z.number().int(), + post_type: z.number().int(), + primary_group_name: z.nullable(z.string()), + quote_count: z.number().int(), + readers_count: z.number().int(), + reads: z.number().int(), + reply_count: z.number().int(), + reply_to_post_number: z.number().int(), + reply_to_user: z.lazy(() => ReplyToUser$inboundSchema), + reviewable_id: z.nullable(z.string()), + reviewable_score_count: z.number().int(), + reviewable_score_pending_count: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topic_id: z.number().int(), + topic_slug: z.string(), + trust_level: z.number().int(), + updated_at: z.string(), + user_deleted: z.boolean(), + user_id: z.number().int(), + user_title: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reply_to_user": "replyToUser", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); +}); /** @internal */ export type PostRepliesResponseBody$Outbound = { - actions_summary: Array; - admin: boolean; - avatar_template: string; - bookmarked: boolean; - can_delete: boolean; - can_edit: boolean; - can_recover: boolean; - can_see_hidden_post: boolean; - can_view_edit_history: boolean; - can_wiki: boolean; - cooked: string; - created_at: string; - deleted_at: string | null; - display_username: string | null; - edit_reason: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_name: string | null; - flair_url: string | null; - hidden: boolean; - id: number; - incoming_link_count: number; - moderator: boolean; - name: string | null; - post_number: number; - post_type: number; - primary_group_name: string | null; - quote_count: number; - readers_count: number; - reads: number; - reply_count: number; - reply_to_post_number: number; - reply_to_user: ReplyToUser$Outbound; - reviewable_id: string | null; - reviewable_score_count: number; - reviewable_score_pending_count: number; - score: number; - staff: boolean; - topic_id: number; - topic_slug: string; - trust_level: number; - updated_at: string; - user_deleted: boolean; - user_id: number; - user_title: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actions_summary: Array; + admin: boolean; + avatar_template: string; + bookmarked: boolean; + can_delete: boolean; + can_edit: boolean; + can_recover: boolean; + can_see_hidden_post: boolean; + can_view_edit_history: boolean; + can_wiki: boolean; + cooked: string; + created_at: string; + deleted_at: string | null; + display_username: string | null; + edit_reason: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_name: string | null; + flair_url: string | null; + hidden: boolean; + id: number; + incoming_link_count: number; + moderator: boolean; + name: string | null; + post_number: number; + post_type: number; + primary_group_name: string | null; + quote_count: number; + readers_count: number; + reads: number; + reply_count: number; + reply_to_post_number: number; + reply_to_user: ReplyToUser$Outbound; + reviewable_id: string | null; + reviewable_score_count: number; + reviewable_score_pending_count: number; + score: number; + staff: boolean; + topic_id: number; + topic_slug: string; + trust_level: number; + updated_at: string; + user_deleted: boolean; + user_id: number; + user_title: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ export const PostRepliesResponseBody$outboundSchema: z.ZodType< - PostRepliesResponseBody$Outbound, - z.ZodTypeDef, - PostRepliesResponseBody -> = z - .object({ - actionsSummary: z.array(z.lazy(() => PostRepliesActionsSummary$outboundSchema)), - admin: z.boolean(), - avatarTemplate: z.string(), - bookmarked: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canRecover: z.boolean(), - canSeeHiddenPost: z.boolean(), - canViewEditHistory: z.boolean(), - canWiki: z.boolean(), - cooked: z.string(), - createdAt: z.string(), - deletedAt: z.nullable(z.string()), - displayUsername: z.nullable(z.string()), - editReason: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incomingLinkCount: z.number().int(), - moderator: z.boolean(), - name: z.nullable(z.string()), - postNumber: z.number().int(), - postType: z.number().int(), - primaryGroupName: z.nullable(z.string()), - quoteCount: z.number().int(), - readersCount: z.number().int(), - reads: z.number().int(), - replyCount: z.number().int(), - replyToPostNumber: z.number().int(), - replyToUser: z.lazy(() => ReplyToUser$outboundSchema), - reviewableId: z.nullable(z.string()), - reviewableScoreCount: z.number().int(), - reviewableScorePendingCount: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topicId: z.number().int(), - topicSlug: z.string(), - trustLevel: z.number().int(), - updatedAt: z.string(), - userDeleted: z.boolean(), - userId: z.number().int(), - userTitle: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - replyToUser: "reply_to_user", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); + PostRepliesResponseBody$Outbound, + z.ZodTypeDef, + PostRepliesResponseBody +> = z.object({ + actionsSummary: z.array( + z.lazy(() => PostRepliesActionsSummary$outboundSchema), + ), + admin: z.boolean(), + avatarTemplate: z.string(), + bookmarked: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canRecover: z.boolean(), + canSeeHiddenPost: z.boolean(), + canViewEditHistory: z.boolean(), + canWiki: z.boolean(), + cooked: z.string(), + createdAt: z.string(), + deletedAt: z.nullable(z.string()), + displayUsername: z.nullable(z.string()), + editReason: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incomingLinkCount: z.number().int(), + moderator: z.boolean(), + name: z.nullable(z.string()), + postNumber: z.number().int(), + postType: z.number().int(), + primaryGroupName: z.nullable(z.string()), + quoteCount: z.number().int(), + readersCount: z.number().int(), + reads: z.number().int(), + replyCount: z.number().int(), + replyToPostNumber: z.number().int(), + replyToUser: z.lazy(() => ReplyToUser$outboundSchema), + reviewableId: z.nullable(z.string()), + reviewableScoreCount: z.number().int(), + reviewableScorePendingCount: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topicId: z.number().int(), + topicSlug: z.string(), + trustLevel: z.number().int(), + updatedAt: z.string(), + userDeleted: z.boolean(), + userId: z.number().int(), + userTitle: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + replyToUser: "reply_to_user", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostRepliesResponseBody$ { - /** @deprecated use `PostRepliesResponseBody$inboundSchema` instead. */ - export const inboundSchema = PostRepliesResponseBody$inboundSchema; - /** @deprecated use `PostRepliesResponseBody$outboundSchema` instead. */ - export const outboundSchema = PostRepliesResponseBody$outboundSchema; - /** @deprecated use `PostRepliesResponseBody$Outbound` instead. */ - export type Outbound = PostRepliesResponseBody$Outbound; + /** @deprecated use `PostRepliesResponseBody$inboundSchema` instead. */ + export const inboundSchema = PostRepliesResponseBody$inboundSchema; + /** @deprecated use `PostRepliesResponseBody$outboundSchema` instead. */ + export const outboundSchema = PostRepliesResponseBody$outboundSchema; + /** @deprecated use `PostRepliesResponseBody$Outbound` instead. */ + export type Outbound = PostRepliesResponseBody$Outbound; } diff --git a/src/sdk/models/operations/refreshgravatar.ts b/src/sdk/models/operations/refreshgravatar.ts index ccf9848..4f0ca95 100644 --- a/src/sdk/models/operations/refreshgravatar.ts +++ b/src/sdk/models/operations/refreshgravatar.ts @@ -2,42 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type RefreshGravatarRequest = { - username: string; + username: string; }; /** * response */ export type RefreshGravatarResponseBody = { - gravatarAvatarTemplate: string | null; - gravatarUploadId: number | null; + gravatarAvatarTemplate: string | null; + gravatarUploadId: number | null; }; /** @internal */ export const RefreshGravatarRequest$inboundSchema: z.ZodType< - RefreshGravatarRequest, - z.ZodTypeDef, - unknown + RefreshGravatarRequest, + z.ZodTypeDef, + unknown > = z.object({ - username: z.string(), + username: z.string(), }); /** @internal */ export type RefreshGravatarRequest$Outbound = { - username: string; + username: string; }; /** @internal */ export const RefreshGravatarRequest$outboundSchema: z.ZodType< - RefreshGravatarRequest$Outbound, - z.ZodTypeDef, - RefreshGravatarRequest + RefreshGravatarRequest$Outbound, + z.ZodTypeDef, + RefreshGravatarRequest > = z.object({ - username: z.string(), + username: z.string(), }); /** @@ -45,63 +45,59 @@ export const RefreshGravatarRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RefreshGravatarRequest$ { - /** @deprecated use `RefreshGravatarRequest$inboundSchema` instead. */ - export const inboundSchema = RefreshGravatarRequest$inboundSchema; - /** @deprecated use `RefreshGravatarRequest$outboundSchema` instead. */ - export const outboundSchema = RefreshGravatarRequest$outboundSchema; - /** @deprecated use `RefreshGravatarRequest$Outbound` instead. */ - export type Outbound = RefreshGravatarRequest$Outbound; + /** @deprecated use `RefreshGravatarRequest$inboundSchema` instead. */ + export const inboundSchema = RefreshGravatarRequest$inboundSchema; + /** @deprecated use `RefreshGravatarRequest$outboundSchema` instead. */ + export const outboundSchema = RefreshGravatarRequest$outboundSchema; + /** @deprecated use `RefreshGravatarRequest$Outbound` instead. */ + export type Outbound = RefreshGravatarRequest$Outbound; } /** @internal */ export const RefreshGravatarResponseBody$inboundSchema: z.ZodType< - RefreshGravatarResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - gravatar_avatar_template: z.nullable(z.string()), - gravatar_upload_id: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - gravatar_avatar_template: "gravatarAvatarTemplate", - gravatar_upload_id: "gravatarUploadId", - }); - }); + RefreshGravatarResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + gravatar_avatar_template: z.nullable(z.string()), + gravatar_upload_id: z.nullable(z.number().int()), +}).transform((v) => { + return remap$(v, { + "gravatar_avatar_template": "gravatarAvatarTemplate", + "gravatar_upload_id": "gravatarUploadId", + }); +}); /** @internal */ export type RefreshGravatarResponseBody$Outbound = { - gravatar_avatar_template: string | null; - gravatar_upload_id: number | null; + gravatar_avatar_template: string | null; + gravatar_upload_id: number | null; }; /** @internal */ export const RefreshGravatarResponseBody$outboundSchema: z.ZodType< - RefreshGravatarResponseBody$Outbound, - z.ZodTypeDef, - RefreshGravatarResponseBody -> = z - .object({ - gravatarAvatarTemplate: z.nullable(z.string()), - gravatarUploadId: z.nullable(z.number().int()), - }) - .transform((v) => { - return remap$(v, { - gravatarAvatarTemplate: "gravatar_avatar_template", - gravatarUploadId: "gravatar_upload_id", - }); - }); + RefreshGravatarResponseBody$Outbound, + z.ZodTypeDef, + RefreshGravatarResponseBody +> = z.object({ + gravatarAvatarTemplate: z.nullable(z.string()), + gravatarUploadId: z.nullable(z.number().int()), +}).transform((v) => { + return remap$(v, { + gravatarAvatarTemplate: "gravatar_avatar_template", + gravatarUploadId: "gravatar_upload_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RefreshGravatarResponseBody$ { - /** @deprecated use `RefreshGravatarResponseBody$inboundSchema` instead. */ - export const inboundSchema = RefreshGravatarResponseBody$inboundSchema; - /** @deprecated use `RefreshGravatarResponseBody$outboundSchema` instead. */ - export const outboundSchema = RefreshGravatarResponseBody$outboundSchema; - /** @deprecated use `RefreshGravatarResponseBody$Outbound` instead. */ - export type Outbound = RefreshGravatarResponseBody$Outbound; + /** @deprecated use `RefreshGravatarResponseBody$inboundSchema` instead. */ + export const inboundSchema = RefreshGravatarResponseBody$inboundSchema; + /** @deprecated use `RefreshGravatarResponseBody$outboundSchema` instead. */ + export const outboundSchema = RefreshGravatarResponseBody$outboundSchema; + /** @deprecated use `RefreshGravatarResponseBody$Outbound` instead. */ + export type Outbound = RefreshGravatarResponseBody$Outbound; } diff --git a/src/sdk/models/operations/removegroupmembers.ts b/src/sdk/models/operations/removegroupmembers.ts index 2279a1f..51d70c3 100644 --- a/src/sdk/models/operations/removegroupmembers.ts +++ b/src/sdk/models/operations/removegroupmembers.ts @@ -2,51 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type RemoveGroupMembersRequestBody = { - /** - * comma separated list - */ - usernames?: string | undefined; + /** + * comma separated list + */ + usernames?: string | undefined; }; export type RemoveGroupMembersRequest = { - requestBody?: RemoveGroupMembersRequestBody | undefined; - id: number; + requestBody?: RemoveGroupMembersRequestBody | undefined; + id: number; }; /** * success response */ export type RemoveGroupMembersResponseBody = { - skippedUsernames: Array; - success: string; - usernames: Array; + skippedUsernames: Array; + success: string; + usernames: Array; }; /** @internal */ export const RemoveGroupMembersRequestBody$inboundSchema: z.ZodType< - RemoveGroupMembersRequestBody, - z.ZodTypeDef, - unknown + RemoveGroupMembersRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - usernames: z.string().optional(), + usernames: z.string().optional(), }); /** @internal */ export type RemoveGroupMembersRequestBody$Outbound = { - usernames?: string | undefined; + usernames?: string | undefined; }; /** @internal */ export const RemoveGroupMembersRequestBody$outboundSchema: z.ZodType< - RemoveGroupMembersRequestBody$Outbound, - z.ZodTypeDef, - RemoveGroupMembersRequestBody + RemoveGroupMembersRequestBody$Outbound, + z.ZodTypeDef, + RemoveGroupMembersRequestBody > = z.object({ - usernames: z.string().optional(), + usernames: z.string().optional(), }); /** @@ -54,115 +54,109 @@ export const RemoveGroupMembersRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveGroupMembersRequestBody$ { - /** @deprecated use `RemoveGroupMembersRequestBody$inboundSchema` instead. */ - export const inboundSchema = RemoveGroupMembersRequestBody$inboundSchema; - /** @deprecated use `RemoveGroupMembersRequestBody$outboundSchema` instead. */ - export const outboundSchema = RemoveGroupMembersRequestBody$outboundSchema; - /** @deprecated use `RemoveGroupMembersRequestBody$Outbound` instead. */ - export type Outbound = RemoveGroupMembersRequestBody$Outbound; + /** @deprecated use `RemoveGroupMembersRequestBody$inboundSchema` instead. */ + export const inboundSchema = RemoveGroupMembersRequestBody$inboundSchema; + /** @deprecated use `RemoveGroupMembersRequestBody$outboundSchema` instead. */ + export const outboundSchema = RemoveGroupMembersRequestBody$outboundSchema; + /** @deprecated use `RemoveGroupMembersRequestBody$Outbound` instead. */ + export type Outbound = RemoveGroupMembersRequestBody$Outbound; } /** @internal */ export const RemoveGroupMembersRequest$inboundSchema: z.ZodType< - RemoveGroupMembersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => RemoveGroupMembersRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + RemoveGroupMembersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => RemoveGroupMembersRequestBody$inboundSchema) + .optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type RemoveGroupMembersRequest$Outbound = { - RequestBody?: RemoveGroupMembersRequestBody$Outbound | undefined; - id: number; + RequestBody?: RemoveGroupMembersRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const RemoveGroupMembersRequest$outboundSchema: z.ZodType< - RemoveGroupMembersRequest$Outbound, - z.ZodTypeDef, - RemoveGroupMembersRequest -> = z - .object({ - requestBody: z.lazy(() => RemoveGroupMembersRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + RemoveGroupMembersRequest$Outbound, + z.ZodTypeDef, + RemoveGroupMembersRequest +> = z.object({ + requestBody: z.lazy(() => RemoveGroupMembersRequestBody$outboundSchema) + .optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveGroupMembersRequest$ { - /** @deprecated use `RemoveGroupMembersRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveGroupMembersRequest$inboundSchema; - /** @deprecated use `RemoveGroupMembersRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveGroupMembersRequest$outboundSchema; - /** @deprecated use `RemoveGroupMembersRequest$Outbound` instead. */ - export type Outbound = RemoveGroupMembersRequest$Outbound; + /** @deprecated use `RemoveGroupMembersRequest$inboundSchema` instead. */ + export const inboundSchema = RemoveGroupMembersRequest$inboundSchema; + /** @deprecated use `RemoveGroupMembersRequest$outboundSchema` instead. */ + export const outboundSchema = RemoveGroupMembersRequest$outboundSchema; + /** @deprecated use `RemoveGroupMembersRequest$Outbound` instead. */ + export type Outbound = RemoveGroupMembersRequest$Outbound; } /** @internal */ export const RemoveGroupMembersResponseBody$inboundSchema: z.ZodType< - RemoveGroupMembersResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - skipped_usernames: z.array(z.any()), - success: z.string(), - usernames: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - skipped_usernames: "skippedUsernames", - }); - }); + RemoveGroupMembersResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + skipped_usernames: z.array(z.any()), + success: z.string(), + usernames: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "skipped_usernames": "skippedUsernames", + }); +}); /** @internal */ export type RemoveGroupMembersResponseBody$Outbound = { - skipped_usernames: Array; - success: string; - usernames: Array; + skipped_usernames: Array; + success: string; + usernames: Array; }; /** @internal */ export const RemoveGroupMembersResponseBody$outboundSchema: z.ZodType< - RemoveGroupMembersResponseBody$Outbound, - z.ZodTypeDef, - RemoveGroupMembersResponseBody -> = z - .object({ - skippedUsernames: z.array(z.any()), - success: z.string(), - usernames: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - skippedUsernames: "skipped_usernames", - }); - }); + RemoveGroupMembersResponseBody$Outbound, + z.ZodTypeDef, + RemoveGroupMembersResponseBody +> = z.object({ + skippedUsernames: z.array(z.any()), + success: z.string(), + usernames: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + skippedUsernames: "skipped_usernames", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveGroupMembersResponseBody$ { - /** @deprecated use `RemoveGroupMembersResponseBody$inboundSchema` instead. */ - export const inboundSchema = RemoveGroupMembersResponseBody$inboundSchema; - /** @deprecated use `RemoveGroupMembersResponseBody$outboundSchema` instead. */ - export const outboundSchema = RemoveGroupMembersResponseBody$outboundSchema; - /** @deprecated use `RemoveGroupMembersResponseBody$Outbound` instead. */ - export type Outbound = RemoveGroupMembersResponseBody$Outbound; + /** @deprecated use `RemoveGroupMembersResponseBody$inboundSchema` instead. */ + export const inboundSchema = RemoveGroupMembersResponseBody$inboundSchema; + /** @deprecated use `RemoveGroupMembersResponseBody$outboundSchema` instead. */ + export const outboundSchema = RemoveGroupMembersResponseBody$outboundSchema; + /** @deprecated use `RemoveGroupMembersResponseBody$Outbound` instead. */ + export type Outbound = RemoveGroupMembersResponseBody$Outbound; } diff --git a/src/sdk/models/operations/removetopic.ts b/src/sdk/models/operations/removetopic.ts index 5db10dc..4f56abd 100644 --- a/src/sdk/models/operations/removetopic.ts +++ b/src/sdk/models/operations/removetopic.ts @@ -2,67 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type RemoveTopicRequest = { - apiKey: string; - apiUsername: string; - id: string; + apiKey: string; + apiUsername: string; + id: string; }; /** @internal */ export const RemoveTopicRequest$inboundSchema: z.ZodType< - RemoveTopicRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - }); - }); + RemoveTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + }); +}); /** @internal */ export type RemoveTopicRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - id: string; + "Api-Key": string; + "Api-Username": string; + id: string; }; /** @internal */ export const RemoveTopicRequest$outboundSchema: z.ZodType< - RemoveTopicRequest$Outbound, - z.ZodTypeDef, - RemoveTopicRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - }); - }); + RemoveTopicRequest$Outbound, + z.ZodTypeDef, + RemoveTopicRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveTopicRequest$ { - /** @deprecated use `RemoveTopicRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveTopicRequest$inboundSchema; - /** @deprecated use `RemoveTopicRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveTopicRequest$outboundSchema; - /** @deprecated use `RemoveTopicRequest$Outbound` instead. */ - export type Outbound = RemoveTopicRequest$Outbound; + /** @deprecated use `RemoveTopicRequest$inboundSchema` instead. */ + export const inboundSchema = RemoveTopicRequest$inboundSchema; + /** @deprecated use `RemoveTopicRequest$outboundSchema` instead. */ + export const outboundSchema = RemoveTopicRequest$outboundSchema; + /** @deprecated use `RemoveTopicRequest$Outbound` instead. */ + export type Outbound = RemoveTopicRequest$Outbound; } diff --git a/src/sdk/models/operations/search.ts b/src/sdk/models/operations/search.ts index dddadc1..47daea3 100644 --- a/src/sdk/models/operations/search.ts +++ b/src/sdk/models/operations/search.ts @@ -2,93 +2,95 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type SearchRequest = { - page?: number | undefined; - /** - * The query string needs to be url encoded and is made up of the following options: - * - * @remarks - * - Search term. This is just a string. Usually it would be the first item in the query. - * - `@`: Use the `@` followed by the username to specify posts by this user. - * - `#`: Use the `#` followed by the category slug to search within this category. - * - `tags:`: `api,solved` or for posts that have all the specified tags `api+solved`. - * - `before:`: `yyyy-mm-dd` - * - `after:`: `yyyy-mm-dd` - * - `order:`: `latest`, `likes`, `views`, `latest_topic` - * - `assigned:`: username (without `@`) - * - `in:`: `title`, `likes`, `personal`, `messages`, `seen`, `unseen`, `posted`, `created`, `watching`, `tracking`, `bookmarks`, `assigned`, `unassigned`, `first`, `pinned`, `wiki` - * - `with:`: `images` - * - `status:`: `open`, `closed`, `public`, `archived`, `noreplies`, `single_user`, `solved`, `unsolved` - * - `group:`: group_name or group_id - * - `group_messages:`: group_name or group_id - * - `min_posts:`: 1 - * - `max_posts:`: 10 - * - `min_views:`: 1 - * - `max_views:`: 10 - * - * If you are using cURL you can use the `-G` and the `--data-urlencode` flags to encode the query: - * - * ``` - * curl -i -sS -X GET -G "http://localhost:4200/search.json" \ - * --data-urlencode 'q=wordpress @scossar #fun after:2020-01-01' - * ``` - * - */ - q?: string | undefined; + page?: number | undefined; + /** + * The query string needs to be url encoded and is made up of the following options: + * + * @remarks + * - Search term. This is just a string. Usually it would be the first item in the query. + * - `@`: Use the `@` followed by the username to specify posts by this user. + * - `#`: Use the `#` followed by the category slug to search within this category. + * - `tags:`: `api,solved` or for posts that have all the specified tags `api+solved`. + * - `before:`: `yyyy-mm-dd` + * - `after:`: `yyyy-mm-dd` + * - `order:`: `latest`, `likes`, `views`, `latest_topic` + * - `assigned:`: username (without `@`) + * - `in:`: `title`, `likes`, `personal`, `messages`, `seen`, `unseen`, `posted`, `created`, `watching`, `tracking`, `bookmarks`, `assigned`, `unassigned`, `first`, `pinned`, `wiki` + * - `with:`: `images` + * - `status:`: `open`, `closed`, `public`, `archived`, `noreplies`, `single_user`, `solved`, `unsolved` + * - `group:`: group_name or group_id + * - `group_messages:`: group_name or group_id + * - `min_posts:`: 1 + * - `max_posts:`: 10 + * - `min_views:`: 1 + * - `max_views:`: 10 + * + * If you are using cURL you can use the `-G` and the `--data-urlencode` flags to encode the query: + * + * ``` + * curl -i -sS -X GET -G "http://localhost:4200/search.json" \ + * --data-urlencode 'q=wordpress @scossar #fun after:2020-01-01' + * ``` + */ + q?: string | undefined; }; export type GroupedSearchResult = { - canCreateTopic: boolean; - categoryIds: Array; - error: string | null; - groupIds: Array; - moreCategories: string | null; - moreFullPageResults: string | null; - morePosts: string | null; - moreUsers: string | null; - postIds: Array; - searchLogId: number; - tagIds: Array; - term: string; - userIds: Array; + canCreateTopic: boolean; + categoryIds: Array; + error: string | null; + groupIds: Array; + moreCategories: string | null; + moreFullPageResults: string | null; + morePosts: string | null; + moreUsers: string | null; + postIds: Array; + searchLogId: number; + tagIds: Array; + term: string; + userIds: Array; }; /** * success response */ export type SearchResponseBody = { - categories: Array; - groupedSearchResult: GroupedSearchResult; - groups: Array; - posts: Array; - tags: Array; - users: Array; + categories: Array; + groupedSearchResult: GroupedSearchResult; + groups: Array; + posts: Array; + tags: Array; + users: Array; }; /** @internal */ -export const SearchRequest$inboundSchema: z.ZodType = - z.object({ - page: z.number().int().optional(), - q: z.string().optional(), - }); +export const SearchRequest$inboundSchema: z.ZodType< + SearchRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.number().int().optional(), + q: z.string().optional(), +}); /** @internal */ export type SearchRequest$Outbound = { - page?: number | undefined; - q?: string | undefined; + page?: number | undefined; + q?: string | undefined; }; /** @internal */ export const SearchRequest$outboundSchema: z.ZodType< - SearchRequest$Outbound, - z.ZodTypeDef, - SearchRequest + SearchRequest$Outbound, + z.ZodTypeDef, + SearchRequest > = z.object({ - page: z.number().int().optional(), - q: z.string().optional(), + page: z.number().int().optional(), + q: z.string().optional(), }); /** @@ -96,177 +98,169 @@ export const SearchRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SearchRequest$ { - /** @deprecated use `SearchRequest$inboundSchema` instead. */ - export const inboundSchema = SearchRequest$inboundSchema; - /** @deprecated use `SearchRequest$outboundSchema` instead. */ - export const outboundSchema = SearchRequest$outboundSchema; - /** @deprecated use `SearchRequest$Outbound` instead. */ - export type Outbound = SearchRequest$Outbound; + /** @deprecated use `SearchRequest$inboundSchema` instead. */ + export const inboundSchema = SearchRequest$inboundSchema; + /** @deprecated use `SearchRequest$outboundSchema` instead. */ + export const outboundSchema = SearchRequest$outboundSchema; + /** @deprecated use `SearchRequest$Outbound` instead. */ + export type Outbound = SearchRequest$Outbound; } /** @internal */ export const GroupedSearchResult$inboundSchema: z.ZodType< - GroupedSearchResult, - z.ZodTypeDef, - unknown -> = z - .object({ - can_create_topic: z.boolean(), - category_ids: z.array(z.any()), - error: z.nullable(z.string()), - group_ids: z.array(z.any()), - more_categories: z.nullable(z.string()), - more_full_page_results: z.nullable(z.string()), - more_posts: z.nullable(z.string()), - more_users: z.nullable(z.string()), - post_ids: z.array(z.any()), - search_log_id: z.number().int(), - tag_ids: z.array(z.any()), - term: z.string(), - user_ids: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - can_create_topic: "canCreateTopic", - category_ids: "categoryIds", - group_ids: "groupIds", - more_categories: "moreCategories", - more_full_page_results: "moreFullPageResults", - more_posts: "morePosts", - more_users: "moreUsers", - post_ids: "postIds", - search_log_id: "searchLogId", - tag_ids: "tagIds", - user_ids: "userIds", - }); - }); + GroupedSearchResult, + z.ZodTypeDef, + unknown +> = z.object({ + can_create_topic: z.boolean(), + category_ids: z.array(z.any()), + error: z.nullable(z.string()), + group_ids: z.array(z.any()), + more_categories: z.nullable(z.string()), + more_full_page_results: z.nullable(z.string()), + more_posts: z.nullable(z.string()), + more_users: z.nullable(z.string()), + post_ids: z.array(z.any()), + search_log_id: z.number().int(), + tag_ids: z.array(z.any()), + term: z.string(), + user_ids: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "can_create_topic": "canCreateTopic", + "category_ids": "categoryIds", + "group_ids": "groupIds", + "more_categories": "moreCategories", + "more_full_page_results": "moreFullPageResults", + "more_posts": "morePosts", + "more_users": "moreUsers", + "post_ids": "postIds", + "search_log_id": "searchLogId", + "tag_ids": "tagIds", + "user_ids": "userIds", + }); +}); /** @internal */ export type GroupedSearchResult$Outbound = { - can_create_topic: boolean; - category_ids: Array; - error: string | null; - group_ids: Array; - more_categories: string | null; - more_full_page_results: string | null; - more_posts: string | null; - more_users: string | null; - post_ids: Array; - search_log_id: number; - tag_ids: Array; - term: string; - user_ids: Array; + can_create_topic: boolean; + category_ids: Array; + error: string | null; + group_ids: Array; + more_categories: string | null; + more_full_page_results: string | null; + more_posts: string | null; + more_users: string | null; + post_ids: Array; + search_log_id: number; + tag_ids: Array; + term: string; + user_ids: Array; }; /** @internal */ export const GroupedSearchResult$outboundSchema: z.ZodType< - GroupedSearchResult$Outbound, - z.ZodTypeDef, - GroupedSearchResult -> = z - .object({ - canCreateTopic: z.boolean(), - categoryIds: z.array(z.any()), - error: z.nullable(z.string()), - groupIds: z.array(z.any()), - moreCategories: z.nullable(z.string()), - moreFullPageResults: z.nullable(z.string()), - morePosts: z.nullable(z.string()), - moreUsers: z.nullable(z.string()), - postIds: z.array(z.any()), - searchLogId: z.number().int(), - tagIds: z.array(z.any()), - term: z.string(), - userIds: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - canCreateTopic: "can_create_topic", - categoryIds: "category_ids", - groupIds: "group_ids", - moreCategories: "more_categories", - moreFullPageResults: "more_full_page_results", - morePosts: "more_posts", - moreUsers: "more_users", - postIds: "post_ids", - searchLogId: "search_log_id", - tagIds: "tag_ids", - userIds: "user_ids", - }); - }); + GroupedSearchResult$Outbound, + z.ZodTypeDef, + GroupedSearchResult +> = z.object({ + canCreateTopic: z.boolean(), + categoryIds: z.array(z.any()), + error: z.nullable(z.string()), + groupIds: z.array(z.any()), + moreCategories: z.nullable(z.string()), + moreFullPageResults: z.nullable(z.string()), + morePosts: z.nullable(z.string()), + moreUsers: z.nullable(z.string()), + postIds: z.array(z.any()), + searchLogId: z.number().int(), + tagIds: z.array(z.any()), + term: z.string(), + userIds: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + canCreateTopic: "can_create_topic", + categoryIds: "category_ids", + groupIds: "group_ids", + moreCategories: "more_categories", + moreFullPageResults: "more_full_page_results", + morePosts: "more_posts", + moreUsers: "more_users", + postIds: "post_ids", + searchLogId: "search_log_id", + tagIds: "tag_ids", + userIds: "user_ids", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GroupedSearchResult$ { - /** @deprecated use `GroupedSearchResult$inboundSchema` instead. */ - export const inboundSchema = GroupedSearchResult$inboundSchema; - /** @deprecated use `GroupedSearchResult$outboundSchema` instead. */ - export const outboundSchema = GroupedSearchResult$outboundSchema; - /** @deprecated use `GroupedSearchResult$Outbound` instead. */ - export type Outbound = GroupedSearchResult$Outbound; + /** @deprecated use `GroupedSearchResult$inboundSchema` instead. */ + export const inboundSchema = GroupedSearchResult$inboundSchema; + /** @deprecated use `GroupedSearchResult$outboundSchema` instead. */ + export const outboundSchema = GroupedSearchResult$outboundSchema; + /** @deprecated use `GroupedSearchResult$Outbound` instead. */ + export type Outbound = GroupedSearchResult$Outbound; } /** @internal */ export const SearchResponseBody$inboundSchema: z.ZodType< - SearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - categories: z.array(z.any()), - grouped_search_result: z.lazy(() => GroupedSearchResult$inboundSchema), - groups: z.array(z.any()), - posts: z.array(z.any()), - tags: z.array(z.any()), - users: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - grouped_search_result: "groupedSearchResult", - }); - }); + SearchResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + categories: z.array(z.any()), + grouped_search_result: z.lazy(() => GroupedSearchResult$inboundSchema), + groups: z.array(z.any()), + posts: z.array(z.any()), + tags: z.array(z.any()), + users: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + "grouped_search_result": "groupedSearchResult", + }); +}); /** @internal */ export type SearchResponseBody$Outbound = { - categories: Array; - grouped_search_result: GroupedSearchResult$Outbound; - groups: Array; - posts: Array; - tags: Array; - users: Array; + categories: Array; + grouped_search_result: GroupedSearchResult$Outbound; + groups: Array; + posts: Array; + tags: Array; + users: Array; }; /** @internal */ export const SearchResponseBody$outboundSchema: z.ZodType< - SearchResponseBody$Outbound, - z.ZodTypeDef, - SearchResponseBody -> = z - .object({ - categories: z.array(z.any()), - groupedSearchResult: z.lazy(() => GroupedSearchResult$outboundSchema), - groups: z.array(z.any()), - posts: z.array(z.any()), - tags: z.array(z.any()), - users: z.array(z.any()), - }) - .transform((v) => { - return remap$(v, { - groupedSearchResult: "grouped_search_result", - }); - }); + SearchResponseBody$Outbound, + z.ZodTypeDef, + SearchResponseBody +> = z.object({ + categories: z.array(z.any()), + groupedSearchResult: z.lazy(() => GroupedSearchResult$outboundSchema), + groups: z.array(z.any()), + posts: z.array(z.any()), + tags: z.array(z.any()), + users: z.array(z.any()), +}).transform((v) => { + return remap$(v, { + groupedSearchResult: "grouped_search_result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SearchResponseBody$ { - /** @deprecated use `SearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = SearchResponseBody$inboundSchema; - /** @deprecated use `SearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = SearchResponseBody$outboundSchema; - /** @deprecated use `SearchResponseBody$Outbound` instead. */ - export type Outbound = SearchResponseBody$Outbound; + /** @deprecated use `SearchResponseBody$inboundSchema` instead. */ + export const inboundSchema = SearchResponseBody$inboundSchema; + /** @deprecated use `SearchResponseBody$outboundSchema` instead. */ + export const outboundSchema = SearchResponseBody$outboundSchema; + /** @deprecated use `SearchResponseBody$Outbound` instead. */ + export type Outbound = SearchResponseBody$Outbound; } diff --git a/src/sdk/models/operations/senddownloadbackupemail.ts b/src/sdk/models/operations/senddownloadbackupemail.ts index 279f484..7c6a228 100644 --- a/src/sdk/models/operations/senddownloadbackupemail.ts +++ b/src/sdk/models/operations/senddownloadbackupemail.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type SendDownloadBackupEmailRequest = { - filename: string; + filename: string; }; /** @internal */ export const SendDownloadBackupEmailRequest$inboundSchema: z.ZodType< - SendDownloadBackupEmailRequest, - z.ZodTypeDef, - unknown + SendDownloadBackupEmailRequest, + z.ZodTypeDef, + unknown > = z.object({ - filename: z.string(), + filename: z.string(), }); /** @internal */ export type SendDownloadBackupEmailRequest$Outbound = { - filename: string; + filename: string; }; /** @internal */ export const SendDownloadBackupEmailRequest$outboundSchema: z.ZodType< - SendDownloadBackupEmailRequest$Outbound, - z.ZodTypeDef, - SendDownloadBackupEmailRequest + SendDownloadBackupEmailRequest$Outbound, + z.ZodTypeDef, + SendDownloadBackupEmailRequest > = z.object({ - filename: z.string(), + filename: z.string(), }); /** @@ -36,10 +36,10 @@ export const SendDownloadBackupEmailRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SendDownloadBackupEmailRequest$ { - /** @deprecated use `SendDownloadBackupEmailRequest$inboundSchema` instead. */ - export const inboundSchema = SendDownloadBackupEmailRequest$inboundSchema; - /** @deprecated use `SendDownloadBackupEmailRequest$outboundSchema` instead. */ - export const outboundSchema = SendDownloadBackupEmailRequest$outboundSchema; - /** @deprecated use `SendDownloadBackupEmailRequest$Outbound` instead. */ - export type Outbound = SendDownloadBackupEmailRequest$Outbound; + /** @deprecated use `SendDownloadBackupEmailRequest$inboundSchema` instead. */ + export const inboundSchema = SendDownloadBackupEmailRequest$inboundSchema; + /** @deprecated use `SendDownloadBackupEmailRequest$outboundSchema` instead. */ + export const outboundSchema = SendDownloadBackupEmailRequest$outboundSchema; + /** @deprecated use `SendDownloadBackupEmailRequest$Outbound` instead. */ + export type Outbound = SendDownloadBackupEmailRequest$Outbound; } diff --git a/src/sdk/models/operations/sendpasswordresetemail.ts b/src/sdk/models/operations/sendpasswordresetemail.ts index 8a993a0..9dc3132 100644 --- a/src/sdk/models/operations/sendpasswordresetemail.ts +++ b/src/sdk/models/operations/sendpasswordresetemail.ts @@ -2,42 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type SendPasswordResetEmailRequestBody = { - login: string; + login: string; }; /** * success response */ export type SendPasswordResetEmailResponseBody = { - success: string; - userFound: boolean; + success: string; + userFound: boolean; }; /** @internal */ export const SendPasswordResetEmailRequestBody$inboundSchema: z.ZodType< - SendPasswordResetEmailRequestBody, - z.ZodTypeDef, - unknown + SendPasswordResetEmailRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - login: z.string(), + login: z.string(), }); /** @internal */ export type SendPasswordResetEmailRequestBody$Outbound = { - login: string; + login: string; }; /** @internal */ export const SendPasswordResetEmailRequestBody$outboundSchema: z.ZodType< - SendPasswordResetEmailRequestBody$Outbound, - z.ZodTypeDef, - SendPasswordResetEmailRequestBody + SendPasswordResetEmailRequestBody$Outbound, + z.ZodTypeDef, + SendPasswordResetEmailRequestBody > = z.object({ - login: z.string(), + login: z.string(), }); /** @@ -45,61 +45,59 @@ export const SendPasswordResetEmailRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SendPasswordResetEmailRequestBody$ { - /** @deprecated use `SendPasswordResetEmailRequestBody$inboundSchema` instead. */ - export const inboundSchema = SendPasswordResetEmailRequestBody$inboundSchema; - /** @deprecated use `SendPasswordResetEmailRequestBody$outboundSchema` instead. */ - export const outboundSchema = SendPasswordResetEmailRequestBody$outboundSchema; - /** @deprecated use `SendPasswordResetEmailRequestBody$Outbound` instead. */ - export type Outbound = SendPasswordResetEmailRequestBody$Outbound; + /** @deprecated use `SendPasswordResetEmailRequestBody$inboundSchema` instead. */ + export const inboundSchema = SendPasswordResetEmailRequestBody$inboundSchema; + /** @deprecated use `SendPasswordResetEmailRequestBody$outboundSchema` instead. */ + export const outboundSchema = + SendPasswordResetEmailRequestBody$outboundSchema; + /** @deprecated use `SendPasswordResetEmailRequestBody$Outbound` instead. */ + export type Outbound = SendPasswordResetEmailRequestBody$Outbound; } /** @internal */ export const SendPasswordResetEmailResponseBody$inboundSchema: z.ZodType< - SendPasswordResetEmailResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - success: z.string(), - user_found: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - user_found: "userFound", - }); - }); + SendPasswordResetEmailResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + success: z.string(), + user_found: z.boolean(), +}).transform((v) => { + return remap$(v, { + "user_found": "userFound", + }); +}); /** @internal */ export type SendPasswordResetEmailResponseBody$Outbound = { - success: string; - user_found: boolean; + success: string; + user_found: boolean; }; /** @internal */ export const SendPasswordResetEmailResponseBody$outboundSchema: z.ZodType< - SendPasswordResetEmailResponseBody$Outbound, - z.ZodTypeDef, - SendPasswordResetEmailResponseBody -> = z - .object({ - success: z.string(), - userFound: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - userFound: "user_found", - }); - }); + SendPasswordResetEmailResponseBody$Outbound, + z.ZodTypeDef, + SendPasswordResetEmailResponseBody +> = z.object({ + success: z.string(), + userFound: z.boolean(), +}).transform((v) => { + return remap$(v, { + userFound: "user_found", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SendPasswordResetEmailResponseBody$ { - /** @deprecated use `SendPasswordResetEmailResponseBody$inboundSchema` instead. */ - export const inboundSchema = SendPasswordResetEmailResponseBody$inboundSchema; - /** @deprecated use `SendPasswordResetEmailResponseBody$outboundSchema` instead. */ - export const outboundSchema = SendPasswordResetEmailResponseBody$outboundSchema; - /** @deprecated use `SendPasswordResetEmailResponseBody$Outbound` instead. */ - export type Outbound = SendPasswordResetEmailResponseBody$Outbound; + /** @deprecated use `SendPasswordResetEmailResponseBody$inboundSchema` instead. */ + export const inboundSchema = SendPasswordResetEmailResponseBody$inboundSchema; + /** @deprecated use `SendPasswordResetEmailResponseBody$outboundSchema` instead. */ + export const outboundSchema = + SendPasswordResetEmailResponseBody$outboundSchema; + /** @deprecated use `SendPasswordResetEmailResponseBody$Outbound` instead. */ + export type Outbound = SendPasswordResetEmailResponseBody$Outbound; } diff --git a/src/sdk/models/operations/setnotificationlevel.ts b/src/sdk/models/operations/setnotificationlevel.ts index 340d6ae..b86457b 100644 --- a/src/sdk/models/operations/setnotificationlevel.ts +++ b/src/sdk/models/operations/setnotificationlevel.ts @@ -2,185 +2,181 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const NotificationLevel = { - Zero: "0", - One: "1", - Two: "2", - Three: "3", + Zero: "0", + One: "1", + Two: "2", + Three: "3", } as const; export type NotificationLevel = ClosedEnum; export type SetNotificationLevelRequestBody = { - notificationLevel: NotificationLevel; + notificationLevel: NotificationLevel; }; export type SetNotificationLevelRequest = { - apiKey: string; - apiUsername: string; - requestBody?: SetNotificationLevelRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: SetNotificationLevelRequestBody | undefined; + id: string; }; /** * topic updated */ export type SetNotificationLevelResponseBody = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ -export const NotificationLevel$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(NotificationLevel); +export const NotificationLevel$inboundSchema: z.ZodNativeEnum< + typeof NotificationLevel +> = z.nativeEnum(NotificationLevel); /** @internal */ -export const NotificationLevel$outboundSchema: z.ZodNativeEnum = - NotificationLevel$inboundSchema; +export const NotificationLevel$outboundSchema: z.ZodNativeEnum< + typeof NotificationLevel +> = NotificationLevel$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotificationLevel$ { - /** @deprecated use `NotificationLevel$inboundSchema` instead. */ - export const inboundSchema = NotificationLevel$inboundSchema; - /** @deprecated use `NotificationLevel$outboundSchema` instead. */ - export const outboundSchema = NotificationLevel$outboundSchema; + /** @deprecated use `NotificationLevel$inboundSchema` instead. */ + export const inboundSchema = NotificationLevel$inboundSchema; + /** @deprecated use `NotificationLevel$outboundSchema` instead. */ + export const outboundSchema = NotificationLevel$outboundSchema; } /** @internal */ export const SetNotificationLevelRequestBody$inboundSchema: z.ZodType< - SetNotificationLevelRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - notification_level: NotificationLevel$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - notification_level: "notificationLevel", - }); - }); + SetNotificationLevelRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + notification_level: NotificationLevel$inboundSchema, +}).transform((v) => { + return remap$(v, { + "notification_level": "notificationLevel", + }); +}); /** @internal */ export type SetNotificationLevelRequestBody$Outbound = { - notification_level: string; + notification_level: string; }; /** @internal */ export const SetNotificationLevelRequestBody$outboundSchema: z.ZodType< - SetNotificationLevelRequestBody$Outbound, - z.ZodTypeDef, - SetNotificationLevelRequestBody -> = z - .object({ - notificationLevel: NotificationLevel$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - notificationLevel: "notification_level", - }); - }); + SetNotificationLevelRequestBody$Outbound, + z.ZodTypeDef, + SetNotificationLevelRequestBody +> = z.object({ + notificationLevel: NotificationLevel$outboundSchema, +}).transform((v) => { + return remap$(v, { + notificationLevel: "notification_level", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SetNotificationLevelRequestBody$ { - /** @deprecated use `SetNotificationLevelRequestBody$inboundSchema` instead. */ - export const inboundSchema = SetNotificationLevelRequestBody$inboundSchema; - /** @deprecated use `SetNotificationLevelRequestBody$outboundSchema` instead. */ - export const outboundSchema = SetNotificationLevelRequestBody$outboundSchema; - /** @deprecated use `SetNotificationLevelRequestBody$Outbound` instead. */ - export type Outbound = SetNotificationLevelRequestBody$Outbound; + /** @deprecated use `SetNotificationLevelRequestBody$inboundSchema` instead. */ + export const inboundSchema = SetNotificationLevelRequestBody$inboundSchema; + /** @deprecated use `SetNotificationLevelRequestBody$outboundSchema` instead. */ + export const outboundSchema = SetNotificationLevelRequestBody$outboundSchema; + /** @deprecated use `SetNotificationLevelRequestBody$Outbound` instead. */ + export type Outbound = SetNotificationLevelRequestBody$Outbound; } /** @internal */ export const SetNotificationLevelRequest$inboundSchema: z.ZodType< - SetNotificationLevelRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => SetNotificationLevelRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + SetNotificationLevelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => SetNotificationLevelRequestBody$inboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type SetNotificationLevelRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: SetNotificationLevelRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: SetNotificationLevelRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const SetNotificationLevelRequest$outboundSchema: z.ZodType< - SetNotificationLevelRequest$Outbound, - z.ZodTypeDef, - SetNotificationLevelRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => SetNotificationLevelRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + SetNotificationLevelRequest$Outbound, + z.ZodTypeDef, + SetNotificationLevelRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => SetNotificationLevelRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SetNotificationLevelRequest$ { - /** @deprecated use `SetNotificationLevelRequest$inboundSchema` instead. */ - export const inboundSchema = SetNotificationLevelRequest$inboundSchema; - /** @deprecated use `SetNotificationLevelRequest$outboundSchema` instead. */ - export const outboundSchema = SetNotificationLevelRequest$outboundSchema; - /** @deprecated use `SetNotificationLevelRequest$Outbound` instead. */ - export type Outbound = SetNotificationLevelRequest$Outbound; + /** @deprecated use `SetNotificationLevelRequest$inboundSchema` instead. */ + export const inboundSchema = SetNotificationLevelRequest$inboundSchema; + /** @deprecated use `SetNotificationLevelRequest$outboundSchema` instead. */ + export const outboundSchema = SetNotificationLevelRequest$outboundSchema; + /** @deprecated use `SetNotificationLevelRequest$Outbound` instead. */ + export type Outbound = SetNotificationLevelRequest$Outbound; } /** @internal */ export const SetNotificationLevelResponseBody$inboundSchema: z.ZodType< - SetNotificationLevelResponseBody, - z.ZodTypeDef, - unknown + SetNotificationLevelResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @internal */ export type SetNotificationLevelResponseBody$Outbound = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const SetNotificationLevelResponseBody$outboundSchema: z.ZodType< - SetNotificationLevelResponseBody$Outbound, - z.ZodTypeDef, - SetNotificationLevelResponseBody + SetNotificationLevelResponseBody$Outbound, + z.ZodTypeDef, + SetNotificationLevelResponseBody > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @@ -188,10 +184,10 @@ export const SetNotificationLevelResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SetNotificationLevelResponseBody$ { - /** @deprecated use `SetNotificationLevelResponseBody$inboundSchema` instead. */ - export const inboundSchema = SetNotificationLevelResponseBody$inboundSchema; - /** @deprecated use `SetNotificationLevelResponseBody$outboundSchema` instead. */ - export const outboundSchema = SetNotificationLevelResponseBody$outboundSchema; - /** @deprecated use `SetNotificationLevelResponseBody$Outbound` instead. */ - export type Outbound = SetNotificationLevelResponseBody$Outbound; + /** @deprecated use `SetNotificationLevelResponseBody$inboundSchema` instead. */ + export const inboundSchema = SetNotificationLevelResponseBody$inboundSchema; + /** @deprecated use `SetNotificationLevelResponseBody$outboundSchema` instead. */ + export const outboundSchema = SetNotificationLevelResponseBody$outboundSchema; + /** @deprecated use `SetNotificationLevelResponseBody$Outbound` instead. */ + export type Outbound = SetNotificationLevelResponseBody$Outbound; } diff --git a/src/sdk/models/operations/silenceuser.ts b/src/sdk/models/operations/silenceuser.ts index 1cbb829..238a94e 100644 --- a/src/sdk/models/operations/silenceuser.ts +++ b/src/sdk/models/operations/silenceuser.ts @@ -2,284 +2,281 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type SilenceUserRequestBody = { - /** - * Will send an email with this message when present - */ - message?: string | undefined; - postAction?: string | undefined; - reason?: string | undefined; - silencedTill?: string | undefined; + /** + * Will send an email with this message when present + */ + message?: string | undefined; + postAction?: string | undefined; + reason?: string | undefined; + silencedTill?: string | undefined; }; export type SilenceUserRequest = { - requestBody?: SilenceUserRequestBody | undefined; - id: number; + requestBody?: SilenceUserRequestBody | undefined; + id: number; }; export type SilencedBy = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type Silence = { - silenceReason: string; - silenced: boolean; - silencedAt: string; - silencedBy: SilencedBy; - silencedTill: string; + silenceReason: string; + silenced: boolean; + silencedAt: string; + silencedBy: SilencedBy; + silencedTill: string; }; /** * response */ export type SilenceUserResponseBody = { - silence: Silence; + silence: Silence; }; /** @internal */ export const SilenceUserRequestBody$inboundSchema: z.ZodType< - SilenceUserRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - message: z.string().optional(), - post_action: z.string().optional(), - reason: z.string().optional(), - silenced_till: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - post_action: "postAction", - silenced_till: "silencedTill", - }); - }); + SilenceUserRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + post_action: z.string().optional(), + reason: z.string().optional(), + silenced_till: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "post_action": "postAction", + "silenced_till": "silencedTill", + }); +}); /** @internal */ export type SilenceUserRequestBody$Outbound = { - message?: string | undefined; - post_action?: string | undefined; - reason?: string | undefined; - silenced_till?: string | undefined; + message?: string | undefined; + post_action?: string | undefined; + reason?: string | undefined; + silenced_till?: string | undefined; }; /** @internal */ export const SilenceUserRequestBody$outboundSchema: z.ZodType< - SilenceUserRequestBody$Outbound, - z.ZodTypeDef, - SilenceUserRequestBody -> = z - .object({ - message: z.string().optional(), - postAction: z.string().optional(), - reason: z.string().optional(), - silencedTill: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - postAction: "post_action", - silencedTill: "silenced_till", - }); - }); + SilenceUserRequestBody$Outbound, + z.ZodTypeDef, + SilenceUserRequestBody +> = z.object({ + message: z.string().optional(), + postAction: z.string().optional(), + reason: z.string().optional(), + silencedTill: z.string().optional(), +}).transform((v) => { + return remap$(v, { + postAction: "post_action", + silencedTill: "silenced_till", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SilenceUserRequestBody$ { - /** @deprecated use `SilenceUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = SilenceUserRequestBody$inboundSchema; - /** @deprecated use `SilenceUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = SilenceUserRequestBody$outboundSchema; - /** @deprecated use `SilenceUserRequestBody$Outbound` instead. */ - export type Outbound = SilenceUserRequestBody$Outbound; + /** @deprecated use `SilenceUserRequestBody$inboundSchema` instead. */ + export const inboundSchema = SilenceUserRequestBody$inboundSchema; + /** @deprecated use `SilenceUserRequestBody$outboundSchema` instead. */ + export const outboundSchema = SilenceUserRequestBody$outboundSchema; + /** @deprecated use `SilenceUserRequestBody$Outbound` instead. */ + export type Outbound = SilenceUserRequestBody$Outbound; } /** @internal */ export const SilenceUserRequest$inboundSchema: z.ZodType< - SilenceUserRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => SilenceUserRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + SilenceUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => SilenceUserRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type SilenceUserRequest$Outbound = { - RequestBody?: SilenceUserRequestBody$Outbound | undefined; - id: number; + RequestBody?: SilenceUserRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const SilenceUserRequest$outboundSchema: z.ZodType< - SilenceUserRequest$Outbound, - z.ZodTypeDef, - SilenceUserRequest -> = z - .object({ - requestBody: z.lazy(() => SilenceUserRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + SilenceUserRequest$Outbound, + z.ZodTypeDef, + SilenceUserRequest +> = z.object({ + requestBody: z.lazy(() => SilenceUserRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SilenceUserRequest$ { - /** @deprecated use `SilenceUserRequest$inboundSchema` instead. */ - export const inboundSchema = SilenceUserRequest$inboundSchema; - /** @deprecated use `SilenceUserRequest$outboundSchema` instead. */ - export const outboundSchema = SilenceUserRequest$outboundSchema; - /** @deprecated use `SilenceUserRequest$Outbound` instead. */ - export type Outbound = SilenceUserRequest$Outbound; + /** @deprecated use `SilenceUserRequest$inboundSchema` instead. */ + export const inboundSchema = SilenceUserRequest$inboundSchema; + /** @deprecated use `SilenceUserRequest$outboundSchema` instead. */ + export const outboundSchema = SilenceUserRequest$outboundSchema; + /** @deprecated use `SilenceUserRequest$Outbound` instead. */ + export type Outbound = SilenceUserRequest$Outbound; } /** @internal */ -export const SilencedBy$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const SilencedBy$inboundSchema: z.ZodType< + SilencedBy, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type SilencedBy$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ -export const SilencedBy$outboundSchema: z.ZodType = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); +export const SilencedBy$outboundSchema: z.ZodType< + SilencedBy$Outbound, + z.ZodTypeDef, + SilencedBy +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SilencedBy$ { - /** @deprecated use `SilencedBy$inboundSchema` instead. */ - export const inboundSchema = SilencedBy$inboundSchema; - /** @deprecated use `SilencedBy$outboundSchema` instead. */ - export const outboundSchema = SilencedBy$outboundSchema; - /** @deprecated use `SilencedBy$Outbound` instead. */ - export type Outbound = SilencedBy$Outbound; + /** @deprecated use `SilencedBy$inboundSchema` instead. */ + export const inboundSchema = SilencedBy$inboundSchema; + /** @deprecated use `SilencedBy$outboundSchema` instead. */ + export const outboundSchema = SilencedBy$outboundSchema; + /** @deprecated use `SilencedBy$Outbound` instead. */ + export type Outbound = SilencedBy$Outbound; } /** @internal */ -export const Silence$inboundSchema: z.ZodType = z - .object({ - silence_reason: z.string(), - silenced: z.boolean(), - silenced_at: z.string(), - silenced_by: z.lazy(() => SilencedBy$inboundSchema), - silenced_till: z.string(), - }) - .transform((v) => { - return remap$(v, { - silence_reason: "silenceReason", - silenced_at: "silencedAt", - silenced_by: "silencedBy", - silenced_till: "silencedTill", - }); +export const Silence$inboundSchema: z.ZodType = + z.object({ + silence_reason: z.string(), + silenced: z.boolean(), + silenced_at: z.string(), + silenced_by: z.lazy(() => SilencedBy$inboundSchema), + silenced_till: z.string(), + }).transform((v) => { + return remap$(v, { + "silence_reason": "silenceReason", + "silenced_at": "silencedAt", + "silenced_by": "silencedBy", + "silenced_till": "silencedTill", }); + }); /** @internal */ export type Silence$Outbound = { - silence_reason: string; - silenced: boolean; - silenced_at: string; - silenced_by: SilencedBy$Outbound; - silenced_till: string; + silence_reason: string; + silenced: boolean; + silenced_at: string; + silenced_by: SilencedBy$Outbound; + silenced_till: string; }; /** @internal */ -export const Silence$outboundSchema: z.ZodType = z - .object({ - silenceReason: z.string(), - silenced: z.boolean(), - silencedAt: z.string(), - silencedBy: z.lazy(() => SilencedBy$outboundSchema), - silencedTill: z.string(), - }) - .transform((v) => { - return remap$(v, { - silenceReason: "silence_reason", - silencedAt: "silenced_at", - silencedBy: "silenced_by", - silencedTill: "silenced_till", - }); - }); +export const Silence$outboundSchema: z.ZodType< + Silence$Outbound, + z.ZodTypeDef, + Silence +> = z.object({ + silenceReason: z.string(), + silenced: z.boolean(), + silencedAt: z.string(), + silencedBy: z.lazy(() => SilencedBy$outboundSchema), + silencedTill: z.string(), +}).transform((v) => { + return remap$(v, { + silenceReason: "silence_reason", + silencedAt: "silenced_at", + silencedBy: "silenced_by", + silencedTill: "silenced_till", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Silence$ { - /** @deprecated use `Silence$inboundSchema` instead. */ - export const inboundSchema = Silence$inboundSchema; - /** @deprecated use `Silence$outboundSchema` instead. */ - export const outboundSchema = Silence$outboundSchema; - /** @deprecated use `Silence$Outbound` instead. */ - export type Outbound = Silence$Outbound; + /** @deprecated use `Silence$inboundSchema` instead. */ + export const inboundSchema = Silence$inboundSchema; + /** @deprecated use `Silence$outboundSchema` instead. */ + export const outboundSchema = Silence$outboundSchema; + /** @deprecated use `Silence$Outbound` instead. */ + export type Outbound = Silence$Outbound; } /** @internal */ export const SilenceUserResponseBody$inboundSchema: z.ZodType< - SilenceUserResponseBody, - z.ZodTypeDef, - unknown + SilenceUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - silence: z.lazy(() => Silence$inboundSchema), + silence: z.lazy(() => Silence$inboundSchema), }); /** @internal */ export type SilenceUserResponseBody$Outbound = { - silence: Silence$Outbound; + silence: Silence$Outbound; }; /** @internal */ export const SilenceUserResponseBody$outboundSchema: z.ZodType< - SilenceUserResponseBody$Outbound, - z.ZodTypeDef, - SilenceUserResponseBody + SilenceUserResponseBody$Outbound, + z.ZodTypeDef, + SilenceUserResponseBody > = z.object({ - silence: z.lazy(() => Silence$outboundSchema), + silence: z.lazy(() => Silence$outboundSchema), }); /** @@ -287,10 +284,10 @@ export const SilenceUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SilenceUserResponseBody$ { - /** @deprecated use `SilenceUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = SilenceUserResponseBody$inboundSchema; - /** @deprecated use `SilenceUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = SilenceUserResponseBody$outboundSchema; - /** @deprecated use `SilenceUserResponseBody$Outbound` instead. */ - export type Outbound = SilenceUserResponseBody$Outbound; + /** @deprecated use `SilenceUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = SilenceUserResponseBody$inboundSchema; + /** @deprecated use `SilenceUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = SilenceUserResponseBody$outboundSchema; + /** @deprecated use `SilenceUserResponseBody$Outbound` instead. */ + export type Outbound = SilenceUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/suspenduser.ts b/src/sdk/models/operations/suspenduser.ts index a0ca49f..cc29d1b 100644 --- a/src/sdk/models/operations/suspenduser.ts +++ b/src/sdk/models/operations/suspenduser.ts @@ -2,290 +2,286 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type SuspendUserRequestBody = { - /** - * Will send an email with this message when present - */ - message?: string | undefined; - postAction?: string | undefined; - reason: string; - suspendUntil: string; + /** + * Will send an email with this message when present + */ + message?: string | undefined; + postAction?: string | undefined; + reason: string; + suspendUntil: string; }; export type SuspendUserRequest = { - requestBody?: SuspendUserRequestBody | undefined; - id: number; + requestBody?: SuspendUserRequestBody | undefined; + id: number; }; export type SuspendedBy = { - avatarTemplate: string; - id: number; - name: string; - username: string; + avatarTemplate: string; + id: number; + name: string; + username: string; }; export type Suspension = { - fullSuspendReason: string; - suspendReason: string; - suspendedAt: string; - suspendedBy: SuspendedBy; - suspendedTill: string; + fullSuspendReason: string; + suspendReason: string; + suspendedAt: string; + suspendedBy: SuspendedBy; + suspendedTill: string; }; /** * response */ export type SuspendUserResponseBody = { - suspension: Suspension; + suspension: Suspension; }; /** @internal */ export const SuspendUserRequestBody$inboundSchema: z.ZodType< - SuspendUserRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - message: z.string().optional(), - post_action: z.string().optional(), - reason: z.string(), - suspend_until: z.string(), - }) - .transform((v) => { - return remap$(v, { - post_action: "postAction", - suspend_until: "suspendUntil", - }); - }); + SuspendUserRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.string().optional(), + post_action: z.string().optional(), + reason: z.string(), + suspend_until: z.string(), +}).transform((v) => { + return remap$(v, { + "post_action": "postAction", + "suspend_until": "suspendUntil", + }); +}); /** @internal */ export type SuspendUserRequestBody$Outbound = { - message?: string | undefined; - post_action?: string | undefined; - reason: string; - suspend_until: string; + message?: string | undefined; + post_action?: string | undefined; + reason: string; + suspend_until: string; }; /** @internal */ export const SuspendUserRequestBody$outboundSchema: z.ZodType< - SuspendUserRequestBody$Outbound, - z.ZodTypeDef, - SuspendUserRequestBody -> = z - .object({ - message: z.string().optional(), - postAction: z.string().optional(), - reason: z.string(), - suspendUntil: z.string(), - }) - .transform((v) => { - return remap$(v, { - postAction: "post_action", - suspendUntil: "suspend_until", - }); - }); + SuspendUserRequestBody$Outbound, + z.ZodTypeDef, + SuspendUserRequestBody +> = z.object({ + message: z.string().optional(), + postAction: z.string().optional(), + reason: z.string(), + suspendUntil: z.string(), +}).transform((v) => { + return remap$(v, { + postAction: "post_action", + suspendUntil: "suspend_until", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuspendUserRequestBody$ { - /** @deprecated use `SuspendUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = SuspendUserRequestBody$inboundSchema; - /** @deprecated use `SuspendUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = SuspendUserRequestBody$outboundSchema; - /** @deprecated use `SuspendUserRequestBody$Outbound` instead. */ - export type Outbound = SuspendUserRequestBody$Outbound; + /** @deprecated use `SuspendUserRequestBody$inboundSchema` instead. */ + export const inboundSchema = SuspendUserRequestBody$inboundSchema; + /** @deprecated use `SuspendUserRequestBody$outboundSchema` instead. */ + export const outboundSchema = SuspendUserRequestBody$outboundSchema; + /** @deprecated use `SuspendUserRequestBody$Outbound` instead. */ + export type Outbound = SuspendUserRequestBody$Outbound; } /** @internal */ export const SuspendUserRequest$inboundSchema: z.ZodType< - SuspendUserRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => SuspendUserRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + SuspendUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => SuspendUserRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type SuspendUserRequest$Outbound = { - RequestBody?: SuspendUserRequestBody$Outbound | undefined; - id: number; + RequestBody?: SuspendUserRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const SuspendUserRequest$outboundSchema: z.ZodType< - SuspendUserRequest$Outbound, - z.ZodTypeDef, - SuspendUserRequest -> = z - .object({ - requestBody: z.lazy(() => SuspendUserRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + SuspendUserRequest$Outbound, + z.ZodTypeDef, + SuspendUserRequest +> = z.object({ + requestBody: z.lazy(() => SuspendUserRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuspendUserRequest$ { - /** @deprecated use `SuspendUserRequest$inboundSchema` instead. */ - export const inboundSchema = SuspendUserRequest$inboundSchema; - /** @deprecated use `SuspendUserRequest$outboundSchema` instead. */ - export const outboundSchema = SuspendUserRequest$outboundSchema; - /** @deprecated use `SuspendUserRequest$Outbound` instead. */ - export type Outbound = SuspendUserRequest$Outbound; + /** @deprecated use `SuspendUserRequest$inboundSchema` instead. */ + export const inboundSchema = SuspendUserRequest$inboundSchema; + /** @deprecated use `SuspendUserRequest$outboundSchema` instead. */ + export const outboundSchema = SuspendUserRequest$outboundSchema; + /** @deprecated use `SuspendUserRequest$Outbound` instead. */ + export type Outbound = SuspendUserRequest$Outbound; } /** @internal */ -export const SuspendedBy$inboundSchema: z.ZodType = z - .object({ - avatar_template: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatar_template: "avatarTemplate", - }); - }); +export const SuspendedBy$inboundSchema: z.ZodType< + SuspendedBy, + z.ZodTypeDef, + unknown +> = z.object({ + avatar_template: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "avatar_template": "avatarTemplate", + }); +}); /** @internal */ export type SuspendedBy$Outbound = { - avatar_template: string; - id: number; - name: string; - username: string; + avatar_template: string; + id: number; + name: string; + username: string; }; /** @internal */ export const SuspendedBy$outboundSchema: z.ZodType< - SuspendedBy$Outbound, - z.ZodTypeDef, - SuspendedBy -> = z - .object({ - avatarTemplate: z.string(), - id: z.number().int(), - name: z.string(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - avatarTemplate: "avatar_template", - }); - }); + SuspendedBy$Outbound, + z.ZodTypeDef, + SuspendedBy +> = z.object({ + avatarTemplate: z.string(), + id: z.number().int(), + name: z.string(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + avatarTemplate: "avatar_template", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuspendedBy$ { - /** @deprecated use `SuspendedBy$inboundSchema` instead. */ - export const inboundSchema = SuspendedBy$inboundSchema; - /** @deprecated use `SuspendedBy$outboundSchema` instead. */ - export const outboundSchema = SuspendedBy$outboundSchema; - /** @deprecated use `SuspendedBy$Outbound` instead. */ - export type Outbound = SuspendedBy$Outbound; + /** @deprecated use `SuspendedBy$inboundSchema` instead. */ + export const inboundSchema = SuspendedBy$inboundSchema; + /** @deprecated use `SuspendedBy$outboundSchema` instead. */ + export const outboundSchema = SuspendedBy$outboundSchema; + /** @deprecated use `SuspendedBy$Outbound` instead. */ + export type Outbound = SuspendedBy$Outbound; } /** @internal */ -export const Suspension$inboundSchema: z.ZodType = z - .object({ - full_suspend_reason: z.string(), - suspend_reason: z.string(), - suspended_at: z.string(), - suspended_by: z.lazy(() => SuspendedBy$inboundSchema), - suspended_till: z.string(), - }) - .transform((v) => { - return remap$(v, { - full_suspend_reason: "fullSuspendReason", - suspend_reason: "suspendReason", - suspended_at: "suspendedAt", - suspended_by: "suspendedBy", - suspended_till: "suspendedTill", - }); - }); +export const Suspension$inboundSchema: z.ZodType< + Suspension, + z.ZodTypeDef, + unknown +> = z.object({ + full_suspend_reason: z.string(), + suspend_reason: z.string(), + suspended_at: z.string(), + suspended_by: z.lazy(() => SuspendedBy$inboundSchema), + suspended_till: z.string(), +}).transform((v) => { + return remap$(v, { + "full_suspend_reason": "fullSuspendReason", + "suspend_reason": "suspendReason", + "suspended_at": "suspendedAt", + "suspended_by": "suspendedBy", + "suspended_till": "suspendedTill", + }); +}); /** @internal */ export type Suspension$Outbound = { - full_suspend_reason: string; - suspend_reason: string; - suspended_at: string; - suspended_by: SuspendedBy$Outbound; - suspended_till: string; + full_suspend_reason: string; + suspend_reason: string; + suspended_at: string; + suspended_by: SuspendedBy$Outbound; + suspended_till: string; }; /** @internal */ -export const Suspension$outboundSchema: z.ZodType = z - .object({ - fullSuspendReason: z.string(), - suspendReason: z.string(), - suspendedAt: z.string(), - suspendedBy: z.lazy(() => SuspendedBy$outboundSchema), - suspendedTill: z.string(), - }) - .transform((v) => { - return remap$(v, { - fullSuspendReason: "full_suspend_reason", - suspendReason: "suspend_reason", - suspendedAt: "suspended_at", - suspendedBy: "suspended_by", - suspendedTill: "suspended_till", - }); - }); +export const Suspension$outboundSchema: z.ZodType< + Suspension$Outbound, + z.ZodTypeDef, + Suspension +> = z.object({ + fullSuspendReason: z.string(), + suspendReason: z.string(), + suspendedAt: z.string(), + suspendedBy: z.lazy(() => SuspendedBy$outboundSchema), + suspendedTill: z.string(), +}).transform((v) => { + return remap$(v, { + fullSuspendReason: "full_suspend_reason", + suspendReason: "suspend_reason", + suspendedAt: "suspended_at", + suspendedBy: "suspended_by", + suspendedTill: "suspended_till", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Suspension$ { - /** @deprecated use `Suspension$inboundSchema` instead. */ - export const inboundSchema = Suspension$inboundSchema; - /** @deprecated use `Suspension$outboundSchema` instead. */ - export const outboundSchema = Suspension$outboundSchema; - /** @deprecated use `Suspension$Outbound` instead. */ - export type Outbound = Suspension$Outbound; + /** @deprecated use `Suspension$inboundSchema` instead. */ + export const inboundSchema = Suspension$inboundSchema; + /** @deprecated use `Suspension$outboundSchema` instead. */ + export const outboundSchema = Suspension$outboundSchema; + /** @deprecated use `Suspension$Outbound` instead. */ + export type Outbound = Suspension$Outbound; } /** @internal */ export const SuspendUserResponseBody$inboundSchema: z.ZodType< - SuspendUserResponseBody, - z.ZodTypeDef, - unknown + SuspendUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - suspension: z.lazy(() => Suspension$inboundSchema), + suspension: z.lazy(() => Suspension$inboundSchema), }); /** @internal */ export type SuspendUserResponseBody$Outbound = { - suspension: Suspension$Outbound; + suspension: Suspension$Outbound; }; /** @internal */ export const SuspendUserResponseBody$outboundSchema: z.ZodType< - SuspendUserResponseBody$Outbound, - z.ZodTypeDef, - SuspendUserResponseBody + SuspendUserResponseBody$Outbound, + z.ZodTypeDef, + SuspendUserResponseBody > = z.object({ - suspension: z.lazy(() => Suspension$outboundSchema), + suspension: z.lazy(() => Suspension$outboundSchema), }); /** @@ -293,10 +289,10 @@ export const SuspendUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuspendUserResponseBody$ { - /** @deprecated use `SuspendUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = SuspendUserResponseBody$inboundSchema; - /** @deprecated use `SuspendUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = SuspendUserResponseBody$outboundSchema; - /** @deprecated use `SuspendUserResponseBody$Outbound` instead. */ - export type Outbound = SuspendUserResponseBody$Outbound; + /** @deprecated use `SuspendUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = SuspendUserResponseBody$inboundSchema; + /** @deprecated use `SuspendUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = SuspendUserResponseBody$outboundSchema; + /** @deprecated use `SuspendUserResponseBody$Outbound` instead. */ + export type Outbound = SuspendUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updateavatar.ts b/src/sdk/models/operations/updateavatar.ts index 9886079..6874241 100644 --- a/src/sdk/models/operations/updateavatar.ts +++ b/src/sdk/models/operations/updateavatar.ts @@ -2,177 +2,171 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const UpdateAvatarType = { - Uploaded: "uploaded", - Custom: "custom", - Gravatar: "gravatar", - System: "system", + Uploaded: "uploaded", + Custom: "custom", + Gravatar: "gravatar", + System: "system", } as const; export type UpdateAvatarType = ClosedEnum; export type UpdateAvatarRequestBody = { - type: UpdateAvatarType; - uploadId: number; + type: UpdateAvatarType; + uploadId: number; }; export type UpdateAvatarRequest = { - requestBody?: UpdateAvatarRequestBody | undefined; - username: string; + requestBody?: UpdateAvatarRequestBody | undefined; + username: string; }; /** * avatar updated */ export type UpdateAvatarResponseBody = { - success: string; + success: string; }; /** @internal */ -export const UpdateAvatarType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(UpdateAvatarType); +export const UpdateAvatarType$inboundSchema: z.ZodNativeEnum< + typeof UpdateAvatarType +> = z.nativeEnum(UpdateAvatarType); /** @internal */ -export const UpdateAvatarType$outboundSchema: z.ZodNativeEnum = - UpdateAvatarType$inboundSchema; +export const UpdateAvatarType$outboundSchema: z.ZodNativeEnum< + typeof UpdateAvatarType +> = UpdateAvatarType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateAvatarType$ { - /** @deprecated use `UpdateAvatarType$inboundSchema` instead. */ - export const inboundSchema = UpdateAvatarType$inboundSchema; - /** @deprecated use `UpdateAvatarType$outboundSchema` instead. */ - export const outboundSchema = UpdateAvatarType$outboundSchema; + /** @deprecated use `UpdateAvatarType$inboundSchema` instead. */ + export const inboundSchema = UpdateAvatarType$inboundSchema; + /** @deprecated use `UpdateAvatarType$outboundSchema` instead. */ + export const outboundSchema = UpdateAvatarType$outboundSchema; } /** @internal */ export const UpdateAvatarRequestBody$inboundSchema: z.ZodType< - UpdateAvatarRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - type: UpdateAvatarType$inboundSchema, - upload_id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - upload_id: "uploadId", - }); - }); + UpdateAvatarRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + type: UpdateAvatarType$inboundSchema, + upload_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "upload_id": "uploadId", + }); +}); /** @internal */ export type UpdateAvatarRequestBody$Outbound = { - type: string; - upload_id: number; + type: string; + upload_id: number; }; /** @internal */ export const UpdateAvatarRequestBody$outboundSchema: z.ZodType< - UpdateAvatarRequestBody$Outbound, - z.ZodTypeDef, - UpdateAvatarRequestBody -> = z - .object({ - type: UpdateAvatarType$outboundSchema, - uploadId: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - uploadId: "upload_id", - }); - }); + UpdateAvatarRequestBody$Outbound, + z.ZodTypeDef, + UpdateAvatarRequestBody +> = z.object({ + type: UpdateAvatarType$outboundSchema, + uploadId: z.number().int(), +}).transform((v) => { + return remap$(v, { + uploadId: "upload_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateAvatarRequestBody$ { - /** @deprecated use `UpdateAvatarRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateAvatarRequestBody$inboundSchema; - /** @deprecated use `UpdateAvatarRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateAvatarRequestBody$outboundSchema; - /** @deprecated use `UpdateAvatarRequestBody$Outbound` instead. */ - export type Outbound = UpdateAvatarRequestBody$Outbound; + /** @deprecated use `UpdateAvatarRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateAvatarRequestBody$inboundSchema; + /** @deprecated use `UpdateAvatarRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateAvatarRequestBody$outboundSchema; + /** @deprecated use `UpdateAvatarRequestBody$Outbound` instead. */ + export type Outbound = UpdateAvatarRequestBody$Outbound; } /** @internal */ export const UpdateAvatarRequest$inboundSchema: z.ZodType< - UpdateAvatarRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateAvatarRequestBody$inboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateAvatarRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateAvatarRequestBody$inboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateAvatarRequest$Outbound = { - RequestBody?: UpdateAvatarRequestBody$Outbound | undefined; - username: string; + RequestBody?: UpdateAvatarRequestBody$Outbound | undefined; + username: string; }; /** @internal */ export const UpdateAvatarRequest$outboundSchema: z.ZodType< - UpdateAvatarRequest$Outbound, - z.ZodTypeDef, - UpdateAvatarRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateAvatarRequestBody$outboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateAvatarRequest$Outbound, + z.ZodTypeDef, + UpdateAvatarRequest +> = z.object({ + requestBody: z.lazy(() => UpdateAvatarRequestBody$outboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateAvatarRequest$ { - /** @deprecated use `UpdateAvatarRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateAvatarRequest$inboundSchema; - /** @deprecated use `UpdateAvatarRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateAvatarRequest$outboundSchema; - /** @deprecated use `UpdateAvatarRequest$Outbound` instead. */ - export type Outbound = UpdateAvatarRequest$Outbound; + /** @deprecated use `UpdateAvatarRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateAvatarRequest$inboundSchema; + /** @deprecated use `UpdateAvatarRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateAvatarRequest$outboundSchema; + /** @deprecated use `UpdateAvatarRequest$Outbound` instead. */ + export type Outbound = UpdateAvatarRequest$Outbound; } /** @internal */ export const UpdateAvatarResponseBody$inboundSchema: z.ZodType< - UpdateAvatarResponseBody, - z.ZodTypeDef, - unknown + UpdateAvatarResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), + success: z.string(), }); /** @internal */ export type UpdateAvatarResponseBody$Outbound = { - success: string; + success: string; }; /** @internal */ export const UpdateAvatarResponseBody$outboundSchema: z.ZodType< - UpdateAvatarResponseBody$Outbound, - z.ZodTypeDef, - UpdateAvatarResponseBody + UpdateAvatarResponseBody$Outbound, + z.ZodTypeDef, + UpdateAvatarResponseBody > = z.object({ - success: z.string(), + success: z.string(), }); /** @@ -180,10 +174,10 @@ export const UpdateAvatarResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateAvatarResponseBody$ { - /** @deprecated use `UpdateAvatarResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateAvatarResponseBody$inboundSchema; - /** @deprecated use `UpdateAvatarResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateAvatarResponseBody$outboundSchema; - /** @deprecated use `UpdateAvatarResponseBody$Outbound` instead. */ - export type Outbound = UpdateAvatarResponseBody$Outbound; + /** @deprecated use `UpdateAvatarResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateAvatarResponseBody$inboundSchema; + /** @deprecated use `UpdateAvatarResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateAvatarResponseBody$outboundSchema; + /** @deprecated use `UpdateAvatarResponseBody$Outbound` instead. */ + export type Outbound = UpdateAvatarResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatebadge.ts b/src/sdk/models/operations/updatebadge.ts index c3b61c3..4ca246b 100644 --- a/src/sdk/models/operations/updatebadge.ts +++ b/src/sdk/models/operations/updatebadge.ts @@ -2,390 +2,374 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateBadgeRequestBody = { - /** - * The ID for the badge type. 1 for Gold, 2 for Silver, 3 for Bronze. - */ - badgeTypeId: number; - /** - * The name for the new badge. - */ - name: string; + /** + * The ID for the badge type. 1 for Gold, 2 for Silver, 3 for Bronze. + */ + badgeTypeId: number; + /** + * The name for the new badge. + */ + name: string; }; export type UpdateBadgeRequest = { - requestBody?: UpdateBadgeRequestBody | undefined; - id: number; + requestBody?: UpdateBadgeRequestBody | undefined; + id: number; }; export type UpdateBadgeBadge = { - allowTitle: boolean; - autoRevoke: boolean; - badgeGroupingId: number; - badgeTypeId: number; - description: string; - enabled: boolean; - grantCount: number; - icon: string; - id: number; - imageUrl: string | null; - listable: boolean; - longDescription: string; - manuallyGrantable: boolean; - multipleGrant: boolean; - name: string; - query: string | null; - showPosts: boolean; - slug: string; - system: boolean; - targetPosts: boolean; - trigger: string | null; + allowTitle: boolean; + autoRevoke: boolean; + badgeGroupingId: number; + badgeTypeId: number; + description: string; + enabled: boolean; + grantCount: number; + icon: string; + id: number; + imageUrl: string | null; + listable: boolean; + longDescription: string; + manuallyGrantable: boolean; + multipleGrant: boolean; + name: string; + query: string | null; + showPosts: boolean; + slug: string; + system: boolean; + targetPosts: boolean; + trigger: string | null; }; export type UpdateBadgeBadgeTypes = { - id: number; - name: string; - sortOrder: number; + id: number; + name: string; + sortOrder: number; }; /** * success response */ export type UpdateBadgeResponseBody = { - badge: UpdateBadgeBadge; - badgeTypes: Array; + badge: UpdateBadgeBadge; + badgeTypes: Array; }; /** @internal */ export const UpdateBadgeRequestBody$inboundSchema: z.ZodType< - UpdateBadgeRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - badge_type_id: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - badge_type_id: "badgeTypeId", - }); - }); + UpdateBadgeRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + badge_type_id: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "badge_type_id": "badgeTypeId", + }); +}); /** @internal */ export type UpdateBadgeRequestBody$Outbound = { - badge_type_id: number; - name: string; + badge_type_id: number; + name: string; }; /** @internal */ export const UpdateBadgeRequestBody$outboundSchema: z.ZodType< - UpdateBadgeRequestBody$Outbound, - z.ZodTypeDef, - UpdateBadgeRequestBody -> = z - .object({ - badgeTypeId: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - badgeTypeId: "badge_type_id", - }); - }); + UpdateBadgeRequestBody$Outbound, + z.ZodTypeDef, + UpdateBadgeRequestBody +> = z.object({ + badgeTypeId: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + badgeTypeId: "badge_type_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeRequestBody$ { - /** @deprecated use `UpdateBadgeRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateBadgeRequestBody$inboundSchema; - /** @deprecated use `UpdateBadgeRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateBadgeRequestBody$outboundSchema; - /** @deprecated use `UpdateBadgeRequestBody$Outbound` instead. */ - export type Outbound = UpdateBadgeRequestBody$Outbound; + /** @deprecated use `UpdateBadgeRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateBadgeRequestBody$inboundSchema; + /** @deprecated use `UpdateBadgeRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateBadgeRequestBody$outboundSchema; + /** @deprecated use `UpdateBadgeRequestBody$Outbound` instead. */ + export type Outbound = UpdateBadgeRequestBody$Outbound; } /** @internal */ export const UpdateBadgeRequest$inboundSchema: z.ZodType< - UpdateBadgeRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateBadgeRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateBadgeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateBadgeRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateBadgeRequest$Outbound = { - RequestBody?: UpdateBadgeRequestBody$Outbound | undefined; - id: number; + RequestBody?: UpdateBadgeRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const UpdateBadgeRequest$outboundSchema: z.ZodType< - UpdateBadgeRequest$Outbound, - z.ZodTypeDef, - UpdateBadgeRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateBadgeRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateBadgeRequest$Outbound, + z.ZodTypeDef, + UpdateBadgeRequest +> = z.object({ + requestBody: z.lazy(() => UpdateBadgeRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeRequest$ { - /** @deprecated use `UpdateBadgeRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateBadgeRequest$inboundSchema; - /** @deprecated use `UpdateBadgeRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateBadgeRequest$outboundSchema; - /** @deprecated use `UpdateBadgeRequest$Outbound` instead. */ - export type Outbound = UpdateBadgeRequest$Outbound; + /** @deprecated use `UpdateBadgeRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateBadgeRequest$inboundSchema; + /** @deprecated use `UpdateBadgeRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateBadgeRequest$outboundSchema; + /** @deprecated use `UpdateBadgeRequest$Outbound` instead. */ + export type Outbound = UpdateBadgeRequest$Outbound; } /** @internal */ -export const UpdateBadgeBadge$inboundSchema: z.ZodType = z - .object({ - allow_title: z.boolean(), - auto_revoke: z.boolean(), - badge_grouping_id: z.number().int(), - badge_type_id: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grant_count: z.number().int(), - icon: z.string(), - id: z.number().int(), - image_url: z.nullable(z.string()), - listable: z.boolean(), - long_description: z.string(), - manually_grantable: z.boolean(), - multiple_grant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - show_posts: z.boolean(), - slug: z.string(), - system: z.boolean(), - target_posts: z.boolean(), - trigger: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allow_title: "allowTitle", - auto_revoke: "autoRevoke", - badge_grouping_id: "badgeGroupingId", - badge_type_id: "badgeTypeId", - grant_count: "grantCount", - image_url: "imageUrl", - long_description: "longDescription", - manually_grantable: "manuallyGrantable", - multiple_grant: "multipleGrant", - show_posts: "showPosts", - target_posts: "targetPosts", - }); - }); +export const UpdateBadgeBadge$inboundSchema: z.ZodType< + UpdateBadgeBadge, + z.ZodTypeDef, + unknown +> = z.object({ + allow_title: z.boolean(), + auto_revoke: z.boolean(), + badge_grouping_id: z.number().int(), + badge_type_id: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grant_count: z.number().int(), + icon: z.string(), + id: z.number().int(), + image_url: z.nullable(z.string()), + listable: z.boolean(), + long_description: z.string(), + manually_grantable: z.boolean(), + multiple_grant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + show_posts: z.boolean(), + slug: z.string(), + system: z.boolean(), + target_posts: z.boolean(), + trigger: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "allow_title": "allowTitle", + "auto_revoke": "autoRevoke", + "badge_grouping_id": "badgeGroupingId", + "badge_type_id": "badgeTypeId", + "grant_count": "grantCount", + "image_url": "imageUrl", + "long_description": "longDescription", + "manually_grantable": "manuallyGrantable", + "multiple_grant": "multipleGrant", + "show_posts": "showPosts", + "target_posts": "targetPosts", + }); +}); /** @internal */ export type UpdateBadgeBadge$Outbound = { - allow_title: boolean; - auto_revoke: boolean; - badge_grouping_id: number; - badge_type_id: number; - description: string; - enabled: boolean; - grant_count: number; - icon: string; - id: number; - image_url: string | null; - listable: boolean; - long_description: string; - manually_grantable: boolean; - multiple_grant: boolean; - name: string; - query: string | null; - show_posts: boolean; - slug: string; - system: boolean; - target_posts: boolean; - trigger: string | null; + allow_title: boolean; + auto_revoke: boolean; + badge_grouping_id: number; + badge_type_id: number; + description: string; + enabled: boolean; + grant_count: number; + icon: string; + id: number; + image_url: string | null; + listable: boolean; + long_description: string; + manually_grantable: boolean; + multiple_grant: boolean; + name: string; + query: string | null; + show_posts: boolean; + slug: string; + system: boolean; + target_posts: boolean; + trigger: string | null; }; /** @internal */ export const UpdateBadgeBadge$outboundSchema: z.ZodType< - UpdateBadgeBadge$Outbound, - z.ZodTypeDef, - UpdateBadgeBadge -> = z - .object({ - allowTitle: z.boolean(), - autoRevoke: z.boolean(), - badgeGroupingId: z.number().int(), - badgeTypeId: z.number().int(), - description: z.string(), - enabled: z.boolean(), - grantCount: z.number().int(), - icon: z.string(), - id: z.number().int(), - imageUrl: z.nullable(z.string()), - listable: z.boolean(), - longDescription: z.string(), - manuallyGrantable: z.boolean(), - multipleGrant: z.boolean(), - name: z.string(), - query: z.nullable(z.string()), - showPosts: z.boolean(), - slug: z.string(), - system: z.boolean(), - targetPosts: z.boolean(), - trigger: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allowTitle: "allow_title", - autoRevoke: "auto_revoke", - badgeGroupingId: "badge_grouping_id", - badgeTypeId: "badge_type_id", - grantCount: "grant_count", - imageUrl: "image_url", - longDescription: "long_description", - manuallyGrantable: "manually_grantable", - multipleGrant: "multiple_grant", - showPosts: "show_posts", - targetPosts: "target_posts", - }); - }); + UpdateBadgeBadge$Outbound, + z.ZodTypeDef, + UpdateBadgeBadge +> = z.object({ + allowTitle: z.boolean(), + autoRevoke: z.boolean(), + badgeGroupingId: z.number().int(), + badgeTypeId: z.number().int(), + description: z.string(), + enabled: z.boolean(), + grantCount: z.number().int(), + icon: z.string(), + id: z.number().int(), + imageUrl: z.nullable(z.string()), + listable: z.boolean(), + longDescription: z.string(), + manuallyGrantable: z.boolean(), + multipleGrant: z.boolean(), + name: z.string(), + query: z.nullable(z.string()), + showPosts: z.boolean(), + slug: z.string(), + system: z.boolean(), + targetPosts: z.boolean(), + trigger: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allowTitle: "allow_title", + autoRevoke: "auto_revoke", + badgeGroupingId: "badge_grouping_id", + badgeTypeId: "badge_type_id", + grantCount: "grant_count", + imageUrl: "image_url", + longDescription: "long_description", + manuallyGrantable: "manually_grantable", + multipleGrant: "multiple_grant", + showPosts: "show_posts", + targetPosts: "target_posts", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeBadge$ { - /** @deprecated use `UpdateBadgeBadge$inboundSchema` instead. */ - export const inboundSchema = UpdateBadgeBadge$inboundSchema; - /** @deprecated use `UpdateBadgeBadge$outboundSchema` instead. */ - export const outboundSchema = UpdateBadgeBadge$outboundSchema; - /** @deprecated use `UpdateBadgeBadge$Outbound` instead. */ - export type Outbound = UpdateBadgeBadge$Outbound; + /** @deprecated use `UpdateBadgeBadge$inboundSchema` instead. */ + export const inboundSchema = UpdateBadgeBadge$inboundSchema; + /** @deprecated use `UpdateBadgeBadge$outboundSchema` instead. */ + export const outboundSchema = UpdateBadgeBadge$outboundSchema; + /** @deprecated use `UpdateBadgeBadge$Outbound` instead. */ + export type Outbound = UpdateBadgeBadge$Outbound; } /** @internal */ export const UpdateBadgeBadgeTypes$inboundSchema: z.ZodType< - UpdateBadgeBadgeTypes, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int(), - name: z.string(), - sort_order: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sort_order: "sortOrder", - }); - }); + UpdateBadgeBadgeTypes, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + name: z.string(), + sort_order: z.number().int(), +}).transform((v) => { + return remap$(v, { + "sort_order": "sortOrder", + }); +}); /** @internal */ export type UpdateBadgeBadgeTypes$Outbound = { - id: number; - name: string; - sort_order: number; + id: number; + name: string; + sort_order: number; }; /** @internal */ export const UpdateBadgeBadgeTypes$outboundSchema: z.ZodType< - UpdateBadgeBadgeTypes$Outbound, - z.ZodTypeDef, - UpdateBadgeBadgeTypes -> = z - .object({ - id: z.number().int(), - name: z.string(), - sortOrder: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - sortOrder: "sort_order", - }); - }); + UpdateBadgeBadgeTypes$Outbound, + z.ZodTypeDef, + UpdateBadgeBadgeTypes +> = z.object({ + id: z.number().int(), + name: z.string(), + sortOrder: z.number().int(), +}).transform((v) => { + return remap$(v, { + sortOrder: "sort_order", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeBadgeTypes$ { - /** @deprecated use `UpdateBadgeBadgeTypes$inboundSchema` instead. */ - export const inboundSchema = UpdateBadgeBadgeTypes$inboundSchema; - /** @deprecated use `UpdateBadgeBadgeTypes$outboundSchema` instead. */ - export const outboundSchema = UpdateBadgeBadgeTypes$outboundSchema; - /** @deprecated use `UpdateBadgeBadgeTypes$Outbound` instead. */ - export type Outbound = UpdateBadgeBadgeTypes$Outbound; + /** @deprecated use `UpdateBadgeBadgeTypes$inboundSchema` instead. */ + export const inboundSchema = UpdateBadgeBadgeTypes$inboundSchema; + /** @deprecated use `UpdateBadgeBadgeTypes$outboundSchema` instead. */ + export const outboundSchema = UpdateBadgeBadgeTypes$outboundSchema; + /** @deprecated use `UpdateBadgeBadgeTypes$Outbound` instead. */ + export type Outbound = UpdateBadgeBadgeTypes$Outbound; } /** @internal */ export const UpdateBadgeResponseBody$inboundSchema: z.ZodType< - UpdateBadgeResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - badge: z.lazy(() => UpdateBadgeBadge$inboundSchema), - badge_types: z.array(z.lazy(() => UpdateBadgeBadgeTypes$inboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badge_types: "badgeTypes", - }); - }); + UpdateBadgeResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + badge: z.lazy(() => UpdateBadgeBadge$inboundSchema), + badge_types: z.array(z.lazy(() => UpdateBadgeBadgeTypes$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "badge_types": "badgeTypes", + }); +}); /** @internal */ export type UpdateBadgeResponseBody$Outbound = { - badge: UpdateBadgeBadge$Outbound; - badge_types: Array; + badge: UpdateBadgeBadge$Outbound; + badge_types: Array; }; /** @internal */ export const UpdateBadgeResponseBody$outboundSchema: z.ZodType< - UpdateBadgeResponseBody$Outbound, - z.ZodTypeDef, - UpdateBadgeResponseBody -> = z - .object({ - badge: z.lazy(() => UpdateBadgeBadge$outboundSchema), - badgeTypes: z.array(z.lazy(() => UpdateBadgeBadgeTypes$outboundSchema)), - }) - .transform((v) => { - return remap$(v, { - badgeTypes: "badge_types", - }); - }); + UpdateBadgeResponseBody$Outbound, + z.ZodTypeDef, + UpdateBadgeResponseBody +> = z.object({ + badge: z.lazy(() => UpdateBadgeBadge$outboundSchema), + badgeTypes: z.array(z.lazy(() => UpdateBadgeBadgeTypes$outboundSchema)), +}).transform((v) => { + return remap$(v, { + badgeTypes: "badge_types", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeResponseBody$ { - /** @deprecated use `UpdateBadgeResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateBadgeResponseBody$inboundSchema; - /** @deprecated use `UpdateBadgeResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateBadgeResponseBody$outboundSchema; - /** @deprecated use `UpdateBadgeResponseBody$Outbound` instead. */ - export type Outbound = UpdateBadgeResponseBody$Outbound; + /** @deprecated use `UpdateBadgeResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateBadgeResponseBody$inboundSchema; + /** @deprecated use `UpdateBadgeResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateBadgeResponseBody$outboundSchema; + /** @deprecated use `UpdateBadgeResponseBody$Outbound` instead. */ + export type Outbound = UpdateBadgeResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatecategory.ts b/src/sdk/models/operations/updatecategory.ts index dd71810..67ab867 100644 --- a/src/sdk/models/operations/updatecategory.ts +++ b/src/sdk/models/operations/updatecategory.ts @@ -2,308 +2,298 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../../lib/schemas.js"; -import * as z from "zod"; export type UpdateCategoryPermissions = { - everyone?: number | undefined; - staff?: number | undefined; - additionalProperties: { [k: string]: any }; + everyone?: number | undefined; + staff?: number | undefined; + additionalProperties: { [k: string]: any }; }; export type UpdateCategoryRequestBody = { - allowBadges?: boolean | undefined; - color?: string | undefined; - formTemplateIds?: Array | undefined; - name: string; - parentCategoryId?: number | undefined; - permissions?: UpdateCategoryPermissions | undefined; - searchPriority?: number | undefined; - slug?: string | undefined; - textColor?: string | undefined; - topicFeaturedLinksAllowed?: boolean | undefined; + allowBadges?: boolean | undefined; + color?: string | undefined; + formTemplateIds?: Array | undefined; + name: string; + parentCategoryId?: number | undefined; + permissions?: UpdateCategoryPermissions | undefined; + searchPriority?: number | undefined; + slug?: string | undefined; + textColor?: string | undefined; + topicFeaturedLinksAllowed?: boolean | undefined; }; export type UpdateCategoryRequest = { - requestBody?: UpdateCategoryRequestBody | undefined; - id: number; + requestBody?: UpdateCategoryRequestBody | undefined; + id: number; }; export type UpdateCategoryCustomFields = {}; export type UpdateCategoryGroupPermissions = { - groupName: string; - permissionType: number; + groupName: string; + permissionType: number; }; export type UpdateCategoryRequiredTagGroups = { - minCount: number; - name: string; + minCount: number; + name: string; }; export type UpdateCategoryCategory = { - allTopicsWiki: boolean; - allowBadges: boolean; - allowGlobalTags?: boolean | undefined; - allowUnlimitedOwnerEditsOnFirstPost: boolean; - allowedTagGroups?: Array | undefined; - allowedTags?: Array | undefined; - autoCloseBasedOnLastPost: boolean; - autoCloseHours: string | null; - availableGroups: Array; - canDelete: boolean; - canEdit: boolean; - categorySetting?: any | undefined; - color: string; - customFields: UpdateCategoryCustomFields; - defaultListFilter: string; - defaultSlowModeSeconds: string | null; - defaultTopPeriod: string; - defaultView: string | null; - description: string | null; - descriptionExcerpt: string | null; - descriptionText: string | null; - emailIn: string | null; - emailInAllowStrangers: boolean; - formTemplateIds: Array; - groupPermissions: Array; - hasChildren: boolean | null; - id: number; - mailinglistMirror: boolean; - minimumRequiredTags: number; - name: string; - navigateToFirstPostAfterRead: boolean; - notificationLevel: number; - numFeaturedTopics: number; - permission: number | null; - position: number; - postCount: number; - readOnlyBanner: string | null; - readRestricted: boolean; - requiredTagGroups: Array; - searchPriority: number; - showSubcategoryList: boolean; - slug: string; - sortAscending: string | null; - sortOrder: string | null; - subcategoryListStyle: string; - textColor: string; - topicCount: number; - topicFeaturedLinkAllowed: boolean; - topicTemplate: string | null; - topicUrl: string | null; - uploadedBackground: string | null; - uploadedBackgroundDark: string | null; - uploadedLogo: string | null; - uploadedLogoDark: string | null; + allTopicsWiki: boolean; + allowBadges: boolean; + allowGlobalTags?: boolean | undefined; + allowUnlimitedOwnerEditsOnFirstPost: boolean; + allowedTagGroups?: Array | undefined; + allowedTags?: Array | undefined; + autoCloseBasedOnLastPost: boolean; + autoCloseHours: string | null; + availableGroups: Array; + canDelete: boolean; + canEdit: boolean; + categorySetting?: any | undefined; + color: string; + customFields: UpdateCategoryCustomFields; + defaultListFilter: string; + defaultSlowModeSeconds: string | null; + defaultTopPeriod: string; + defaultView: string | null; + description: string | null; + descriptionExcerpt: string | null; + descriptionText: string | null; + emailIn: string | null; + emailInAllowStrangers: boolean; + formTemplateIds: Array; + groupPermissions: Array; + hasChildren: boolean | null; + id: number; + mailinglistMirror: boolean; + minimumRequiredTags: number; + name: string; + navigateToFirstPostAfterRead: boolean; + notificationLevel: number; + numFeaturedTopics: number; + permission: number | null; + position: number; + postCount: number; + readOnlyBanner: string | null; + readRestricted: boolean; + requiredTagGroups: Array; + searchPriority: number; + showSubcategoryList: boolean; + slug: string; + sortAscending: string | null; + sortOrder: string | null; + subcategoryListStyle: string; + textColor: string; + topicCount: number; + topicFeaturedLinkAllowed: boolean; + topicTemplate: string | null; + topicUrl: string | null; + uploadedBackground: string | null; + uploadedBackgroundDark: string | null; + uploadedLogo: string | null; + uploadedLogoDark: string | null; }; /** * success response */ export type UpdateCategoryResponseBody = { - category: UpdateCategoryCategory; - success: string; + category: UpdateCategoryCategory; + success: string; }; /** @internal */ export const UpdateCategoryPermissions$inboundSchema: z.ZodType< - UpdateCategoryPermissions, - z.ZodTypeDef, - unknown + UpdateCategoryPermissions, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - everyone: z.number().int().optional(), - staff: z.number().int().optional(), - }) - .catchall(z.any()), - "additionalProperties" + z.object({ + everyone: z.number().int().optional(), + staff: z.number().int().optional(), + }).catchall(z.any()), + "additionalProperties", ); /** @internal */ export type UpdateCategoryPermissions$Outbound = { - everyone?: number | undefined; - staff?: number | undefined; - [additionalProperties: string]: unknown; + everyone?: number | undefined; + staff?: number | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const UpdateCategoryPermissions$outboundSchema: z.ZodType< - UpdateCategoryPermissions$Outbound, - z.ZodTypeDef, - UpdateCategoryPermissions -> = z - .object({ - additionalProperties: z.record(z.any()), + UpdateCategoryPermissions$Outbound, + z.ZodTypeDef, + UpdateCategoryPermissions +> = z.object({ + additionalProperties: z.record(z.any()), - everyone: z.number().int().optional(), - staff: z.number().int().optional(), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + everyone: z.number().int().optional(), + staff: z.number().int().optional(), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryPermissions$ { - /** @deprecated use `UpdateCategoryPermissions$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryPermissions$inboundSchema; - /** @deprecated use `UpdateCategoryPermissions$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryPermissions$outboundSchema; - /** @deprecated use `UpdateCategoryPermissions$Outbound` instead. */ - export type Outbound = UpdateCategoryPermissions$Outbound; + /** @deprecated use `UpdateCategoryPermissions$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryPermissions$inboundSchema; + /** @deprecated use `UpdateCategoryPermissions$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryPermissions$outboundSchema; + /** @deprecated use `UpdateCategoryPermissions$Outbound` instead. */ + export type Outbound = UpdateCategoryPermissions$Outbound; } /** @internal */ export const UpdateCategoryRequestBody$inboundSchema: z.ZodType< - UpdateCategoryRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - allow_badges: z.boolean().optional(), - color: z.string().optional(), - form_template_ids: z.array(z.any()).optional(), - name: z.string(), - parent_category_id: z.number().int().optional(), - permissions: z.lazy(() => UpdateCategoryPermissions$inboundSchema).optional(), - search_priority: z.number().int().optional(), - slug: z.string().optional(), - text_color: z.string().optional(), - topic_featured_links_allowed: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allow_badges: "allowBadges", - form_template_ids: "formTemplateIds", - parent_category_id: "parentCategoryId", - search_priority: "searchPriority", - text_color: "textColor", - topic_featured_links_allowed: "topicFeaturedLinksAllowed", - }); - }); + UpdateCategoryRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + allow_badges: z.boolean().optional(), + color: z.string().optional(), + form_template_ids: z.array(z.any()).optional(), + name: z.string(), + parent_category_id: z.number().int().optional(), + permissions: z.lazy(() => UpdateCategoryPermissions$inboundSchema).optional(), + search_priority: z.number().int().optional(), + slug: z.string().optional(), + text_color: z.string().optional(), + topic_featured_links_allowed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "allow_badges": "allowBadges", + "form_template_ids": "formTemplateIds", + "parent_category_id": "parentCategoryId", + "search_priority": "searchPriority", + "text_color": "textColor", + "topic_featured_links_allowed": "topicFeaturedLinksAllowed", + }); +}); /** @internal */ export type UpdateCategoryRequestBody$Outbound = { - allow_badges?: boolean | undefined; - color?: string | undefined; - form_template_ids?: Array | undefined; - name: string; - parent_category_id?: number | undefined; - permissions?: UpdateCategoryPermissions$Outbound | undefined; - search_priority?: number | undefined; - slug?: string | undefined; - text_color?: string | undefined; - topic_featured_links_allowed?: boolean | undefined; + allow_badges?: boolean | undefined; + color?: string | undefined; + form_template_ids?: Array | undefined; + name: string; + parent_category_id?: number | undefined; + permissions?: UpdateCategoryPermissions$Outbound | undefined; + search_priority?: number | undefined; + slug?: string | undefined; + text_color?: string | undefined; + topic_featured_links_allowed?: boolean | undefined; }; /** @internal */ export const UpdateCategoryRequestBody$outboundSchema: z.ZodType< - UpdateCategoryRequestBody$Outbound, - z.ZodTypeDef, - UpdateCategoryRequestBody -> = z - .object({ - allowBadges: z.boolean().optional(), - color: z.string().optional(), - formTemplateIds: z.array(z.any()).optional(), - name: z.string(), - parentCategoryId: z.number().int().optional(), - permissions: z.lazy(() => UpdateCategoryPermissions$outboundSchema).optional(), - searchPriority: z.number().int().optional(), - slug: z.string().optional(), - textColor: z.string().optional(), - topicFeaturedLinksAllowed: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - allowBadges: "allow_badges", - formTemplateIds: "form_template_ids", - parentCategoryId: "parent_category_id", - searchPriority: "search_priority", - textColor: "text_color", - topicFeaturedLinksAllowed: "topic_featured_links_allowed", - }); - }); + UpdateCategoryRequestBody$Outbound, + z.ZodTypeDef, + UpdateCategoryRequestBody +> = z.object({ + allowBadges: z.boolean().optional(), + color: z.string().optional(), + formTemplateIds: z.array(z.any()).optional(), + name: z.string(), + parentCategoryId: z.number().int().optional(), + permissions: z.lazy(() => UpdateCategoryPermissions$outboundSchema) + .optional(), + searchPriority: z.number().int().optional(), + slug: z.string().optional(), + textColor: z.string().optional(), + topicFeaturedLinksAllowed: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + allowBadges: "allow_badges", + formTemplateIds: "form_template_ids", + parentCategoryId: "parent_category_id", + searchPriority: "search_priority", + textColor: "text_color", + topicFeaturedLinksAllowed: "topic_featured_links_allowed", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryRequestBody$ { - /** @deprecated use `UpdateCategoryRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryRequestBody$inboundSchema; - /** @deprecated use `UpdateCategoryRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryRequestBody$outboundSchema; - /** @deprecated use `UpdateCategoryRequestBody$Outbound` instead. */ - export type Outbound = UpdateCategoryRequestBody$Outbound; + /** @deprecated use `UpdateCategoryRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryRequestBody$inboundSchema; + /** @deprecated use `UpdateCategoryRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryRequestBody$outboundSchema; + /** @deprecated use `UpdateCategoryRequestBody$Outbound` instead. */ + export type Outbound = UpdateCategoryRequestBody$Outbound; } /** @internal */ export const UpdateCategoryRequest$inboundSchema: z.ZodType< - UpdateCategoryRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateCategoryRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateCategoryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateCategoryRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateCategoryRequest$Outbound = { - RequestBody?: UpdateCategoryRequestBody$Outbound | undefined; - id: number; + RequestBody?: UpdateCategoryRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const UpdateCategoryRequest$outboundSchema: z.ZodType< - UpdateCategoryRequest$Outbound, - z.ZodTypeDef, - UpdateCategoryRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateCategoryRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateCategoryRequest$Outbound, + z.ZodTypeDef, + UpdateCategoryRequest +> = z.object({ + requestBody: z.lazy(() => UpdateCategoryRequestBody$outboundSchema) + .optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryRequest$ { - /** @deprecated use `UpdateCategoryRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryRequest$inboundSchema; - /** @deprecated use `UpdateCategoryRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryRequest$outboundSchema; - /** @deprecated use `UpdateCategoryRequest$Outbound` instead. */ - export type Outbound = UpdateCategoryRequest$Outbound; + /** @deprecated use `UpdateCategoryRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryRequest$inboundSchema; + /** @deprecated use `UpdateCategoryRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryRequest$outboundSchema; + /** @deprecated use `UpdateCategoryRequest$Outbound` instead. */ + export type Outbound = UpdateCategoryRequest$Outbound; } /** @internal */ export const UpdateCategoryCustomFields$inboundSchema: z.ZodType< - UpdateCategoryCustomFields, - z.ZodTypeDef, - unknown + UpdateCategoryCustomFields, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -311,9 +301,9 @@ export type UpdateCategoryCustomFields$Outbound = {}; /** @internal */ export const UpdateCategoryCustomFields$outboundSchema: z.ZodType< - UpdateCategoryCustomFields$Outbound, - z.ZodTypeDef, - UpdateCategoryCustomFields + UpdateCategoryCustomFields$Outbound, + z.ZodTypeDef, + UpdateCategoryCustomFields > = z.object({}); /** @@ -321,441 +311,439 @@ export const UpdateCategoryCustomFields$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryCustomFields$ { - /** @deprecated use `UpdateCategoryCustomFields$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryCustomFields$inboundSchema; - /** @deprecated use `UpdateCategoryCustomFields$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryCustomFields$outboundSchema; - /** @deprecated use `UpdateCategoryCustomFields$Outbound` instead. */ - export type Outbound = UpdateCategoryCustomFields$Outbound; + /** @deprecated use `UpdateCategoryCustomFields$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryCustomFields$inboundSchema; + /** @deprecated use `UpdateCategoryCustomFields$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryCustomFields$outboundSchema; + /** @deprecated use `UpdateCategoryCustomFields$Outbound` instead. */ + export type Outbound = UpdateCategoryCustomFields$Outbound; } /** @internal */ export const UpdateCategoryGroupPermissions$inboundSchema: z.ZodType< - UpdateCategoryGroupPermissions, - z.ZodTypeDef, - unknown -> = z - .object({ - group_name: z.string(), - permission_type: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - group_name: "groupName", - permission_type: "permissionType", - }); - }); + UpdateCategoryGroupPermissions, + z.ZodTypeDef, + unknown +> = z.object({ + group_name: z.string(), + permission_type: z.number().int(), +}).transform((v) => { + return remap$(v, { + "group_name": "groupName", + "permission_type": "permissionType", + }); +}); /** @internal */ export type UpdateCategoryGroupPermissions$Outbound = { - group_name: string; - permission_type: number; + group_name: string; + permission_type: number; }; /** @internal */ export const UpdateCategoryGroupPermissions$outboundSchema: z.ZodType< - UpdateCategoryGroupPermissions$Outbound, - z.ZodTypeDef, - UpdateCategoryGroupPermissions -> = z - .object({ - groupName: z.string(), - permissionType: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - groupName: "group_name", - permissionType: "permission_type", - }); - }); + UpdateCategoryGroupPermissions$Outbound, + z.ZodTypeDef, + UpdateCategoryGroupPermissions +> = z.object({ + groupName: z.string(), + permissionType: z.number().int(), +}).transform((v) => { + return remap$(v, { + groupName: "group_name", + permissionType: "permission_type", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryGroupPermissions$ { - /** @deprecated use `UpdateCategoryGroupPermissions$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryGroupPermissions$inboundSchema; - /** @deprecated use `UpdateCategoryGroupPermissions$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryGroupPermissions$outboundSchema; - /** @deprecated use `UpdateCategoryGroupPermissions$Outbound` instead. */ - export type Outbound = UpdateCategoryGroupPermissions$Outbound; + /** @deprecated use `UpdateCategoryGroupPermissions$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryGroupPermissions$inboundSchema; + /** @deprecated use `UpdateCategoryGroupPermissions$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryGroupPermissions$outboundSchema; + /** @deprecated use `UpdateCategoryGroupPermissions$Outbound` instead. */ + export type Outbound = UpdateCategoryGroupPermissions$Outbound; } /** @internal */ export const UpdateCategoryRequiredTagGroups$inboundSchema: z.ZodType< - UpdateCategoryRequiredTagGroups, - z.ZodTypeDef, - unknown -> = z - .object({ - min_count: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - min_count: "minCount", - }); - }); + UpdateCategoryRequiredTagGroups, + z.ZodTypeDef, + unknown +> = z.object({ + min_count: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + "min_count": "minCount", + }); +}); /** @internal */ export type UpdateCategoryRequiredTagGroups$Outbound = { - min_count: number; - name: string; + min_count: number; + name: string; }; /** @internal */ export const UpdateCategoryRequiredTagGroups$outboundSchema: z.ZodType< - UpdateCategoryRequiredTagGroups$Outbound, - z.ZodTypeDef, - UpdateCategoryRequiredTagGroups -> = z - .object({ - minCount: z.number().int(), - name: z.string(), - }) - .transform((v) => { - return remap$(v, { - minCount: "min_count", - }); - }); + UpdateCategoryRequiredTagGroups$Outbound, + z.ZodTypeDef, + UpdateCategoryRequiredTagGroups +> = z.object({ + minCount: z.number().int(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + minCount: "min_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryRequiredTagGroups$ { - /** @deprecated use `UpdateCategoryRequiredTagGroups$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryRequiredTagGroups$inboundSchema; - /** @deprecated use `UpdateCategoryRequiredTagGroups$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryRequiredTagGroups$outboundSchema; - /** @deprecated use `UpdateCategoryRequiredTagGroups$Outbound` instead. */ - export type Outbound = UpdateCategoryRequiredTagGroups$Outbound; + /** @deprecated use `UpdateCategoryRequiredTagGroups$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryRequiredTagGroups$inboundSchema; + /** @deprecated use `UpdateCategoryRequiredTagGroups$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryRequiredTagGroups$outboundSchema; + /** @deprecated use `UpdateCategoryRequiredTagGroups$Outbound` instead. */ + export type Outbound = UpdateCategoryRequiredTagGroups$Outbound; } /** @internal */ export const UpdateCategoryCategory$inboundSchema: z.ZodType< - UpdateCategoryCategory, - z.ZodTypeDef, - unknown -> = z - .object({ - all_topics_wiki: z.boolean(), - allow_badges: z.boolean(), - allow_global_tags: z.boolean().optional(), - allow_unlimited_owner_edits_on_first_post: z.boolean(), - allowed_tag_groups: z.array(z.any()).optional(), - allowed_tags: z.array(z.any()).optional(), - auto_close_based_on_last_post: z.boolean(), - auto_close_hours: z.nullable(z.string()), - available_groups: z.array(z.any()), - can_delete: z.boolean(), - can_edit: z.boolean(), - category_setting: z.any().optional(), - color: z.string(), - custom_fields: z.lazy(() => UpdateCategoryCustomFields$inboundSchema), - default_list_filter: z.string(), - default_slow_mode_seconds: z.nullable(z.string()), - default_top_period: z.string(), - default_view: z.nullable(z.string()), - description: z.nullable(z.string()), - description_excerpt: z.nullable(z.string()), - description_text: z.nullable(z.string()), - email_in: z.nullable(z.string()), - email_in_allow_strangers: z.boolean(), - form_template_ids: z.array(z.any()), - group_permissions: z.array(z.lazy(() => UpdateCategoryGroupPermissions$inboundSchema)), - has_children: z.nullable(z.boolean()), - id: z.number().int(), - mailinglist_mirror: z.boolean(), - minimum_required_tags: z.number().int(), - name: z.string(), - navigate_to_first_post_after_read: z.boolean(), - notification_level: z.number().int(), - num_featured_topics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - post_count: z.number().int(), - read_only_banner: z.nullable(z.string()), - read_restricted: z.boolean(), - required_tag_groups: z.array(z.lazy(() => UpdateCategoryRequiredTagGroups$inboundSchema)), - search_priority: z.number().int(), - show_subcategory_list: z.boolean(), - slug: z.string(), - sort_ascending: z.nullable(z.string()), - sort_order: z.nullable(z.string()), - subcategory_list_style: z.string(), - text_color: z.string(), - topic_count: z.number().int(), - topic_featured_link_allowed: z.boolean(), - topic_template: z.nullable(z.string()), - topic_url: z.nullable(z.string()), - uploaded_background: z.nullable(z.string()), - uploaded_background_dark: z.nullable(z.string()), - uploaded_logo: z.nullable(z.string()), - uploaded_logo_dark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - all_topics_wiki: "allTopicsWiki", - allow_badges: "allowBadges", - allow_global_tags: "allowGlobalTags", - allow_unlimited_owner_edits_on_first_post: "allowUnlimitedOwnerEditsOnFirstPost", - allowed_tag_groups: "allowedTagGroups", - allowed_tags: "allowedTags", - auto_close_based_on_last_post: "autoCloseBasedOnLastPost", - auto_close_hours: "autoCloseHours", - available_groups: "availableGroups", - can_delete: "canDelete", - can_edit: "canEdit", - category_setting: "categorySetting", - custom_fields: "customFields", - default_list_filter: "defaultListFilter", - default_slow_mode_seconds: "defaultSlowModeSeconds", - default_top_period: "defaultTopPeriod", - default_view: "defaultView", - description_excerpt: "descriptionExcerpt", - description_text: "descriptionText", - email_in: "emailIn", - email_in_allow_strangers: "emailInAllowStrangers", - form_template_ids: "formTemplateIds", - group_permissions: "groupPermissions", - has_children: "hasChildren", - mailinglist_mirror: "mailinglistMirror", - minimum_required_tags: "minimumRequiredTags", - navigate_to_first_post_after_read: "navigateToFirstPostAfterRead", - notification_level: "notificationLevel", - num_featured_topics: "numFeaturedTopics", - post_count: "postCount", - read_only_banner: "readOnlyBanner", - read_restricted: "readRestricted", - required_tag_groups: "requiredTagGroups", - search_priority: "searchPriority", - show_subcategory_list: "showSubcategoryList", - sort_ascending: "sortAscending", - sort_order: "sortOrder", - subcategory_list_style: "subcategoryListStyle", - text_color: "textColor", - topic_count: "topicCount", - topic_featured_link_allowed: "topicFeaturedLinkAllowed", - topic_template: "topicTemplate", - topic_url: "topicUrl", - uploaded_background: "uploadedBackground", - uploaded_background_dark: "uploadedBackgroundDark", - uploaded_logo: "uploadedLogo", - uploaded_logo_dark: "uploadedLogoDark", - }); - }); + UpdateCategoryCategory, + z.ZodTypeDef, + unknown +> = z.object({ + all_topics_wiki: z.boolean(), + allow_badges: z.boolean(), + allow_global_tags: z.boolean().optional(), + allow_unlimited_owner_edits_on_first_post: z.boolean(), + allowed_tag_groups: z.array(z.any()).optional(), + allowed_tags: z.array(z.any()).optional(), + auto_close_based_on_last_post: z.boolean(), + auto_close_hours: z.nullable(z.string()), + available_groups: z.array(z.any()), + can_delete: z.boolean(), + can_edit: z.boolean(), + category_setting: z.any().optional(), + color: z.string(), + custom_fields: z.lazy(() => UpdateCategoryCustomFields$inboundSchema), + default_list_filter: z.string(), + default_slow_mode_seconds: z.nullable(z.string()), + default_top_period: z.string(), + default_view: z.nullable(z.string()), + description: z.nullable(z.string()), + description_excerpt: z.nullable(z.string()), + description_text: z.nullable(z.string()), + email_in: z.nullable(z.string()), + email_in_allow_strangers: z.boolean(), + form_template_ids: z.array(z.any()), + group_permissions: z.array( + z.lazy(() => UpdateCategoryGroupPermissions$inboundSchema), + ), + has_children: z.nullable(z.boolean()), + id: z.number().int(), + mailinglist_mirror: z.boolean(), + minimum_required_tags: z.number().int(), + name: z.string(), + navigate_to_first_post_after_read: z.boolean(), + notification_level: z.number().int(), + num_featured_topics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + post_count: z.number().int(), + read_only_banner: z.nullable(z.string()), + read_restricted: z.boolean(), + required_tag_groups: z.array( + z.lazy(() => UpdateCategoryRequiredTagGroups$inboundSchema), + ), + search_priority: z.number().int(), + show_subcategory_list: z.boolean(), + slug: z.string(), + sort_ascending: z.nullable(z.string()), + sort_order: z.nullable(z.string()), + subcategory_list_style: z.string(), + text_color: z.string(), + topic_count: z.number().int(), + topic_featured_link_allowed: z.boolean(), + topic_template: z.nullable(z.string()), + topic_url: z.nullable(z.string()), + uploaded_background: z.nullable(z.string()), + uploaded_background_dark: z.nullable(z.string()), + uploaded_logo: z.nullable(z.string()), + uploaded_logo_dark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "all_topics_wiki": "allTopicsWiki", + "allow_badges": "allowBadges", + "allow_global_tags": "allowGlobalTags", + "allow_unlimited_owner_edits_on_first_post": + "allowUnlimitedOwnerEditsOnFirstPost", + "allowed_tag_groups": "allowedTagGroups", + "allowed_tags": "allowedTags", + "auto_close_based_on_last_post": "autoCloseBasedOnLastPost", + "auto_close_hours": "autoCloseHours", + "available_groups": "availableGroups", + "can_delete": "canDelete", + "can_edit": "canEdit", + "category_setting": "categorySetting", + "custom_fields": "customFields", + "default_list_filter": "defaultListFilter", + "default_slow_mode_seconds": "defaultSlowModeSeconds", + "default_top_period": "defaultTopPeriod", + "default_view": "defaultView", + "description_excerpt": "descriptionExcerpt", + "description_text": "descriptionText", + "email_in": "emailIn", + "email_in_allow_strangers": "emailInAllowStrangers", + "form_template_ids": "formTemplateIds", + "group_permissions": "groupPermissions", + "has_children": "hasChildren", + "mailinglist_mirror": "mailinglistMirror", + "minimum_required_tags": "minimumRequiredTags", + "navigate_to_first_post_after_read": "navigateToFirstPostAfterRead", + "notification_level": "notificationLevel", + "num_featured_topics": "numFeaturedTopics", + "post_count": "postCount", + "read_only_banner": "readOnlyBanner", + "read_restricted": "readRestricted", + "required_tag_groups": "requiredTagGroups", + "search_priority": "searchPriority", + "show_subcategory_list": "showSubcategoryList", + "sort_ascending": "sortAscending", + "sort_order": "sortOrder", + "subcategory_list_style": "subcategoryListStyle", + "text_color": "textColor", + "topic_count": "topicCount", + "topic_featured_link_allowed": "topicFeaturedLinkAllowed", + "topic_template": "topicTemplate", + "topic_url": "topicUrl", + "uploaded_background": "uploadedBackground", + "uploaded_background_dark": "uploadedBackgroundDark", + "uploaded_logo": "uploadedLogo", + "uploaded_logo_dark": "uploadedLogoDark", + }); +}); /** @internal */ export type UpdateCategoryCategory$Outbound = { - all_topics_wiki: boolean; - allow_badges: boolean; - allow_global_tags?: boolean | undefined; - allow_unlimited_owner_edits_on_first_post: boolean; - allowed_tag_groups?: Array | undefined; - allowed_tags?: Array | undefined; - auto_close_based_on_last_post: boolean; - auto_close_hours: string | null; - available_groups: Array; - can_delete: boolean; - can_edit: boolean; - category_setting?: any | undefined; - color: string; - custom_fields: UpdateCategoryCustomFields$Outbound; - default_list_filter: string; - default_slow_mode_seconds: string | null; - default_top_period: string; - default_view: string | null; - description: string | null; - description_excerpt: string | null; - description_text: string | null; - email_in: string | null; - email_in_allow_strangers: boolean; - form_template_ids: Array; - group_permissions: Array; - has_children: boolean | null; - id: number; - mailinglist_mirror: boolean; - minimum_required_tags: number; - name: string; - navigate_to_first_post_after_read: boolean; - notification_level: number; - num_featured_topics: number; - permission: number | null; - position: number; - post_count: number; - read_only_banner: string | null; - read_restricted: boolean; - required_tag_groups: Array; - search_priority: number; - show_subcategory_list: boolean; - slug: string; - sort_ascending: string | null; - sort_order: string | null; - subcategory_list_style: string; - text_color: string; - topic_count: number; - topic_featured_link_allowed: boolean; - topic_template: string | null; - topic_url: string | null; - uploaded_background: string | null; - uploaded_background_dark: string | null; - uploaded_logo: string | null; - uploaded_logo_dark: string | null; + all_topics_wiki: boolean; + allow_badges: boolean; + allow_global_tags?: boolean | undefined; + allow_unlimited_owner_edits_on_first_post: boolean; + allowed_tag_groups?: Array | undefined; + allowed_tags?: Array | undefined; + auto_close_based_on_last_post: boolean; + auto_close_hours: string | null; + available_groups: Array; + can_delete: boolean; + can_edit: boolean; + category_setting?: any | undefined; + color: string; + custom_fields: UpdateCategoryCustomFields$Outbound; + default_list_filter: string; + default_slow_mode_seconds: string | null; + default_top_period: string; + default_view: string | null; + description: string | null; + description_excerpt: string | null; + description_text: string | null; + email_in: string | null; + email_in_allow_strangers: boolean; + form_template_ids: Array; + group_permissions: Array; + has_children: boolean | null; + id: number; + mailinglist_mirror: boolean; + minimum_required_tags: number; + name: string; + navigate_to_first_post_after_read: boolean; + notification_level: number; + num_featured_topics: number; + permission: number | null; + position: number; + post_count: number; + read_only_banner: string | null; + read_restricted: boolean; + required_tag_groups: Array; + search_priority: number; + show_subcategory_list: boolean; + slug: string; + sort_ascending: string | null; + sort_order: string | null; + subcategory_list_style: string; + text_color: string; + topic_count: number; + topic_featured_link_allowed: boolean; + topic_template: string | null; + topic_url: string | null; + uploaded_background: string | null; + uploaded_background_dark: string | null; + uploaded_logo: string | null; + uploaded_logo_dark: string | null; }; /** @internal */ export const UpdateCategoryCategory$outboundSchema: z.ZodType< - UpdateCategoryCategory$Outbound, - z.ZodTypeDef, - UpdateCategoryCategory -> = z - .object({ - allTopicsWiki: z.boolean(), - allowBadges: z.boolean(), - allowGlobalTags: z.boolean().optional(), - allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), - allowedTagGroups: z.array(z.any()).optional(), - allowedTags: z.array(z.any()).optional(), - autoCloseBasedOnLastPost: z.boolean(), - autoCloseHours: z.nullable(z.string()), - availableGroups: z.array(z.any()), - canDelete: z.boolean(), - canEdit: z.boolean(), - categorySetting: z.any().optional(), - color: z.string(), - customFields: z.lazy(() => UpdateCategoryCustomFields$outboundSchema), - defaultListFilter: z.string(), - defaultSlowModeSeconds: z.nullable(z.string()), - defaultTopPeriod: z.string(), - defaultView: z.nullable(z.string()), - description: z.nullable(z.string()), - descriptionExcerpt: z.nullable(z.string()), - descriptionText: z.nullable(z.string()), - emailIn: z.nullable(z.string()), - emailInAllowStrangers: z.boolean(), - formTemplateIds: z.array(z.any()), - groupPermissions: z.array(z.lazy(() => UpdateCategoryGroupPermissions$outboundSchema)), - hasChildren: z.nullable(z.boolean()), - id: z.number().int(), - mailinglistMirror: z.boolean(), - minimumRequiredTags: z.number().int(), - name: z.string(), - navigateToFirstPostAfterRead: z.boolean(), - notificationLevel: z.number().int(), - numFeaturedTopics: z.number().int(), - permission: z.nullable(z.number().int()), - position: z.number().int(), - postCount: z.number().int(), - readOnlyBanner: z.nullable(z.string()), - readRestricted: z.boolean(), - requiredTagGroups: z.array(z.lazy(() => UpdateCategoryRequiredTagGroups$outboundSchema)), - searchPriority: z.number().int(), - showSubcategoryList: z.boolean(), - slug: z.string(), - sortAscending: z.nullable(z.string()), - sortOrder: z.nullable(z.string()), - subcategoryListStyle: z.string(), - textColor: z.string(), - topicCount: z.number().int(), - topicFeaturedLinkAllowed: z.boolean(), - topicTemplate: z.nullable(z.string()), - topicUrl: z.nullable(z.string()), - uploadedBackground: z.nullable(z.string()), - uploadedBackgroundDark: z.nullable(z.string()), - uploadedLogo: z.nullable(z.string()), - uploadedLogoDark: z.nullable(z.string()), - }) - .transform((v) => { - return remap$(v, { - allTopicsWiki: "all_topics_wiki", - allowBadges: "allow_badges", - allowGlobalTags: "allow_global_tags", - allowUnlimitedOwnerEditsOnFirstPost: "allow_unlimited_owner_edits_on_first_post", - allowedTagGroups: "allowed_tag_groups", - allowedTags: "allowed_tags", - autoCloseBasedOnLastPost: "auto_close_based_on_last_post", - autoCloseHours: "auto_close_hours", - availableGroups: "available_groups", - canDelete: "can_delete", - canEdit: "can_edit", - categorySetting: "category_setting", - customFields: "custom_fields", - defaultListFilter: "default_list_filter", - defaultSlowModeSeconds: "default_slow_mode_seconds", - defaultTopPeriod: "default_top_period", - defaultView: "default_view", - descriptionExcerpt: "description_excerpt", - descriptionText: "description_text", - emailIn: "email_in", - emailInAllowStrangers: "email_in_allow_strangers", - formTemplateIds: "form_template_ids", - groupPermissions: "group_permissions", - hasChildren: "has_children", - mailinglistMirror: "mailinglist_mirror", - minimumRequiredTags: "minimum_required_tags", - navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", - notificationLevel: "notification_level", - numFeaturedTopics: "num_featured_topics", - postCount: "post_count", - readOnlyBanner: "read_only_banner", - readRestricted: "read_restricted", - requiredTagGroups: "required_tag_groups", - searchPriority: "search_priority", - showSubcategoryList: "show_subcategory_list", - sortAscending: "sort_ascending", - sortOrder: "sort_order", - subcategoryListStyle: "subcategory_list_style", - textColor: "text_color", - topicCount: "topic_count", - topicFeaturedLinkAllowed: "topic_featured_link_allowed", - topicTemplate: "topic_template", - topicUrl: "topic_url", - uploadedBackground: "uploaded_background", - uploadedBackgroundDark: "uploaded_background_dark", - uploadedLogo: "uploaded_logo", - uploadedLogoDark: "uploaded_logo_dark", - }); - }); + UpdateCategoryCategory$Outbound, + z.ZodTypeDef, + UpdateCategoryCategory +> = z.object({ + allTopicsWiki: z.boolean(), + allowBadges: z.boolean(), + allowGlobalTags: z.boolean().optional(), + allowUnlimitedOwnerEditsOnFirstPost: z.boolean(), + allowedTagGroups: z.array(z.any()).optional(), + allowedTags: z.array(z.any()).optional(), + autoCloseBasedOnLastPost: z.boolean(), + autoCloseHours: z.nullable(z.string()), + availableGroups: z.array(z.any()), + canDelete: z.boolean(), + canEdit: z.boolean(), + categorySetting: z.any().optional(), + color: z.string(), + customFields: z.lazy(() => UpdateCategoryCustomFields$outboundSchema), + defaultListFilter: z.string(), + defaultSlowModeSeconds: z.nullable(z.string()), + defaultTopPeriod: z.string(), + defaultView: z.nullable(z.string()), + description: z.nullable(z.string()), + descriptionExcerpt: z.nullable(z.string()), + descriptionText: z.nullable(z.string()), + emailIn: z.nullable(z.string()), + emailInAllowStrangers: z.boolean(), + formTemplateIds: z.array(z.any()), + groupPermissions: z.array( + z.lazy(() => UpdateCategoryGroupPermissions$outboundSchema), + ), + hasChildren: z.nullable(z.boolean()), + id: z.number().int(), + mailinglistMirror: z.boolean(), + minimumRequiredTags: z.number().int(), + name: z.string(), + navigateToFirstPostAfterRead: z.boolean(), + notificationLevel: z.number().int(), + numFeaturedTopics: z.number().int(), + permission: z.nullable(z.number().int()), + position: z.number().int(), + postCount: z.number().int(), + readOnlyBanner: z.nullable(z.string()), + readRestricted: z.boolean(), + requiredTagGroups: z.array( + z.lazy(() => UpdateCategoryRequiredTagGroups$outboundSchema), + ), + searchPriority: z.number().int(), + showSubcategoryList: z.boolean(), + slug: z.string(), + sortAscending: z.nullable(z.string()), + sortOrder: z.nullable(z.string()), + subcategoryListStyle: z.string(), + textColor: z.string(), + topicCount: z.number().int(), + topicFeaturedLinkAllowed: z.boolean(), + topicTemplate: z.nullable(z.string()), + topicUrl: z.nullable(z.string()), + uploadedBackground: z.nullable(z.string()), + uploadedBackgroundDark: z.nullable(z.string()), + uploadedLogo: z.nullable(z.string()), + uploadedLogoDark: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + allTopicsWiki: "all_topics_wiki", + allowBadges: "allow_badges", + allowGlobalTags: "allow_global_tags", + allowUnlimitedOwnerEditsOnFirstPost: + "allow_unlimited_owner_edits_on_first_post", + allowedTagGroups: "allowed_tag_groups", + allowedTags: "allowed_tags", + autoCloseBasedOnLastPost: "auto_close_based_on_last_post", + autoCloseHours: "auto_close_hours", + availableGroups: "available_groups", + canDelete: "can_delete", + canEdit: "can_edit", + categorySetting: "category_setting", + customFields: "custom_fields", + defaultListFilter: "default_list_filter", + defaultSlowModeSeconds: "default_slow_mode_seconds", + defaultTopPeriod: "default_top_period", + defaultView: "default_view", + descriptionExcerpt: "description_excerpt", + descriptionText: "description_text", + emailIn: "email_in", + emailInAllowStrangers: "email_in_allow_strangers", + formTemplateIds: "form_template_ids", + groupPermissions: "group_permissions", + hasChildren: "has_children", + mailinglistMirror: "mailinglist_mirror", + minimumRequiredTags: "minimum_required_tags", + navigateToFirstPostAfterRead: "navigate_to_first_post_after_read", + notificationLevel: "notification_level", + numFeaturedTopics: "num_featured_topics", + postCount: "post_count", + readOnlyBanner: "read_only_banner", + readRestricted: "read_restricted", + requiredTagGroups: "required_tag_groups", + searchPriority: "search_priority", + showSubcategoryList: "show_subcategory_list", + sortAscending: "sort_ascending", + sortOrder: "sort_order", + subcategoryListStyle: "subcategory_list_style", + textColor: "text_color", + topicCount: "topic_count", + topicFeaturedLinkAllowed: "topic_featured_link_allowed", + topicTemplate: "topic_template", + topicUrl: "topic_url", + uploadedBackground: "uploaded_background", + uploadedBackgroundDark: "uploaded_background_dark", + uploadedLogo: "uploaded_logo", + uploadedLogoDark: "uploaded_logo_dark", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryCategory$ { - /** @deprecated use `UpdateCategoryCategory$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryCategory$inboundSchema; - /** @deprecated use `UpdateCategoryCategory$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryCategory$outboundSchema; - /** @deprecated use `UpdateCategoryCategory$Outbound` instead. */ - export type Outbound = UpdateCategoryCategory$Outbound; + /** @deprecated use `UpdateCategoryCategory$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryCategory$inboundSchema; + /** @deprecated use `UpdateCategoryCategory$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryCategory$outboundSchema; + /** @deprecated use `UpdateCategoryCategory$Outbound` instead. */ + export type Outbound = UpdateCategoryCategory$Outbound; } /** @internal */ export const UpdateCategoryResponseBody$inboundSchema: z.ZodType< - UpdateCategoryResponseBody, - z.ZodTypeDef, - unknown + UpdateCategoryResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - category: z.lazy(() => UpdateCategoryCategory$inboundSchema), - success: z.string(), + category: z.lazy(() => UpdateCategoryCategory$inboundSchema), + success: z.string(), }); /** @internal */ export type UpdateCategoryResponseBody$Outbound = { - category: UpdateCategoryCategory$Outbound; - success: string; + category: UpdateCategoryCategory$Outbound; + success: string; }; /** @internal */ export const UpdateCategoryResponseBody$outboundSchema: z.ZodType< - UpdateCategoryResponseBody$Outbound, - z.ZodTypeDef, - UpdateCategoryResponseBody + UpdateCategoryResponseBody$Outbound, + z.ZodTypeDef, + UpdateCategoryResponseBody > = z.object({ - category: z.lazy(() => UpdateCategoryCategory$outboundSchema), - success: z.string(), + category: z.lazy(() => UpdateCategoryCategory$outboundSchema), + success: z.string(), }); /** @@ -763,10 +751,10 @@ export const UpdateCategoryResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateCategoryResponseBody$ { - /** @deprecated use `UpdateCategoryResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateCategoryResponseBody$inboundSchema; - /** @deprecated use `UpdateCategoryResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateCategoryResponseBody$outboundSchema; - /** @deprecated use `UpdateCategoryResponseBody$Outbound` instead. */ - export type Outbound = UpdateCategoryResponseBody$Outbound; + /** @deprecated use `UpdateCategoryResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateCategoryResponseBody$inboundSchema; + /** @deprecated use `UpdateCategoryResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateCategoryResponseBody$outboundSchema; + /** @deprecated use `UpdateCategoryResponseBody$Outbound` instead. */ + export type Outbound = UpdateCategoryResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updateemail.ts b/src/sdk/models/operations/updateemail.ts index 72f5faf..044be2c 100644 --- a/src/sdk/models/operations/updateemail.ts +++ b/src/sdk/models/operations/updateemail.ts @@ -2,39 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateEmailRequestBody = { - email: string; + email: string; }; export type UpdateEmailRequest = { - requestBody?: UpdateEmailRequestBody | undefined; - username: string; + requestBody?: UpdateEmailRequestBody | undefined; + username: string; }; /** @internal */ export const UpdateEmailRequestBody$inboundSchema: z.ZodType< - UpdateEmailRequestBody, - z.ZodTypeDef, - unknown + UpdateEmailRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - email: z.string(), + email: z.string(), }); /** @internal */ export type UpdateEmailRequestBody$Outbound = { - email: string; + email: string; }; /** @internal */ export const UpdateEmailRequestBody$outboundSchema: z.ZodType< - UpdateEmailRequestBody$Outbound, - z.ZodTypeDef, - UpdateEmailRequestBody + UpdateEmailRequestBody$Outbound, + z.ZodTypeDef, + UpdateEmailRequestBody > = z.object({ - email: z.string(), + email: z.string(), }); /** @@ -42,61 +42,57 @@ export const UpdateEmailRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateEmailRequestBody$ { - /** @deprecated use `UpdateEmailRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateEmailRequestBody$inboundSchema; - /** @deprecated use `UpdateEmailRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateEmailRequestBody$outboundSchema; - /** @deprecated use `UpdateEmailRequestBody$Outbound` instead. */ - export type Outbound = UpdateEmailRequestBody$Outbound; + /** @deprecated use `UpdateEmailRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateEmailRequestBody$inboundSchema; + /** @deprecated use `UpdateEmailRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateEmailRequestBody$outboundSchema; + /** @deprecated use `UpdateEmailRequestBody$Outbound` instead. */ + export type Outbound = UpdateEmailRequestBody$Outbound; } /** @internal */ export const UpdateEmailRequest$inboundSchema: z.ZodType< - UpdateEmailRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateEmailRequestBody$inboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateEmailRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateEmailRequestBody$inboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateEmailRequest$Outbound = { - RequestBody?: UpdateEmailRequestBody$Outbound | undefined; - username: string; + RequestBody?: UpdateEmailRequestBody$Outbound | undefined; + username: string; }; /** @internal */ export const UpdateEmailRequest$outboundSchema: z.ZodType< - UpdateEmailRequest$Outbound, - z.ZodTypeDef, - UpdateEmailRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateEmailRequestBody$outboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateEmailRequest$Outbound, + z.ZodTypeDef, + UpdateEmailRequest +> = z.object({ + requestBody: z.lazy(() => UpdateEmailRequestBody$outboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateEmailRequest$ { - /** @deprecated use `UpdateEmailRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateEmailRequest$inboundSchema; - /** @deprecated use `UpdateEmailRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateEmailRequest$outboundSchema; - /** @deprecated use `UpdateEmailRequest$Outbound` instead. */ - export type Outbound = UpdateEmailRequest$Outbound; + /** @deprecated use `UpdateEmailRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateEmailRequest$inboundSchema; + /** @deprecated use `UpdateEmailRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateEmailRequest$outboundSchema; + /** @deprecated use `UpdateEmailRequest$Outbound` instead. */ + export type Outbound = UpdateEmailRequest$Outbound; } diff --git a/src/sdk/models/operations/updategroup.ts b/src/sdk/models/operations/updategroup.ts index 0217c91..b89fa5a 100644 --- a/src/sdk/models/operations/updategroup.ts +++ b/src/sdk/models/operations/updategroup.ts @@ -2,210 +2,210 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateGroupGroup = { - /** - * pipe|separated - */ - automaticMembershipEmailDomains?: string | undefined; - /** - * About Group - */ - bioRaw?: string | undefined; - defaultNotificationLevel?: number | undefined; - flairBgColor?: string | undefined; - flairIcon?: string | undefined; - flairUploadId?: number | undefined; - fullName?: string | undefined; - mutedCategoryIds?: Array | undefined; - name: string; - /** - * comma,separated - */ - ownerUsernames?: string | undefined; - primaryGroup?: boolean | undefined; - publicAdmission?: boolean | undefined; - publicExit?: boolean | undefined; - regularCategoryIds?: Array | undefined; - trackingCategoryIds?: Array | undefined; - /** - * comma,separated - */ - usernames?: string | undefined; - visibilityLevel?: number | undefined; - watchingCategoryIds?: Array | undefined; - watchingFirstPostCategoryIds?: Array | undefined; + /** + * pipe|separated + */ + automaticMembershipEmailDomains?: string | undefined; + /** + * About Group + */ + bioRaw?: string | undefined; + defaultNotificationLevel?: number | undefined; + flairBgColor?: string | undefined; + flairIcon?: string | undefined; + flairUploadId?: number | undefined; + fullName?: string | undefined; + mutedCategoryIds?: Array | undefined; + name: string; + /** + * comma,separated + */ + ownerUsernames?: string | undefined; + primaryGroup?: boolean | undefined; + publicAdmission?: boolean | undefined; + publicExit?: boolean | undefined; + regularCategoryIds?: Array | undefined; + trackingCategoryIds?: Array | undefined; + /** + * comma,separated + */ + usernames?: string | undefined; + visibilityLevel?: number | undefined; + watchingCategoryIds?: Array | undefined; + watchingFirstPostCategoryIds?: Array | undefined; }; export type UpdateGroupRequestBody = { - group: UpdateGroupGroup; + group: UpdateGroupGroup; }; export type UpdateGroupRequest = { - requestBody?: UpdateGroupRequestBody | undefined; - id: number; + requestBody?: UpdateGroupRequestBody | undefined; + id: number; }; /** * success response */ export type UpdateGroupResponseBody = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ -export const UpdateGroupGroup$inboundSchema: z.ZodType = z - .object({ - automatic_membership_email_domains: z.string().optional(), - bio_raw: z.string().optional(), - default_notification_level: z.number().int().optional(), - flair_bg_color: z.string().optional(), - flair_icon: z.string().optional(), - flair_upload_id: z.number().int().optional(), - full_name: z.string().optional(), - muted_category_ids: z.array(z.number().int()).optional(), - name: z.string(), - owner_usernames: z.string().optional(), - primary_group: z.boolean().optional(), - public_admission: z.boolean().optional(), - public_exit: z.boolean().optional(), - regular_category_ids: z.array(z.number().int()).optional(), - tracking_category_ids: z.array(z.number().int()).optional(), - usernames: z.string().optional(), - visibility_level: z.number().int().optional(), - watching_category_ids: z.array(z.number().int()).optional(), - watching_first_post_category_ids: z.array(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - automatic_membership_email_domains: "automaticMembershipEmailDomains", - bio_raw: "bioRaw", - default_notification_level: "defaultNotificationLevel", - flair_bg_color: "flairBgColor", - flair_icon: "flairIcon", - flair_upload_id: "flairUploadId", - full_name: "fullName", - muted_category_ids: "mutedCategoryIds", - owner_usernames: "ownerUsernames", - primary_group: "primaryGroup", - public_admission: "publicAdmission", - public_exit: "publicExit", - regular_category_ids: "regularCategoryIds", - tracking_category_ids: "trackingCategoryIds", - visibility_level: "visibilityLevel", - watching_category_ids: "watchingCategoryIds", - watching_first_post_category_ids: "watchingFirstPostCategoryIds", - }); - }); +export const UpdateGroupGroup$inboundSchema: z.ZodType< + UpdateGroupGroup, + z.ZodTypeDef, + unknown +> = z.object({ + automatic_membership_email_domains: z.string().optional(), + bio_raw: z.string().optional(), + default_notification_level: z.number().int().optional(), + flair_bg_color: z.string().optional(), + flair_icon: z.string().optional(), + flair_upload_id: z.number().int().optional(), + full_name: z.string().optional(), + muted_category_ids: z.array(z.number().int()).optional(), + name: z.string(), + owner_usernames: z.string().optional(), + primary_group: z.boolean().optional(), + public_admission: z.boolean().optional(), + public_exit: z.boolean().optional(), + regular_category_ids: z.array(z.number().int()).optional(), + tracking_category_ids: z.array(z.number().int()).optional(), + usernames: z.string().optional(), + visibility_level: z.number().int().optional(), + watching_category_ids: z.array(z.number().int()).optional(), + watching_first_post_category_ids: z.array(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "automatic_membership_email_domains": "automaticMembershipEmailDomains", + "bio_raw": "bioRaw", + "default_notification_level": "defaultNotificationLevel", + "flair_bg_color": "flairBgColor", + "flair_icon": "flairIcon", + "flair_upload_id": "flairUploadId", + "full_name": "fullName", + "muted_category_ids": "mutedCategoryIds", + "owner_usernames": "ownerUsernames", + "primary_group": "primaryGroup", + "public_admission": "publicAdmission", + "public_exit": "publicExit", + "regular_category_ids": "regularCategoryIds", + "tracking_category_ids": "trackingCategoryIds", + "visibility_level": "visibilityLevel", + "watching_category_ids": "watchingCategoryIds", + "watching_first_post_category_ids": "watchingFirstPostCategoryIds", + }); +}); /** @internal */ export type UpdateGroupGroup$Outbound = { - automatic_membership_email_domains?: string | undefined; - bio_raw?: string | undefined; - default_notification_level?: number | undefined; - flair_bg_color?: string | undefined; - flair_icon?: string | undefined; - flair_upload_id?: number | undefined; - full_name?: string | undefined; - muted_category_ids?: Array | undefined; - name: string; - owner_usernames?: string | undefined; - primary_group?: boolean | undefined; - public_admission?: boolean | undefined; - public_exit?: boolean | undefined; - regular_category_ids?: Array | undefined; - tracking_category_ids?: Array | undefined; - usernames?: string | undefined; - visibility_level?: number | undefined; - watching_category_ids?: Array | undefined; - watching_first_post_category_ids?: Array | undefined; + automatic_membership_email_domains?: string | undefined; + bio_raw?: string | undefined; + default_notification_level?: number | undefined; + flair_bg_color?: string | undefined; + flair_icon?: string | undefined; + flair_upload_id?: number | undefined; + full_name?: string | undefined; + muted_category_ids?: Array | undefined; + name: string; + owner_usernames?: string | undefined; + primary_group?: boolean | undefined; + public_admission?: boolean | undefined; + public_exit?: boolean | undefined; + regular_category_ids?: Array | undefined; + tracking_category_ids?: Array | undefined; + usernames?: string | undefined; + visibility_level?: number | undefined; + watching_category_ids?: Array | undefined; + watching_first_post_category_ids?: Array | undefined; }; /** @internal */ export const UpdateGroupGroup$outboundSchema: z.ZodType< - UpdateGroupGroup$Outbound, - z.ZodTypeDef, - UpdateGroupGroup -> = z - .object({ - automaticMembershipEmailDomains: z.string().optional(), - bioRaw: z.string().optional(), - defaultNotificationLevel: z.number().int().optional(), - flairBgColor: z.string().optional(), - flairIcon: z.string().optional(), - flairUploadId: z.number().int().optional(), - fullName: z.string().optional(), - mutedCategoryIds: z.array(z.number().int()).optional(), - name: z.string(), - ownerUsernames: z.string().optional(), - primaryGroup: z.boolean().optional(), - publicAdmission: z.boolean().optional(), - publicExit: z.boolean().optional(), - regularCategoryIds: z.array(z.number().int()).optional(), - trackingCategoryIds: z.array(z.number().int()).optional(), - usernames: z.string().optional(), - visibilityLevel: z.number().int().optional(), - watchingCategoryIds: z.array(z.number().int()).optional(), - watchingFirstPostCategoryIds: z.array(z.number().int()).optional(), - }) - .transform((v) => { - return remap$(v, { - automaticMembershipEmailDomains: "automatic_membership_email_domains", - bioRaw: "bio_raw", - defaultNotificationLevel: "default_notification_level", - flairBgColor: "flair_bg_color", - flairIcon: "flair_icon", - flairUploadId: "flair_upload_id", - fullName: "full_name", - mutedCategoryIds: "muted_category_ids", - ownerUsernames: "owner_usernames", - primaryGroup: "primary_group", - publicAdmission: "public_admission", - publicExit: "public_exit", - regularCategoryIds: "regular_category_ids", - trackingCategoryIds: "tracking_category_ids", - visibilityLevel: "visibility_level", - watchingCategoryIds: "watching_category_ids", - watchingFirstPostCategoryIds: "watching_first_post_category_ids", - }); - }); + UpdateGroupGroup$Outbound, + z.ZodTypeDef, + UpdateGroupGroup +> = z.object({ + automaticMembershipEmailDomains: z.string().optional(), + bioRaw: z.string().optional(), + defaultNotificationLevel: z.number().int().optional(), + flairBgColor: z.string().optional(), + flairIcon: z.string().optional(), + flairUploadId: z.number().int().optional(), + fullName: z.string().optional(), + mutedCategoryIds: z.array(z.number().int()).optional(), + name: z.string(), + ownerUsernames: z.string().optional(), + primaryGroup: z.boolean().optional(), + publicAdmission: z.boolean().optional(), + publicExit: z.boolean().optional(), + regularCategoryIds: z.array(z.number().int()).optional(), + trackingCategoryIds: z.array(z.number().int()).optional(), + usernames: z.string().optional(), + visibilityLevel: z.number().int().optional(), + watchingCategoryIds: z.array(z.number().int()).optional(), + watchingFirstPostCategoryIds: z.array(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + automaticMembershipEmailDomains: "automatic_membership_email_domains", + bioRaw: "bio_raw", + defaultNotificationLevel: "default_notification_level", + flairBgColor: "flair_bg_color", + flairIcon: "flair_icon", + flairUploadId: "flair_upload_id", + fullName: "full_name", + mutedCategoryIds: "muted_category_ids", + ownerUsernames: "owner_usernames", + primaryGroup: "primary_group", + publicAdmission: "public_admission", + publicExit: "public_exit", + regularCategoryIds: "regular_category_ids", + trackingCategoryIds: "tracking_category_ids", + visibilityLevel: "visibility_level", + watchingCategoryIds: "watching_category_ids", + watchingFirstPostCategoryIds: "watching_first_post_category_ids", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateGroupGroup$ { - /** @deprecated use `UpdateGroupGroup$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupGroup$inboundSchema; - /** @deprecated use `UpdateGroupGroup$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupGroup$outboundSchema; - /** @deprecated use `UpdateGroupGroup$Outbound` instead. */ - export type Outbound = UpdateGroupGroup$Outbound; + /** @deprecated use `UpdateGroupGroup$inboundSchema` instead. */ + export const inboundSchema = UpdateGroupGroup$inboundSchema; + /** @deprecated use `UpdateGroupGroup$outboundSchema` instead. */ + export const outboundSchema = UpdateGroupGroup$outboundSchema; + /** @deprecated use `UpdateGroupGroup$Outbound` instead. */ + export type Outbound = UpdateGroupGroup$Outbound; } /** @internal */ export const UpdateGroupRequestBody$inboundSchema: z.ZodType< - UpdateGroupRequestBody, - z.ZodTypeDef, - unknown + UpdateGroupRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - group: z.lazy(() => UpdateGroupGroup$inboundSchema), + group: z.lazy(() => UpdateGroupGroup$inboundSchema), }); /** @internal */ export type UpdateGroupRequestBody$Outbound = { - group: UpdateGroupGroup$Outbound; + group: UpdateGroupGroup$Outbound; }; /** @internal */ export const UpdateGroupRequestBody$outboundSchema: z.ZodType< - UpdateGroupRequestBody$Outbound, - z.ZodTypeDef, - UpdateGroupRequestBody + UpdateGroupRequestBody$Outbound, + z.ZodTypeDef, + UpdateGroupRequestBody > = z.object({ - group: z.lazy(() => UpdateGroupGroup$outboundSchema), + group: z.lazy(() => UpdateGroupGroup$outboundSchema), }); /** @@ -213,86 +213,82 @@ export const UpdateGroupRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateGroupRequestBody$ { - /** @deprecated use `UpdateGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupRequestBody$inboundSchema; - /** @deprecated use `UpdateGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupRequestBody$outboundSchema; - /** @deprecated use `UpdateGroupRequestBody$Outbound` instead. */ - export type Outbound = UpdateGroupRequestBody$Outbound; + /** @deprecated use `UpdateGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateGroupRequestBody$inboundSchema; + /** @deprecated use `UpdateGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateGroupRequestBody$outboundSchema; + /** @deprecated use `UpdateGroupRequestBody$Outbound` instead. */ + export type Outbound = UpdateGroupRequestBody$Outbound; } /** @internal */ export const UpdateGroupRequest$inboundSchema: z.ZodType< - UpdateGroupRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateGroupRequestBody$inboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateGroupRequestBody$inboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateGroupRequest$Outbound = { - RequestBody?: UpdateGroupRequestBody$Outbound | undefined; - id: number; + RequestBody?: UpdateGroupRequestBody$Outbound | undefined; + id: number; }; /** @internal */ export const UpdateGroupRequest$outboundSchema: z.ZodType< - UpdateGroupRequest$Outbound, - z.ZodTypeDef, - UpdateGroupRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateGroupRequestBody$outboundSchema).optional(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateGroupRequest$Outbound, + z.ZodTypeDef, + UpdateGroupRequest +> = z.object({ + requestBody: z.lazy(() => UpdateGroupRequestBody$outboundSchema).optional(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateGroupRequest$ { - /** @deprecated use `UpdateGroupRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupRequest$inboundSchema; - /** @deprecated use `UpdateGroupRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupRequest$outboundSchema; - /** @deprecated use `UpdateGroupRequest$Outbound` instead. */ - export type Outbound = UpdateGroupRequest$Outbound; + /** @deprecated use `UpdateGroupRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateGroupRequest$inboundSchema; + /** @deprecated use `UpdateGroupRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateGroupRequest$outboundSchema; + /** @deprecated use `UpdateGroupRequest$Outbound` instead. */ + export type Outbound = UpdateGroupRequest$Outbound; } /** @internal */ export const UpdateGroupResponseBody$inboundSchema: z.ZodType< - UpdateGroupResponseBody, - z.ZodTypeDef, - unknown + UpdateGroupResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @internal */ export type UpdateGroupResponseBody$Outbound = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const UpdateGroupResponseBody$outboundSchema: z.ZodType< - UpdateGroupResponseBody$Outbound, - z.ZodTypeDef, - UpdateGroupResponseBody + UpdateGroupResponseBody$Outbound, + z.ZodTypeDef, + UpdateGroupResponseBody > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @@ -300,10 +296,10 @@ export const UpdateGroupResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateGroupResponseBody$ { - /** @deprecated use `UpdateGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupResponseBody$inboundSchema; - /** @deprecated use `UpdateGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupResponseBody$outboundSchema; - /** @deprecated use `UpdateGroupResponseBody$Outbound` instead. */ - export type Outbound = UpdateGroupResponseBody$Outbound; + /** @deprecated use `UpdateGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateGroupResponseBody$inboundSchema; + /** @deprecated use `UpdateGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateGroupResponseBody$outboundSchema; + /** @deprecated use `UpdateGroupResponseBody$Outbound` instead. */ + export type Outbound = UpdateGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatepost.ts b/src/sdk/models/operations/updatepost.ts index 68b6aa9..0f08452 100644 --- a/src/sdk/models/operations/updatepost.ts +++ b/src/sdk/models/operations/updatepost.ts @@ -2,154 +2,152 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Post = { - editReason?: string | undefined; - raw: string; + editReason?: string | undefined; + raw: string; }; export type UpdatePostRequestBody = { - post?: Post | undefined; + post?: Post | undefined; }; export type UpdatePostRequest = { - requestBody?: UpdatePostRequestBody | undefined; - id: string; + requestBody?: UpdatePostRequestBody | undefined; + id: string; }; export type UpdatePostActionsSummary = { - canAct: boolean; - id: number; + canAct: boolean; + id: number; }; export type UpdatePostPost = { - actionsSummary: Array; - admin: boolean; - avatarTemplate: string; - bookmarked: boolean; - canDelete: boolean; - canEdit: boolean; - canRecover: boolean; - canSeeHiddenPost?: boolean | undefined; - canViewEditHistory: boolean; - canWiki: boolean; - cooked: string; - createdAt: string; - deletedAt: string | null; - displayUsername?: string | null | undefined; - draftSequence: number; - editReason: string | null; - flairBgColor: string | null; - flairColor: string | null; - flairGroupId?: string | null | undefined; - flairName: string | null; - flairUrl: string | null; - hidden: boolean; - id: number; - incomingLinkCount: number; - mentionedUsers?: Array | undefined; - moderator: boolean; - name?: string | null | undefined; - postNumber: number; - postType: number; - primaryGroupName: string | null; - quoteCount: number; - raw: string; - readersCount: number; - reads: number; - replyCount: number; - replyToPostNumber: string | null; - reviewableId: string | null; - reviewableScoreCount: number; - reviewableScorePendingCount: number; - score: number; - staff: boolean; - topicId: number; - topicSlug: string; - trustLevel: number; - updatedAt: string; - userDeleted: boolean; - userId: number; - userTitle: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actionsSummary: Array; + admin: boolean; + avatarTemplate: string; + bookmarked: boolean; + canDelete: boolean; + canEdit: boolean; + canRecover: boolean; + canSeeHiddenPost?: boolean | undefined; + canViewEditHistory: boolean; + canWiki: boolean; + cooked: string; + createdAt: string; + deletedAt: string | null; + displayUsername?: string | null | undefined; + draftSequence: number; + editReason: string | null; + flairBgColor: string | null; + flairColor: string | null; + flairGroupId?: string | null | undefined; + flairName: string | null; + flairUrl: string | null; + hidden: boolean; + id: number; + incomingLinkCount: number; + mentionedUsers?: Array | undefined; + moderator: boolean; + name?: string | null | undefined; + postNumber: number; + postType: number; + primaryGroupName: string | null; + quoteCount: number; + raw: string; + readersCount: number; + reads: number; + replyCount: number; + replyToPostNumber: string | null; + reviewableId: string | null; + reviewableScoreCount: number; + reviewableScorePendingCount: number; + score: number; + staff: boolean; + topicId: number; + topicSlug: string; + trustLevel: number; + updatedAt: string; + userDeleted: boolean; + userId: number; + userTitle: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** * post updated */ export type UpdatePostResponseBody = { - post: UpdatePostPost; + post: UpdatePostPost; }; /** @internal */ export const Post$inboundSchema: z.ZodType = z - .object({ - edit_reason: z.string().optional(), - raw: z.string(), - }) - .transform((v) => { - return remap$(v, { - edit_reason: "editReason", - }); + .object({ + edit_reason: z.string().optional(), + raw: z.string(), + }).transform((v) => { + return remap$(v, { + "edit_reason": "editReason", }); + }); /** @internal */ export type Post$Outbound = { - edit_reason?: string | undefined; - raw: string; + edit_reason?: string | undefined; + raw: string; }; /** @internal */ -export const Post$outboundSchema: z.ZodType = z - .object({ - editReason: z.string().optional(), - raw: z.string(), - }) - .transform((v) => { - return remap$(v, { - editReason: "edit_reason", - }); +export const Post$outboundSchema: z.ZodType = + z.object({ + editReason: z.string().optional(), + raw: z.string(), + }).transform((v) => { + return remap$(v, { + editReason: "edit_reason", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Post$ { - /** @deprecated use `Post$inboundSchema` instead. */ - export const inboundSchema = Post$inboundSchema; - /** @deprecated use `Post$outboundSchema` instead. */ - export const outboundSchema = Post$outboundSchema; - /** @deprecated use `Post$Outbound` instead. */ - export type Outbound = Post$Outbound; + /** @deprecated use `Post$inboundSchema` instead. */ + export const inboundSchema = Post$inboundSchema; + /** @deprecated use `Post$outboundSchema` instead. */ + export const outboundSchema = Post$outboundSchema; + /** @deprecated use `Post$Outbound` instead. */ + export type Outbound = Post$Outbound; } /** @internal */ export const UpdatePostRequestBody$inboundSchema: z.ZodType< - UpdatePostRequestBody, - z.ZodTypeDef, - unknown + UpdatePostRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - post: z.lazy(() => Post$inboundSchema).optional(), + post: z.lazy(() => Post$inboundSchema).optional(), }); /** @internal */ export type UpdatePostRequestBody$Outbound = { - post?: Post$Outbound | undefined; + post?: Post$Outbound | undefined; }; /** @internal */ export const UpdatePostRequestBody$outboundSchema: z.ZodType< - UpdatePostRequestBody$Outbound, - z.ZodTypeDef, - UpdatePostRequestBody + UpdatePostRequestBody$Outbound, + z.ZodTypeDef, + UpdatePostRequestBody > = z.object({ - post: z.lazy(() => Post$outboundSchema).optional(), + post: z.lazy(() => Post$outboundSchema).optional(), }); /** @@ -157,403 +155,402 @@ export const UpdatePostRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePostRequestBody$ { - /** @deprecated use `UpdatePostRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePostRequestBody$inboundSchema; - /** @deprecated use `UpdatePostRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePostRequestBody$outboundSchema; - /** @deprecated use `UpdatePostRequestBody$Outbound` instead. */ - export type Outbound = UpdatePostRequestBody$Outbound; + /** @deprecated use `UpdatePostRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdatePostRequestBody$inboundSchema; + /** @deprecated use `UpdatePostRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdatePostRequestBody$outboundSchema; + /** @deprecated use `UpdatePostRequestBody$Outbound` instead. */ + export type Outbound = UpdatePostRequestBody$Outbound; } /** @internal */ -export const UpdatePostRequest$inboundSchema: z.ZodType = - z - .object({ - RequestBody: z.lazy(() => UpdatePostRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); +export const UpdatePostRequest$inboundSchema: z.ZodType< + UpdatePostRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdatePostRequestBody$inboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdatePostRequest$Outbound = { - RequestBody?: UpdatePostRequestBody$Outbound | undefined; - id: string; + RequestBody?: UpdatePostRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const UpdatePostRequest$outboundSchema: z.ZodType< - UpdatePostRequest$Outbound, - z.ZodTypeDef, - UpdatePostRequest -> = z - .object({ - requestBody: z.lazy(() => UpdatePostRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdatePostRequest$Outbound, + z.ZodTypeDef, + UpdatePostRequest +> = z.object({ + requestBody: z.lazy(() => UpdatePostRequestBody$outboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePostRequest$ { - /** @deprecated use `UpdatePostRequest$inboundSchema` instead. */ - export const inboundSchema = UpdatePostRequest$inboundSchema; - /** @deprecated use `UpdatePostRequest$outboundSchema` instead. */ - export const outboundSchema = UpdatePostRequest$outboundSchema; - /** @deprecated use `UpdatePostRequest$Outbound` instead. */ - export type Outbound = UpdatePostRequest$Outbound; + /** @deprecated use `UpdatePostRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePostRequest$inboundSchema; + /** @deprecated use `UpdatePostRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePostRequest$outboundSchema; + /** @deprecated use `UpdatePostRequest$Outbound` instead. */ + export type Outbound = UpdatePostRequest$Outbound; } /** @internal */ export const UpdatePostActionsSummary$inboundSchema: z.ZodType< - UpdatePostActionsSummary, - z.ZodTypeDef, - unknown -> = z - .object({ - can_act: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - can_act: "canAct", - }); - }); + UpdatePostActionsSummary, + z.ZodTypeDef, + unknown +> = z.object({ + can_act: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "can_act": "canAct", + }); +}); /** @internal */ export type UpdatePostActionsSummary$Outbound = { - can_act: boolean; - id: number; + can_act: boolean; + id: number; }; /** @internal */ export const UpdatePostActionsSummary$outboundSchema: z.ZodType< - UpdatePostActionsSummary$Outbound, - z.ZodTypeDef, - UpdatePostActionsSummary -> = z - .object({ - canAct: z.boolean(), - id: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - canAct: "can_act", - }); - }); + UpdatePostActionsSummary$Outbound, + z.ZodTypeDef, + UpdatePostActionsSummary +> = z.object({ + canAct: z.boolean(), + id: z.number().int(), +}).transform((v) => { + return remap$(v, { + canAct: "can_act", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePostActionsSummary$ { - /** @deprecated use `UpdatePostActionsSummary$inboundSchema` instead. */ - export const inboundSchema = UpdatePostActionsSummary$inboundSchema; - /** @deprecated use `UpdatePostActionsSummary$outboundSchema` instead. */ - export const outboundSchema = UpdatePostActionsSummary$outboundSchema; - /** @deprecated use `UpdatePostActionsSummary$Outbound` instead. */ - export type Outbound = UpdatePostActionsSummary$Outbound; + /** @deprecated use `UpdatePostActionsSummary$inboundSchema` instead. */ + export const inboundSchema = UpdatePostActionsSummary$inboundSchema; + /** @deprecated use `UpdatePostActionsSummary$outboundSchema` instead. */ + export const outboundSchema = UpdatePostActionsSummary$outboundSchema; + /** @deprecated use `UpdatePostActionsSummary$Outbound` instead. */ + export type Outbound = UpdatePostActionsSummary$Outbound; } /** @internal */ -export const UpdatePostPost$inboundSchema: z.ZodType = z - .object({ - actions_summary: z.array(z.lazy(() => UpdatePostActionsSummary$inboundSchema)), - admin: z.boolean(), - avatar_template: z.string(), - bookmarked: z.boolean(), - can_delete: z.boolean(), - can_edit: z.boolean(), - can_recover: z.boolean(), - can_see_hidden_post: z.boolean().optional(), - can_view_edit_history: z.boolean(), - can_wiki: z.boolean(), - cooked: z.string(), - created_at: z.string(), - deleted_at: z.nullable(z.string()), - display_username: z.nullable(z.string()).optional(), - draft_sequence: z.number().int(), - edit_reason: z.nullable(z.string()), - flair_bg_color: z.nullable(z.string()), - flair_color: z.nullable(z.string()), - flair_group_id: z.nullable(z.string()).optional(), - flair_name: z.nullable(z.string()), - flair_url: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incoming_link_count: z.number().int(), - mentioned_users: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()).optional(), - post_number: z.number().int(), - post_type: z.number().int(), - primary_group_name: z.nullable(z.string()), - quote_count: z.number().int(), - raw: z.string(), - readers_count: z.number().int(), - reads: z.number().int(), - reply_count: z.number().int(), - reply_to_post_number: z.nullable(z.string()), - reviewable_id: z.nullable(z.string()), - reviewable_score_count: z.number().int(), - reviewable_score_pending_count: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topic_id: z.number().int(), - topic_slug: z.string(), - trust_level: z.number().int(), - updated_at: z.string(), - user_deleted: z.boolean(), - user_id: z.number().int(), - user_title: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actions_summary: "actionsSummary", - avatar_template: "avatarTemplate", - can_delete: "canDelete", - can_edit: "canEdit", - can_recover: "canRecover", - can_see_hidden_post: "canSeeHiddenPost", - can_view_edit_history: "canViewEditHistory", - can_wiki: "canWiki", - created_at: "createdAt", - deleted_at: "deletedAt", - display_username: "displayUsername", - draft_sequence: "draftSequence", - edit_reason: "editReason", - flair_bg_color: "flairBgColor", - flair_color: "flairColor", - flair_group_id: "flairGroupId", - flair_name: "flairName", - flair_url: "flairUrl", - incoming_link_count: "incomingLinkCount", - mentioned_users: "mentionedUsers", - post_number: "postNumber", - post_type: "postType", - primary_group_name: "primaryGroupName", - quote_count: "quoteCount", - readers_count: "readersCount", - reply_count: "replyCount", - reply_to_post_number: "replyToPostNumber", - reviewable_id: "reviewableId", - reviewable_score_count: "reviewableScoreCount", - reviewable_score_pending_count: "reviewableScorePendingCount", - topic_id: "topicId", - topic_slug: "topicSlug", - trust_level: "trustLevel", - updated_at: "updatedAt", - user_deleted: "userDeleted", - user_id: "userId", - user_title: "userTitle", - }); - }); +export const UpdatePostPost$inboundSchema: z.ZodType< + UpdatePostPost, + z.ZodTypeDef, + unknown +> = z.object({ + actions_summary: z.array( + z.lazy(() => UpdatePostActionsSummary$inboundSchema), + ), + admin: z.boolean(), + avatar_template: z.string(), + bookmarked: z.boolean(), + can_delete: z.boolean(), + can_edit: z.boolean(), + can_recover: z.boolean(), + can_see_hidden_post: z.boolean().optional(), + can_view_edit_history: z.boolean(), + can_wiki: z.boolean(), + cooked: z.string(), + created_at: z.string(), + deleted_at: z.nullable(z.string()), + display_username: z.nullable(z.string()).optional(), + draft_sequence: z.number().int(), + edit_reason: z.nullable(z.string()), + flair_bg_color: z.nullable(z.string()), + flair_color: z.nullable(z.string()), + flair_group_id: z.nullable(z.string()).optional(), + flair_name: z.nullable(z.string()), + flair_url: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incoming_link_count: z.number().int(), + mentioned_users: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()).optional(), + post_number: z.number().int(), + post_type: z.number().int(), + primary_group_name: z.nullable(z.string()), + quote_count: z.number().int(), + raw: z.string(), + readers_count: z.number().int(), + reads: z.number().int(), + reply_count: z.number().int(), + reply_to_post_number: z.nullable(z.string()), + reviewable_id: z.nullable(z.string()), + reviewable_score_count: z.number().int(), + reviewable_score_pending_count: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topic_id: z.number().int(), + topic_slug: z.string(), + trust_level: z.number().int(), + updated_at: z.string(), + user_deleted: z.boolean(), + user_id: z.number().int(), + user_title: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + "actions_summary": "actionsSummary", + "avatar_template": "avatarTemplate", + "can_delete": "canDelete", + "can_edit": "canEdit", + "can_recover": "canRecover", + "can_see_hidden_post": "canSeeHiddenPost", + "can_view_edit_history": "canViewEditHistory", + "can_wiki": "canWiki", + "created_at": "createdAt", + "deleted_at": "deletedAt", + "display_username": "displayUsername", + "draft_sequence": "draftSequence", + "edit_reason": "editReason", + "flair_bg_color": "flairBgColor", + "flair_color": "flairColor", + "flair_group_id": "flairGroupId", + "flair_name": "flairName", + "flair_url": "flairUrl", + "incoming_link_count": "incomingLinkCount", + "mentioned_users": "mentionedUsers", + "post_number": "postNumber", + "post_type": "postType", + "primary_group_name": "primaryGroupName", + "quote_count": "quoteCount", + "readers_count": "readersCount", + "reply_count": "replyCount", + "reply_to_post_number": "replyToPostNumber", + "reviewable_id": "reviewableId", + "reviewable_score_count": "reviewableScoreCount", + "reviewable_score_pending_count": "reviewableScorePendingCount", + "topic_id": "topicId", + "topic_slug": "topicSlug", + "trust_level": "trustLevel", + "updated_at": "updatedAt", + "user_deleted": "userDeleted", + "user_id": "userId", + "user_title": "userTitle", + }); +}); /** @internal */ export type UpdatePostPost$Outbound = { - actions_summary: Array; - admin: boolean; - avatar_template: string; - bookmarked: boolean; - can_delete: boolean; - can_edit: boolean; - can_recover: boolean; - can_see_hidden_post?: boolean | undefined; - can_view_edit_history: boolean; - can_wiki: boolean; - cooked: string; - created_at: string; - deleted_at: string | null; - display_username?: string | null | undefined; - draft_sequence: number; - edit_reason: string | null; - flair_bg_color: string | null; - flair_color: string | null; - flair_group_id?: string | null | undefined; - flair_name: string | null; - flair_url: string | null; - hidden: boolean; - id: number; - incoming_link_count: number; - mentioned_users?: Array | undefined; - moderator: boolean; - name?: string | null | undefined; - post_number: number; - post_type: number; - primary_group_name: string | null; - quote_count: number; - raw: string; - readers_count: number; - reads: number; - reply_count: number; - reply_to_post_number: string | null; - reviewable_id: string | null; - reviewable_score_count: number; - reviewable_score_pending_count: number; - score: number; - staff: boolean; - topic_id: number; - topic_slug: string; - trust_level: number; - updated_at: string; - user_deleted: boolean; - user_id: number; - user_title: string | null; - username: string; - version: number; - wiki: boolean; - yours: boolean; + actions_summary: Array; + admin: boolean; + avatar_template: string; + bookmarked: boolean; + can_delete: boolean; + can_edit: boolean; + can_recover: boolean; + can_see_hidden_post?: boolean | undefined; + can_view_edit_history: boolean; + can_wiki: boolean; + cooked: string; + created_at: string; + deleted_at: string | null; + display_username?: string | null | undefined; + draft_sequence: number; + edit_reason: string | null; + flair_bg_color: string | null; + flair_color: string | null; + flair_group_id?: string | null | undefined; + flair_name: string | null; + flair_url: string | null; + hidden: boolean; + id: number; + incoming_link_count: number; + mentioned_users?: Array | undefined; + moderator: boolean; + name?: string | null | undefined; + post_number: number; + post_type: number; + primary_group_name: string | null; + quote_count: number; + raw: string; + readers_count: number; + reads: number; + reply_count: number; + reply_to_post_number: string | null; + reviewable_id: string | null; + reviewable_score_count: number; + reviewable_score_pending_count: number; + score: number; + staff: boolean; + topic_id: number; + topic_slug: string; + trust_level: number; + updated_at: string; + user_deleted: boolean; + user_id: number; + user_title: string | null; + username: string; + version: number; + wiki: boolean; + yours: boolean; }; /** @internal */ export const UpdatePostPost$outboundSchema: z.ZodType< - UpdatePostPost$Outbound, - z.ZodTypeDef, - UpdatePostPost -> = z - .object({ - actionsSummary: z.array(z.lazy(() => UpdatePostActionsSummary$outboundSchema)), - admin: z.boolean(), - avatarTemplate: z.string(), - bookmarked: z.boolean(), - canDelete: z.boolean(), - canEdit: z.boolean(), - canRecover: z.boolean(), - canSeeHiddenPost: z.boolean().optional(), - canViewEditHistory: z.boolean(), - canWiki: z.boolean(), - cooked: z.string(), - createdAt: z.string(), - deletedAt: z.nullable(z.string()), - displayUsername: z.nullable(z.string()).optional(), - draftSequence: z.number().int(), - editReason: z.nullable(z.string()), - flairBgColor: z.nullable(z.string()), - flairColor: z.nullable(z.string()), - flairGroupId: z.nullable(z.string()).optional(), - flairName: z.nullable(z.string()), - flairUrl: z.nullable(z.string()), - hidden: z.boolean(), - id: z.number().int(), - incomingLinkCount: z.number().int(), - mentionedUsers: z.array(z.any()).optional(), - moderator: z.boolean(), - name: z.nullable(z.string()).optional(), - postNumber: z.number().int(), - postType: z.number().int(), - primaryGroupName: z.nullable(z.string()), - quoteCount: z.number().int(), - raw: z.string(), - readersCount: z.number().int(), - reads: z.number().int(), - replyCount: z.number().int(), - replyToPostNumber: z.nullable(z.string()), - reviewableId: z.nullable(z.string()), - reviewableScoreCount: z.number().int(), - reviewableScorePendingCount: z.number().int(), - score: z.number().int(), - staff: z.boolean(), - topicId: z.number().int(), - topicSlug: z.string(), - trustLevel: z.number().int(), - updatedAt: z.string(), - userDeleted: z.boolean(), - userId: z.number().int(), - userTitle: z.nullable(z.string()), - username: z.string(), - version: z.number().int(), - wiki: z.boolean(), - yours: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - actionsSummary: "actions_summary", - avatarTemplate: "avatar_template", - canDelete: "can_delete", - canEdit: "can_edit", - canRecover: "can_recover", - canSeeHiddenPost: "can_see_hidden_post", - canViewEditHistory: "can_view_edit_history", - canWiki: "can_wiki", - createdAt: "created_at", - deletedAt: "deleted_at", - displayUsername: "display_username", - draftSequence: "draft_sequence", - editReason: "edit_reason", - flairBgColor: "flair_bg_color", - flairColor: "flair_color", - flairGroupId: "flair_group_id", - flairName: "flair_name", - flairUrl: "flair_url", - incomingLinkCount: "incoming_link_count", - mentionedUsers: "mentioned_users", - postNumber: "post_number", - postType: "post_type", - primaryGroupName: "primary_group_name", - quoteCount: "quote_count", - readersCount: "readers_count", - replyCount: "reply_count", - replyToPostNumber: "reply_to_post_number", - reviewableId: "reviewable_id", - reviewableScoreCount: "reviewable_score_count", - reviewableScorePendingCount: "reviewable_score_pending_count", - topicId: "topic_id", - topicSlug: "topic_slug", - trustLevel: "trust_level", - updatedAt: "updated_at", - userDeleted: "user_deleted", - userId: "user_id", - userTitle: "user_title", - }); - }); + UpdatePostPost$Outbound, + z.ZodTypeDef, + UpdatePostPost +> = z.object({ + actionsSummary: z.array( + z.lazy(() => UpdatePostActionsSummary$outboundSchema), + ), + admin: z.boolean(), + avatarTemplate: z.string(), + bookmarked: z.boolean(), + canDelete: z.boolean(), + canEdit: z.boolean(), + canRecover: z.boolean(), + canSeeHiddenPost: z.boolean().optional(), + canViewEditHistory: z.boolean(), + canWiki: z.boolean(), + cooked: z.string(), + createdAt: z.string(), + deletedAt: z.nullable(z.string()), + displayUsername: z.nullable(z.string()).optional(), + draftSequence: z.number().int(), + editReason: z.nullable(z.string()), + flairBgColor: z.nullable(z.string()), + flairColor: z.nullable(z.string()), + flairGroupId: z.nullable(z.string()).optional(), + flairName: z.nullable(z.string()), + flairUrl: z.nullable(z.string()), + hidden: z.boolean(), + id: z.number().int(), + incomingLinkCount: z.number().int(), + mentionedUsers: z.array(z.any()).optional(), + moderator: z.boolean(), + name: z.nullable(z.string()).optional(), + postNumber: z.number().int(), + postType: z.number().int(), + primaryGroupName: z.nullable(z.string()), + quoteCount: z.number().int(), + raw: z.string(), + readersCount: z.number().int(), + reads: z.number().int(), + replyCount: z.number().int(), + replyToPostNumber: z.nullable(z.string()), + reviewableId: z.nullable(z.string()), + reviewableScoreCount: z.number().int(), + reviewableScorePendingCount: z.number().int(), + score: z.number().int(), + staff: z.boolean(), + topicId: z.number().int(), + topicSlug: z.string(), + trustLevel: z.number().int(), + updatedAt: z.string(), + userDeleted: z.boolean(), + userId: z.number().int(), + userTitle: z.nullable(z.string()), + username: z.string(), + version: z.number().int(), + wiki: z.boolean(), + yours: z.boolean(), +}).transform((v) => { + return remap$(v, { + actionsSummary: "actions_summary", + avatarTemplate: "avatar_template", + canDelete: "can_delete", + canEdit: "can_edit", + canRecover: "can_recover", + canSeeHiddenPost: "can_see_hidden_post", + canViewEditHistory: "can_view_edit_history", + canWiki: "can_wiki", + createdAt: "created_at", + deletedAt: "deleted_at", + displayUsername: "display_username", + draftSequence: "draft_sequence", + editReason: "edit_reason", + flairBgColor: "flair_bg_color", + flairColor: "flair_color", + flairGroupId: "flair_group_id", + flairName: "flair_name", + flairUrl: "flair_url", + incomingLinkCount: "incoming_link_count", + mentionedUsers: "mentioned_users", + postNumber: "post_number", + postType: "post_type", + primaryGroupName: "primary_group_name", + quoteCount: "quote_count", + readersCount: "readers_count", + replyCount: "reply_count", + replyToPostNumber: "reply_to_post_number", + reviewableId: "reviewable_id", + reviewableScoreCount: "reviewable_score_count", + reviewableScorePendingCount: "reviewable_score_pending_count", + topicId: "topic_id", + topicSlug: "topic_slug", + trustLevel: "trust_level", + updatedAt: "updated_at", + userDeleted: "user_deleted", + userId: "user_id", + userTitle: "user_title", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePostPost$ { - /** @deprecated use `UpdatePostPost$inboundSchema` instead. */ - export const inboundSchema = UpdatePostPost$inboundSchema; - /** @deprecated use `UpdatePostPost$outboundSchema` instead. */ - export const outboundSchema = UpdatePostPost$outboundSchema; - /** @deprecated use `UpdatePostPost$Outbound` instead. */ - export type Outbound = UpdatePostPost$Outbound; + /** @deprecated use `UpdatePostPost$inboundSchema` instead. */ + export const inboundSchema = UpdatePostPost$inboundSchema; + /** @deprecated use `UpdatePostPost$outboundSchema` instead. */ + export const outboundSchema = UpdatePostPost$outboundSchema; + /** @deprecated use `UpdatePostPost$Outbound` instead. */ + export type Outbound = UpdatePostPost$Outbound; } /** @internal */ export const UpdatePostResponseBody$inboundSchema: z.ZodType< - UpdatePostResponseBody, - z.ZodTypeDef, - unknown + UpdatePostResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - post: z.lazy(() => UpdatePostPost$inboundSchema), + post: z.lazy(() => UpdatePostPost$inboundSchema), }); /** @internal */ export type UpdatePostResponseBody$Outbound = { - post: UpdatePostPost$Outbound; + post: UpdatePostPost$Outbound; }; /** @internal */ export const UpdatePostResponseBody$outboundSchema: z.ZodType< - UpdatePostResponseBody$Outbound, - z.ZodTypeDef, - UpdatePostResponseBody + UpdatePostResponseBody$Outbound, + z.ZodTypeDef, + UpdatePostResponseBody > = z.object({ - post: z.lazy(() => UpdatePostPost$outboundSchema), + post: z.lazy(() => UpdatePostPost$outboundSchema), }); /** @@ -561,10 +558,10 @@ export const UpdatePostResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePostResponseBody$ { - /** @deprecated use `UpdatePostResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePostResponseBody$inboundSchema; - /** @deprecated use `UpdatePostResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePostResponseBody$outboundSchema; - /** @deprecated use `UpdatePostResponseBody$Outbound` instead. */ - export type Outbound = UpdatePostResponseBody$Outbound; + /** @deprecated use `UpdatePostResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdatePostResponseBody$inboundSchema; + /** @deprecated use `UpdatePostResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdatePostResponseBody$outboundSchema; + /** @deprecated use `UpdatePostResponseBody$Outbound` instead. */ + export type Outbound = UpdatePostResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatetaggroup.ts b/src/sdk/models/operations/updatetaggroup.ts index 11da492..15d7e33 100644 --- a/src/sdk/models/operations/updatetaggroup.ts +++ b/src/sdk/models/operations/updatetaggroup.ts @@ -2,60 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateTagGroupRequestBody = { - name?: string | undefined; + name?: string | undefined; }; export type UpdateTagGroupRequest = { - requestBody?: UpdateTagGroupRequestBody | undefined; - id: string; + requestBody?: UpdateTagGroupRequestBody | undefined; + id: string; }; export type UpdateTagGroupPermissions = { - everyone?: number | undefined; + everyone?: number | undefined; }; export type UpdateTagGroupTagGroup = { - id?: number | undefined; - name?: string | undefined; - onePerTopic?: boolean | undefined; - parentTagName?: Array | undefined; - permissions?: UpdateTagGroupPermissions | undefined; - tagNames?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + onePerTopic?: boolean | undefined; + parentTagName?: Array | undefined; + permissions?: UpdateTagGroupPermissions | undefined; + tagNames?: Array | undefined; }; /** * Tag group updated */ export type UpdateTagGroupResponseBody = { - success?: string | undefined; - tagGroup?: UpdateTagGroupTagGroup | undefined; + success?: string | undefined; + tagGroup?: UpdateTagGroupTagGroup | undefined; }; /** @internal */ export const UpdateTagGroupRequestBody$inboundSchema: z.ZodType< - UpdateTagGroupRequestBody, - z.ZodTypeDef, - unknown + UpdateTagGroupRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string().optional(), + name: z.string().optional(), }); /** @internal */ export type UpdateTagGroupRequestBody$Outbound = { - name?: string | undefined; + name?: string | undefined; }; /** @internal */ export const UpdateTagGroupRequestBody$outboundSchema: z.ZodType< - UpdateTagGroupRequestBody$Outbound, - z.ZodTypeDef, - UpdateTagGroupRequestBody + UpdateTagGroupRequestBody$Outbound, + z.ZodTypeDef, + UpdateTagGroupRequestBody > = z.object({ - name: z.string().optional(), + name: z.string().optional(), }); /** @@ -63,86 +63,83 @@ export const UpdateTagGroupRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTagGroupRequestBody$ { - /** @deprecated use `UpdateTagGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTagGroupRequestBody$inboundSchema; - /** @deprecated use `UpdateTagGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTagGroupRequestBody$outboundSchema; - /** @deprecated use `UpdateTagGroupRequestBody$Outbound` instead. */ - export type Outbound = UpdateTagGroupRequestBody$Outbound; + /** @deprecated use `UpdateTagGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTagGroupRequestBody$inboundSchema; + /** @deprecated use `UpdateTagGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTagGroupRequestBody$outboundSchema; + /** @deprecated use `UpdateTagGroupRequestBody$Outbound` instead. */ + export type Outbound = UpdateTagGroupRequestBody$Outbound; } /** @internal */ export const UpdateTagGroupRequest$inboundSchema: z.ZodType< - UpdateTagGroupRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateTagGroupRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateTagGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateTagGroupRequestBody$inboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateTagGroupRequest$Outbound = { - RequestBody?: UpdateTagGroupRequestBody$Outbound | undefined; - id: string; + RequestBody?: UpdateTagGroupRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const UpdateTagGroupRequest$outboundSchema: z.ZodType< - UpdateTagGroupRequest$Outbound, - z.ZodTypeDef, - UpdateTagGroupRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateTagGroupRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateTagGroupRequest$Outbound, + z.ZodTypeDef, + UpdateTagGroupRequest +> = z.object({ + requestBody: z.lazy(() => UpdateTagGroupRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTagGroupRequest$ { - /** @deprecated use `UpdateTagGroupRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateTagGroupRequest$inboundSchema; - /** @deprecated use `UpdateTagGroupRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateTagGroupRequest$outboundSchema; - /** @deprecated use `UpdateTagGroupRequest$Outbound` instead. */ - export type Outbound = UpdateTagGroupRequest$Outbound; + /** @deprecated use `UpdateTagGroupRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTagGroupRequest$inboundSchema; + /** @deprecated use `UpdateTagGroupRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateTagGroupRequest$outboundSchema; + /** @deprecated use `UpdateTagGroupRequest$Outbound` instead. */ + export type Outbound = UpdateTagGroupRequest$Outbound; } /** @internal */ export const UpdateTagGroupPermissions$inboundSchema: z.ZodType< - UpdateTagGroupPermissions, - z.ZodTypeDef, - unknown + UpdateTagGroupPermissions, + z.ZodTypeDef, + unknown > = z.object({ - everyone: z.number().int().optional(), + everyone: z.number().int().optional(), }); /** @internal */ export type UpdateTagGroupPermissions$Outbound = { - everyone?: number | undefined; + everyone?: number | undefined; }; /** @internal */ export const UpdateTagGroupPermissions$outboundSchema: z.ZodType< - UpdateTagGroupPermissions$Outbound, - z.ZodTypeDef, - UpdateTagGroupPermissions + UpdateTagGroupPermissions$Outbound, + z.ZodTypeDef, + UpdateTagGroupPermissions > = z.object({ - everyone: z.number().int().optional(), + everyone: z.number().int().optional(), }); /** @@ -150,128 +147,121 @@ export const UpdateTagGroupPermissions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTagGroupPermissions$ { - /** @deprecated use `UpdateTagGroupPermissions$inboundSchema` instead. */ - export const inboundSchema = UpdateTagGroupPermissions$inboundSchema; - /** @deprecated use `UpdateTagGroupPermissions$outboundSchema` instead. */ - export const outboundSchema = UpdateTagGroupPermissions$outboundSchema; - /** @deprecated use `UpdateTagGroupPermissions$Outbound` instead. */ - export type Outbound = UpdateTagGroupPermissions$Outbound; + /** @deprecated use `UpdateTagGroupPermissions$inboundSchema` instead. */ + export const inboundSchema = UpdateTagGroupPermissions$inboundSchema; + /** @deprecated use `UpdateTagGroupPermissions$outboundSchema` instead. */ + export const outboundSchema = UpdateTagGroupPermissions$outboundSchema; + /** @deprecated use `UpdateTagGroupPermissions$Outbound` instead. */ + export type Outbound = UpdateTagGroupPermissions$Outbound; } /** @internal */ export const UpdateTagGroupTagGroup$inboundSchema: z.ZodType< - UpdateTagGroupTagGroup, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - one_per_topic: z.boolean().optional(), - parent_tag_name: z.array(z.any()).optional(), - permissions: z.lazy(() => UpdateTagGroupPermissions$inboundSchema).optional(), - tag_names: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - one_per_topic: "onePerTopic", - parent_tag_name: "parentTagName", - tag_names: "tagNames", - }); - }); + UpdateTagGroupTagGroup, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + one_per_topic: z.boolean().optional(), + parent_tag_name: z.array(z.any()).optional(), + permissions: z.lazy(() => UpdateTagGroupPermissions$inboundSchema).optional(), + tag_names: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "one_per_topic": "onePerTopic", + "parent_tag_name": "parentTagName", + "tag_names": "tagNames", + }); +}); /** @internal */ export type UpdateTagGroupTagGroup$Outbound = { - id?: number | undefined; - name?: string | undefined; - one_per_topic?: boolean | undefined; - parent_tag_name?: Array | undefined; - permissions?: UpdateTagGroupPermissions$Outbound | undefined; - tag_names?: Array | undefined; + id?: number | undefined; + name?: string | undefined; + one_per_topic?: boolean | undefined; + parent_tag_name?: Array | undefined; + permissions?: UpdateTagGroupPermissions$Outbound | undefined; + tag_names?: Array | undefined; }; /** @internal */ export const UpdateTagGroupTagGroup$outboundSchema: z.ZodType< - UpdateTagGroupTagGroup$Outbound, - z.ZodTypeDef, - UpdateTagGroupTagGroup -> = z - .object({ - id: z.number().int().optional(), - name: z.string().optional(), - onePerTopic: z.boolean().optional(), - parentTagName: z.array(z.any()).optional(), - permissions: z.lazy(() => UpdateTagGroupPermissions$outboundSchema).optional(), - tagNames: z.array(z.any()).optional(), - }) - .transform((v) => { - return remap$(v, { - onePerTopic: "one_per_topic", - parentTagName: "parent_tag_name", - tagNames: "tag_names", - }); - }); + UpdateTagGroupTagGroup$Outbound, + z.ZodTypeDef, + UpdateTagGroupTagGroup +> = z.object({ + id: z.number().int().optional(), + name: z.string().optional(), + onePerTopic: z.boolean().optional(), + parentTagName: z.array(z.any()).optional(), + permissions: z.lazy(() => UpdateTagGroupPermissions$outboundSchema) + .optional(), + tagNames: z.array(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + onePerTopic: "one_per_topic", + parentTagName: "parent_tag_name", + tagNames: "tag_names", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTagGroupTagGroup$ { - /** @deprecated use `UpdateTagGroupTagGroup$inboundSchema` instead. */ - export const inboundSchema = UpdateTagGroupTagGroup$inboundSchema; - /** @deprecated use `UpdateTagGroupTagGroup$outboundSchema` instead. */ - export const outboundSchema = UpdateTagGroupTagGroup$outboundSchema; - /** @deprecated use `UpdateTagGroupTagGroup$Outbound` instead. */ - export type Outbound = UpdateTagGroupTagGroup$Outbound; + /** @deprecated use `UpdateTagGroupTagGroup$inboundSchema` instead. */ + export const inboundSchema = UpdateTagGroupTagGroup$inboundSchema; + /** @deprecated use `UpdateTagGroupTagGroup$outboundSchema` instead. */ + export const outboundSchema = UpdateTagGroupTagGroup$outboundSchema; + /** @deprecated use `UpdateTagGroupTagGroup$Outbound` instead. */ + export type Outbound = UpdateTagGroupTagGroup$Outbound; } /** @internal */ export const UpdateTagGroupResponseBody$inboundSchema: z.ZodType< - UpdateTagGroupResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - success: z.string().optional(), - tag_group: z.lazy(() => UpdateTagGroupTagGroup$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - tag_group: "tagGroup", - }); - }); + UpdateTagGroupResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + success: z.string().optional(), + tag_group: z.lazy(() => UpdateTagGroupTagGroup$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "tag_group": "tagGroup", + }); +}); /** @internal */ export type UpdateTagGroupResponseBody$Outbound = { - success?: string | undefined; - tag_group?: UpdateTagGroupTagGroup$Outbound | undefined; + success?: string | undefined; + tag_group?: UpdateTagGroupTagGroup$Outbound | undefined; }; /** @internal */ export const UpdateTagGroupResponseBody$outboundSchema: z.ZodType< - UpdateTagGroupResponseBody$Outbound, - z.ZodTypeDef, - UpdateTagGroupResponseBody -> = z - .object({ - success: z.string().optional(), - tagGroup: z.lazy(() => UpdateTagGroupTagGroup$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - tagGroup: "tag_group", - }); - }); + UpdateTagGroupResponseBody$Outbound, + z.ZodTypeDef, + UpdateTagGroupResponseBody +> = z.object({ + success: z.string().optional(), + tagGroup: z.lazy(() => UpdateTagGroupTagGroup$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + tagGroup: "tag_group", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTagGroupResponseBody$ { - /** @deprecated use `UpdateTagGroupResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTagGroupResponseBody$inboundSchema; - /** @deprecated use `UpdateTagGroupResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTagGroupResponseBody$outboundSchema; - /** @deprecated use `UpdateTagGroupResponseBody$Outbound` instead. */ - export type Outbound = UpdateTagGroupResponseBody$Outbound; + /** @deprecated use `UpdateTagGroupResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTagGroupResponseBody$inboundSchema; + /** @deprecated use `UpdateTagGroupResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTagGroupResponseBody$outboundSchema; + /** @deprecated use `UpdateTagGroupResponseBody$Outbound` instead. */ + export type Outbound = UpdateTagGroupResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatetopic.ts b/src/sdk/models/operations/updatetopic.ts index fdd9e4a..0d6dc85 100644 --- a/src/sdk/models/operations/updatetopic.ts +++ b/src/sdk/models/operations/updatetopic.ts @@ -2,104 +2,105 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Topic = { - categoryId?: number | undefined; - title?: string | undefined; + categoryId?: number | undefined; + title?: string | undefined; }; export type UpdateTopicRequestBody = { - topic?: Topic | undefined; + topic?: Topic | undefined; }; export type UpdateTopicRequest = { - apiKey: string; - apiUsername: string; - requestBody?: UpdateTopicRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: UpdateTopicRequestBody | undefined; + id: string; }; export type BasicTopic = { - fancyTitle?: string | undefined; - id?: number | undefined; - postsCount?: number | undefined; - slug?: string | undefined; - title?: string | undefined; + fancyTitle?: string | undefined; + id?: number | undefined; + postsCount?: number | undefined; + slug?: string | undefined; + title?: string | undefined; }; /** * topic updated */ export type UpdateTopicResponseBody = { - basicTopic?: BasicTopic | undefined; + basicTopic?: BasicTopic | undefined; }; /** @internal */ export const Topic$inboundSchema: z.ZodType = z - .object({ - category_id: z.number().int().optional(), - title: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - category_id: "categoryId", - }); + .object({ + category_id: z.number().int().optional(), + title: z.string().optional(), + }).transform((v) => { + return remap$(v, { + "category_id": "categoryId", }); + }); /** @internal */ export type Topic$Outbound = { - category_id?: number | undefined; - title?: string | undefined; + category_id?: number | undefined; + title?: string | undefined; }; /** @internal */ -export const Topic$outboundSchema: z.ZodType = z - .object({ - categoryId: z.number().int().optional(), - title: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - categoryId: "category_id", - }); - }); +export const Topic$outboundSchema: z.ZodType< + Topic$Outbound, + z.ZodTypeDef, + Topic +> = z.object({ + categoryId: z.number().int().optional(), + title: z.string().optional(), +}).transform((v) => { + return remap$(v, { + categoryId: "category_id", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Topic$ { - /** @deprecated use `Topic$inboundSchema` instead. */ - export const inboundSchema = Topic$inboundSchema; - /** @deprecated use `Topic$outboundSchema` instead. */ - export const outboundSchema = Topic$outboundSchema; - /** @deprecated use `Topic$Outbound` instead. */ - export type Outbound = Topic$Outbound; + /** @deprecated use `Topic$inboundSchema` instead. */ + export const inboundSchema = Topic$inboundSchema; + /** @deprecated use `Topic$outboundSchema` instead. */ + export const outboundSchema = Topic$outboundSchema; + /** @deprecated use `Topic$Outbound` instead. */ + export type Outbound = Topic$Outbound; } /** @internal */ export const UpdateTopicRequestBody$inboundSchema: z.ZodType< - UpdateTopicRequestBody, - z.ZodTypeDef, - unknown + UpdateTopicRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - topic: z.lazy(() => Topic$inboundSchema).optional(), + topic: z.lazy(() => Topic$inboundSchema).optional(), }); /** @internal */ export type UpdateTopicRequestBody$Outbound = { - topic?: Topic$Outbound | undefined; + topic?: Topic$Outbound | undefined; }; /** @internal */ export const UpdateTopicRequestBody$outboundSchema: z.ZodType< - UpdateTopicRequestBody$Outbound, - z.ZodTypeDef, - UpdateTopicRequestBody + UpdateTopicRequestBody$Outbound, + z.ZodTypeDef, + UpdateTopicRequestBody > = z.object({ - topic: z.lazy(() => Topic$outboundSchema).optional(), + topic: z.lazy(() => Topic$outboundSchema).optional(), }); /** @@ -107,173 +108,169 @@ export const UpdateTopicRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicRequestBody$ { - /** @deprecated use `UpdateTopicRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicRequestBody$inboundSchema; - /** @deprecated use `UpdateTopicRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicRequestBody$outboundSchema; - /** @deprecated use `UpdateTopicRequestBody$Outbound` instead. */ - export type Outbound = UpdateTopicRequestBody$Outbound; + /** @deprecated use `UpdateTopicRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicRequestBody$inboundSchema; + /** @deprecated use `UpdateTopicRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicRequestBody$outboundSchema; + /** @deprecated use `UpdateTopicRequestBody$Outbound` instead. */ + export type Outbound = UpdateTopicRequestBody$Outbound; } /** @internal */ export const UpdateTopicRequest$inboundSchema: z.ZodType< - UpdateTopicRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => UpdateTopicRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + UpdateTopicRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => UpdateTopicRequestBody$inboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateTopicRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: UpdateTopicRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: UpdateTopicRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const UpdateTopicRequest$outboundSchema: z.ZodType< - UpdateTopicRequest$Outbound, - z.ZodTypeDef, - UpdateTopicRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => UpdateTopicRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + UpdateTopicRequest$Outbound, + z.ZodTypeDef, + UpdateTopicRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => UpdateTopicRequestBody$outboundSchema).optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicRequest$ { - /** @deprecated use `UpdateTopicRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicRequest$inboundSchema; - /** @deprecated use `UpdateTopicRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicRequest$outboundSchema; - /** @deprecated use `UpdateTopicRequest$Outbound` instead. */ - export type Outbound = UpdateTopicRequest$Outbound; + /** @deprecated use `UpdateTopicRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicRequest$inboundSchema; + /** @deprecated use `UpdateTopicRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicRequest$outboundSchema; + /** @deprecated use `UpdateTopicRequest$Outbound` instead. */ + export type Outbound = UpdateTopicRequest$Outbound; } /** @internal */ -export const BasicTopic$inboundSchema: z.ZodType = z - .object({ - fancy_title: z.string().optional(), - id: z.number().int().optional(), - posts_count: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - fancy_title: "fancyTitle", - posts_count: "postsCount", - }); - }); +export const BasicTopic$inboundSchema: z.ZodType< + BasicTopic, + z.ZodTypeDef, + unknown +> = z.object({ + fancy_title: z.string().optional(), + id: z.number().int().optional(), + posts_count: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "fancy_title": "fancyTitle", + "posts_count": "postsCount", + }); +}); /** @internal */ export type BasicTopic$Outbound = { - fancy_title?: string | undefined; - id?: number | undefined; - posts_count?: number | undefined; - slug?: string | undefined; - title?: string | undefined; + fancy_title?: string | undefined; + id?: number | undefined; + posts_count?: number | undefined; + slug?: string | undefined; + title?: string | undefined; }; /** @internal */ -export const BasicTopic$outboundSchema: z.ZodType = z - .object({ - fancyTitle: z.string().optional(), - id: z.number().int().optional(), - postsCount: z.number().int().optional(), - slug: z.string().optional(), - title: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - fancyTitle: "fancy_title", - postsCount: "posts_count", - }); - }); +export const BasicTopic$outboundSchema: z.ZodType< + BasicTopic$Outbound, + z.ZodTypeDef, + BasicTopic +> = z.object({ + fancyTitle: z.string().optional(), + id: z.number().int().optional(), + postsCount: z.number().int().optional(), + slug: z.string().optional(), + title: z.string().optional(), +}).transform((v) => { + return remap$(v, { + fancyTitle: "fancy_title", + postsCount: "posts_count", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BasicTopic$ { - /** @deprecated use `BasicTopic$inboundSchema` instead. */ - export const inboundSchema = BasicTopic$inboundSchema; - /** @deprecated use `BasicTopic$outboundSchema` instead. */ - export const outboundSchema = BasicTopic$outboundSchema; - /** @deprecated use `BasicTopic$Outbound` instead. */ - export type Outbound = BasicTopic$Outbound; + /** @deprecated use `BasicTopic$inboundSchema` instead. */ + export const inboundSchema = BasicTopic$inboundSchema; + /** @deprecated use `BasicTopic$outboundSchema` instead. */ + export const outboundSchema = BasicTopic$outboundSchema; + /** @deprecated use `BasicTopic$Outbound` instead. */ + export type Outbound = BasicTopic$Outbound; } /** @internal */ export const UpdateTopicResponseBody$inboundSchema: z.ZodType< - UpdateTopicResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - basic_topic: z.lazy(() => BasicTopic$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - basic_topic: "basicTopic", - }); - }); + UpdateTopicResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + basic_topic: z.lazy(() => BasicTopic$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "basic_topic": "basicTopic", + }); +}); /** @internal */ export type UpdateTopicResponseBody$Outbound = { - basic_topic?: BasicTopic$Outbound | undefined; + basic_topic?: BasicTopic$Outbound | undefined; }; /** @internal */ export const UpdateTopicResponseBody$outboundSchema: z.ZodType< - UpdateTopicResponseBody$Outbound, - z.ZodTypeDef, - UpdateTopicResponseBody -> = z - .object({ - basicTopic: z.lazy(() => BasicTopic$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - basicTopic: "basic_topic", - }); - }); + UpdateTopicResponseBody$Outbound, + z.ZodTypeDef, + UpdateTopicResponseBody +> = z.object({ + basicTopic: z.lazy(() => BasicTopic$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + basicTopic: "basic_topic", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicResponseBody$ { - /** @deprecated use `UpdateTopicResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicResponseBody$inboundSchema; - /** @deprecated use `UpdateTopicResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicResponseBody$outboundSchema; - /** @deprecated use `UpdateTopicResponseBody$Outbound` instead. */ - export type Outbound = UpdateTopicResponseBody$Outbound; + /** @deprecated use `UpdateTopicResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicResponseBody$inboundSchema; + /** @deprecated use `UpdateTopicResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicResponseBody$outboundSchema; + /** @deprecated use `UpdateTopicResponseBody$Outbound` instead. */ + export type Outbound = UpdateTopicResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatetopicstatus.ts b/src/sdk/models/operations/updatetopicstatus.ts index 7c332d5..dd4b168 100644 --- a/src/sdk/models/operations/updatetopicstatus.ts +++ b/src/sdk/models/operations/updatetopicstatus.ts @@ -2,110 +2,114 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; -import * as z from "zod"; export const Enabled = { - True: "true", - False: "false", + True: "true", + False: "false", } as const; export type Enabled = ClosedEnum; export const Status = { - Closed: "closed", - Pinned: "pinned", - PinnedGlobally: "pinned_globally", - Archived: "archived", - Visible: "visible", + Closed: "closed", + Pinned: "pinned", + PinnedGlobally: "pinned_globally", + Archived: "archived", + Visible: "visible", } as const; export type Status = ClosedEnum; export type UpdateTopicStatusRequestBody = { - enabled: Enabled; - status: Status; - /** - * Only required for `pinned` and `pinned_globally` - */ - until?: string | undefined; + enabled: Enabled; + status: Status; + /** + * Only required for `pinned` and `pinned_globally` + */ + until?: string | undefined; }; export type UpdateTopicStatusRequest = { - apiKey: string; - apiUsername: string; - requestBody?: UpdateTopicStatusRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: UpdateTopicStatusRequestBody | undefined; + id: string; }; /** * topic updated */ export type UpdateTopicStatusResponseBody = { - success?: string | undefined; - topicStatusUpdate?: string | null | undefined; + success?: string | undefined; + topicStatusUpdate?: string | null | undefined; }; /** @internal */ -export const Enabled$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Enabled); +export const Enabled$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Enabled); /** @internal */ -export const Enabled$outboundSchema: z.ZodNativeEnum = Enabled$inboundSchema; +export const Enabled$outboundSchema: z.ZodNativeEnum = + Enabled$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Enabled$ { - /** @deprecated use `Enabled$inboundSchema` instead. */ - export const inboundSchema = Enabled$inboundSchema; - /** @deprecated use `Enabled$outboundSchema` instead. */ - export const outboundSchema = Enabled$outboundSchema; + /** @deprecated use `Enabled$inboundSchema` instead. */ + export const inboundSchema = Enabled$inboundSchema; + /** @deprecated use `Enabled$outboundSchema` instead. */ + export const outboundSchema = Enabled$outboundSchema; } /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Status); +export const Status$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Status); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; +export const Status$outboundSchema: z.ZodNativeEnum = + Status$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; + /** @deprecated use `Status$inboundSchema` instead. */ + export const inboundSchema = Status$inboundSchema; + /** @deprecated use `Status$outboundSchema` instead. */ + export const outboundSchema = Status$outboundSchema; } /** @internal */ export const UpdateTopicStatusRequestBody$inboundSchema: z.ZodType< - UpdateTopicStatusRequestBody, - z.ZodTypeDef, - unknown + UpdateTopicStatusRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - enabled: Enabled$inboundSchema, - status: Status$inboundSchema, - until: z.string().optional(), + enabled: Enabled$inboundSchema, + status: Status$inboundSchema, + until: z.string().optional(), }); /** @internal */ export type UpdateTopicStatusRequestBody$Outbound = { - enabled: string; - status: string; - until?: string | undefined; + enabled: string; + status: string; + until?: string | undefined; }; /** @internal */ export const UpdateTopicStatusRequestBody$outboundSchema: z.ZodType< - UpdateTopicStatusRequestBody$Outbound, - z.ZodTypeDef, - UpdateTopicStatusRequestBody + UpdateTopicStatusRequestBody$Outbound, + z.ZodTypeDef, + UpdateTopicStatusRequestBody > = z.object({ - enabled: Enabled$outboundSchema, - status: Status$outboundSchema, - until: z.string().optional(), + enabled: Enabled$outboundSchema, + status: Status$outboundSchema, + until: z.string().optional(), }); /** @@ -113,122 +117,116 @@ export const UpdateTopicStatusRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicStatusRequestBody$ { - /** @deprecated use `UpdateTopicStatusRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicStatusRequestBody$inboundSchema; - /** @deprecated use `UpdateTopicStatusRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicStatusRequestBody$outboundSchema; - /** @deprecated use `UpdateTopicStatusRequestBody$Outbound` instead. */ - export type Outbound = UpdateTopicStatusRequestBody$Outbound; + /** @deprecated use `UpdateTopicStatusRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicStatusRequestBody$inboundSchema; + /** @deprecated use `UpdateTopicStatusRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicStatusRequestBody$outboundSchema; + /** @deprecated use `UpdateTopicStatusRequestBody$Outbound` instead. */ + export type Outbound = UpdateTopicStatusRequestBody$Outbound; } /** @internal */ export const UpdateTopicStatusRequest$inboundSchema: z.ZodType< - UpdateTopicStatusRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => UpdateTopicStatusRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + UpdateTopicStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => UpdateTopicStatusRequestBody$inboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateTopicStatusRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: UpdateTopicStatusRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: UpdateTopicStatusRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const UpdateTopicStatusRequest$outboundSchema: z.ZodType< - UpdateTopicStatusRequest$Outbound, - z.ZodTypeDef, - UpdateTopicStatusRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => UpdateTopicStatusRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + UpdateTopicStatusRequest$Outbound, + z.ZodTypeDef, + UpdateTopicStatusRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => UpdateTopicStatusRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicStatusRequest$ { - /** @deprecated use `UpdateTopicStatusRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicStatusRequest$inboundSchema; - /** @deprecated use `UpdateTopicStatusRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicStatusRequest$outboundSchema; - /** @deprecated use `UpdateTopicStatusRequest$Outbound` instead. */ - export type Outbound = UpdateTopicStatusRequest$Outbound; + /** @deprecated use `UpdateTopicStatusRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicStatusRequest$inboundSchema; + /** @deprecated use `UpdateTopicStatusRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicStatusRequest$outboundSchema; + /** @deprecated use `UpdateTopicStatusRequest$Outbound` instead. */ + export type Outbound = UpdateTopicStatusRequest$Outbound; } /** @internal */ export const UpdateTopicStatusResponseBody$inboundSchema: z.ZodType< - UpdateTopicStatusResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - success: z.string().optional(), - topic_status_update: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - topic_status_update: "topicStatusUpdate", - }); - }); + UpdateTopicStatusResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + success: z.string().optional(), + topic_status_update: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "topic_status_update": "topicStatusUpdate", + }); +}); /** @internal */ export type UpdateTopicStatusResponseBody$Outbound = { - success?: string | undefined; - topic_status_update?: string | null | undefined; + success?: string | undefined; + topic_status_update?: string | null | undefined; }; /** @internal */ export const UpdateTopicStatusResponseBody$outboundSchema: z.ZodType< - UpdateTopicStatusResponseBody$Outbound, - z.ZodTypeDef, - UpdateTopicStatusResponseBody -> = z - .object({ - success: z.string().optional(), - topicStatusUpdate: z.nullable(z.string()).optional(), - }) - .transform((v) => { - return remap$(v, { - topicStatusUpdate: "topic_status_update", - }); - }); + UpdateTopicStatusResponseBody$Outbound, + z.ZodTypeDef, + UpdateTopicStatusResponseBody +> = z.object({ + success: z.string().optional(), + topicStatusUpdate: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + topicStatusUpdate: "topic_status_update", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicStatusResponseBody$ { - /** @deprecated use `UpdateTopicStatusResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicStatusResponseBody$inboundSchema; - /** @deprecated use `UpdateTopicStatusResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicStatusResponseBody$outboundSchema; - /** @deprecated use `UpdateTopicStatusResponseBody$Outbound` instead. */ - export type Outbound = UpdateTopicStatusResponseBody$Outbound; + /** @deprecated use `UpdateTopicStatusResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicStatusResponseBody$inboundSchema; + /** @deprecated use `UpdateTopicStatusResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicStatusResponseBody$outboundSchema; + /** @deprecated use `UpdateTopicStatusResponseBody$Outbound` instead. */ + export type Outbound = UpdateTopicStatusResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updatetopictimestamp.ts b/src/sdk/models/operations/updatetopictimestamp.ts index 642fd60..b0aee51 100644 --- a/src/sdk/models/operations/updatetopictimestamp.ts +++ b/src/sdk/models/operations/updatetopictimestamp.ts @@ -2,48 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateTopicTimestampRequestBody = { - timestamp: string; + timestamp: string; }; export type UpdateTopicTimestampRequest = { - apiKey: string; - apiUsername: string; - requestBody?: UpdateTopicTimestampRequestBody | undefined; - id: string; + apiKey: string; + apiUsername: string; + requestBody?: UpdateTopicTimestampRequestBody | undefined; + id: string; }; /** * topic updated */ export type UpdateTopicTimestampResponseBody = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const UpdateTopicTimestampRequestBody$inboundSchema: z.ZodType< - UpdateTopicTimestampRequestBody, - z.ZodTypeDef, - unknown + UpdateTopicTimestampRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - timestamp: z.string(), + timestamp: z.string(), }); /** @internal */ export type UpdateTopicTimestampRequestBody$Outbound = { - timestamp: string; + timestamp: string; }; /** @internal */ export const UpdateTopicTimestampRequestBody$outboundSchema: z.ZodType< - UpdateTopicTimestampRequestBody$Outbound, - z.ZodTypeDef, - UpdateTopicTimestampRequestBody + UpdateTopicTimestampRequestBody$Outbound, + z.ZodTypeDef, + UpdateTopicTimestampRequestBody > = z.object({ - timestamp: z.string(), + timestamp: z.string(), }); /** @@ -51,96 +51,94 @@ export const UpdateTopicTimestampRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicTimestampRequestBody$ { - /** @deprecated use `UpdateTopicTimestampRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicTimestampRequestBody$inboundSchema; - /** @deprecated use `UpdateTopicTimestampRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicTimestampRequestBody$outboundSchema; - /** @deprecated use `UpdateTopicTimestampRequestBody$Outbound` instead. */ - export type Outbound = UpdateTopicTimestampRequestBody$Outbound; + /** @deprecated use `UpdateTopicTimestampRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicTimestampRequestBody$inboundSchema; + /** @deprecated use `UpdateTopicTimestampRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicTimestampRequestBody$outboundSchema; + /** @deprecated use `UpdateTopicTimestampRequestBody$Outbound` instead. */ + export type Outbound = UpdateTopicTimestampRequestBody$Outbound; } /** @internal */ export const UpdateTopicTimestampRequest$inboundSchema: z.ZodType< - UpdateTopicTimestampRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => UpdateTopicTimestampRequestBody$inboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); + UpdateTopicTimestampRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => UpdateTopicTimestampRequestBody$inboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateTopicTimestampRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: UpdateTopicTimestampRequestBody$Outbound | undefined; - id: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: UpdateTopicTimestampRequestBody$Outbound | undefined; + id: string; }; /** @internal */ export const UpdateTopicTimestampRequest$outboundSchema: z.ZodType< - UpdateTopicTimestampRequest$Outbound, - z.ZodTypeDef, - UpdateTopicTimestampRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => UpdateTopicTimestampRequestBody$outboundSchema).optional(), - id: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + UpdateTopicTimestampRequest$Outbound, + z.ZodTypeDef, + UpdateTopicTimestampRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => UpdateTopicTimestampRequestBody$outboundSchema) + .optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicTimestampRequest$ { - /** @deprecated use `UpdateTopicTimestampRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicTimestampRequest$inboundSchema; - /** @deprecated use `UpdateTopicTimestampRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicTimestampRequest$outboundSchema; - /** @deprecated use `UpdateTopicTimestampRequest$Outbound` instead. */ - export type Outbound = UpdateTopicTimestampRequest$Outbound; + /** @deprecated use `UpdateTopicTimestampRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicTimestampRequest$inboundSchema; + /** @deprecated use `UpdateTopicTimestampRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicTimestampRequest$outboundSchema; + /** @deprecated use `UpdateTopicTimestampRequest$Outbound` instead. */ + export type Outbound = UpdateTopicTimestampRequest$Outbound; } /** @internal */ export const UpdateTopicTimestampResponseBody$inboundSchema: z.ZodType< - UpdateTopicTimestampResponseBody, - z.ZodTypeDef, - unknown + UpdateTopicTimestampResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @internal */ export type UpdateTopicTimestampResponseBody$Outbound = { - success?: string | undefined; + success?: string | undefined; }; /** @internal */ export const UpdateTopicTimestampResponseBody$outboundSchema: z.ZodType< - UpdateTopicTimestampResponseBody$Outbound, - z.ZodTypeDef, - UpdateTopicTimestampResponseBody + UpdateTopicTimestampResponseBody$Outbound, + z.ZodTypeDef, + UpdateTopicTimestampResponseBody > = z.object({ - success: z.string().optional(), + success: z.string().optional(), }); /** @@ -148,10 +146,10 @@ export const UpdateTopicTimestampResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateTopicTimestampResponseBody$ { - /** @deprecated use `UpdateTopicTimestampResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateTopicTimestampResponseBody$inboundSchema; - /** @deprecated use `UpdateTopicTimestampResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateTopicTimestampResponseBody$outboundSchema; - /** @deprecated use `UpdateTopicTimestampResponseBody$Outbound` instead. */ - export type Outbound = UpdateTopicTimestampResponseBody$Outbound; + /** @deprecated use `UpdateTopicTimestampResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateTopicTimestampResponseBody$inboundSchema; + /** @deprecated use `UpdateTopicTimestampResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateTopicTimestampResponseBody$outboundSchema; + /** @deprecated use `UpdateTopicTimestampResponseBody$Outbound` instead. */ + export type Outbound = UpdateTopicTimestampResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updateuser.ts b/src/sdk/models/operations/updateuser.ts index c17bdab..3d8b8d4 100644 --- a/src/sdk/models/operations/updateuser.ts +++ b/src/sdk/models/operations/updateuser.ts @@ -2,21 +2,21 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateUserExternalIds = {}; export type UpdateUserRequestBody = { - externalIds?: UpdateUserExternalIds | undefined; - name?: string | undefined; + externalIds?: UpdateUserExternalIds | undefined; + name?: string | undefined; }; export type UpdateUserRequest = { - apiKey: string; - apiUsername: string; - requestBody?: UpdateUserRequestBody | undefined; - username: string; + apiKey: string; + apiUsername: string; + requestBody?: UpdateUserRequestBody | undefined; + username: string; }; export type UpdateUserUser = {}; @@ -25,15 +25,15 @@ export type UpdateUserUser = {}; * user updated */ export type UpdateUserResponseBody = { - success: string; - user: UpdateUserUser; + success: string; + user: UpdateUserUser; }; /** @internal */ export const UpdateUserExternalIds$inboundSchema: z.ZodType< - UpdateUserExternalIds, - z.ZodTypeDef, - unknown + UpdateUserExternalIds, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -41,9 +41,9 @@ export type UpdateUserExternalIds$Outbound = {}; /** @internal */ export const UpdateUserExternalIds$outboundSchema: z.ZodType< - UpdateUserExternalIds$Outbound, - z.ZodTypeDef, - UpdateUserExternalIds + UpdateUserExternalIds$Outbound, + z.ZodTypeDef, + UpdateUserExternalIds > = z.object({}); /** @@ -51,135 +51,133 @@ export const UpdateUserExternalIds$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUserExternalIds$ { - /** @deprecated use `UpdateUserExternalIds$inboundSchema` instead. */ - export const inboundSchema = UpdateUserExternalIds$inboundSchema; - /** @deprecated use `UpdateUserExternalIds$outboundSchema` instead. */ - export const outboundSchema = UpdateUserExternalIds$outboundSchema; - /** @deprecated use `UpdateUserExternalIds$Outbound` instead. */ - export type Outbound = UpdateUserExternalIds$Outbound; + /** @deprecated use `UpdateUserExternalIds$inboundSchema` instead. */ + export const inboundSchema = UpdateUserExternalIds$inboundSchema; + /** @deprecated use `UpdateUserExternalIds$outboundSchema` instead. */ + export const outboundSchema = UpdateUserExternalIds$outboundSchema; + /** @deprecated use `UpdateUserExternalIds$Outbound` instead. */ + export type Outbound = UpdateUserExternalIds$Outbound; } /** @internal */ export const UpdateUserRequestBody$inboundSchema: z.ZodType< - UpdateUserRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - external_ids: z.lazy(() => UpdateUserExternalIds$inboundSchema).optional(), - name: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - external_ids: "externalIds", - }); - }); + UpdateUserRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + external_ids: z.lazy(() => UpdateUserExternalIds$inboundSchema).optional(), + name: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "external_ids": "externalIds", + }); +}); /** @internal */ export type UpdateUserRequestBody$Outbound = { - external_ids?: UpdateUserExternalIds$Outbound | undefined; - name?: string | undefined; + external_ids?: UpdateUserExternalIds$Outbound | undefined; + name?: string | undefined; }; /** @internal */ export const UpdateUserRequestBody$outboundSchema: z.ZodType< - UpdateUserRequestBody$Outbound, - z.ZodTypeDef, - UpdateUserRequestBody -> = z - .object({ - externalIds: z.lazy(() => UpdateUserExternalIds$outboundSchema).optional(), - name: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - externalIds: "external_ids", - }); - }); + UpdateUserRequestBody$Outbound, + z.ZodTypeDef, + UpdateUserRequestBody +> = z.object({ + externalIds: z.lazy(() => UpdateUserExternalIds$outboundSchema).optional(), + name: z.string().optional(), +}).transform((v) => { + return remap$(v, { + externalIds: "external_ids", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUserRequestBody$ { - /** @deprecated use `UpdateUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateUserRequestBody$inboundSchema; - /** @deprecated use `UpdateUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateUserRequestBody$outboundSchema; - /** @deprecated use `UpdateUserRequestBody$Outbound` instead. */ - export type Outbound = UpdateUserRequestBody$Outbound; + /** @deprecated use `UpdateUserRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateUserRequestBody$inboundSchema; + /** @deprecated use `UpdateUserRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateUserRequestBody$outboundSchema; + /** @deprecated use `UpdateUserRequestBody$Outbound` instead. */ + export type Outbound = UpdateUserRequestBody$Outbound; } /** @internal */ -export const UpdateUserRequest$inboundSchema: z.ZodType = - z - .object({ - "Api-Key": z.string(), - "Api-Username": z.string(), - RequestBody: z.lazy(() => UpdateUserRequestBody$inboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - "Api-Key": "apiKey", - "Api-Username": "apiUsername", - RequestBody: "requestBody", - }); - }); +export const UpdateUserRequest$inboundSchema: z.ZodType< + UpdateUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "Api-Key": z.string(), + "Api-Username": z.string(), + RequestBody: z.lazy(() => UpdateUserRequestBody$inboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "Api-Key": "apiKey", + "Api-Username": "apiUsername", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateUserRequest$Outbound = { - "Api-Key": string; - "Api-Username": string; - RequestBody?: UpdateUserRequestBody$Outbound | undefined; - username: string; + "Api-Key": string; + "Api-Username": string; + RequestBody?: UpdateUserRequestBody$Outbound | undefined; + username: string; }; /** @internal */ export const UpdateUserRequest$outboundSchema: z.ZodType< - UpdateUserRequest$Outbound, - z.ZodTypeDef, - UpdateUserRequest -> = z - .object({ - apiKey: z.string(), - apiUsername: z.string(), - requestBody: z.lazy(() => UpdateUserRequestBody$outboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - apiKey: "Api-Key", - apiUsername: "Api-Username", - requestBody: "RequestBody", - }); - }); + UpdateUserRequest$Outbound, + z.ZodTypeDef, + UpdateUserRequest +> = z.object({ + apiKey: z.string(), + apiUsername: z.string(), + requestBody: z.lazy(() => UpdateUserRequestBody$outboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + apiKey: "Api-Key", + apiUsername: "Api-Username", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUserRequest$ { - /** @deprecated use `UpdateUserRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateUserRequest$inboundSchema; - /** @deprecated use `UpdateUserRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateUserRequest$outboundSchema; - /** @deprecated use `UpdateUserRequest$Outbound` instead. */ - export type Outbound = UpdateUserRequest$Outbound; + /** @deprecated use `UpdateUserRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateUserRequest$inboundSchema; + /** @deprecated use `UpdateUserRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateUserRequest$outboundSchema; + /** @deprecated use `UpdateUserRequest$Outbound` instead. */ + export type Outbound = UpdateUserRequest$Outbound; } /** @internal */ -export const UpdateUserUser$inboundSchema: z.ZodType = - z.object({}); +export const UpdateUserUser$inboundSchema: z.ZodType< + UpdateUserUser, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type UpdateUserUser$Outbound = {}; /** @internal */ export const UpdateUserUser$outboundSchema: z.ZodType< - UpdateUserUser$Outbound, - z.ZodTypeDef, - UpdateUserUser + UpdateUserUser$Outbound, + z.ZodTypeDef, + UpdateUserUser > = z.object({}); /** @@ -187,38 +185,38 @@ export const UpdateUserUser$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUserUser$ { - /** @deprecated use `UpdateUserUser$inboundSchema` instead. */ - export const inboundSchema = UpdateUserUser$inboundSchema; - /** @deprecated use `UpdateUserUser$outboundSchema` instead. */ - export const outboundSchema = UpdateUserUser$outboundSchema; - /** @deprecated use `UpdateUserUser$Outbound` instead. */ - export type Outbound = UpdateUserUser$Outbound; + /** @deprecated use `UpdateUserUser$inboundSchema` instead. */ + export const inboundSchema = UpdateUserUser$inboundSchema; + /** @deprecated use `UpdateUserUser$outboundSchema` instead. */ + export const outboundSchema = UpdateUserUser$outboundSchema; + /** @deprecated use `UpdateUserUser$Outbound` instead. */ + export type Outbound = UpdateUserUser$Outbound; } /** @internal */ export const UpdateUserResponseBody$inboundSchema: z.ZodType< - UpdateUserResponseBody, - z.ZodTypeDef, - unknown + UpdateUserResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - success: z.string(), - user: z.lazy(() => UpdateUserUser$inboundSchema), + success: z.string(), + user: z.lazy(() => UpdateUserUser$inboundSchema), }); /** @internal */ export type UpdateUserResponseBody$Outbound = { - success: string; - user: UpdateUserUser$Outbound; + success: string; + user: UpdateUserUser$Outbound; }; /** @internal */ export const UpdateUserResponseBody$outboundSchema: z.ZodType< - UpdateUserResponseBody$Outbound, - z.ZodTypeDef, - UpdateUserResponseBody + UpdateUserResponseBody$Outbound, + z.ZodTypeDef, + UpdateUserResponseBody > = z.object({ - success: z.string(), - user: z.lazy(() => UpdateUserUser$outboundSchema), + success: z.string(), + user: z.lazy(() => UpdateUserUser$outboundSchema), }); /** @@ -226,10 +224,10 @@ export const UpdateUserResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUserResponseBody$ { - /** @deprecated use `UpdateUserResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdateUserResponseBody$inboundSchema; - /** @deprecated use `UpdateUserResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdateUserResponseBody$outboundSchema; - /** @deprecated use `UpdateUserResponseBody$Outbound` instead. */ - export type Outbound = UpdateUserResponseBody$Outbound; + /** @deprecated use `UpdateUserResponseBody$inboundSchema` instead. */ + export const inboundSchema = UpdateUserResponseBody$inboundSchema; + /** @deprecated use `UpdateUserResponseBody$outboundSchema` instead. */ + export const outboundSchema = UpdateUserResponseBody$outboundSchema; + /** @deprecated use `UpdateUserResponseBody$Outbound` instead. */ + export type Outbound = UpdateUserResponseBody$Outbound; } diff --git a/src/sdk/models/operations/updateusername.ts b/src/sdk/models/operations/updateusername.ts index 42a74cc..a4dec88 100644 --- a/src/sdk/models/operations/updateusername.ts +++ b/src/sdk/models/operations/updateusername.ts @@ -2,113 +2,106 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdateUsernameRequestBody = { - newUsername: string; + newUsername: string; }; export type UpdateUsernameRequest = { - requestBody?: UpdateUsernameRequestBody | undefined; - username: string; + requestBody?: UpdateUsernameRequestBody | undefined; + username: string; }; /** @internal */ export const UpdateUsernameRequestBody$inboundSchema: z.ZodType< - UpdateUsernameRequestBody, - z.ZodTypeDef, - unknown -> = z - .object({ - new_username: z.string(), - }) - .transform((v) => { - return remap$(v, { - new_username: "newUsername", - }); - }); + UpdateUsernameRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + new_username: z.string(), +}).transform((v) => { + return remap$(v, { + "new_username": "newUsername", + }); +}); /** @internal */ export type UpdateUsernameRequestBody$Outbound = { - new_username: string; + new_username: string; }; /** @internal */ export const UpdateUsernameRequestBody$outboundSchema: z.ZodType< - UpdateUsernameRequestBody$Outbound, - z.ZodTypeDef, - UpdateUsernameRequestBody -> = z - .object({ - newUsername: z.string(), - }) - .transform((v) => { - return remap$(v, { - newUsername: "new_username", - }); - }); + UpdateUsernameRequestBody$Outbound, + z.ZodTypeDef, + UpdateUsernameRequestBody +> = z.object({ + newUsername: z.string(), +}).transform((v) => { + return remap$(v, { + newUsername: "new_username", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUsernameRequestBody$ { - /** @deprecated use `UpdateUsernameRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateUsernameRequestBody$inboundSchema; - /** @deprecated use `UpdateUsernameRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateUsernameRequestBody$outboundSchema; - /** @deprecated use `UpdateUsernameRequestBody$Outbound` instead. */ - export type Outbound = UpdateUsernameRequestBody$Outbound; + /** @deprecated use `UpdateUsernameRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateUsernameRequestBody$inboundSchema; + /** @deprecated use `UpdateUsernameRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateUsernameRequestBody$outboundSchema; + /** @deprecated use `UpdateUsernameRequestBody$Outbound` instead. */ + export type Outbound = UpdateUsernameRequestBody$Outbound; } /** @internal */ export const UpdateUsernameRequest$inboundSchema: z.ZodType< - UpdateUsernameRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - RequestBody: z.lazy(() => UpdateUsernameRequestBody$inboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - RequestBody: "requestBody", - }); - }); + UpdateUsernameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + RequestBody: z.lazy(() => UpdateUsernameRequestBody$inboundSchema).optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); /** @internal */ export type UpdateUsernameRequest$Outbound = { - RequestBody?: UpdateUsernameRequestBody$Outbound | undefined; - username: string; + RequestBody?: UpdateUsernameRequestBody$Outbound | undefined; + username: string; }; /** @internal */ export const UpdateUsernameRequest$outboundSchema: z.ZodType< - UpdateUsernameRequest$Outbound, - z.ZodTypeDef, - UpdateUsernameRequest -> = z - .object({ - requestBody: z.lazy(() => UpdateUsernameRequestBody$outboundSchema).optional(), - username: z.string(), - }) - .transform((v) => { - return remap$(v, { - requestBody: "RequestBody", - }); - }); + UpdateUsernameRequest$Outbound, + z.ZodTypeDef, + UpdateUsernameRequest +> = z.object({ + requestBody: z.lazy(() => UpdateUsernameRequestBody$outboundSchema) + .optional(), + username: z.string(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateUsernameRequest$ { - /** @deprecated use `UpdateUsernameRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateUsernameRequest$inboundSchema; - /** @deprecated use `UpdateUsernameRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateUsernameRequest$outboundSchema; - /** @deprecated use `UpdateUsernameRequest$Outbound` instead. */ - export type Outbound = UpdateUsernameRequest$Outbound; + /** @deprecated use `UpdateUsernameRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateUsernameRequest$inboundSchema; + /** @deprecated use `UpdateUsernameRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateUsernameRequest$outboundSchema; + /** @deprecated use `UpdateUsernameRequest$Outbound` instead. */ + export type Outbound = UpdateUsernameRequest$Outbound; } diff --git a/src/sdk/notifications.ts b/src/sdk/notifications.ts index af5f047..da6f4b6 100644 --- a/src/sdk/notifications.ts +++ b/src/sdk/notifications.ts @@ -9,22 +9,29 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Notifications extends ClientSDK { - /** - * Get the notifications that belong to the current user - */ - async getNotifications( - options?: RequestOptions - ): Promise { - return unwrapAsync(notificationsGetNotifications(this, options)); - } + /** + * Get the notifications that belong to the current user + */ + async getNotifications( + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsGetNotifications( + this, + options, + )); + } - /** - * Mark notifications as read - */ - async markNotificationsAsRead( - request?: operations.MarkNotificationsAsReadRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(notificationsMarkNotificationsAsRead(this, request, options)); - } + /** + * Mark notifications as read + */ + async markNotificationsAsRead( + request?: operations.MarkNotificationsAsReadRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationsMarkNotificationsAsRead( + this, + request, + options, + )); + } } diff --git a/src/sdk/posts.ts b/src/sdk/posts.ts index 42cd676..92bcf67 100644 --- a/src/sdk/posts.ts +++ b/src/sdk/posts.ts @@ -15,97 +15,140 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Posts extends ClientSDK { - /** - * Creates a new topic, a new post, or a private message - */ - async createTopicPostPM( - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsCreateTopicPostPM(this, request, options)); - } + /** + * Creates a new topic, a new post, or a private message + */ + async createTopicPostPM( + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsCreateTopicPostPM( + this, + request, + options, + )); + } - /** - * delete a single post - */ - async deletePost( - id: number, - requestBody?: operations.DeletePostRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsDeletePost(this, id, requestBody, options)); - } + /** + * delete a single post + */ + async deletePost( + id: number, + requestBody?: operations.DeletePostRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsDeletePost( + this, + id, + requestBody, + options, + )); + } - /** - * Retrieve a single post - * - * @remarks - * This endpoint can be used to get the number of likes on a post using the - * `actions_summary` property in the response. `actions_summary` responses - * with the id of `2` signify a `like`. If there are no `actions_summary` - * items with the id of `2`, that means there are 0 likes. Other ids likely - * refer to various different flag types. - * - */ - async getPost(id: string, options?: RequestOptions): Promise { - return unwrapAsync(postsGetPost(this, id, options)); - } + /** + * Retrieve a single post + * + * @remarks + * This endpoint can be used to get the number of likes on a post using the + * `actions_summary` property in the response. `actions_summary` responses + * with the id of `2` signify a `like`. If there are no `actions_summary` + * items with the id of `2`, that means there are 0 likes. Other ids likely + * refer to various different flag types. + */ + async getPost( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsGetPost( + this, + id, + options, + )); + } - /** - * List latest posts across topics - */ - async listPosts( - apiKey: string, - apiUsername: string, - before?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsListPosts(this, apiKey, apiUsername, before, options)); - } + /** + * List latest posts across topics + */ + async listPosts( + apiKey: string, + apiUsername: string, + before?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsListPosts( + this, + apiKey, + apiUsername, + before, + options, + )); + } - /** - * Lock a post from being edited - */ - async lockPost( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.LockPostRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsLockPost(this, apiKey, apiUsername, id, requestBody, options)); - } + /** + * Lock a post from being edited + */ + async lockPost( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.LockPostRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsLockPost( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Like a post and other actions - */ - async performPostAction( - apiKey: string, - apiUsername: string, - requestBody?: operations.PerformPostActionRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsPerformPostAction(this, apiKey, apiUsername, requestBody, options)); - } + /** + * Like a post and other actions + */ + async performPostAction( + apiKey: string, + apiUsername: string, + requestBody?: operations.PerformPostActionRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsPerformPostAction( + this, + apiKey, + apiUsername, + requestBody, + options, + )); + } - /** - * List replies to a post - */ - async postReplies( - id: string, - options?: RequestOptions - ): Promise> { - return unwrapAsync(postsPostReplies(this, id, options)); - } + /** + * List replies to a post + */ + async postReplies( + id: string, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(postsPostReplies( + this, + id, + options, + )); + } - /** - * Update a single post - */ - async updatePost( - id: string, - requestBody?: operations.UpdatePostRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(postsUpdatePost(this, id, requestBody, options)); - } + /** + * Update a single post + */ + async updatePost( + id: string, + requestBody?: operations.UpdatePostRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(postsUpdatePost( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/privatemessages.ts b/src/sdk/privatemessages.ts index 0a27192..221a7f7 100644 --- a/src/sdk/privatemessages.ts +++ b/src/sdk/privatemessages.ts @@ -10,33 +10,45 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class PrivateMessages extends ClientSDK { - /** - * Creates a new topic, a new post, or a private message - */ - async createTopicPostPM( - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(privateMessagesCreateTopicPostPM(this, request, options)); - } + /** + * Creates a new topic, a new post, or a private message + */ + async createTopicPostPM( + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateMessagesCreateTopicPostPM( + this, + request, + options, + )); + } - /** - * Get a list of private messages sent for a user - */ - async getUserSentPrivateMessages( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(privateMessagesGetUserSentPrivateMessages(this, username, options)); - } + /** + * Get a list of private messages sent for a user + */ + async getUserSentPrivateMessages( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateMessagesGetUserSentPrivateMessages( + this, + username, + options, + )); + } - /** - * Get a list of private messages for a user - */ - async listUserPrivateMessages( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(privateMessagesListUserPrivateMessages(this, username, options)); - } + /** + * Get a list of private messages for a user + */ + async listUserPrivateMessages( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateMessagesListUserPrivateMessages( + this, + username, + options, + )); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index cb8a87d..2aa9e68 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -20,78 +20,78 @@ import { Uploads } from "./uploads.js"; import { Users } from "./users.js"; export class SDK extends ClientSDK { - private _backups?: Backups; - get backups(): Backups { - return (this._backups ??= new Backups(this.options$)); - } + private _backups?: Backups; + get backups(): Backups { + return (this._backups ??= new Backups(this.options$)); + } - private _badges?: Badges; - get badges(): Badges { - return (this._badges ??= new Badges(this.options$)); - } + private _badges?: Badges; + get badges(): Badges { + return (this._badges ??= new Badges(this.options$)); + } - private _groups?: Groups; - get groups(): Groups { - return (this._groups ??= new Groups(this.options$)); - } + private _groups?: Groups; + get groups(): Groups { + return (this._groups ??= new Groups(this.options$)); + } - private _users?: Users; - get users(): Users { - return (this._users ??= new Users(this.options$)); - } + private _users?: Users; + get users(): Users { + return (this._users ??= new Users(this.options$)); + } - private _admin?: Admin; - get admin(): Admin { - return (this._admin ??= new Admin(this.options$)); - } + private _admin?: Admin; + get admin(): Admin { + return (this._admin ??= new Admin(this.options$)); + } - private _categories?: Categories; - get categories(): Categories { - return (this._categories ??= new Categories(this.options$)); - } + private _categories?: Categories; + get categories(): Categories { + return (this._categories ??= new Categories(this.options$)); + } - private _invites?: Invites; - get invites(): Invites { - return (this._invites ??= new Invites(this.options$)); - } + private _invites?: Invites; + get invites(): Invites { + return (this._invites ??= new Invites(this.options$)); + } - private _topics?: Topics; - get topics(): Topics { - return (this._topics ??= new Topics(this.options$)); - } + private _topics?: Topics; + get topics(): Topics { + return (this._topics ??= new Topics(this.options$)); + } - private _notifications?: Notifications; - get notifications(): Notifications { - return (this._notifications ??= new Notifications(this.options$)); - } + private _notifications?: Notifications; + get notifications(): Notifications { + return (this._notifications ??= new Notifications(this.options$)); + } - private _posts?: Posts; - get posts(): Posts { - return (this._posts ??= new Posts(this.options$)); - } + private _posts?: Posts; + get posts(): Posts { + return (this._posts ??= new Posts(this.options$)); + } - private _privateMessages?: PrivateMessages; - get privateMessages(): PrivateMessages { - return (this._privateMessages ??= new PrivateMessages(this.options$)); - } + private _privateMessages?: PrivateMessages; + get privateMessages(): PrivateMessages { + return (this._privateMessages ??= new PrivateMessages(this.options$)); + } - private _search?: Search; - get search(): Search { - return (this._search ??= new Search(this.options$)); - } + private _search?: Search; + get search(): Search { + return (this._search ??= new Search(this.options$)); + } - private _site?: Site; - get site(): Site { - return (this._site ??= new Site(this.options$)); - } + private _site?: Site; + get site(): Site { + return (this._site ??= new Site(this.options$)); + } - private _tags?: Tags; - get tags(): Tags { - return (this._tags ??= new Tags(this.options$)); - } + private _tags?: Tags; + get tags(): Tags { + return (this._tags ??= new Tags(this.options$)); + } - private _uploads?: Uploads; - get uploads(): Uploads { - return (this._uploads ??= new Uploads(this.options$)); - } + private _uploads?: Uploads; + get uploads(): Uploads { + return (this._uploads ??= new Uploads(this.options$)); + } } diff --git a/src/sdk/search.ts b/src/sdk/search.ts index 81c1cca..72fac88 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -8,14 +8,19 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Search extends ClientSDK { - /** - * Search for a term - */ - async search( - page?: number | undefined, - q?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(searchSearch(this, page, q, options)); - } + /** + * Search for a term + */ + async search( + page?: number | undefined, + q?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchSearch( + this, + page, + q, + options, + )); + } } diff --git a/src/sdk/site.ts b/src/sdk/site.ts index c0d4be3..cede518 100644 --- a/src/sdk/site.ts +++ b/src/sdk/site.ts @@ -8,13 +8,18 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Site extends ClientSDK { - /** - * Get site info - * - * @remarks - * Can be used to fetch all categories and subcategories - */ - async getSite(options?: RequestOptions): Promise { - return unwrapAsync(siteGetSite(this, options)); - } + /** + * Get site info + * + * @remarks + * Can be used to fetch all categories and subcategories + */ + async getSite( + options?: RequestOptions, + ): Promise { + return unwrapAsync(siteGetSite( + this, + options, + )); + } } diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts index bf8cf4c..0a72216 100644 --- a/src/sdk/tags.ts +++ b/src/sdk/tags.ts @@ -13,55 +13,85 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Tags extends ClientSDK { - /** - * Creates a tag group - */ - async createTagGroup( - request?: operations.CreateTagGroupRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(tagsCreateTagGroup(this, request, options)); - } + /** + * Creates a tag group + */ + async createTagGroup( + request?: operations.CreateTagGroupRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsCreateTagGroup( + this, + request, + options, + )); + } - /** - * Get a specific tag - */ - async getTag(name: string, options?: RequestOptions): Promise { - return unwrapAsync(tagsGetTag(this, name, options)); - } + /** + * Get a specific tag + */ + async getTag( + name: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsGetTag( + this, + name, + options, + )); + } - /** - * Get a single tag group - */ - async getTagGroup( - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(tagsGetTagGroup(this, id, options)); - } + /** + * Get a single tag group + */ + async getTagGroup( + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsGetTagGroup( + this, + id, + options, + )); + } - /** - * Get a list of tag groups - */ - async listTagGroups(options?: RequestOptions): Promise { - return unwrapAsync(tagsListTagGroups(this, options)); - } + /** + * Get a list of tag groups + */ + async listTagGroups( + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsListTagGroups( + this, + options, + )); + } - /** - * Get a list of tags - */ - async listTags(options?: RequestOptions): Promise { - return unwrapAsync(tagsListTags(this, options)); - } + /** + * Get a list of tags + */ + async listTags( + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsListTags( + this, + options, + )); + } - /** - * Update tag group - */ - async updateTagGroup( - id: string, - requestBody?: operations.UpdateTagGroupRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(tagsUpdateTagGroup(this, id, requestBody, options)); - } + /** + * Update tag group + */ + async updateTagGroup( + id: string, + requestBody?: operations.UpdateTagGroupRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagsUpdateTagGroup( + this, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/topics.ts b/src/sdk/topics.ts index 24b6d8f..52aef2c 100644 --- a/src/sdk/topics.ts +++ b/src/sdk/topics.ts @@ -20,171 +20,243 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Topics extends ClientSDK { - /** - * Bookmark topic - */ - async bookmarkTopic( - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsBookmarkTopic(this, apiKey, apiUsername, id, options)); - } + /** + * Bookmark topic + */ + async bookmarkTopic( + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsBookmarkTopic( + this, + apiKey, + apiUsername, + id, + options, + )); + } - /** - * Creates a new topic, a new post, or a private message - */ - async createTopicPostPM( - request?: operations.CreateTopicPostPMRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsCreateTopicPostPM(this, request, options)); - } + /** + * Creates a new topic, a new post, or a private message + */ + async createTopicPostPM( + request?: operations.CreateTopicPostPMRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsCreateTopicPostPM( + this, + request, + options, + )); + } - /** - * Create topic timer - */ - async createTopicTimer( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.CreateTopicTimerRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsCreateTopicTimer(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Create topic timer + */ + async createTopicTimer( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.CreateTopicTimerRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsCreateTopicTimer( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Get a single topic - */ - async getTopic( - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsGetTopic(this, apiKey, apiUsername, id, options)); - } + /** + * Get a single topic + */ + async getTopic( + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsGetTopic( + this, + apiKey, + apiUsername, + id, + options, + )); + } - /** - * Get topic by external_id - */ - async getTopicByExternalId(externalId: string, options?: RequestOptions): Promise { - return unwrapAsync(topicsGetTopicByExternalId(this, externalId, options)); - } + /** + * Get topic by external_id + */ + async getTopicByExternalId( + externalId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsGetTopicByExternalId( + this, + externalId, + options, + )); + } - /** - * Invite to topic - */ - async inviteToTopic( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.InviteToTopicRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsInviteToTopic(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Invite to topic + */ + async inviteToTopic( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.InviteToTopicRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsInviteToTopic( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Get the latest topics - */ - async listLatestTopics( - apiKey: string, - apiUsername: string, - ascending?: string | undefined, - order?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsListLatestTopics(this, apiKey, apiUsername, ascending, order, options) - ); - } + /** + * Get the latest topics + */ + async listLatestTopics( + apiKey: string, + apiUsername: string, + ascending?: string | undefined, + order?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsListLatestTopics( + this, + apiKey, + apiUsername, + ascending, + order, + options, + )); + } - /** - * Get the top topics filtered by period - */ - async listTopTopics( - apiKey: string, - apiUsername: string, - period?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsListTopTopics(this, apiKey, apiUsername, period, options)); - } + /** + * Get the top topics filtered by period + */ + async listTopTopics( + apiKey: string, + apiUsername: string, + period?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsListTopTopics( + this, + apiKey, + apiUsername, + period, + options, + )); + } - /** - * Remove a topic - */ - async removeTopic( - apiKey: string, - apiUsername: string, - id: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsRemoveTopic(this, apiKey, apiUsername, id, options)); - } + /** + * Remove a topic + */ + async removeTopic( + apiKey: string, + apiUsername: string, + id: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsRemoveTopic( + this, + apiKey, + apiUsername, + id, + options, + )); + } - /** - * Set notification level - */ - async setNotificationLevel( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.SetNotificationLevelRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsSetNotificationLevel(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Set notification level + */ + async setNotificationLevel( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.SetNotificationLevelRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsSetNotificationLevel( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Update a topic - */ - async updateTopic( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(topicsUpdateTopic(this, apiKey, apiUsername, id, requestBody, options)); - } + /** + * Update a topic + */ + async updateTopic( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsUpdateTopic( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Update the status of a topic - */ - async updateTopicStatus( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicStatusRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsUpdateTopicStatus(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Update the status of a topic + */ + async updateTopicStatus( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicStatusRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsUpdateTopicStatus( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } - /** - * Update topic timestamp - */ - async updateTopicTimestamp( - apiKey: string, - apiUsername: string, - id: string, - requestBody?: operations.UpdateTopicTimestampRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - topicsUpdateTopicTimestamp(this, apiKey, apiUsername, id, requestBody, options) - ); - } + /** + * Update topic timestamp + */ + async updateTopicTimestamp( + apiKey: string, + apiUsername: string, + id: string, + requestBody?: operations.UpdateTopicTimestampRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(topicsUpdateTopicTimestamp( + this, + apiKey, + apiUsername, + id, + requestBody, + options, + )); + } } diff --git a/src/sdk/types/index.ts b/src/sdk/types/index.ts index dbaa5e6..e124e81 100644 --- a/src/sdk/types/index.ts +++ b/src/sdk/types/index.ts @@ -2,10 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate.js"; export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { Paginator, PageIterator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; export { catchUnrecognizedEnum } from "./enums.js"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/src/sdk/uploads.ts b/src/sdk/uploads.ts index 3c0303c..49940a0 100644 --- a/src/sdk/uploads.ts +++ b/src/sdk/uploads.ts @@ -14,186 +14,202 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Uploads extends ClientSDK { - /** - * Abort multipart upload - * - * @remarks - * This endpoint aborts the multipart upload initiated with /create-multipart. - * This should be used when cancelling the upload. It does not matter if parts - * were already uploaded into the external storage provider. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async abortMultipart( - request?: operations.AbortMultipartRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsAbortMultipart(this, request, options)); - } + /** + * Abort multipart upload + * + * @remarks + * This endpoint aborts the multipart upload initiated with /create-multipart. + * This should be used when cancelling the upload. It does not matter if parts + * were already uploaded into the external storage provider. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async abortMultipart( + request?: operations.AbortMultipartRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsAbortMultipart( + this, + request, + options, + )); + } - /** - * Generates batches of presigned URLs for multipart parts - * - * @remarks - * Multipart uploads are uploaded in chunks or parts to individual presigned - * URLs, similar to the one generated by /generate-presigned-put. The part - * numbers provided must be between 1 and 10000. The total number of parts - * will depend on the chunk size in bytes that you intend to use to upload - * each chunk. For example a 12MB file may have 2 5MB chunks and a final - * 2MB chunk, for part numbers 1, 2, and 3. - * - * This endpoint will return a presigned URL for each part number provided, - * which you can then use to send PUT requests for the binary chunk corresponding - * to that part. When the part is uploaded, the provider should return an - * ETag for the part, and this should be stored along with the part number, - * because this is needed to complete the multipart upload. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async batchPresignMultipartParts( - request?: operations.BatchPresignMultipartPartsRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsBatchPresignMultipartParts(this, request, options)); - } + /** + * Generates batches of presigned URLs for multipart parts + * + * @remarks + * Multipart uploads are uploaded in chunks or parts to individual presigned + * URLs, similar to the one generated by /generate-presigned-put. The part + * numbers provided must be between 1 and 10000. The total number of parts + * will depend on the chunk size in bytes that you intend to use to upload + * each chunk. For example a 12MB file may have 2 5MB chunks and a final + * 2MB chunk, for part numbers 1, 2, and 3. + * + * This endpoint will return a presigned URL for each part number provided, + * which you can then use to send PUT requests for the binary chunk corresponding + * to that part. When the part is uploaded, the provider should return an + * ETag for the part, and this should be stored along with the part number, + * because this is needed to complete the multipart upload. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async batchPresignMultipartParts( + request?: operations.BatchPresignMultipartPartsRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsBatchPresignMultipartParts( + this, + request, + options, + )); + } - /** - * Completes a direct external upload - * - * @remarks - * Completes an external upload initialized with /get-presigned-put. The - * file will be moved from its temporary location in external storage to - * a final destination in the S3 bucket. An Upload record will also be - * created in the database in most cases. - * - * If a sha1-checksum was provided in the initial request it will also - * be compared with the uploaded file in storage to make sure the same - * file was uploaded. The file size will be compared for the same reason. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async completeExternalUpload( - request?: operations.CompleteExternalUploadRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsCompleteExternalUpload(this, request, options)); - } + /** + * Completes a direct external upload + * + * @remarks + * Completes an external upload initialized with /get-presigned-put. The + * file will be moved from its temporary location in external storage to + * a final destination in the S3 bucket. An Upload record will also be + * created in the database in most cases. + * + * If a sha1-checksum was provided in the initial request it will also + * be compared with the uploaded file in storage to make sure the same + * file was uploaded. The file size will be compared for the same reason. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async completeExternalUpload( + request?: operations.CompleteExternalUploadRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsCompleteExternalUpload( + this, + request, + options, + )); + } - /** - * Complete multipart upload - * - * @remarks - * Completes the multipart upload in the external store, and copies the - * file from its temporary location to its final location in the store. - * All of the parts must have been uploaded to the external storage provider. - * An Upload record will be completed in most cases once the file is copied - * to its final location. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async completeMultipart( - request?: operations.CompleteMultipartRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsCompleteMultipart(this, request, options)); - } + /** + * Complete multipart upload + * + * @remarks + * Completes the multipart upload in the external store, and copies the + * file from its temporary location to its final location in the store. + * All of the parts must have been uploaded to the external storage provider. + * An Upload record will be completed in most cases once the file is copied + * to its final location. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async completeMultipart( + request?: operations.CompleteMultipartRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsCompleteMultipart( + this, + request, + options, + )); + } - /** - * Creates a multipart external upload - * - * @remarks - * Creates a multipart upload in the external storage provider, storing - * a temporary reference to the external upload similar to /get-presigned-put. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async createMultipartUpload( - request?: operations.CreateMultipartUploadRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsCreateMultipartUpload(this, request, options)); - } + /** + * Creates a multipart external upload + * + * @remarks + * Creates a multipart upload in the external storage provider, storing + * a temporary reference to the external upload similar to /get-presigned-put. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async createMultipartUpload( + request?: operations.CreateMultipartUploadRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsCreateMultipartUpload( + this, + request, + options, + )); + } - /** - * Creates an upload - */ - async createUpload( - request?: operations.CreateUploadRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsCreateUpload(this, request, options)); - } + /** + * Creates an upload + */ + async createUpload( + request?: operations.CreateUploadRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsCreateUpload( + this, + request, + options, + )); + } - /** - * Initiates a direct external upload - * - * @remarks - * Direct external uploads bypass the usual method of creating uploads - * via the POST /uploads route, and upload directly to an external provider, - * which by default is S3. This route begins the process, and will return - * a unique identifier for the external upload as well as a presigned URL - * which is where the file binary blob should be uploaded to. - * - * Once the upload is complete to the external service, you must call the - * POST /complete-external-upload route using the unique identifier returned - * by this route, which will create any required Upload record in the Discourse - * database and also move file from its temporary location to the final - * destination in the external storage service. - * - * You must have the correct permissions and CORS settings configured in your - * external provider. We support AWS S3 as the default. See: - * - * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. - * - * An external file store must be set up and `enable_direct_s3_uploads` must - * be set to true for this endpoint to function. - * - * - */ - async generatePresignedPut( - request?: operations.GeneratePresignedPutRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(uploadsGeneratePresignedPut(this, request, options)); - } + /** + * Initiates a direct external upload + * + * @remarks + * Direct external uploads bypass the usual method of creating uploads + * via the POST /uploads route, and upload directly to an external provider, + * which by default is S3. This route begins the process, and will return + * a unique identifier for the external upload as well as a presigned URL + * which is where the file binary blob should be uploaded to. + * + * Once the upload is complete to the external service, you must call the + * POST /complete-external-upload route using the unique identifier returned + * by this route, which will create any required Upload record in the Discourse + * database and also move file from its temporary location to the final + * destination in the external storage service. + * + * You must have the correct permissions and CORS settings configured in your + * external provider. We support AWS S3 as the default. See: + * + * https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4. + * + * An external file store must be set up and `enable_direct_s3_uploads` must + * be set to true for this endpoint to function. + */ + async generatePresignedPut( + request?: operations.GeneratePresignedPutRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uploadsGeneratePresignedPut( + this, + request, + options, + )); + } } diff --git a/src/sdk/users.ts b/src/sdk/users.ts index 3b5175d..da1d302 100644 --- a/src/sdk/users.ts +++ b/src/sdk/users.ts @@ -31,278 +31,387 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Users extends ClientSDK { - /** - * Activate a user - */ - async activateUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersActivateUser(this, id, options)); - } + /** + * Activate a user + */ + async activateUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersActivateUser( + this, + id, + options, + )); + } - /** - * Get a user by id - */ - async adminGetUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersAdminGetUser(this, id, options)); - } + /** + * Get a user by id + */ + async adminGetUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersAdminGetUser( + this, + id, + options, + )); + } - /** - * Get a list of users - */ - async adminListUsers( - request: operations.AdminListUsersRequest, - options?: RequestOptions - ): Promise> { - return unwrapAsync(usersAdminListUsers(this, request, options)); - } + /** + * Get a list of users + */ + async adminListUsers( + request: operations.AdminListUsersRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(usersAdminListUsers( + this, + request, + options, + )); + } - /** - * Anonymize a user - */ - async anonymizeUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersAnonymizeUser(this, id, options)); - } + /** + * Anonymize a user + */ + async anonymizeUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersAnonymizeUser( + this, + id, + options, + )); + } - /** - * Change password - */ - async changePassword( - token: string, - requestBody?: operations.ChangePasswordRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersChangePassword(this, token, requestBody, options)); - } + /** + * Change password + */ + async changePassword( + token: string, + requestBody?: operations.ChangePasswordRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersChangePassword( + this, + token, + requestBody, + options, + )); + } - /** - * Creates a user - */ - async createUser( - apiKey: string, - apiUsername: string, - requestBody?: operations.CreateUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersCreateUser(this, apiKey, apiUsername, requestBody, options)); - } + /** + * Creates a user + */ + async createUser( + apiKey: string, + apiUsername: string, + requestBody?: operations.CreateUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersCreateUser( + this, + apiKey, + apiUsername, + requestBody, + options, + )); + } - /** - * Deactivate a user - */ - async deactivateUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersDeactivateUser(this, id, options)); - } + /** + * Deactivate a user + */ + async deactivateUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersDeactivateUser( + this, + id, + options, + )); + } - /** - * Delete a user - */ - async deleteUser( - id: number, - requestBody?: operations.DeleteUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersDeleteUser(this, id, requestBody, options)); - } + /** + * Delete a user + */ + async deleteUser( + id: number, + requestBody?: operations.DeleteUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersDeleteUser( + this, + id, + requestBody, + options, + )); + } - /** - * Get a single user by username - */ - async getUser( - apiKey: string, - apiUsername: string, - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersGetUser(this, apiKey, apiUsername, username, options)); - } + /** + * Get a single user by username + */ + async getUser( + apiKey: string, + apiUsername: string, + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetUser( + this, + apiKey, + apiUsername, + username, + options, + )); + } - /** - * Get email addresses belonging to a user - */ - async getUserEmails( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersGetUserEmails(this, username, options)); - } + /** + * Get email addresses belonging to a user + */ + async getUserEmails( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetUserEmails( + this, + username, + options, + )); + } - /** - * Get a user by external_id - */ - async getUserExternalId( - apiKey: string, - apiUsername: string, - externalId: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersGetUserExternalId(this, apiKey, apiUsername, externalId, options)); - } + /** + * Get a user by external_id + */ + async getUserExternalId( + apiKey: string, + apiUsername: string, + externalId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetUserExternalId( + this, + apiKey, + apiUsername, + externalId, + options, + )); + } - /** - * Get a user by identity provider external ID - */ - async getUserIdentiyProviderExternalId( - apiKey: string, - apiUsername: string, - externalId: string, - provider: string, - options?: RequestOptions - ): Promise { - return unwrapAsync( - usersGetUserIdentiyProviderExternalId( - this, - apiKey, - apiUsername, - externalId, - provider, - options - ) - ); - } + /** + * Get a user by identity provider external ID + */ + async getUserIdentiyProviderExternalId( + apiKey: string, + apiUsername: string, + externalId: string, + provider: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetUserIdentiyProviderExternalId( + this, + apiKey, + apiUsername, + externalId, + provider, + options, + )); + } - /** - * Get a list of user actions - */ - async listUserActions( - filter: string, - offset: number, - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersListUserActions(this, filter, offset, username, options)); - } + /** + * Get a list of user actions + */ + async listUserActions( + filter: string, + offset: number, + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersListUserActions( + this, + filter, + offset, + username, + options, + )); + } - /** - * List badges for a user - */ - async listUserBadges( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersListUserBadges(this, username, options)); - } + /** + * List badges for a user + */ + async listUserBadges( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersListUserBadges( + this, + username, + options, + )); + } - /** - * Get a public list of users - */ - async listUsersPublic( - order: operations.Order, - period: operations.Period, - asc?: operations.Asc | undefined, - page?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersListUsersPublic(this, order, period, asc, page, options)); - } + /** + * Get a public list of users + */ + async listUsersPublic( + order: operations.Order, + period: operations.Period, + asc?: operations.Asc | undefined, + page?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersListUsersPublic( + this, + order, + period, + asc, + page, + options, + )); + } - /** - * Log a user out - */ - async logOutUser( - id: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersLogOutUser(this, id, options)); - } + /** + * Log a user out + */ + async logOutUser( + id: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersLogOutUser( + this, + id, + options, + )); + } - /** - * Refresh gravatar - */ - async refreshGravatar( - username: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersRefreshGravatar(this, username, options)); - } + /** + * Refresh gravatar + */ + async refreshGravatar( + username: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersRefreshGravatar( + this, + username, + options, + )); + } - /** - * Send password reset email - */ - async sendPasswordResetEmail( - request?: operations.SendPasswordResetEmailRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersSendPasswordResetEmail(this, request, options)); - } + /** + * Send password reset email + */ + async sendPasswordResetEmail( + request?: operations.SendPasswordResetEmailRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersSendPasswordResetEmail( + this, + request, + options, + )); + } - /** - * Silence a user - */ - async silenceUser( - id: number, - requestBody?: operations.SilenceUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersSilenceUser(this, id, requestBody, options)); - } + /** + * Silence a user + */ + async silenceUser( + id: number, + requestBody?: operations.SilenceUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersSilenceUser( + this, + id, + requestBody, + options, + )); + } - /** - * Suspend a user - */ - async suspendUser( - id: number, - requestBody?: operations.SuspendUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersSuspendUser(this, id, requestBody, options)); - } + /** + * Suspend a user + */ + async suspendUser( + id: number, + requestBody?: operations.SuspendUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersSuspendUser( + this, + id, + requestBody, + options, + )); + } - /** - * Update avatar - */ - async updateAvatar( - username: string, - requestBody?: operations.UpdateAvatarRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersUpdateAvatar(this, username, requestBody, options)); - } + /** + * Update avatar + */ + async updateAvatar( + username: string, + requestBody?: operations.UpdateAvatarRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersUpdateAvatar( + this, + username, + requestBody, + options, + )); + } - /** - * Update email - */ - async updateEmail( - username: string, - requestBody?: operations.UpdateEmailRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersUpdateEmail(this, username, requestBody, options)); - } + /** + * Update email + */ + async updateEmail( + username: string, + requestBody?: operations.UpdateEmailRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersUpdateEmail( + this, + username, + requestBody, + options, + )); + } - /** - * Update a user - */ - async updateUser( - apiKey: string, - apiUsername: string, - username: string, - requestBody?: operations.UpdateUserRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - usersUpdateUser(this, apiKey, apiUsername, username, requestBody, options) - ); - } + /** + * Update a user + */ + async updateUser( + apiKey: string, + apiUsername: string, + username: string, + requestBody?: operations.UpdateUserRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersUpdateUser( + this, + apiKey, + apiUsername, + username, + requestBody, + options, + )); + } - /** - * Update username - */ - async updateUsername( - username: string, - requestBody?: operations.UpdateUsernameRequestBody | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(usersUpdateUsername(this, username, requestBody, options)); - } + /** + * Update username + */ + async updateUsername( + username: string, + requestBody?: operations.UpdateUsernameRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersUpdateUsername( + this, + username, + requestBody, + options, + )); + } }