From 5994271d0477ad05380caa4c91033a51b171ee5c Mon Sep 17 00:00:00 2001 From: Luke Hagar Date: Fri, 16 May 2025 17:01:58 -0500 Subject: [PATCH] initial generation --- .devcontainer/README.md | 30 + .devcontainer/devcontainer.json | 45 + .devcontainer/setup.sh | 30 + .gitattributes | 2 + .github/workflows/sdk_generation.yaml | 29 + .gitignore | 26 + .npmignore | 15 + .speakeasy/gen.lock | 1403 ++++++ .speakeasy/gen.yaml | 55 + .../speakeasy-modifications-overlay.yaml | 15 + .speakeasy/workflow.lock | 28 + .speakeasy/workflow.yaml | 20 + CONTRIBUTING.md | 26 + FUNCTIONS.md | 106 + README.md | 873 ++++ RUNTIMES.md | 48 + USAGE.md | 21 + docs/lib/utils/retryconfig.md | 24 + docs/models/apiinforesource.md | 16 + docs/models/applicationbulkresource.md | 18 + docs/models/applicationresource.md | 26 + docs/models/applicationsynclevel.md | 15 + docs/models/applytags.md | 15 + docs/models/appprofileresource.md | 20 + docs/models/authenticationrequiredtype.md | 15 + docs/models/authenticationtype.md | 15 + docs/models/backupresource.md | 20 + docs/models/backuptype.md | 15 + docs/models/booksearchparam.md | 15 + docs/models/certificatevalidationtype.md | 15 + docs/models/command.md | 26 + docs/models/commandinput.md | 20 + docs/models/commandpriority.md | 15 + docs/models/commandresource.md | 32 + docs/models/commandresourceinput.md | 32 + docs/models/commandstatus.md | 15 + docs/models/commandtrigger.md | 15 + docs/models/customfilterresource.md | 18 + docs/models/databasetype.md | 15 + docs/models/developmentconfigresource.md | 20 + docs/models/downloadclientbulkresource.md | 19 + docs/models/downloadclientcategory.md | 16 + docs/models/downloadclientconfigresource.md | 15 + docs/models/downloadclientresource.md | 29 + docs/models/downloadprotocol.md | 15 + docs/models/field.md | 31 + docs/models/healthcheckresult.md | 15 + docs/models/healthresource.md | 19 + docs/models/historyeventtype.md | 15 + docs/models/historyresource.md | 21 + docs/models/historyresourcepagingresource.md | 20 + docs/models/hostconfigresource.md | 53 + docs/models/hoststatistics.md | 17 + docs/models/indexerbulkresource.md | 25 + docs/models/indexercapabilityresource.md | 24 + docs/models/indexercapabilityresourceinput.md | 24 + docs/models/indexercategory.md | 18 + docs/models/indexercategoryinput.md | 17 + docs/models/indexerprivacy.md | 15 + docs/models/indexerproxyresource.md | 29 + docs/models/indexerresource.md | 45 + docs/models/indexerresourceinput.md | 45 + docs/models/indexerstatistics.md | 26 + docs/models/indexerstatsresource.md | 18 + docs/models/indexerstatusresource.md | 19 + docs/models/localizationoption.md | 16 + docs/models/logfileresource.md | 19 + docs/models/logresource.md | 22 + docs/models/logresourcepagingresource.md | 20 + docs/models/moviesearchparam.md | 15 + docs/models/musicsearchparam.md | 15 + docs/models/notificationresource.md | 36 + .../deleteapiv1applicationsidrequest.md | 17 + .../deleteapiv1appprofileidrequest.md | 17 + .../operations/deleteapiv1commandidrequest.md | 17 + .../deleteapiv1customfilteridrequest.md | 17 + .../deleteapiv1downloadclientidrequest.md | 17 + .../operations/deleteapiv1indexeridrequest.md | 17 + .../deleteapiv1indexerproxyidrequest.md | 17 + .../deleteapiv1notificationidrequest.md | 17 + .../deleteapiv1systembackupidrequest.md | 17 + .../operations/deleteapiv1tagidrequest.md | 17 + .../getapiv1applicationsidrequest.md | 17 + .../operations/getapiv1appprofileidrequest.md | 17 + .../operations/getapiv1commandidrequest.md | 17 + .../getapiv1configdevelopmentidrequest.md | 17 + .../getapiv1configdownloadclientidrequest.md | 17 + .../operations/getapiv1confighostidrequest.md | 17 + .../operations/getapiv1configuiidrequest.md | 17 + .../getapiv1customfilteridrequest.md | 17 + .../getapiv1downloadclientidrequest.md | 17 + .../operations/getapiv1filesystemrequest.md | 17 + .../getapiv1filesystemtyperequest.md | 15 + .../getapiv1historyindexerrequest.md | 17 + .../operations/getapiv1historyrequest.md | 22 + .../operations/getapiv1historysincerequest.md | 16 + .../getapiv1indexeriddownloadrequest.md | 19 + .../getapiv1indexeridnewznabrequest.md | 49 + .../operations/getapiv1indexeridrequest.md | 17 + .../getapiv1indexerproxyidrequest.md | 17 + .../operations/getapiv1indexerstatsrequest.md | 19 + .../getapiv1logfilefilenamerequest.md | 17 + .../getapiv1logfileupdatefilenamerequest.md | 17 + docs/models/operations/getapiv1logrequest.md | 19 + .../getapiv1notificationidrequest.md | 17 + .../operations/getapiv1searchrequest.md | 20 + .../operations/getapiv1systemtaskidrequest.md | 17 + .../operations/getapiv1tagdetailidrequest.md | 17 + .../models/operations/getapiv1tagidrequest.md | 17 + .../operations/getcontentpathrequest.md | 17 + docs/models/operations/getidapirequest.md | 49 + .../models/operations/getiddownloadrequest.md | 19 + docs/models/operations/getpathrequest.md | 17 + .../postapiv1applicationsactionnamerequest.md | 18 + .../postapiv1applicationsrequest.md | 16 + .../postapiv1applicationstestrequest.md | 16 + ...ostapiv1downloadclientactionnamerequest.md | 18 + .../postapiv1downloadclientrequest.md | 16 + .../postapiv1downloadclienttestrequest.md | 16 + .../postapiv1indexeractionnamerequest.md | 18 + .../postapiv1indexerproxyactionnamerequest.md | 18 + .../postapiv1indexerproxyrequest.md | 16 + .../postapiv1indexerproxytestrequest.md | 16 + .../operations/postapiv1indexerrequest.md | 16 + .../operations/postapiv1indexertestrequest.md | 16 + .../postapiv1notificationactionnamerequest.md | 18 + .../postapiv1notificationrequest.md | 16 + .../postapiv1notificationtestrequest.md | 16 + .../postapiv1systembackuprestoreidrequest.md | 17 + .../putapiv1applicationsidrequest.md | 19 + .../operations/putapiv1appprofileidrequest.md | 18 + .../putapiv1configdevelopmentidrequest.md | 18 + .../putapiv1configdownloadclientidrequest.md | 18 + .../operations/putapiv1confighostidrequest.md | 18 + .../operations/putapiv1configuiidrequest.md | 18 + .../putapiv1customfilteridrequest.md | 18 + .../putapiv1downloadclientidrequest.md | 19 + .../operations/putapiv1indexeridrequest.md | 19 + .../putapiv1indexerproxyidrequest.md | 19 + .../putapiv1notificationidrequest.md | 19 + .../models/operations/putapiv1tagidrequest.md | 18 + docs/models/pingresource.md | 15 + docs/models/privacylevel.md | 15 + docs/models/providermessage.md | 16 + docs/models/providermessagetype.md | 15 + docs/models/proxytype.md | 15 + docs/models/releaseresource.md | 46 + docs/models/releaseresourceinput.md | 45 + docs/models/runtimemode.md | 15 + docs/models/searchparam.md | 15 + docs/models/security.md | 16 + docs/models/selectoption.md | 19 + docs/models/sortdirection.md | 15 + docs/models/systemresource.md | 45 + docs/models/tagdetailsresource.md | 20 + docs/models/tagresource.md | 16 + docs/models/taskresource.md | 22 + docs/models/tvsearchparam.md | 15 + docs/models/uiconfigresource.md | 24 + docs/models/updatechanges.md | 16 + docs/models/updatemechanism.md | 15 + docs/models/updateresource.md | 26 + docs/models/useragentstatistics.md | 17 + docs/sdks/apiinfo/README.md | 81 + docs/sdks/application/README.md | 835 ++++ docs/sdks/appprofile/README.md | 465 ++ docs/sdks/authentication/README.md | 79 + docs/sdks/backup/README.md | 307 ++ docs/sdks/command/README.md | 312 ++ docs/sdks/customfilter/README.md | 391 ++ docs/sdks/developmentconfig/README.md | 239 + docs/sdks/downloadclient/README.md | 835 ++++ docs/sdks/downloadclientconfig/README.md | 239 + docs/sdks/filesystem/README.md | 153 + docs/sdks/health/README.md | 81 + docs/sdks/history/README.md | 232 + docs/sdks/hostconfig/README.md | 239 + docs/sdks/indexer/README.md | 835 ++++ docs/sdks/indexerdefaultcategories/README.md | 81 + docs/sdks/indexerproxy/README.md | 687 +++ docs/sdks/indexerstats/README.md | 82 + docs/sdks/indexerstatus/README.md | 81 + docs/sdks/localization/README.md | 153 + docs/sdks/log/README.md | 82 + docs/sdks/logfile/README.md | 160 + docs/sdks/newznab/README.md | 315 ++ docs/sdks/notification/README.md | 687 +++ docs/sdks/ping/README.md | 155 + docs/sdks/prowlarr/README.md | 7 + docs/sdks/search/README.md | 232 + docs/sdks/staticresource/README.md | 305 ++ docs/sdks/system/README.md | 369 ++ docs/sdks/tag/README.md | 391 ++ docs/sdks/tagdetails/README.md | 160 + docs/sdks/task/README.md | 160 + docs/sdks/uiconfig/README.md | 239 + docs/sdks/update/README.md | 81 + docs/sdks/updatelogfile/README.md | 160 + eslint.config.mjs | 22 + jsr.json | 27 + package-lock.json | 4014 +++++++++++++++++ package.json | 139 + src/core.ts | 13 + src/funcs/apiInfoGetApi.ts | 129 + .../appProfileDeleteApiV1AppprofileId.ts | 155 + src/funcs/appProfileGetApiV1Appprofile.ts | 130 + src/funcs/appProfileGetApiV1AppprofileId.ts | 155 + .../appProfileGetApiV1AppprofileSchema.ts | 129 + src/funcs/appProfilePostApiV1Appprofile.ts | 149 + src/funcs/appProfilePutApiV1AppprofileId.ts | 158 + .../applicationDeleteApiV1ApplicationsBulk.ts | 151 + .../applicationDeleteApiV1ApplicationsId.ts | 155 + src/funcs/applicationGetApiV1Applications.ts | 130 + .../applicationGetApiV1ApplicationsId.ts | 155 + .../applicationGetApiV1ApplicationsSchema.ts | 130 + src/funcs/applicationPostApiV1Applications.ts | 156 + ...licationPostApiV1ApplicationsActionName.ts | 160 + .../applicationPostApiV1ApplicationsTest.ts | 156 + ...applicationPostApiV1ApplicationsTestall.ts | 129 + .../applicationPutApiV1ApplicationsBulk.ts | 150 + .../applicationPutApiV1ApplicationsId.ts | 163 + src/funcs/authenticationGetLogout.ts | 129 + src/funcs/backupDeleteApiV1SystemBackupId.ts | 155 + src/funcs/backupGetApiV1SystemBackup.ts | 130 + .../backupPostApiV1SystemBackupRestoreId.ts | 157 + ...ackupPostApiV1SystemBackupRestoreUpload.ts | 129 + src/funcs/commandDeleteApiV1CommandId.ts | 155 + src/funcs/commandGetApiV1Command.ts | 130 + src/funcs/commandGetApiV1CommandId.ts | 154 + src/funcs/commandPostApiV1Command.ts | 150 + .../customFilterDeleteApiV1CustomfilterId.ts | 155 + src/funcs/customFilterGetApiV1Customfilter.ts | 130 + .../customFilterGetApiV1CustomfilterId.ts | 155 + .../customFilterPostApiV1Customfilter.ts | 150 + .../customFilterPutApiV1CustomfilterId.ts | 158 + ...elopmentConfigGetApiV1ConfigDevelopment.ts | 129 + ...opmentConfigGetApiV1ConfigDevelopmentId.ts | 155 + ...opmentConfigPutApiV1ConfigDevelopmentId.ts | 158 + ...lientConfigGetApiV1ConfigDownloadclient.ts | 129 + ...entConfigGetApiV1ConfigDownloadclientId.ts | 157 + ...entConfigPutApiV1ConfigDownloadclientId.ts | 160 + ...loadClientDeleteApiV1DownloadclientBulk.ts | 151 + ...wnloadClientDeleteApiV1DownloadclientId.ts | 155 + .../downloadClientGetApiV1Downloadclient.ts | 130 + .../downloadClientGetApiV1DownloadclientId.ts | 155 + ...nloadClientGetApiV1DownloadclientSchema.ts | 130 + .../downloadClientPostApiV1Downloadclient.ts | 156 + ...ClientPostApiV1DownloadclientActionName.ts | 160 + ...wnloadClientPostApiV1DownloadclientTest.ts | 156 + ...oadClientPostApiV1DownloadclientTestall.ts | 129 + ...ownloadClientPutApiV1DownloadclientBulk.ts | 150 + .../downloadClientPutApiV1DownloadclientId.ts | 163 + src/funcs/fileSystemGetApiV1Filesystem.ts | 155 + src/funcs/fileSystemGetApiV1FilesystemType.ts | 153 + src/funcs/healthGetApiV1Health.ts | 130 + src/funcs/historyGetApiV1History.ts | 159 + src/funcs/historyGetApiV1HistoryIndexer.ts | 156 + src/funcs/historyGetApiV1HistorySince.ts | 155 + src/funcs/hostConfigGetApiV1ConfigHost.ts | 129 + src/funcs/hostConfigGetApiV1ConfigHostId.ts | 155 + src/funcs/hostConfigPutApiV1ConfigHostId.ts | 158 + ...aultCategoriesGetApiV1IndexerCategories.ts | 130 + src/funcs/indexerDeleteApiV1IndexerBulk.ts | 151 + src/funcs/indexerDeleteApiV1IndexerId.ts | 155 + src/funcs/indexerGetApiV1Indexer.ts | 130 + src/funcs/indexerGetApiV1IndexerId.ts | 154 + src/funcs/indexerGetApiV1IndexerSchema.ts | 130 + src/funcs/indexerPostApiV1Indexer.ts | 153 + .../indexerPostApiV1IndexerActionName.ts | 156 + src/funcs/indexerPostApiV1IndexerTest.ts | 154 + src/funcs/indexerPostApiV1IndexerTestall.ts | 129 + .../indexerProxyDeleteApiV1IndexerproxyId.ts | 155 + src/funcs/indexerProxyGetApiV1Indexerproxy.ts | 130 + .../indexerProxyGetApiV1IndexerproxyId.ts | 155 + .../indexerProxyGetApiV1IndexerproxySchema.ts | 130 + .../indexerProxyPostApiV1Indexerproxy.ts | 156 + ...xerProxyPostApiV1IndexerproxyActionName.ts | 160 + .../indexerProxyPostApiV1IndexerproxyTest.ts | 156 + ...ndexerProxyPostApiV1IndexerproxyTestall.ts | 129 + .../indexerProxyPutApiV1IndexerproxyId.ts | 163 + src/funcs/indexerPutApiV1IndexerBulk.ts | 150 + src/funcs/indexerPutApiV1IndexerId.ts | 160 + src/funcs/indexerStatsGetApiV1Indexerstats.ts | 157 + .../indexerStatusGetApiV1Indexerstatus.ts | 130 + src/funcs/localizationGetApiV1Localization.ts | 129 + ...localizationGetApiV1LocalizationOptions.ts | 130 + src/funcs/logFileGetApiV1LogFile.ts | 130 + src/funcs/logFileGetApiV1LogFileFilename.ts | 155 + src/funcs/logGetApiV1Log.ts | 156 + src/funcs/newznabGetApiV1IndexerIdDownload.ts | 161 + src/funcs/newznabGetApiV1IndexerIdNewznab.ts | 191 + src/funcs/newznabGetIdApi.ts | 190 + src/funcs/newznabGetIdDownload.ts | 160 + .../notificationDeleteApiV1NotificationId.ts | 155 + src/funcs/notificationGetApiV1Notification.ts | 130 + .../notificationGetApiV1NotificationId.ts | 155 + .../notificationGetApiV1NotificationSchema.ts | 130 + .../notificationPostApiV1Notification.ts | 156 + ...ficationPostApiV1NotificationActionName.ts | 160 + .../notificationPostApiV1NotificationTest.ts | 156 + ...otificationPostApiV1NotificationTestall.ts | 129 + .../notificationPutApiV1NotificationId.ts | 163 + src/funcs/pingGetPing.ts | 129 + src/funcs/pingHeadPing.ts | 129 + src/funcs/searchGetApiV1Search.ts | 158 + src/funcs/searchPostApiV1Search.ts | 150 + src/funcs/searchPostApiV1SearchBulk.ts | 153 + src/funcs/staticResourceGet.ts | 129 + src/funcs/staticResourceGetContentPath.ts | 154 + src/funcs/staticResourceGetLogin.ts | 129 + src/funcs/staticResourceGetPath.ts | 154 + src/funcs/systemGetApiV1SystemRoutes.ts | 129 + .../systemGetApiV1SystemRoutesDuplicate.ts | 129 + src/funcs/systemGetApiV1SystemStatus.ts | 129 + src/funcs/systemPostApiV1SystemRestart.ts | 129 + src/funcs/systemPostApiV1SystemShutdown.ts | 129 + src/funcs/tagDeleteApiV1TagId.ts | 154 + src/funcs/tagDetailsGetApiV1TagDetail.ts | 130 + src/funcs/tagDetailsGetApiV1TagDetailId.ts | 155 + src/funcs/tagGetApiV1Tag.ts | 130 + src/funcs/tagGetApiV1TagId.ts | 154 + src/funcs/tagPostApiV1Tag.ts | 149 + src/funcs/tagPutApiV1TagId.ts | 155 + src/funcs/taskGetApiV1SystemTask.ts | 130 + src/funcs/taskGetApiV1SystemTaskId.ts | 155 + src/funcs/uiConfigGetApiV1ConfigUi.ts | 129 + src/funcs/uiConfigGetApiV1ConfigUiId.ts | 154 + src/funcs/uiConfigPutApiV1ConfigUiId.ts | 155 + src/funcs/updateGetApiV1Update.ts | 130 + .../updateLogFileGetApiV1LogFileUpdate.ts | 130 + ...ateLogFileGetApiV1LogFileUpdateFilename.ts | 157 + src/hooks/hooks.ts | 132 + src/hooks/index.ts | 6 + src/hooks/registration.ts | 14 + src/hooks/types.ts | 110 + src/index.ts | 7 + src/lib/base64.ts | 37 + src/lib/config.ts | 86 + src/lib/dlv.ts | 53 + src/lib/encodings.ts | 483 ++ src/lib/env.ts | 43 + src/lib/files.ts | 40 + src/lib/http.ts | 323 ++ src/lib/is-plain-object.ts | 43 + src/lib/logger.ts | 9 + src/lib/matchers.ts | 342 ++ src/lib/primitives.ts | 150 + src/lib/retries.ts | 218 + src/lib/schemas.ts | 91 + src/lib/sdks.ts | 401 ++ src/lib/security.ts | 268 ++ src/lib/url.ts | 33 + src/mcp-server/build.mts | 16 + src/mcp-server/cli.ts | 13 + src/mcp-server/cli/start/command.ts | 128 + src/mcp-server/cli/start/impl.ts | 141 + src/mcp-server/console-logger.ts | 71 + src/mcp-server/extensions.ts | 17 + src/mcp-server/mcp-server.ts | 26 + src/mcp-server/prompts.ts | 117 + src/mcp-server/resources.ts | 172 + src/mcp-server/scopes.ts | 7 + src/mcp-server/server.ts | 319 ++ src/mcp-server/shared.ts | 75 + src/mcp-server/tools.ts | 129 + src/mcp-server/tools/apiInfoGetApi.ts | 28 + .../appProfileDeleteApiV1AppprofileId.ts | 35 + .../tools/appProfileGetApiV1Appprofile.ts | 28 + .../tools/appProfileGetApiV1AppprofileId.ts | 36 + .../appProfileGetApiV1AppprofileSchema.ts | 28 + .../tools/appProfilePostApiV1Appprofile.ts | 35 + .../tools/appProfilePutApiV1AppprofileId.ts | 36 + .../applicationDeleteApiV1ApplicationsBulk.ts | 35 + .../applicationDeleteApiV1ApplicationsId.ts | 35 + .../tools/applicationGetApiV1Applications.ts | 28 + .../applicationGetApiV1ApplicationsId.ts | 37 + .../applicationGetApiV1ApplicationsSchema.ts | 28 + .../tools/applicationPostApiV1Applications.ts | 37 + ...licationPostApiV1ApplicationsActionName.ts | 35 + .../applicationPostApiV1ApplicationsTest.ts | 35 + ...applicationPostApiV1ApplicationsTestall.ts | 26 + .../applicationPutApiV1ApplicationsBulk.ts | 37 + .../applicationPutApiV1ApplicationsId.ts | 37 + .../tools/authenticationGetLogout.ts | 26 + .../tools/backupDeleteApiV1SystemBackupId.ts | 34 + .../tools/backupGetApiV1SystemBackup.ts | 28 + .../backupPostApiV1SystemBackupRestoreId.ts | 35 + ...ackupPostApiV1SystemBackupRestoreUpload.ts | 26 + .../tools/commandDeleteApiV1CommandId.ts | 33 + .../tools/commandGetApiV1Command.ts | 28 + .../tools/commandGetApiV1CommandId.ts | 35 + .../tools/commandPostApiV1Command.ts | 35 + .../customFilterDeleteApiV1CustomfilterId.ts | 35 + .../tools/customFilterGetApiV1Customfilter.ts | 28 + .../customFilterGetApiV1CustomfilterId.ts | 37 + .../customFilterPostApiV1Customfilter.ts | 37 + .../customFilterPutApiV1CustomfilterId.ts | 37 + ...elopmentConfigGetApiV1ConfigDevelopment.ts | 28 + ...opmentConfigGetApiV1ConfigDevelopmentId.ts | 38 + ...opmentConfigPutApiV1ConfigDevelopmentId.ts | 38 + ...lientConfigGetApiV1ConfigDownloadclient.ts | 30 + ...entConfigGetApiV1ConfigDownloadclientId.ts | 37 + ...entConfigPutApiV1ConfigDownloadclientId.ts | 37 + ...loadClientDeleteApiV1DownloadclientBulk.ts | 35 + ...wnloadClientDeleteApiV1DownloadclientId.ts | 35 + .../downloadClientGetApiV1Downloadclient.ts | 28 + .../downloadClientGetApiV1DownloadclientId.ts | 37 + ...nloadClientGetApiV1DownloadclientSchema.ts | 28 + .../downloadClientPostApiV1Downloadclient.ts | 37 + ...ClientPostApiV1DownloadclientActionName.ts | 35 + ...wnloadClientPostApiV1DownloadclientTest.ts | 35 + ...oadClientPostApiV1DownloadclientTestall.ts | 28 + ...ownloadClientPutApiV1DownloadclientBulk.ts | 37 + .../downloadClientPutApiV1DownloadclientId.ts | 37 + .../tools/fileSystemGetApiV1Filesystem.ts | 33 + .../tools/fileSystemGetApiV1FilesystemType.ts | 35 + src/mcp-server/tools/healthGetApiV1Health.ts | 28 + .../tools/historyGetApiV1History.ts | 35 + .../tools/historyGetApiV1HistoryIndexer.ts | 35 + .../tools/historyGetApiV1HistorySince.ts | 35 + .../tools/hostConfigGetApiV1ConfigHost.ts | 28 + .../tools/hostConfigGetApiV1ConfigHostId.ts | 36 + .../tools/hostConfigPutApiV1ConfigHostId.ts | 36 + ...aultCategoriesGetApiV1IndexerCategories.ts | 30 + .../tools/indexerDeleteApiV1IndexerBulk.ts | 33 + .../tools/indexerDeleteApiV1IndexerId.ts | 33 + .../tools/indexerGetApiV1Indexer.ts | 28 + .../tools/indexerGetApiV1IndexerId.ts | 35 + .../tools/indexerGetApiV1IndexerSchema.ts | 28 + .../tools/indexerPostApiV1Indexer.ts | 35 + .../indexerPostApiV1IndexerActionName.ts | 35 + .../tools/indexerPostApiV1IndexerTest.ts | 33 + .../tools/indexerPostApiV1IndexerTestall.ts | 26 + .../indexerProxyDeleteApiV1IndexerproxyId.ts | 35 + .../tools/indexerProxyGetApiV1Indexerproxy.ts | 28 + .../indexerProxyGetApiV1IndexerproxyId.ts | 37 + .../indexerProxyGetApiV1IndexerproxySchema.ts | 28 + .../indexerProxyPostApiV1Indexerproxy.ts | 37 + ...xerProxyPostApiV1IndexerproxyActionName.ts | 35 + .../indexerProxyPostApiV1IndexerproxyTest.ts | 35 + ...ndexerProxyPostApiV1IndexerproxyTestall.ts | 26 + .../indexerProxyPutApiV1IndexerproxyId.ts | 37 + .../tools/indexerPutApiV1IndexerBulk.ts | 35 + .../tools/indexerPutApiV1IndexerId.ts | 35 + .../tools/indexerStatsGetApiV1Indexerstats.ts | 37 + .../indexerStatusGetApiV1Indexerstatus.ts | 28 + .../tools/localizationGetApiV1Localization.ts | 26 + ...localizationGetApiV1LocalizationOptions.ts | 28 + .../tools/logFileGetApiV1LogFile.ts | 28 + .../tools/logFileGetApiV1LogFileFilename.ts | 36 + src/mcp-server/tools/logGetApiV1Log.ts | 35 + .../tools/newznabGetApiV1IndexerIdDownload.ts | 35 + .../tools/newznabGetApiV1IndexerIdNewznab.ts | 34 + src/mcp-server/tools/newznabGetIdApi.ts | 33 + src/mcp-server/tools/newznabGetIdDownload.ts | 33 + .../notificationDeleteApiV1NotificationId.ts | 35 + .../tools/notificationGetApiV1Notification.ts | 28 + .../notificationGetApiV1NotificationId.ts | 37 + .../notificationGetApiV1NotificationSchema.ts | 28 + .../notificationPostApiV1Notification.ts | 37 + ...ficationPostApiV1NotificationActionName.ts | 35 + .../notificationPostApiV1NotificationTest.ts | 35 + ...otificationPostApiV1NotificationTestall.ts | 26 + .../notificationPutApiV1NotificationId.ts | 37 + src/mcp-server/tools/pingGetPing.ts | 28 + src/mcp-server/tools/pingHeadPing.ts | 28 + src/mcp-server/tools/searchGetApiV1Search.ts | 35 + src/mcp-server/tools/searchPostApiV1Search.ts | 35 + .../tools/searchPostApiV1SearchBulk.ts | 36 + src/mcp-server/tools/staticResourceGet.ts | 26 + .../tools/staticResourceGetContentPath.ts | 33 + .../tools/staticResourceGetLogin.ts | 26 + src/mcp-server/tools/staticResourceGetPath.ts | 33 + .../tools/systemGetApiV1SystemRoutes.ts | 26 + .../systemGetApiV1SystemRoutesDuplicate.ts | 26 + .../tools/systemGetApiV1SystemStatus.ts | 28 + .../tools/systemPostApiV1SystemRestart.ts | 26 + .../tools/systemPostApiV1SystemShutdown.ts | 26 + src/mcp-server/tools/tagDeleteApiV1TagId.ts | 33 + .../tools/tagDetailsGetApiV1TagDetail.ts | 28 + .../tools/tagDetailsGetApiV1TagDetailId.ts | 35 + src/mcp-server/tools/tagGetApiV1Tag.ts | 28 + src/mcp-server/tools/tagGetApiV1TagId.ts | 35 + src/mcp-server/tools/tagPostApiV1Tag.ts | 35 + src/mcp-server/tools/tagPutApiV1TagId.ts | 35 + .../tools/taskGetApiV1SystemTask.ts | 28 + .../tools/taskGetApiV1SystemTaskId.ts | 35 + .../tools/uiConfigGetApiV1ConfigUi.ts | 28 + .../tools/uiConfigGetApiV1ConfigUiId.ts | 35 + .../tools/uiConfigPutApiV1ConfigUiId.ts | 35 + src/mcp-server/tools/updateGetApiV1Update.ts | 28 + .../updateLogFileGetApiV1LogFileUpdate.ts | 28 + ...ateLogFileGetApiV1LogFileUpdateFilename.ts | 37 + src/models/apiinforesource.ts | 68 + src/models/applicationbulkresource.ts | 88 + src/models/applicationresource.ts | 129 + src/models/applicationsynclevel.ts | 34 + src/models/applytags.ts | 32 + src/models/appprofileresource.ts | 86 + src/models/authenticationrequiredtype.ts | 35 + src/models/authenticationtype.ts | 35 + src/models/backupresource.ts | 88 + src/models/backuptype.ts | 32 + src/models/booksearchparam.ts | 37 + src/models/certificatevalidationtype.ts | 36 + src/models/command.ts | 114 + src/models/commandinput.ts | 93 + src/models/commandpriority.ts | 34 + src/models/commandresource.ts | 164 + src/models/commandresourceinput.ts | 166 + src/models/commandstatus.ts | 38 + src/models/commandtrigger.ts | 34 + src/models/customfilterresource.ts | 78 + src/models/databasetype.ts | 31 + src/models/developmentconfigresource.ts | 86 + src/models/downloadclientbulkresource.ts | 87 + src/models/downloadclientcategory.ts | 70 + src/models/downloadclientconfigresource.ts | 68 + src/models/downloadclientresource.ts | 151 + src/models/downloadprotocol.ts | 34 + src/models/errors/apierror.ts | 27 + src/models/errors/httpclienterrors.ts | 62 + src/models/errors/index.ts | 7 + src/models/errors/sdkvalidationerror.ts | 97 + src/models/field.ts | 134 + src/models/healthcheckresult.ts | 35 + src/models/healthresource.ts | 83 + src/models/historyeventtype.ts | 37 + src/models/historyresource.ts | 94 + src/models/historyresourcepagingresource.ts | 99 + src/models/hostconfigresource.ts | 243 + src/models/hoststatistics.ts | 70 + src/models/index.ts | 80 + src/models/indexerbulkresource.ts | 111 + src/models/indexercapabilityresource.ts | 139 + src/models/indexercapabilityresourceinput.ts | 143 + src/models/indexercategory.ts | 80 + src/models/indexercategoryinput.ts | 74 + src/models/indexerprivacy.ts | 34 + src/models/indexerproxyresource.ts | 137 + src/models/indexerresource.ts | 221 + src/models/indexerresourceinput.ts | 224 + src/models/indexerstatistics.ts | 110 + src/models/indexerstatsresource.ts | 97 + src/models/indexerstatusresource.ts | 90 + src/models/localizationoption.ts | 70 + src/models/logfileresource.ts | 82 + src/models/logresource.ts | 91 + src/models/logresourcepagingresource.ts | 97 + src/models/moviesearchparam.ts | 40 + src/models/musicsearchparam.ts | 38 + src/models/notificationresource.ts | 165 + .../operations/deleteapiv1applicationsid.ts | 68 + .../operations/deleteapiv1appprofileid.ts | 68 + src/models/operations/deleteapiv1commandid.ts | 68 + .../operations/deleteapiv1customfilterid.ts | 68 + .../operations/deleteapiv1downloadclientid.ts | 70 + src/models/operations/deleteapiv1indexerid.ts | 68 + .../operations/deleteapiv1indexerproxyid.ts | 68 + .../operations/deleteapiv1notificationid.ts | 68 + .../operations/deleteapiv1systembackupid.ts | 68 + src/models/operations/deleteapiv1tagid.ts | 66 + .../operations/getapiv1applicationsid.ts | 68 + src/models/operations/getapiv1appprofileid.ts | 68 + src/models/operations/getapiv1commandid.ts | 66 + .../operations/getapiv1configdevelopmentid.ts | 70 + .../getapiv1configdownloadclientid.ts | 71 + src/models/operations/getapiv1confighostid.ts | 68 + src/models/operations/getapiv1configuiid.ts | 66 + .../operations/getapiv1customfilterid.ts | 68 + .../operations/getapiv1downloadclientid.ts | 68 + src/models/operations/getapiv1filesystem.ts | 74 + .../operations/getapiv1filesystemtype.ts | 68 + src/models/operations/getapiv1history.ts | 95 + .../operations/getapiv1historyindexer.ts | 77 + src/models/operations/getapiv1historysince.ts | 74 + src/models/operations/getapiv1indexerid.ts | 66 + .../operations/getapiv1indexeriddownload.ts | 76 + .../operations/getapiv1indexeridnewznab.ts | 196 + .../operations/getapiv1indexerproxyid.ts | 68 + src/models/operations/getapiv1indexerstats.ts | 86 + src/models/operations/getapiv1log.ts | 83 + .../operations/getapiv1logfilefilename.ts | 68 + .../getapiv1logfileupdatefilename.ts | 71 + .../operations/getapiv1notificationid.ts | 68 + src/models/operations/getapiv1search.ts | 86 + src/models/operations/getapiv1systemtaskid.ts | 68 + src/models/operations/getapiv1tagdetailid.ts | 66 + src/models/operations/getapiv1tagid.ts | 66 + src/models/operations/getcontentpath.ts | 66 + src/models/operations/getidapi.ts | 192 + src/models/operations/getiddownload.ts | 74 + src/models/operations/getpath.ts | 62 + src/models/operations/index.ts | 73 + .../operations/postapiv1applications.ts | 82 + .../postapiv1applicationsactionname.ts | 86 + .../operations/postapiv1applicationstest.ts | 82 + .../operations/postapiv1downloadclient.ts | 84 + .../postapiv1downloadclientactionname.ts | 93 + .../operations/postapiv1downloadclienttest.ts | 86 + src/models/operations/postapiv1indexer.ts | 80 + .../operations/postapiv1indexeractionname.ts | 83 + .../operations/postapiv1indexerproxy.ts | 82 + .../postapiv1indexerproxyactionname.ts | 86 + .../operations/postapiv1indexerproxytest.ts | 82 + src/models/operations/postapiv1indexertest.ts | 82 + .../operations/postapiv1notification.ts | 82 + .../postapiv1notificationactionname.ts | 86 + .../operations/postapiv1notificationtest.ts | 82 + .../postapiv1systembackuprestoreid.ts | 71 + .../operations/putapiv1applicationsid.ts | 86 + src/models/operations/putapiv1appprofileid.ts | 82 + .../operations/putapiv1configdevelopmentid.ts | 88 + .../putapiv1configdownloadclientid.ts | 91 + src/models/operations/putapiv1confighostid.ts | 82 + src/models/operations/putapiv1configuiid.ts | 80 + .../operations/putapiv1customfilterid.ts | 82 + .../operations/putapiv1downloadclientid.ts | 88 + src/models/operations/putapiv1indexerid.ts | 84 + .../operations/putapiv1indexerproxyid.ts | 86 + .../operations/putapiv1notificationid.ts | 86 + src/models/operations/putapiv1tagid.ts | 80 + src/models/pingresource.ts | 62 + src/models/privacylevel.ts | 33 + src/models/providermessage.ts | 73 + src/models/providermessagetype.ts | 34 + src/models/proxytype.ts | 32 + src/models/releaseresource.ts | 200 + src/models/releaseresourceinput.ts | 200 + src/models/runtimemode.ts | 32 + src/models/searchparam.ts | 30 + src/models/security.ts | 75 + src/models/selectoption.ts | 78 + src/models/sortdirection.ts | 34 + src/models/systemresource.ts | 204 + src/models/tagdetailsresource.ts | 86 + src/models/tagresource.ts | 66 + src/models/taskresource.ts | 96 + src/models/tvsearchparam.ts | 43 + src/models/uiconfigresource.ts | 102 + src/models/updatechanges.ts | 66 + src/models/updatemechanism.ts | 36 + src/models/updateresource.ts | 115 + src/models/useragentstatistics.ts | 74 + src/sdk/apiinfo.ts | 19 + src/sdk/application.ts | 136 + src/sdk/appprofile.ts | 78 + src/sdk/authentication.ts | 18 + src/sdk/backup.ts | 54 + src/sdk/command.ts | 56 + src/sdk/customfilter.ts | 68 + src/sdk/developmentconfig.ts | 44 + src/sdk/downloadclient.ts | 136 + src/sdk/downloadclientconfig.ts | 44 + src/sdk/filesystem.ts | 33 + src/sdk/health.ts | 19 + src/sdk/history.ts | 46 + src/sdk/hostconfig.ts | 44 + src/sdk/index.ts | 5 + src/sdk/indexer.ts | 136 + src/sdk/indexerdefaultcategories.ts | 19 + src/sdk/indexerproxy.ts | 112 + src/sdk/indexerstats.ts | 22 + src/sdk/indexerstatus.ts | 19 + src/sdk/localization.ts | 29 + src/sdk/log.ts | 22 + src/sdk/logfile.ts | 32 + src/sdk/newznab.ts | 57 + src/sdk/notification.ts | 112 + src/sdk/ping.ts | 29 + src/sdk/sdk.ts | 215 + src/sdk/search.ts | 46 + src/sdk/staticresource.ts | 53 + src/sdk/system.ts | 59 + src/sdk/tag.ts | 68 + src/sdk/tagdetails.ts | 32 + src/sdk/task.ts | 32 + src/sdk/uiconfig.ts | 44 + src/sdk/update.ts | 19 + src/sdk/updatelogfile.ts | 32 + src/types/async.ts | 68 + src/types/blobs.ts | 31 + src/types/constdatetime.ts | 15 + src/types/enums.ts | 16 + src/types/fp.ts | 50 + src/types/index.ts | 11 + src/types/operations.ts | 105 + src/types/rfcdate.ts | 54 + src/types/streams.ts | 21 + tsconfig.json | 41 + 690 files changed, 61620 insertions(+) create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/setup.sh create mode 100644 .gitattributes create mode 100644 .github/workflows/sdk_generation.yaml create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .speakeasy/gen.lock create mode 100644 .speakeasy/gen.yaml create mode 100644 .speakeasy/speakeasy-modifications-overlay.yaml create mode 100644 .speakeasy/workflow.lock create mode 100644 .speakeasy/workflow.yaml create mode 100644 CONTRIBUTING.md create mode 100644 FUNCTIONS.md create mode 100644 RUNTIMES.md create mode 100644 USAGE.md create mode 100644 docs/lib/utils/retryconfig.md create mode 100644 docs/models/apiinforesource.md create mode 100644 docs/models/applicationbulkresource.md create mode 100644 docs/models/applicationresource.md create mode 100644 docs/models/applicationsynclevel.md create mode 100644 docs/models/applytags.md create mode 100644 docs/models/appprofileresource.md create mode 100644 docs/models/authenticationrequiredtype.md create mode 100644 docs/models/authenticationtype.md create mode 100644 docs/models/backupresource.md create mode 100644 docs/models/backuptype.md create mode 100644 docs/models/booksearchparam.md create mode 100644 docs/models/certificatevalidationtype.md create mode 100644 docs/models/command.md create mode 100644 docs/models/commandinput.md create mode 100644 docs/models/commandpriority.md create mode 100644 docs/models/commandresource.md create mode 100644 docs/models/commandresourceinput.md create mode 100644 docs/models/commandstatus.md create mode 100644 docs/models/commandtrigger.md create mode 100644 docs/models/customfilterresource.md create mode 100644 docs/models/databasetype.md create mode 100644 docs/models/developmentconfigresource.md create mode 100644 docs/models/downloadclientbulkresource.md create mode 100644 docs/models/downloadclientcategory.md create mode 100644 docs/models/downloadclientconfigresource.md create mode 100644 docs/models/downloadclientresource.md create mode 100644 docs/models/downloadprotocol.md create mode 100644 docs/models/field.md create mode 100644 docs/models/healthcheckresult.md create mode 100644 docs/models/healthresource.md create mode 100644 docs/models/historyeventtype.md create mode 100644 docs/models/historyresource.md create mode 100644 docs/models/historyresourcepagingresource.md create mode 100644 docs/models/hostconfigresource.md create mode 100644 docs/models/hoststatistics.md create mode 100644 docs/models/indexerbulkresource.md create mode 100644 docs/models/indexercapabilityresource.md create mode 100644 docs/models/indexercapabilityresourceinput.md create mode 100644 docs/models/indexercategory.md create mode 100644 docs/models/indexercategoryinput.md create mode 100644 docs/models/indexerprivacy.md create mode 100644 docs/models/indexerproxyresource.md create mode 100644 docs/models/indexerresource.md create mode 100644 docs/models/indexerresourceinput.md create mode 100644 docs/models/indexerstatistics.md create mode 100644 docs/models/indexerstatsresource.md create mode 100644 docs/models/indexerstatusresource.md create mode 100644 docs/models/localizationoption.md create mode 100644 docs/models/logfileresource.md create mode 100644 docs/models/logresource.md create mode 100644 docs/models/logresourcepagingresource.md create mode 100644 docs/models/moviesearchparam.md create mode 100644 docs/models/musicsearchparam.md create mode 100644 docs/models/notificationresource.md create mode 100644 docs/models/operations/deleteapiv1applicationsidrequest.md create mode 100644 docs/models/operations/deleteapiv1appprofileidrequest.md create mode 100644 docs/models/operations/deleteapiv1commandidrequest.md create mode 100644 docs/models/operations/deleteapiv1customfilteridrequest.md create mode 100644 docs/models/operations/deleteapiv1downloadclientidrequest.md create mode 100644 docs/models/operations/deleteapiv1indexeridrequest.md create mode 100644 docs/models/operations/deleteapiv1indexerproxyidrequest.md create mode 100644 docs/models/operations/deleteapiv1notificationidrequest.md create mode 100644 docs/models/operations/deleteapiv1systembackupidrequest.md create mode 100644 docs/models/operations/deleteapiv1tagidrequest.md create mode 100644 docs/models/operations/getapiv1applicationsidrequest.md create mode 100644 docs/models/operations/getapiv1appprofileidrequest.md create mode 100644 docs/models/operations/getapiv1commandidrequest.md create mode 100644 docs/models/operations/getapiv1configdevelopmentidrequest.md create mode 100644 docs/models/operations/getapiv1configdownloadclientidrequest.md create mode 100644 docs/models/operations/getapiv1confighostidrequest.md create mode 100644 docs/models/operations/getapiv1configuiidrequest.md create mode 100644 docs/models/operations/getapiv1customfilteridrequest.md create mode 100644 docs/models/operations/getapiv1downloadclientidrequest.md create mode 100644 docs/models/operations/getapiv1filesystemrequest.md create mode 100644 docs/models/operations/getapiv1filesystemtyperequest.md create mode 100644 docs/models/operations/getapiv1historyindexerrequest.md create mode 100644 docs/models/operations/getapiv1historyrequest.md create mode 100644 docs/models/operations/getapiv1historysincerequest.md create mode 100644 docs/models/operations/getapiv1indexeriddownloadrequest.md create mode 100644 docs/models/operations/getapiv1indexeridnewznabrequest.md create mode 100644 docs/models/operations/getapiv1indexeridrequest.md create mode 100644 docs/models/operations/getapiv1indexerproxyidrequest.md create mode 100644 docs/models/operations/getapiv1indexerstatsrequest.md create mode 100644 docs/models/operations/getapiv1logfilefilenamerequest.md create mode 100644 docs/models/operations/getapiv1logfileupdatefilenamerequest.md create mode 100644 docs/models/operations/getapiv1logrequest.md create mode 100644 docs/models/operations/getapiv1notificationidrequest.md create mode 100644 docs/models/operations/getapiv1searchrequest.md create mode 100644 docs/models/operations/getapiv1systemtaskidrequest.md create mode 100644 docs/models/operations/getapiv1tagdetailidrequest.md create mode 100644 docs/models/operations/getapiv1tagidrequest.md create mode 100644 docs/models/operations/getcontentpathrequest.md create mode 100644 docs/models/operations/getidapirequest.md create mode 100644 docs/models/operations/getiddownloadrequest.md create mode 100644 docs/models/operations/getpathrequest.md create mode 100644 docs/models/operations/postapiv1applicationsactionnamerequest.md create mode 100644 docs/models/operations/postapiv1applicationsrequest.md create mode 100644 docs/models/operations/postapiv1applicationstestrequest.md create mode 100644 docs/models/operations/postapiv1downloadclientactionnamerequest.md create mode 100644 docs/models/operations/postapiv1downloadclientrequest.md create mode 100644 docs/models/operations/postapiv1downloadclienttestrequest.md create mode 100644 docs/models/operations/postapiv1indexeractionnamerequest.md create mode 100644 docs/models/operations/postapiv1indexerproxyactionnamerequest.md create mode 100644 docs/models/operations/postapiv1indexerproxyrequest.md create mode 100644 docs/models/operations/postapiv1indexerproxytestrequest.md create mode 100644 docs/models/operations/postapiv1indexerrequest.md create mode 100644 docs/models/operations/postapiv1indexertestrequest.md create mode 100644 docs/models/operations/postapiv1notificationactionnamerequest.md create mode 100644 docs/models/operations/postapiv1notificationrequest.md create mode 100644 docs/models/operations/postapiv1notificationtestrequest.md create mode 100644 docs/models/operations/postapiv1systembackuprestoreidrequest.md create mode 100644 docs/models/operations/putapiv1applicationsidrequest.md create mode 100644 docs/models/operations/putapiv1appprofileidrequest.md create mode 100644 docs/models/operations/putapiv1configdevelopmentidrequest.md create mode 100644 docs/models/operations/putapiv1configdownloadclientidrequest.md create mode 100644 docs/models/operations/putapiv1confighostidrequest.md create mode 100644 docs/models/operations/putapiv1configuiidrequest.md create mode 100644 docs/models/operations/putapiv1customfilteridrequest.md create mode 100644 docs/models/operations/putapiv1downloadclientidrequest.md create mode 100644 docs/models/operations/putapiv1indexeridrequest.md create mode 100644 docs/models/operations/putapiv1indexerproxyidrequest.md create mode 100644 docs/models/operations/putapiv1notificationidrequest.md create mode 100644 docs/models/operations/putapiv1tagidrequest.md create mode 100644 docs/models/pingresource.md create mode 100644 docs/models/privacylevel.md create mode 100644 docs/models/providermessage.md create mode 100644 docs/models/providermessagetype.md create mode 100644 docs/models/proxytype.md create mode 100644 docs/models/releaseresource.md create mode 100644 docs/models/releaseresourceinput.md create mode 100644 docs/models/runtimemode.md create mode 100644 docs/models/searchparam.md create mode 100644 docs/models/security.md create mode 100644 docs/models/selectoption.md create mode 100644 docs/models/sortdirection.md create mode 100644 docs/models/systemresource.md create mode 100644 docs/models/tagdetailsresource.md create mode 100644 docs/models/tagresource.md create mode 100644 docs/models/taskresource.md create mode 100644 docs/models/tvsearchparam.md create mode 100644 docs/models/uiconfigresource.md create mode 100644 docs/models/updatechanges.md create mode 100644 docs/models/updatemechanism.md create mode 100644 docs/models/updateresource.md create mode 100644 docs/models/useragentstatistics.md create mode 100644 docs/sdks/apiinfo/README.md create mode 100644 docs/sdks/application/README.md create mode 100644 docs/sdks/appprofile/README.md create mode 100644 docs/sdks/authentication/README.md create mode 100644 docs/sdks/backup/README.md create mode 100644 docs/sdks/command/README.md create mode 100644 docs/sdks/customfilter/README.md create mode 100644 docs/sdks/developmentconfig/README.md create mode 100644 docs/sdks/downloadclient/README.md create mode 100644 docs/sdks/downloadclientconfig/README.md create mode 100644 docs/sdks/filesystem/README.md create mode 100644 docs/sdks/health/README.md create mode 100644 docs/sdks/history/README.md create mode 100644 docs/sdks/hostconfig/README.md create mode 100644 docs/sdks/indexer/README.md create mode 100644 docs/sdks/indexerdefaultcategories/README.md create mode 100644 docs/sdks/indexerproxy/README.md create mode 100644 docs/sdks/indexerstats/README.md create mode 100644 docs/sdks/indexerstatus/README.md create mode 100644 docs/sdks/localization/README.md create mode 100644 docs/sdks/log/README.md create mode 100644 docs/sdks/logfile/README.md create mode 100644 docs/sdks/newznab/README.md create mode 100644 docs/sdks/notification/README.md create mode 100644 docs/sdks/ping/README.md create mode 100644 docs/sdks/prowlarr/README.md create mode 100644 docs/sdks/search/README.md create mode 100644 docs/sdks/staticresource/README.md create mode 100644 docs/sdks/system/README.md create mode 100644 docs/sdks/tag/README.md create mode 100644 docs/sdks/tagdetails/README.md create mode 100644 docs/sdks/task/README.md create mode 100644 docs/sdks/uiconfig/README.md create mode 100644 docs/sdks/update/README.md create mode 100644 docs/sdks/updatelogfile/README.md create mode 100644 eslint.config.mjs create mode 100644 jsr.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/core.ts create mode 100644 src/funcs/apiInfoGetApi.ts create mode 100644 src/funcs/appProfileDeleteApiV1AppprofileId.ts create mode 100644 src/funcs/appProfileGetApiV1Appprofile.ts create mode 100644 src/funcs/appProfileGetApiV1AppprofileId.ts create mode 100644 src/funcs/appProfileGetApiV1AppprofileSchema.ts create mode 100644 src/funcs/appProfilePostApiV1Appprofile.ts create mode 100644 src/funcs/appProfilePutApiV1AppprofileId.ts create mode 100644 src/funcs/applicationDeleteApiV1ApplicationsBulk.ts create mode 100644 src/funcs/applicationDeleteApiV1ApplicationsId.ts create mode 100644 src/funcs/applicationGetApiV1Applications.ts create mode 100644 src/funcs/applicationGetApiV1ApplicationsId.ts create mode 100644 src/funcs/applicationGetApiV1ApplicationsSchema.ts create mode 100644 src/funcs/applicationPostApiV1Applications.ts create mode 100644 src/funcs/applicationPostApiV1ApplicationsActionName.ts create mode 100644 src/funcs/applicationPostApiV1ApplicationsTest.ts create mode 100644 src/funcs/applicationPostApiV1ApplicationsTestall.ts create mode 100644 src/funcs/applicationPutApiV1ApplicationsBulk.ts create mode 100644 src/funcs/applicationPutApiV1ApplicationsId.ts create mode 100644 src/funcs/authenticationGetLogout.ts create mode 100644 src/funcs/backupDeleteApiV1SystemBackupId.ts create mode 100644 src/funcs/backupGetApiV1SystemBackup.ts create mode 100644 src/funcs/backupPostApiV1SystemBackupRestoreId.ts create mode 100644 src/funcs/backupPostApiV1SystemBackupRestoreUpload.ts create mode 100644 src/funcs/commandDeleteApiV1CommandId.ts create mode 100644 src/funcs/commandGetApiV1Command.ts create mode 100644 src/funcs/commandGetApiV1CommandId.ts create mode 100644 src/funcs/commandPostApiV1Command.ts create mode 100644 src/funcs/customFilterDeleteApiV1CustomfilterId.ts create mode 100644 src/funcs/customFilterGetApiV1Customfilter.ts create mode 100644 src/funcs/customFilterGetApiV1CustomfilterId.ts create mode 100644 src/funcs/customFilterPostApiV1Customfilter.ts create mode 100644 src/funcs/customFilterPutApiV1CustomfilterId.ts create mode 100644 src/funcs/developmentConfigGetApiV1ConfigDevelopment.ts create mode 100644 src/funcs/developmentConfigGetApiV1ConfigDevelopmentId.ts create mode 100644 src/funcs/developmentConfigPutApiV1ConfigDevelopmentId.ts create mode 100644 src/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.ts create mode 100644 src/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.ts create mode 100644 src/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.ts create mode 100644 src/funcs/downloadClientDeleteApiV1DownloadclientBulk.ts create mode 100644 src/funcs/downloadClientDeleteApiV1DownloadclientId.ts create mode 100644 src/funcs/downloadClientGetApiV1Downloadclient.ts create mode 100644 src/funcs/downloadClientGetApiV1DownloadclientId.ts create mode 100644 src/funcs/downloadClientGetApiV1DownloadclientSchema.ts create mode 100644 src/funcs/downloadClientPostApiV1Downloadclient.ts create mode 100644 src/funcs/downloadClientPostApiV1DownloadclientActionName.ts create mode 100644 src/funcs/downloadClientPostApiV1DownloadclientTest.ts create mode 100644 src/funcs/downloadClientPostApiV1DownloadclientTestall.ts create mode 100644 src/funcs/downloadClientPutApiV1DownloadclientBulk.ts create mode 100644 src/funcs/downloadClientPutApiV1DownloadclientId.ts create mode 100644 src/funcs/fileSystemGetApiV1Filesystem.ts create mode 100644 src/funcs/fileSystemGetApiV1FilesystemType.ts create mode 100644 src/funcs/healthGetApiV1Health.ts create mode 100644 src/funcs/historyGetApiV1History.ts create mode 100644 src/funcs/historyGetApiV1HistoryIndexer.ts create mode 100644 src/funcs/historyGetApiV1HistorySince.ts create mode 100644 src/funcs/hostConfigGetApiV1ConfigHost.ts create mode 100644 src/funcs/hostConfigGetApiV1ConfigHostId.ts create mode 100644 src/funcs/hostConfigPutApiV1ConfigHostId.ts create mode 100644 src/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.ts create mode 100644 src/funcs/indexerDeleteApiV1IndexerBulk.ts create mode 100644 src/funcs/indexerDeleteApiV1IndexerId.ts create mode 100644 src/funcs/indexerGetApiV1Indexer.ts create mode 100644 src/funcs/indexerGetApiV1IndexerId.ts create mode 100644 src/funcs/indexerGetApiV1IndexerSchema.ts create mode 100644 src/funcs/indexerPostApiV1Indexer.ts create mode 100644 src/funcs/indexerPostApiV1IndexerActionName.ts create mode 100644 src/funcs/indexerPostApiV1IndexerTest.ts create mode 100644 src/funcs/indexerPostApiV1IndexerTestall.ts create mode 100644 src/funcs/indexerProxyDeleteApiV1IndexerproxyId.ts create mode 100644 src/funcs/indexerProxyGetApiV1Indexerproxy.ts create mode 100644 src/funcs/indexerProxyGetApiV1IndexerproxyId.ts create mode 100644 src/funcs/indexerProxyGetApiV1IndexerproxySchema.ts create mode 100644 src/funcs/indexerProxyPostApiV1Indexerproxy.ts create mode 100644 src/funcs/indexerProxyPostApiV1IndexerproxyActionName.ts create mode 100644 src/funcs/indexerProxyPostApiV1IndexerproxyTest.ts create mode 100644 src/funcs/indexerProxyPostApiV1IndexerproxyTestall.ts create mode 100644 src/funcs/indexerProxyPutApiV1IndexerproxyId.ts create mode 100644 src/funcs/indexerPutApiV1IndexerBulk.ts create mode 100644 src/funcs/indexerPutApiV1IndexerId.ts create mode 100644 src/funcs/indexerStatsGetApiV1Indexerstats.ts create mode 100644 src/funcs/indexerStatusGetApiV1Indexerstatus.ts create mode 100644 src/funcs/localizationGetApiV1Localization.ts create mode 100644 src/funcs/localizationGetApiV1LocalizationOptions.ts create mode 100644 src/funcs/logFileGetApiV1LogFile.ts create mode 100644 src/funcs/logFileGetApiV1LogFileFilename.ts create mode 100644 src/funcs/logGetApiV1Log.ts create mode 100644 src/funcs/newznabGetApiV1IndexerIdDownload.ts create mode 100644 src/funcs/newznabGetApiV1IndexerIdNewznab.ts create mode 100644 src/funcs/newznabGetIdApi.ts create mode 100644 src/funcs/newznabGetIdDownload.ts create mode 100644 src/funcs/notificationDeleteApiV1NotificationId.ts create mode 100644 src/funcs/notificationGetApiV1Notification.ts create mode 100644 src/funcs/notificationGetApiV1NotificationId.ts create mode 100644 src/funcs/notificationGetApiV1NotificationSchema.ts create mode 100644 src/funcs/notificationPostApiV1Notification.ts create mode 100644 src/funcs/notificationPostApiV1NotificationActionName.ts create mode 100644 src/funcs/notificationPostApiV1NotificationTest.ts create mode 100644 src/funcs/notificationPostApiV1NotificationTestall.ts create mode 100644 src/funcs/notificationPutApiV1NotificationId.ts create mode 100644 src/funcs/pingGetPing.ts create mode 100644 src/funcs/pingHeadPing.ts create mode 100644 src/funcs/searchGetApiV1Search.ts create mode 100644 src/funcs/searchPostApiV1Search.ts create mode 100644 src/funcs/searchPostApiV1SearchBulk.ts create mode 100644 src/funcs/staticResourceGet.ts create mode 100644 src/funcs/staticResourceGetContentPath.ts create mode 100644 src/funcs/staticResourceGetLogin.ts create mode 100644 src/funcs/staticResourceGetPath.ts create mode 100644 src/funcs/systemGetApiV1SystemRoutes.ts create mode 100644 src/funcs/systemGetApiV1SystemRoutesDuplicate.ts create mode 100644 src/funcs/systemGetApiV1SystemStatus.ts create mode 100644 src/funcs/systemPostApiV1SystemRestart.ts create mode 100644 src/funcs/systemPostApiV1SystemShutdown.ts create mode 100644 src/funcs/tagDeleteApiV1TagId.ts create mode 100644 src/funcs/tagDetailsGetApiV1TagDetail.ts create mode 100644 src/funcs/tagDetailsGetApiV1TagDetailId.ts create mode 100644 src/funcs/tagGetApiV1Tag.ts create mode 100644 src/funcs/tagGetApiV1TagId.ts create mode 100644 src/funcs/tagPostApiV1Tag.ts create mode 100644 src/funcs/tagPutApiV1TagId.ts create mode 100644 src/funcs/taskGetApiV1SystemTask.ts create mode 100644 src/funcs/taskGetApiV1SystemTaskId.ts create mode 100644 src/funcs/uiConfigGetApiV1ConfigUi.ts create mode 100644 src/funcs/uiConfigGetApiV1ConfigUiId.ts create mode 100644 src/funcs/uiConfigPutApiV1ConfigUiId.ts create mode 100644 src/funcs/updateGetApiV1Update.ts create mode 100644 src/funcs/updateLogFileGetApiV1LogFileUpdate.ts create mode 100644 src/funcs/updateLogFileGetApiV1LogFileUpdateFilename.ts create mode 100644 src/hooks/hooks.ts create mode 100644 src/hooks/index.ts create mode 100644 src/hooks/registration.ts create mode 100644 src/hooks/types.ts create mode 100644 src/index.ts create mode 100644 src/lib/base64.ts create mode 100644 src/lib/config.ts create mode 100644 src/lib/dlv.ts create mode 100644 src/lib/encodings.ts create mode 100644 src/lib/env.ts create mode 100644 src/lib/files.ts create mode 100644 src/lib/http.ts create mode 100644 src/lib/is-plain-object.ts create mode 100644 src/lib/logger.ts create mode 100644 src/lib/matchers.ts create mode 100644 src/lib/primitives.ts create mode 100644 src/lib/retries.ts create mode 100644 src/lib/schemas.ts create mode 100644 src/lib/sdks.ts create mode 100644 src/lib/security.ts create mode 100644 src/lib/url.ts create mode 100644 src/mcp-server/build.mts create mode 100644 src/mcp-server/cli.ts create mode 100644 src/mcp-server/cli/start/command.ts create mode 100644 src/mcp-server/cli/start/impl.ts create mode 100644 src/mcp-server/console-logger.ts create mode 100644 src/mcp-server/extensions.ts create mode 100644 src/mcp-server/mcp-server.ts create mode 100644 src/mcp-server/prompts.ts create mode 100644 src/mcp-server/resources.ts create mode 100644 src/mcp-server/scopes.ts create mode 100644 src/mcp-server/server.ts create mode 100644 src/mcp-server/shared.ts create mode 100644 src/mcp-server/tools.ts create mode 100644 src/mcp-server/tools/apiInfoGetApi.ts create mode 100644 src/mcp-server/tools/appProfileDeleteApiV1AppprofileId.ts create mode 100644 src/mcp-server/tools/appProfileGetApiV1Appprofile.ts create mode 100644 src/mcp-server/tools/appProfileGetApiV1AppprofileId.ts create mode 100644 src/mcp-server/tools/appProfileGetApiV1AppprofileSchema.ts create mode 100644 src/mcp-server/tools/appProfilePostApiV1Appprofile.ts create mode 100644 src/mcp-server/tools/appProfilePutApiV1AppprofileId.ts create mode 100644 src/mcp-server/tools/applicationDeleteApiV1ApplicationsBulk.ts create mode 100644 src/mcp-server/tools/applicationDeleteApiV1ApplicationsId.ts create mode 100644 src/mcp-server/tools/applicationGetApiV1Applications.ts create mode 100644 src/mcp-server/tools/applicationGetApiV1ApplicationsId.ts create mode 100644 src/mcp-server/tools/applicationGetApiV1ApplicationsSchema.ts create mode 100644 src/mcp-server/tools/applicationPostApiV1Applications.ts create mode 100644 src/mcp-server/tools/applicationPostApiV1ApplicationsActionName.ts create mode 100644 src/mcp-server/tools/applicationPostApiV1ApplicationsTest.ts create mode 100644 src/mcp-server/tools/applicationPostApiV1ApplicationsTestall.ts create mode 100644 src/mcp-server/tools/applicationPutApiV1ApplicationsBulk.ts create mode 100644 src/mcp-server/tools/applicationPutApiV1ApplicationsId.ts create mode 100644 src/mcp-server/tools/authenticationGetLogout.ts create mode 100644 src/mcp-server/tools/backupDeleteApiV1SystemBackupId.ts create mode 100644 src/mcp-server/tools/backupGetApiV1SystemBackup.ts create mode 100644 src/mcp-server/tools/backupPostApiV1SystemBackupRestoreId.ts create mode 100644 src/mcp-server/tools/backupPostApiV1SystemBackupRestoreUpload.ts create mode 100644 src/mcp-server/tools/commandDeleteApiV1CommandId.ts create mode 100644 src/mcp-server/tools/commandGetApiV1Command.ts create mode 100644 src/mcp-server/tools/commandGetApiV1CommandId.ts create mode 100644 src/mcp-server/tools/commandPostApiV1Command.ts create mode 100644 src/mcp-server/tools/customFilterDeleteApiV1CustomfilterId.ts create mode 100644 src/mcp-server/tools/customFilterGetApiV1Customfilter.ts create mode 100644 src/mcp-server/tools/customFilterGetApiV1CustomfilterId.ts create mode 100644 src/mcp-server/tools/customFilterPostApiV1Customfilter.ts create mode 100644 src/mcp-server/tools/customFilterPutApiV1CustomfilterId.ts create mode 100644 src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopment.ts create mode 100644 src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopmentId.ts create mode 100644 src/mcp-server/tools/developmentConfigPutApiV1ConfigDevelopmentId.ts create mode 100644 src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclient.ts create mode 100644 src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclientId.ts create mode 100644 src/mcp-server/tools/downloadClientConfigPutApiV1ConfigDownloadclientId.ts create mode 100644 src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientBulk.ts create mode 100644 src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientId.ts create mode 100644 src/mcp-server/tools/downloadClientGetApiV1Downloadclient.ts create mode 100644 src/mcp-server/tools/downloadClientGetApiV1DownloadclientId.ts create mode 100644 src/mcp-server/tools/downloadClientGetApiV1DownloadclientSchema.ts create mode 100644 src/mcp-server/tools/downloadClientPostApiV1Downloadclient.ts create mode 100644 src/mcp-server/tools/downloadClientPostApiV1DownloadclientActionName.ts create mode 100644 src/mcp-server/tools/downloadClientPostApiV1DownloadclientTest.ts create mode 100644 src/mcp-server/tools/downloadClientPostApiV1DownloadclientTestall.ts create mode 100644 src/mcp-server/tools/downloadClientPutApiV1DownloadclientBulk.ts create mode 100644 src/mcp-server/tools/downloadClientPutApiV1DownloadclientId.ts create mode 100644 src/mcp-server/tools/fileSystemGetApiV1Filesystem.ts create mode 100644 src/mcp-server/tools/fileSystemGetApiV1FilesystemType.ts create mode 100644 src/mcp-server/tools/healthGetApiV1Health.ts create mode 100644 src/mcp-server/tools/historyGetApiV1History.ts create mode 100644 src/mcp-server/tools/historyGetApiV1HistoryIndexer.ts create mode 100644 src/mcp-server/tools/historyGetApiV1HistorySince.ts create mode 100644 src/mcp-server/tools/hostConfigGetApiV1ConfigHost.ts create mode 100644 src/mcp-server/tools/hostConfigGetApiV1ConfigHostId.ts create mode 100644 src/mcp-server/tools/hostConfigPutApiV1ConfigHostId.ts create mode 100644 src/mcp-server/tools/indexerDefaultCategoriesGetApiV1IndexerCategories.ts create mode 100644 src/mcp-server/tools/indexerDeleteApiV1IndexerBulk.ts create mode 100644 src/mcp-server/tools/indexerDeleteApiV1IndexerId.ts create mode 100644 src/mcp-server/tools/indexerGetApiV1Indexer.ts create mode 100644 src/mcp-server/tools/indexerGetApiV1IndexerId.ts create mode 100644 src/mcp-server/tools/indexerGetApiV1IndexerSchema.ts create mode 100644 src/mcp-server/tools/indexerPostApiV1Indexer.ts create mode 100644 src/mcp-server/tools/indexerPostApiV1IndexerActionName.ts create mode 100644 src/mcp-server/tools/indexerPostApiV1IndexerTest.ts create mode 100644 src/mcp-server/tools/indexerPostApiV1IndexerTestall.ts create mode 100644 src/mcp-server/tools/indexerProxyDeleteApiV1IndexerproxyId.ts create mode 100644 src/mcp-server/tools/indexerProxyGetApiV1Indexerproxy.ts create mode 100644 src/mcp-server/tools/indexerProxyGetApiV1IndexerproxyId.ts create mode 100644 src/mcp-server/tools/indexerProxyGetApiV1IndexerproxySchema.ts create mode 100644 src/mcp-server/tools/indexerProxyPostApiV1Indexerproxy.ts create mode 100644 src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyActionName.ts create mode 100644 src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTest.ts create mode 100644 src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTestall.ts create mode 100644 src/mcp-server/tools/indexerProxyPutApiV1IndexerproxyId.ts create mode 100644 src/mcp-server/tools/indexerPutApiV1IndexerBulk.ts create mode 100644 src/mcp-server/tools/indexerPutApiV1IndexerId.ts create mode 100644 src/mcp-server/tools/indexerStatsGetApiV1Indexerstats.ts create mode 100644 src/mcp-server/tools/indexerStatusGetApiV1Indexerstatus.ts create mode 100644 src/mcp-server/tools/localizationGetApiV1Localization.ts create mode 100644 src/mcp-server/tools/localizationGetApiV1LocalizationOptions.ts create mode 100644 src/mcp-server/tools/logFileGetApiV1LogFile.ts create mode 100644 src/mcp-server/tools/logFileGetApiV1LogFileFilename.ts create mode 100644 src/mcp-server/tools/logGetApiV1Log.ts create mode 100644 src/mcp-server/tools/newznabGetApiV1IndexerIdDownload.ts create mode 100644 src/mcp-server/tools/newznabGetApiV1IndexerIdNewznab.ts create mode 100644 src/mcp-server/tools/newznabGetIdApi.ts create mode 100644 src/mcp-server/tools/newznabGetIdDownload.ts create mode 100644 src/mcp-server/tools/notificationDeleteApiV1NotificationId.ts create mode 100644 src/mcp-server/tools/notificationGetApiV1Notification.ts create mode 100644 src/mcp-server/tools/notificationGetApiV1NotificationId.ts create mode 100644 src/mcp-server/tools/notificationGetApiV1NotificationSchema.ts create mode 100644 src/mcp-server/tools/notificationPostApiV1Notification.ts create mode 100644 src/mcp-server/tools/notificationPostApiV1NotificationActionName.ts create mode 100644 src/mcp-server/tools/notificationPostApiV1NotificationTest.ts create mode 100644 src/mcp-server/tools/notificationPostApiV1NotificationTestall.ts create mode 100644 src/mcp-server/tools/notificationPutApiV1NotificationId.ts create mode 100644 src/mcp-server/tools/pingGetPing.ts create mode 100644 src/mcp-server/tools/pingHeadPing.ts create mode 100644 src/mcp-server/tools/searchGetApiV1Search.ts create mode 100644 src/mcp-server/tools/searchPostApiV1Search.ts create mode 100644 src/mcp-server/tools/searchPostApiV1SearchBulk.ts create mode 100644 src/mcp-server/tools/staticResourceGet.ts create mode 100644 src/mcp-server/tools/staticResourceGetContentPath.ts create mode 100644 src/mcp-server/tools/staticResourceGetLogin.ts create mode 100644 src/mcp-server/tools/staticResourceGetPath.ts create mode 100644 src/mcp-server/tools/systemGetApiV1SystemRoutes.ts create mode 100644 src/mcp-server/tools/systemGetApiV1SystemRoutesDuplicate.ts create mode 100644 src/mcp-server/tools/systemGetApiV1SystemStatus.ts create mode 100644 src/mcp-server/tools/systemPostApiV1SystemRestart.ts create mode 100644 src/mcp-server/tools/systemPostApiV1SystemShutdown.ts create mode 100644 src/mcp-server/tools/tagDeleteApiV1TagId.ts create mode 100644 src/mcp-server/tools/tagDetailsGetApiV1TagDetail.ts create mode 100644 src/mcp-server/tools/tagDetailsGetApiV1TagDetailId.ts create mode 100644 src/mcp-server/tools/tagGetApiV1Tag.ts create mode 100644 src/mcp-server/tools/tagGetApiV1TagId.ts create mode 100644 src/mcp-server/tools/tagPostApiV1Tag.ts create mode 100644 src/mcp-server/tools/tagPutApiV1TagId.ts create mode 100644 src/mcp-server/tools/taskGetApiV1SystemTask.ts create mode 100644 src/mcp-server/tools/taskGetApiV1SystemTaskId.ts create mode 100644 src/mcp-server/tools/uiConfigGetApiV1ConfigUi.ts create mode 100644 src/mcp-server/tools/uiConfigGetApiV1ConfigUiId.ts create mode 100644 src/mcp-server/tools/uiConfigPutApiV1ConfigUiId.ts create mode 100644 src/mcp-server/tools/updateGetApiV1Update.ts create mode 100644 src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdate.ts create mode 100644 src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdateFilename.ts create mode 100644 src/models/apiinforesource.ts create mode 100644 src/models/applicationbulkresource.ts create mode 100644 src/models/applicationresource.ts create mode 100644 src/models/applicationsynclevel.ts create mode 100644 src/models/applytags.ts create mode 100644 src/models/appprofileresource.ts create mode 100644 src/models/authenticationrequiredtype.ts create mode 100644 src/models/authenticationtype.ts create mode 100644 src/models/backupresource.ts create mode 100644 src/models/backuptype.ts create mode 100644 src/models/booksearchparam.ts create mode 100644 src/models/certificatevalidationtype.ts create mode 100644 src/models/command.ts create mode 100644 src/models/commandinput.ts create mode 100644 src/models/commandpriority.ts create mode 100644 src/models/commandresource.ts create mode 100644 src/models/commandresourceinput.ts create mode 100644 src/models/commandstatus.ts create mode 100644 src/models/commandtrigger.ts create mode 100644 src/models/customfilterresource.ts create mode 100644 src/models/databasetype.ts create mode 100644 src/models/developmentconfigresource.ts create mode 100644 src/models/downloadclientbulkresource.ts create mode 100644 src/models/downloadclientcategory.ts create mode 100644 src/models/downloadclientconfigresource.ts create mode 100644 src/models/downloadclientresource.ts create mode 100644 src/models/downloadprotocol.ts create mode 100644 src/models/errors/apierror.ts create mode 100644 src/models/errors/httpclienterrors.ts create mode 100644 src/models/errors/index.ts create mode 100644 src/models/errors/sdkvalidationerror.ts create mode 100644 src/models/field.ts create mode 100644 src/models/healthcheckresult.ts create mode 100644 src/models/healthresource.ts create mode 100644 src/models/historyeventtype.ts create mode 100644 src/models/historyresource.ts create mode 100644 src/models/historyresourcepagingresource.ts create mode 100644 src/models/hostconfigresource.ts create mode 100644 src/models/hoststatistics.ts create mode 100644 src/models/index.ts create mode 100644 src/models/indexerbulkresource.ts create mode 100644 src/models/indexercapabilityresource.ts create mode 100644 src/models/indexercapabilityresourceinput.ts create mode 100644 src/models/indexercategory.ts create mode 100644 src/models/indexercategoryinput.ts create mode 100644 src/models/indexerprivacy.ts create mode 100644 src/models/indexerproxyresource.ts create mode 100644 src/models/indexerresource.ts create mode 100644 src/models/indexerresourceinput.ts create mode 100644 src/models/indexerstatistics.ts create mode 100644 src/models/indexerstatsresource.ts create mode 100644 src/models/indexerstatusresource.ts create mode 100644 src/models/localizationoption.ts create mode 100644 src/models/logfileresource.ts create mode 100644 src/models/logresource.ts create mode 100644 src/models/logresourcepagingresource.ts create mode 100644 src/models/moviesearchparam.ts create mode 100644 src/models/musicsearchparam.ts create mode 100644 src/models/notificationresource.ts create mode 100644 src/models/operations/deleteapiv1applicationsid.ts create mode 100644 src/models/operations/deleteapiv1appprofileid.ts create mode 100644 src/models/operations/deleteapiv1commandid.ts create mode 100644 src/models/operations/deleteapiv1customfilterid.ts create mode 100644 src/models/operations/deleteapiv1downloadclientid.ts create mode 100644 src/models/operations/deleteapiv1indexerid.ts create mode 100644 src/models/operations/deleteapiv1indexerproxyid.ts create mode 100644 src/models/operations/deleteapiv1notificationid.ts create mode 100644 src/models/operations/deleteapiv1systembackupid.ts create mode 100644 src/models/operations/deleteapiv1tagid.ts create mode 100644 src/models/operations/getapiv1applicationsid.ts create mode 100644 src/models/operations/getapiv1appprofileid.ts create mode 100644 src/models/operations/getapiv1commandid.ts create mode 100644 src/models/operations/getapiv1configdevelopmentid.ts create mode 100644 src/models/operations/getapiv1configdownloadclientid.ts create mode 100644 src/models/operations/getapiv1confighostid.ts create mode 100644 src/models/operations/getapiv1configuiid.ts create mode 100644 src/models/operations/getapiv1customfilterid.ts create mode 100644 src/models/operations/getapiv1downloadclientid.ts create mode 100644 src/models/operations/getapiv1filesystem.ts create mode 100644 src/models/operations/getapiv1filesystemtype.ts create mode 100644 src/models/operations/getapiv1history.ts create mode 100644 src/models/operations/getapiv1historyindexer.ts create mode 100644 src/models/operations/getapiv1historysince.ts create mode 100644 src/models/operations/getapiv1indexerid.ts create mode 100644 src/models/operations/getapiv1indexeriddownload.ts create mode 100644 src/models/operations/getapiv1indexeridnewznab.ts create mode 100644 src/models/operations/getapiv1indexerproxyid.ts create mode 100644 src/models/operations/getapiv1indexerstats.ts create mode 100644 src/models/operations/getapiv1log.ts create mode 100644 src/models/operations/getapiv1logfilefilename.ts create mode 100644 src/models/operations/getapiv1logfileupdatefilename.ts create mode 100644 src/models/operations/getapiv1notificationid.ts create mode 100644 src/models/operations/getapiv1search.ts create mode 100644 src/models/operations/getapiv1systemtaskid.ts create mode 100644 src/models/operations/getapiv1tagdetailid.ts create mode 100644 src/models/operations/getapiv1tagid.ts create mode 100644 src/models/operations/getcontentpath.ts create mode 100644 src/models/operations/getidapi.ts create mode 100644 src/models/operations/getiddownload.ts create mode 100644 src/models/operations/getpath.ts create mode 100644 src/models/operations/index.ts create mode 100644 src/models/operations/postapiv1applications.ts create mode 100644 src/models/operations/postapiv1applicationsactionname.ts create mode 100644 src/models/operations/postapiv1applicationstest.ts create mode 100644 src/models/operations/postapiv1downloadclient.ts create mode 100644 src/models/operations/postapiv1downloadclientactionname.ts create mode 100644 src/models/operations/postapiv1downloadclienttest.ts create mode 100644 src/models/operations/postapiv1indexer.ts create mode 100644 src/models/operations/postapiv1indexeractionname.ts create mode 100644 src/models/operations/postapiv1indexerproxy.ts create mode 100644 src/models/operations/postapiv1indexerproxyactionname.ts create mode 100644 src/models/operations/postapiv1indexerproxytest.ts create mode 100644 src/models/operations/postapiv1indexertest.ts create mode 100644 src/models/operations/postapiv1notification.ts create mode 100644 src/models/operations/postapiv1notificationactionname.ts create mode 100644 src/models/operations/postapiv1notificationtest.ts create mode 100644 src/models/operations/postapiv1systembackuprestoreid.ts create mode 100644 src/models/operations/putapiv1applicationsid.ts create mode 100644 src/models/operations/putapiv1appprofileid.ts create mode 100644 src/models/operations/putapiv1configdevelopmentid.ts create mode 100644 src/models/operations/putapiv1configdownloadclientid.ts create mode 100644 src/models/operations/putapiv1confighostid.ts create mode 100644 src/models/operations/putapiv1configuiid.ts create mode 100644 src/models/operations/putapiv1customfilterid.ts create mode 100644 src/models/operations/putapiv1downloadclientid.ts create mode 100644 src/models/operations/putapiv1indexerid.ts create mode 100644 src/models/operations/putapiv1indexerproxyid.ts create mode 100644 src/models/operations/putapiv1notificationid.ts create mode 100644 src/models/operations/putapiv1tagid.ts create mode 100644 src/models/pingresource.ts create mode 100644 src/models/privacylevel.ts create mode 100644 src/models/providermessage.ts create mode 100644 src/models/providermessagetype.ts create mode 100644 src/models/proxytype.ts create mode 100644 src/models/releaseresource.ts create mode 100644 src/models/releaseresourceinput.ts create mode 100644 src/models/runtimemode.ts create mode 100644 src/models/searchparam.ts create mode 100644 src/models/security.ts create mode 100644 src/models/selectoption.ts create mode 100644 src/models/sortdirection.ts create mode 100644 src/models/systemresource.ts create mode 100644 src/models/tagdetailsresource.ts create mode 100644 src/models/tagresource.ts create mode 100644 src/models/taskresource.ts create mode 100644 src/models/tvsearchparam.ts create mode 100644 src/models/uiconfigresource.ts create mode 100644 src/models/updatechanges.ts create mode 100644 src/models/updatemechanism.ts create mode 100644 src/models/updateresource.ts create mode 100644 src/models/useragentstatistics.ts create mode 100644 src/sdk/apiinfo.ts create mode 100644 src/sdk/application.ts create mode 100644 src/sdk/appprofile.ts create mode 100644 src/sdk/authentication.ts create mode 100644 src/sdk/backup.ts create mode 100644 src/sdk/command.ts create mode 100644 src/sdk/customfilter.ts create mode 100644 src/sdk/developmentconfig.ts create mode 100644 src/sdk/downloadclient.ts create mode 100644 src/sdk/downloadclientconfig.ts create mode 100644 src/sdk/filesystem.ts create mode 100644 src/sdk/health.ts create mode 100644 src/sdk/history.ts create mode 100644 src/sdk/hostconfig.ts create mode 100644 src/sdk/index.ts create mode 100644 src/sdk/indexer.ts create mode 100644 src/sdk/indexerdefaultcategories.ts create mode 100644 src/sdk/indexerproxy.ts create mode 100644 src/sdk/indexerstats.ts create mode 100644 src/sdk/indexerstatus.ts create mode 100644 src/sdk/localization.ts create mode 100644 src/sdk/log.ts create mode 100644 src/sdk/logfile.ts create mode 100644 src/sdk/newznab.ts create mode 100644 src/sdk/notification.ts create mode 100644 src/sdk/ping.ts create mode 100644 src/sdk/sdk.ts create mode 100644 src/sdk/search.ts create mode 100644 src/sdk/staticresource.ts create mode 100644 src/sdk/system.ts create mode 100644 src/sdk/tag.ts create mode 100644 src/sdk/tagdetails.ts create mode 100644 src/sdk/task.ts create mode 100644 src/sdk/uiconfig.ts create mode 100644 src/sdk/update.ts create mode 100644 src/sdk/updatelogfile.ts create mode 100644 src/types/async.ts create mode 100644 src/types/blobs.ts create mode 100644 src/types/constdatetime.ts create mode 100644 src/types/enums.ts create mode 100644 src/types/fp.ts create mode 100644 src/types/index.ts create mode 100644 src/types/operations.ts create mode 100644 src/types/rfcdate.ts create mode 100644 src/types/streams.ts create mode 100644 tsconfig.json diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..0cc2324 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,30 @@ + +> **Remember to shutdown a GitHub Codespace when it is not in use!** + +# Dev Containers Quick Start + +The default location for usage snippets is the `samples` directory. + +## Running a Usage Sample + +A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below. + +``` +ts-node root.ts +``` + +## Generating Additional Usage Samples + +The speakeasy CLI allows you to generate more usage snippets. Here's how: + +- To generate a sample for a specific operation by providing an operation ID, use: + +``` +speakeasy generate usage -s https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json -l typescript -i {INPUT_OPERATION_ID} -o ./samples +``` + +- To generate samples for an entire namespace (like a tag or group name), use: + +``` +speakeasy generate usage -s https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json -l typescript -n {INPUT_TAG_NAME} -o ./samples +``` diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..4d560dd --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,45 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/images/tree/main/src/typescript-node +{ + "name": "TypeScript", + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh", + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.vscode-typescript-tslint-plugin", + "esbenp.prettier-vscode", + "github.vscode-pull-request-github" + ], + "settings": { + "files.eol": "\n", + "editor.formatOnSave": true, + "typescript.tsc.autoDetect": "on", + "typescript.updateImportsOnFileMove.enabled": "always", + "typescript.preferences.importModuleSpecifier": "relative", + "[typescript]": { + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + }, + "[typescriptreact]": { + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + } + } + }, + "codespaces": { + "openFiles": [ + ".devcontainer/README.md" + ] + } + } + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 0000000..ee96abf --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Install the speakeasy CLI +curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh + +# Setup samples directory +rmdir samples || true +mkdir samples + +npm install +npm install -g ts-node +npm link +npm link prowlarr +TS_CONFIG_CONTENT=$(cat < samples/tsconfig.json + +# Generate starter usage sample with speakeasy +speakeasy generate usage -s https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json -l typescript -o samples/root.ts \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..113eead --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.ts linguist-generated=false \ No newline at end of file diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml new file mode 100644 index 0000000..65342d7 --- /dev/null +++ b/.github/workflows/sdk_generation.yaml @@ -0,0 +1,29 @@ +name: Generate +permissions: + checks: write + contents: write + pull-requests: write + statuses: write + id-token: write +"on": + workflow_dispatch: + inputs: + force: + description: Force generation of SDKs + type: boolean + default: false + set_version: + description: optionally set a specific SDK version + type: string + schedule: + - cron: 0 0 * * * +jobs: + generate: + uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 + with: + force: ${{ github.event.inputs.force }} + mode: pr + set_version: ${{ github.event.inputs.set_version }} + secrets: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccddd9f --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +/models +/models/errors +/types +/node_modules +/lib +/sdk +/funcs +/react-query +/mcp-server +/hooks +/index.* +/core.* +/bin +/cjs +/esm +/dist +/.tsbuildinfo +/.eslintcache +/.tshy +/.tshy-* +/__tests__ +.DS_Store +**/.speakeasy/temp/ +**/.speakeasy/logs/ +.DS_Store +/.speakeasy/reports diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..cf98a6b --- /dev/null +++ b/.npmignore @@ -0,0 +1,15 @@ +**/* +!/FUNCTIONS.md +!/RUNTIMES.md +!/REACT_QUERY.md +!/**/*.ts +!/**/*.js +!/**/*.mjs +!/**/*.json +!/**/*.map + +/eslint.config.mjs +/cjs +/.tshy +/.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..050de24 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,1403 @@ +lockVersion: 2.0.0 +id: dcd1d874-ad0d-475e-9c83-6083a087fb17 +management: + docChecksum: 9f92220db0dc81897b8a47c86bfd4b04 + docVersion: 1.0.0 + speakeasyVersion: 1.546.1 + generationVersion: 2.604.2 + releaseVersion: 0.0.1 + configChecksum: 34755fbe88f40a507b248ec6a6774196 +features: + typescript: + additionalDependencies: 0.1.0 + constsAndDefaults: 0.1.11 + core: 3.21.8 + defaultEnabledRetries: 0.1.0 + devContainers: 2.90.0 + enumUnions: 0.1.0 + envVarSecurityUsage: 0.1.2 + globalSecurity: 2.82.13 + globalSecurityCallbacks: 0.1.0 + globalServerURLs: 2.82.5 + inputOutputModels: 2.82.0 + mcpServer: 0.9.2 + nullables: 0.1.1 + responseFormat: 0.2.3 + retries: 2.83.0 + sdkHooks: 0.2.0 +generatedFiles: + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh + - .gitattributes + - .npmignore + - FUNCTIONS.md + - RUNTIMES.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/models/apiinforesource.md + - docs/models/applicationbulkresource.md + - docs/models/applicationresource.md + - docs/models/applicationsynclevel.md + - docs/models/applytags.md + - docs/models/appprofileresource.md + - docs/models/authenticationrequiredtype.md + - docs/models/authenticationtype.md + - docs/models/backupresource.md + - docs/models/backuptype.md + - docs/models/booksearchparam.md + - docs/models/certificatevalidationtype.md + - docs/models/command.md + - docs/models/commandinput.md + - docs/models/commandpriority.md + - docs/models/commandresource.md + - docs/models/commandresourceinput.md + - docs/models/commandstatus.md + - docs/models/commandtrigger.md + - docs/models/customfilterresource.md + - docs/models/databasetype.md + - docs/models/developmentconfigresource.md + - docs/models/downloadclientbulkresource.md + - docs/models/downloadclientcategory.md + - docs/models/downloadclientconfigresource.md + - docs/models/downloadclientresource.md + - docs/models/downloadprotocol.md + - docs/models/field.md + - docs/models/healthcheckresult.md + - docs/models/healthresource.md + - docs/models/historyeventtype.md + - docs/models/historyresource.md + - docs/models/historyresourcepagingresource.md + - docs/models/hostconfigresource.md + - docs/models/hoststatistics.md + - docs/models/indexerbulkresource.md + - docs/models/indexercapabilityresource.md + - docs/models/indexercapabilityresourceinput.md + - docs/models/indexercategory.md + - docs/models/indexercategoryinput.md + - docs/models/indexerprivacy.md + - docs/models/indexerproxyresource.md + - docs/models/indexerresource.md + - docs/models/indexerresourceinput.md + - docs/models/indexerstatistics.md + - docs/models/indexerstatsresource.md + - docs/models/indexerstatusresource.md + - docs/models/localizationoption.md + - docs/models/logfileresource.md + - docs/models/logresource.md + - docs/models/logresourcepagingresource.md + - docs/models/moviesearchparam.md + - docs/models/musicsearchparam.md + - docs/models/notificationresource.md + - docs/models/operations/deleteapiv1applicationsidrequest.md + - docs/models/operations/deleteapiv1appprofileidrequest.md + - docs/models/operations/deleteapiv1commandidrequest.md + - docs/models/operations/deleteapiv1customfilteridrequest.md + - docs/models/operations/deleteapiv1downloadclientidrequest.md + - docs/models/operations/deleteapiv1indexeridrequest.md + - docs/models/operations/deleteapiv1indexerproxyidrequest.md + - docs/models/operations/deleteapiv1notificationidrequest.md + - docs/models/operations/deleteapiv1systembackupidrequest.md + - docs/models/operations/deleteapiv1tagidrequest.md + - docs/models/operations/getapiv1applicationsidrequest.md + - docs/models/operations/getapiv1appprofileidrequest.md + - docs/models/operations/getapiv1commandidrequest.md + - docs/models/operations/getapiv1configdevelopmentidrequest.md + - docs/models/operations/getapiv1configdownloadclientidrequest.md + - docs/models/operations/getapiv1confighostidrequest.md + - docs/models/operations/getapiv1configuiidrequest.md + - docs/models/operations/getapiv1customfilteridrequest.md + - docs/models/operations/getapiv1downloadclientidrequest.md + - docs/models/operations/getapiv1filesystemrequest.md + - docs/models/operations/getapiv1filesystemtyperequest.md + - docs/models/operations/getapiv1historyindexerrequest.md + - docs/models/operations/getapiv1historyrequest.md + - docs/models/operations/getapiv1historysincerequest.md + - docs/models/operations/getapiv1indexeriddownloadrequest.md + - docs/models/operations/getapiv1indexeridnewznabrequest.md + - docs/models/operations/getapiv1indexeridrequest.md + - docs/models/operations/getapiv1indexerproxyidrequest.md + - docs/models/operations/getapiv1indexerstatsrequest.md + - docs/models/operations/getapiv1logfilefilenamerequest.md + - docs/models/operations/getapiv1logfileupdatefilenamerequest.md + - docs/models/operations/getapiv1logrequest.md + - docs/models/operations/getapiv1notificationidrequest.md + - docs/models/operations/getapiv1searchrequest.md + - docs/models/operations/getapiv1systemtaskidrequest.md + - docs/models/operations/getapiv1tagdetailidrequest.md + - docs/models/operations/getapiv1tagidrequest.md + - docs/models/operations/getcontentpathrequest.md + - docs/models/operations/getidapirequest.md + - docs/models/operations/getiddownloadrequest.md + - docs/models/operations/getpathrequest.md + - docs/models/operations/postapiv1applicationsactionnamerequest.md + - docs/models/operations/postapiv1applicationsrequest.md + - docs/models/operations/postapiv1applicationstestrequest.md + - docs/models/operations/postapiv1downloadclientactionnamerequest.md + - docs/models/operations/postapiv1downloadclientrequest.md + - docs/models/operations/postapiv1downloadclienttestrequest.md + - docs/models/operations/postapiv1indexeractionnamerequest.md + - docs/models/operations/postapiv1indexerproxyactionnamerequest.md + - docs/models/operations/postapiv1indexerproxyrequest.md + - docs/models/operations/postapiv1indexerproxytestrequest.md + - docs/models/operations/postapiv1indexerrequest.md + - docs/models/operations/postapiv1indexertestrequest.md + - docs/models/operations/postapiv1notificationactionnamerequest.md + - docs/models/operations/postapiv1notificationrequest.md + - docs/models/operations/postapiv1notificationtestrequest.md + - docs/models/operations/postapiv1systembackuprestoreidrequest.md + - docs/models/operations/putapiv1applicationsidrequest.md + - docs/models/operations/putapiv1appprofileidrequest.md + - docs/models/operations/putapiv1configdevelopmentidrequest.md + - docs/models/operations/putapiv1configdownloadclientidrequest.md + - docs/models/operations/putapiv1confighostidrequest.md + - docs/models/operations/putapiv1configuiidrequest.md + - docs/models/operations/putapiv1customfilteridrequest.md + - docs/models/operations/putapiv1downloadclientidrequest.md + - docs/models/operations/putapiv1indexeridrequest.md + - docs/models/operations/putapiv1indexerproxyidrequest.md + - docs/models/operations/putapiv1notificationidrequest.md + - docs/models/operations/putapiv1tagidrequest.md + - docs/models/pingresource.md + - docs/models/privacylevel.md + - docs/models/providermessage.md + - docs/models/providermessagetype.md + - docs/models/proxytype.md + - docs/models/releaseresource.md + - docs/models/releaseresourceinput.md + - docs/models/runtimemode.md + - docs/models/searchparam.md + - docs/models/security.md + - docs/models/selectoption.md + - docs/models/sortdirection.md + - docs/models/systemresource.md + - docs/models/tagdetailsresource.md + - docs/models/tagresource.md + - docs/models/taskresource.md + - docs/models/tvsearchparam.md + - docs/models/uiconfigresource.md + - docs/models/updatechanges.md + - docs/models/updatemechanism.md + - docs/models/updateresource.md + - docs/models/useragentstatistics.md + - docs/sdks/apiinfo/README.md + - docs/sdks/application/README.md + - docs/sdks/appprofile/README.md + - docs/sdks/authentication/README.md + - docs/sdks/backup/README.md + - docs/sdks/command/README.md + - docs/sdks/customfilter/README.md + - docs/sdks/developmentconfig/README.md + - docs/sdks/downloadclient/README.md + - docs/sdks/downloadclientconfig/README.md + - docs/sdks/filesystem/README.md + - docs/sdks/health/README.md + - docs/sdks/history/README.md + - docs/sdks/hostconfig/README.md + - docs/sdks/indexer/README.md + - docs/sdks/indexerdefaultcategories/README.md + - docs/sdks/indexerproxy/README.md + - docs/sdks/indexerstats/README.md + - docs/sdks/indexerstatus/README.md + - docs/sdks/localization/README.md + - docs/sdks/log/README.md + - docs/sdks/logfile/README.md + - docs/sdks/newznab/README.md + - docs/sdks/notification/README.md + - docs/sdks/ping/README.md + - docs/sdks/prowlarr/README.md + - docs/sdks/search/README.md + - docs/sdks/staticresource/README.md + - docs/sdks/system/README.md + - docs/sdks/tag/README.md + - docs/sdks/tagdetails/README.md + - docs/sdks/task/README.md + - docs/sdks/uiconfig/README.md + - docs/sdks/update/README.md + - docs/sdks/updatelogfile/README.md + - eslint.config.mjs + - jsr.json + - package.json + - src/core.ts + - src/funcs/apiInfoGetApi.ts + - src/funcs/appProfileDeleteApiV1AppprofileId.ts + - src/funcs/appProfileGetApiV1Appprofile.ts + - src/funcs/appProfileGetApiV1AppprofileId.ts + - src/funcs/appProfileGetApiV1AppprofileSchema.ts + - src/funcs/appProfilePostApiV1Appprofile.ts + - src/funcs/appProfilePutApiV1AppprofileId.ts + - src/funcs/applicationDeleteApiV1ApplicationsBulk.ts + - src/funcs/applicationDeleteApiV1ApplicationsId.ts + - src/funcs/applicationGetApiV1Applications.ts + - src/funcs/applicationGetApiV1ApplicationsId.ts + - src/funcs/applicationGetApiV1ApplicationsSchema.ts + - src/funcs/applicationPostApiV1Applications.ts + - src/funcs/applicationPostApiV1ApplicationsActionName.ts + - src/funcs/applicationPostApiV1ApplicationsTest.ts + - src/funcs/applicationPostApiV1ApplicationsTestall.ts + - src/funcs/applicationPutApiV1ApplicationsBulk.ts + - src/funcs/applicationPutApiV1ApplicationsId.ts + - src/funcs/authenticationGetLogout.ts + - src/funcs/backupDeleteApiV1SystemBackupId.ts + - src/funcs/backupGetApiV1SystemBackup.ts + - src/funcs/backupPostApiV1SystemBackupRestoreId.ts + - src/funcs/backupPostApiV1SystemBackupRestoreUpload.ts + - src/funcs/commandDeleteApiV1CommandId.ts + - src/funcs/commandGetApiV1Command.ts + - src/funcs/commandGetApiV1CommandId.ts + - src/funcs/commandPostApiV1Command.ts + - src/funcs/customFilterDeleteApiV1CustomfilterId.ts + - src/funcs/customFilterGetApiV1Customfilter.ts + - src/funcs/customFilterGetApiV1CustomfilterId.ts + - src/funcs/customFilterPostApiV1Customfilter.ts + - src/funcs/customFilterPutApiV1CustomfilterId.ts + - src/funcs/developmentConfigGetApiV1ConfigDevelopment.ts + - src/funcs/developmentConfigGetApiV1ConfigDevelopmentId.ts + - src/funcs/developmentConfigPutApiV1ConfigDevelopmentId.ts + - src/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.ts + - src/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.ts + - src/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.ts + - src/funcs/downloadClientDeleteApiV1DownloadclientBulk.ts + - src/funcs/downloadClientDeleteApiV1DownloadclientId.ts + - src/funcs/downloadClientGetApiV1Downloadclient.ts + - src/funcs/downloadClientGetApiV1DownloadclientId.ts + - src/funcs/downloadClientGetApiV1DownloadclientSchema.ts + - src/funcs/downloadClientPostApiV1Downloadclient.ts + - src/funcs/downloadClientPostApiV1DownloadclientActionName.ts + - src/funcs/downloadClientPostApiV1DownloadclientTest.ts + - src/funcs/downloadClientPostApiV1DownloadclientTestall.ts + - src/funcs/downloadClientPutApiV1DownloadclientBulk.ts + - src/funcs/downloadClientPutApiV1DownloadclientId.ts + - src/funcs/fileSystemGetApiV1Filesystem.ts + - src/funcs/fileSystemGetApiV1FilesystemType.ts + - src/funcs/healthGetApiV1Health.ts + - src/funcs/historyGetApiV1History.ts + - src/funcs/historyGetApiV1HistoryIndexer.ts + - src/funcs/historyGetApiV1HistorySince.ts + - src/funcs/hostConfigGetApiV1ConfigHost.ts + - src/funcs/hostConfigGetApiV1ConfigHostId.ts + - src/funcs/hostConfigPutApiV1ConfigHostId.ts + - src/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.ts + - src/funcs/indexerDeleteApiV1IndexerBulk.ts + - src/funcs/indexerDeleteApiV1IndexerId.ts + - src/funcs/indexerGetApiV1Indexer.ts + - src/funcs/indexerGetApiV1IndexerId.ts + - src/funcs/indexerGetApiV1IndexerSchema.ts + - src/funcs/indexerPostApiV1Indexer.ts + - src/funcs/indexerPostApiV1IndexerActionName.ts + - src/funcs/indexerPostApiV1IndexerTest.ts + - src/funcs/indexerPostApiV1IndexerTestall.ts + - src/funcs/indexerProxyDeleteApiV1IndexerproxyId.ts + - src/funcs/indexerProxyGetApiV1Indexerproxy.ts + - src/funcs/indexerProxyGetApiV1IndexerproxyId.ts + - src/funcs/indexerProxyGetApiV1IndexerproxySchema.ts + - src/funcs/indexerProxyPostApiV1Indexerproxy.ts + - src/funcs/indexerProxyPostApiV1IndexerproxyActionName.ts + - src/funcs/indexerProxyPostApiV1IndexerproxyTest.ts + - src/funcs/indexerProxyPostApiV1IndexerproxyTestall.ts + - src/funcs/indexerProxyPutApiV1IndexerproxyId.ts + - src/funcs/indexerPutApiV1IndexerBulk.ts + - src/funcs/indexerPutApiV1IndexerId.ts + - src/funcs/indexerStatsGetApiV1Indexerstats.ts + - src/funcs/indexerStatusGetApiV1Indexerstatus.ts + - src/funcs/localizationGetApiV1Localization.ts + - src/funcs/localizationGetApiV1LocalizationOptions.ts + - src/funcs/logFileGetApiV1LogFile.ts + - src/funcs/logFileGetApiV1LogFileFilename.ts + - src/funcs/logGetApiV1Log.ts + - src/funcs/newznabGetApiV1IndexerIdDownload.ts + - src/funcs/newznabGetApiV1IndexerIdNewznab.ts + - src/funcs/newznabGetIdApi.ts + - src/funcs/newznabGetIdDownload.ts + - src/funcs/notificationDeleteApiV1NotificationId.ts + - src/funcs/notificationGetApiV1Notification.ts + - src/funcs/notificationGetApiV1NotificationId.ts + - src/funcs/notificationGetApiV1NotificationSchema.ts + - src/funcs/notificationPostApiV1Notification.ts + - src/funcs/notificationPostApiV1NotificationActionName.ts + - src/funcs/notificationPostApiV1NotificationTest.ts + - src/funcs/notificationPostApiV1NotificationTestall.ts + - src/funcs/notificationPutApiV1NotificationId.ts + - src/funcs/pingGetPing.ts + - src/funcs/pingHeadPing.ts + - src/funcs/searchGetApiV1Search.ts + - src/funcs/searchPostApiV1Search.ts + - src/funcs/searchPostApiV1SearchBulk.ts + - src/funcs/staticResourceGet.ts + - src/funcs/staticResourceGetContentPath.ts + - src/funcs/staticResourceGetLogin.ts + - src/funcs/staticResourceGetPath.ts + - src/funcs/systemGetApiV1SystemRoutes.ts + - src/funcs/systemGetApiV1SystemRoutesDuplicate.ts + - src/funcs/systemGetApiV1SystemStatus.ts + - src/funcs/systemPostApiV1SystemRestart.ts + - src/funcs/systemPostApiV1SystemShutdown.ts + - src/funcs/tagDeleteApiV1TagId.ts + - src/funcs/tagDetailsGetApiV1TagDetail.ts + - src/funcs/tagDetailsGetApiV1TagDetailId.ts + - src/funcs/tagGetApiV1Tag.ts + - src/funcs/tagGetApiV1TagId.ts + - src/funcs/tagPostApiV1Tag.ts + - src/funcs/tagPutApiV1TagId.ts + - src/funcs/taskGetApiV1SystemTask.ts + - src/funcs/taskGetApiV1SystemTaskId.ts + - src/funcs/uiConfigGetApiV1ConfigUi.ts + - src/funcs/uiConfigGetApiV1ConfigUiId.ts + - src/funcs/uiConfigPutApiV1ConfigUiId.ts + - src/funcs/updateGetApiV1Update.ts + - src/funcs/updateLogFileGetApiV1LogFileUpdate.ts + - src/funcs/updateLogFileGetApiV1LogFileUpdateFilename.ts + - src/hooks/hooks.ts + - src/hooks/index.ts + - src/hooks/types.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/env.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/mcp-server/build.mts + - src/mcp-server/cli.ts + - src/mcp-server/cli/start/command.ts + - src/mcp-server/cli/start/impl.ts + - src/mcp-server/console-logger.ts + - src/mcp-server/extensions.ts + - src/mcp-server/mcp-server.ts + - src/mcp-server/prompts.ts + - src/mcp-server/resources.ts + - src/mcp-server/scopes.ts + - src/mcp-server/server.ts + - src/mcp-server/shared.ts + - src/mcp-server/tools.ts + - src/mcp-server/tools/apiInfoGetApi.ts + - src/mcp-server/tools/appProfileDeleteApiV1AppprofileId.ts + - src/mcp-server/tools/appProfileGetApiV1Appprofile.ts + - src/mcp-server/tools/appProfileGetApiV1AppprofileId.ts + - src/mcp-server/tools/appProfileGetApiV1AppprofileSchema.ts + - src/mcp-server/tools/appProfilePostApiV1Appprofile.ts + - src/mcp-server/tools/appProfilePutApiV1AppprofileId.ts + - src/mcp-server/tools/applicationDeleteApiV1ApplicationsBulk.ts + - src/mcp-server/tools/applicationDeleteApiV1ApplicationsId.ts + - src/mcp-server/tools/applicationGetApiV1Applications.ts + - src/mcp-server/tools/applicationGetApiV1ApplicationsId.ts + - src/mcp-server/tools/applicationGetApiV1ApplicationsSchema.ts + - src/mcp-server/tools/applicationPostApiV1Applications.ts + - src/mcp-server/tools/applicationPostApiV1ApplicationsActionName.ts + - src/mcp-server/tools/applicationPostApiV1ApplicationsTest.ts + - src/mcp-server/tools/applicationPostApiV1ApplicationsTestall.ts + - src/mcp-server/tools/applicationPutApiV1ApplicationsBulk.ts + - src/mcp-server/tools/applicationPutApiV1ApplicationsId.ts + - src/mcp-server/tools/authenticationGetLogout.ts + - src/mcp-server/tools/backupDeleteApiV1SystemBackupId.ts + - src/mcp-server/tools/backupGetApiV1SystemBackup.ts + - src/mcp-server/tools/backupPostApiV1SystemBackupRestoreId.ts + - src/mcp-server/tools/backupPostApiV1SystemBackupRestoreUpload.ts + - src/mcp-server/tools/commandDeleteApiV1CommandId.ts + - src/mcp-server/tools/commandGetApiV1Command.ts + - src/mcp-server/tools/commandGetApiV1CommandId.ts + - src/mcp-server/tools/commandPostApiV1Command.ts + - src/mcp-server/tools/customFilterDeleteApiV1CustomfilterId.ts + - src/mcp-server/tools/customFilterGetApiV1Customfilter.ts + - src/mcp-server/tools/customFilterGetApiV1CustomfilterId.ts + - src/mcp-server/tools/customFilterPostApiV1Customfilter.ts + - src/mcp-server/tools/customFilterPutApiV1CustomfilterId.ts + - src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopment.ts + - src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopmentId.ts + - src/mcp-server/tools/developmentConfigPutApiV1ConfigDevelopmentId.ts + - src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclient.ts + - src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclientId.ts + - src/mcp-server/tools/downloadClientConfigPutApiV1ConfigDownloadclientId.ts + - src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientBulk.ts + - src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientId.ts + - src/mcp-server/tools/downloadClientGetApiV1Downloadclient.ts + - src/mcp-server/tools/downloadClientGetApiV1DownloadclientId.ts + - src/mcp-server/tools/downloadClientGetApiV1DownloadclientSchema.ts + - src/mcp-server/tools/downloadClientPostApiV1Downloadclient.ts + - src/mcp-server/tools/downloadClientPostApiV1DownloadclientActionName.ts + - src/mcp-server/tools/downloadClientPostApiV1DownloadclientTest.ts + - src/mcp-server/tools/downloadClientPostApiV1DownloadclientTestall.ts + - src/mcp-server/tools/downloadClientPutApiV1DownloadclientBulk.ts + - src/mcp-server/tools/downloadClientPutApiV1DownloadclientId.ts + - src/mcp-server/tools/fileSystemGetApiV1Filesystem.ts + - src/mcp-server/tools/fileSystemGetApiV1FilesystemType.ts + - src/mcp-server/tools/healthGetApiV1Health.ts + - src/mcp-server/tools/historyGetApiV1History.ts + - src/mcp-server/tools/historyGetApiV1HistoryIndexer.ts + - src/mcp-server/tools/historyGetApiV1HistorySince.ts + - src/mcp-server/tools/hostConfigGetApiV1ConfigHost.ts + - src/mcp-server/tools/hostConfigGetApiV1ConfigHostId.ts + - src/mcp-server/tools/hostConfigPutApiV1ConfigHostId.ts + - src/mcp-server/tools/indexerDefaultCategoriesGetApiV1IndexerCategories.ts + - src/mcp-server/tools/indexerDeleteApiV1IndexerBulk.ts + - src/mcp-server/tools/indexerDeleteApiV1IndexerId.ts + - src/mcp-server/tools/indexerGetApiV1Indexer.ts + - src/mcp-server/tools/indexerGetApiV1IndexerId.ts + - src/mcp-server/tools/indexerGetApiV1IndexerSchema.ts + - src/mcp-server/tools/indexerPostApiV1Indexer.ts + - src/mcp-server/tools/indexerPostApiV1IndexerActionName.ts + - src/mcp-server/tools/indexerPostApiV1IndexerTest.ts + - src/mcp-server/tools/indexerPostApiV1IndexerTestall.ts + - src/mcp-server/tools/indexerProxyDeleteApiV1IndexerproxyId.ts + - src/mcp-server/tools/indexerProxyGetApiV1Indexerproxy.ts + - src/mcp-server/tools/indexerProxyGetApiV1IndexerproxyId.ts + - src/mcp-server/tools/indexerProxyGetApiV1IndexerproxySchema.ts + - src/mcp-server/tools/indexerProxyPostApiV1Indexerproxy.ts + - src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyActionName.ts + - src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTest.ts + - src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTestall.ts + - src/mcp-server/tools/indexerProxyPutApiV1IndexerproxyId.ts + - src/mcp-server/tools/indexerPutApiV1IndexerBulk.ts + - src/mcp-server/tools/indexerPutApiV1IndexerId.ts + - src/mcp-server/tools/indexerStatsGetApiV1Indexerstats.ts + - src/mcp-server/tools/indexerStatusGetApiV1Indexerstatus.ts + - src/mcp-server/tools/localizationGetApiV1Localization.ts + - src/mcp-server/tools/localizationGetApiV1LocalizationOptions.ts + - src/mcp-server/tools/logFileGetApiV1LogFile.ts + - src/mcp-server/tools/logFileGetApiV1LogFileFilename.ts + - src/mcp-server/tools/logGetApiV1Log.ts + - src/mcp-server/tools/newznabGetApiV1IndexerIdDownload.ts + - src/mcp-server/tools/newznabGetApiV1IndexerIdNewznab.ts + - src/mcp-server/tools/newznabGetIdApi.ts + - src/mcp-server/tools/newznabGetIdDownload.ts + - src/mcp-server/tools/notificationDeleteApiV1NotificationId.ts + - src/mcp-server/tools/notificationGetApiV1Notification.ts + - src/mcp-server/tools/notificationGetApiV1NotificationId.ts + - src/mcp-server/tools/notificationGetApiV1NotificationSchema.ts + - src/mcp-server/tools/notificationPostApiV1Notification.ts + - src/mcp-server/tools/notificationPostApiV1NotificationActionName.ts + - src/mcp-server/tools/notificationPostApiV1NotificationTest.ts + - src/mcp-server/tools/notificationPostApiV1NotificationTestall.ts + - src/mcp-server/tools/notificationPutApiV1NotificationId.ts + - src/mcp-server/tools/pingGetPing.ts + - src/mcp-server/tools/pingHeadPing.ts + - src/mcp-server/tools/searchGetApiV1Search.ts + - src/mcp-server/tools/searchPostApiV1Search.ts + - src/mcp-server/tools/searchPostApiV1SearchBulk.ts + - src/mcp-server/tools/staticResourceGet.ts + - src/mcp-server/tools/staticResourceGetContentPath.ts + - src/mcp-server/tools/staticResourceGetLogin.ts + - src/mcp-server/tools/staticResourceGetPath.ts + - src/mcp-server/tools/systemGetApiV1SystemRoutes.ts + - src/mcp-server/tools/systemGetApiV1SystemRoutesDuplicate.ts + - src/mcp-server/tools/systemGetApiV1SystemStatus.ts + - src/mcp-server/tools/systemPostApiV1SystemRestart.ts + - src/mcp-server/tools/systemPostApiV1SystemShutdown.ts + - src/mcp-server/tools/tagDeleteApiV1TagId.ts + - src/mcp-server/tools/tagDetailsGetApiV1TagDetail.ts + - src/mcp-server/tools/tagDetailsGetApiV1TagDetailId.ts + - src/mcp-server/tools/tagGetApiV1Tag.ts + - src/mcp-server/tools/tagGetApiV1TagId.ts + - src/mcp-server/tools/tagPostApiV1Tag.ts + - src/mcp-server/tools/tagPutApiV1TagId.ts + - src/mcp-server/tools/taskGetApiV1SystemTask.ts + - src/mcp-server/tools/taskGetApiV1SystemTaskId.ts + - src/mcp-server/tools/uiConfigGetApiV1ConfigUi.ts + - src/mcp-server/tools/uiConfigGetApiV1ConfigUiId.ts + - src/mcp-server/tools/uiConfigPutApiV1ConfigUiId.ts + - src/mcp-server/tools/updateGetApiV1Update.ts + - src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdate.ts + - src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdateFilename.ts + - src/models/apiinforesource.ts + - src/models/applicationbulkresource.ts + - src/models/applicationresource.ts + - src/models/applicationsynclevel.ts + - src/models/applytags.ts + - src/models/appprofileresource.ts + - src/models/authenticationrequiredtype.ts + - src/models/authenticationtype.ts + - src/models/backupresource.ts + - src/models/backuptype.ts + - src/models/booksearchparam.ts + - src/models/certificatevalidationtype.ts + - src/models/command.ts + - src/models/commandinput.ts + - src/models/commandpriority.ts + - src/models/commandresource.ts + - src/models/commandresourceinput.ts + - src/models/commandstatus.ts + - src/models/commandtrigger.ts + - src/models/customfilterresource.ts + - src/models/databasetype.ts + - src/models/developmentconfigresource.ts + - src/models/downloadclientbulkresource.ts + - src/models/downloadclientcategory.ts + - src/models/downloadclientconfigresource.ts + - src/models/downloadclientresource.ts + - src/models/downloadprotocol.ts + - src/models/errors/apierror.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/index.ts + - src/models/errors/sdkvalidationerror.ts + - src/models/field.ts + - src/models/healthcheckresult.ts + - src/models/healthresource.ts + - src/models/historyeventtype.ts + - src/models/historyresource.ts + - src/models/historyresourcepagingresource.ts + - src/models/hostconfigresource.ts + - src/models/hoststatistics.ts + - src/models/index.ts + - src/models/indexerbulkresource.ts + - src/models/indexercapabilityresource.ts + - src/models/indexercapabilityresourceinput.ts + - src/models/indexercategory.ts + - src/models/indexercategoryinput.ts + - src/models/indexerprivacy.ts + - src/models/indexerproxyresource.ts + - src/models/indexerresource.ts + - src/models/indexerresourceinput.ts + - src/models/indexerstatistics.ts + - src/models/indexerstatsresource.ts + - src/models/indexerstatusresource.ts + - src/models/localizationoption.ts + - src/models/logfileresource.ts + - src/models/logresource.ts + - src/models/logresourcepagingresource.ts + - src/models/moviesearchparam.ts + - src/models/musicsearchparam.ts + - src/models/notificationresource.ts + - src/models/operations/deleteapiv1applicationsid.ts + - src/models/operations/deleteapiv1appprofileid.ts + - src/models/operations/deleteapiv1commandid.ts + - src/models/operations/deleteapiv1customfilterid.ts + - src/models/operations/deleteapiv1downloadclientid.ts + - src/models/operations/deleteapiv1indexerid.ts + - src/models/operations/deleteapiv1indexerproxyid.ts + - src/models/operations/deleteapiv1notificationid.ts + - src/models/operations/deleteapiv1systembackupid.ts + - src/models/operations/deleteapiv1tagid.ts + - src/models/operations/getapiv1applicationsid.ts + - src/models/operations/getapiv1appprofileid.ts + - src/models/operations/getapiv1commandid.ts + - src/models/operations/getapiv1configdevelopmentid.ts + - src/models/operations/getapiv1configdownloadclientid.ts + - src/models/operations/getapiv1confighostid.ts + - src/models/operations/getapiv1configuiid.ts + - src/models/operations/getapiv1customfilterid.ts + - src/models/operations/getapiv1downloadclientid.ts + - src/models/operations/getapiv1filesystem.ts + - src/models/operations/getapiv1filesystemtype.ts + - src/models/operations/getapiv1history.ts + - src/models/operations/getapiv1historyindexer.ts + - src/models/operations/getapiv1historysince.ts + - src/models/operations/getapiv1indexerid.ts + - src/models/operations/getapiv1indexeriddownload.ts + - src/models/operations/getapiv1indexeridnewznab.ts + - src/models/operations/getapiv1indexerproxyid.ts + - src/models/operations/getapiv1indexerstats.ts + - src/models/operations/getapiv1log.ts + - src/models/operations/getapiv1logfilefilename.ts + - src/models/operations/getapiv1logfileupdatefilename.ts + - src/models/operations/getapiv1notificationid.ts + - src/models/operations/getapiv1search.ts + - src/models/operations/getapiv1systemtaskid.ts + - src/models/operations/getapiv1tagdetailid.ts + - src/models/operations/getapiv1tagid.ts + - src/models/operations/getcontentpath.ts + - src/models/operations/getidapi.ts + - src/models/operations/getiddownload.ts + - src/models/operations/getpath.ts + - src/models/operations/index.ts + - src/models/operations/postapiv1applications.ts + - src/models/operations/postapiv1applicationsactionname.ts + - src/models/operations/postapiv1applicationstest.ts + - src/models/operations/postapiv1downloadclient.ts + - src/models/operations/postapiv1downloadclientactionname.ts + - src/models/operations/postapiv1downloadclienttest.ts + - src/models/operations/postapiv1indexer.ts + - src/models/operations/postapiv1indexeractionname.ts + - src/models/operations/postapiv1indexerproxy.ts + - src/models/operations/postapiv1indexerproxyactionname.ts + - src/models/operations/postapiv1indexerproxytest.ts + - src/models/operations/postapiv1indexertest.ts + - src/models/operations/postapiv1notification.ts + - src/models/operations/postapiv1notificationactionname.ts + - src/models/operations/postapiv1notificationtest.ts + - src/models/operations/postapiv1systembackuprestoreid.ts + - src/models/operations/putapiv1applicationsid.ts + - src/models/operations/putapiv1appprofileid.ts + - src/models/operations/putapiv1configdevelopmentid.ts + - src/models/operations/putapiv1configdownloadclientid.ts + - src/models/operations/putapiv1confighostid.ts + - src/models/operations/putapiv1configuiid.ts + - src/models/operations/putapiv1customfilterid.ts + - src/models/operations/putapiv1downloadclientid.ts + - src/models/operations/putapiv1indexerid.ts + - src/models/operations/putapiv1indexerproxyid.ts + - src/models/operations/putapiv1notificationid.ts + - src/models/operations/putapiv1tagid.ts + - src/models/pingresource.ts + - src/models/privacylevel.ts + - src/models/providermessage.ts + - src/models/providermessagetype.ts + - src/models/proxytype.ts + - src/models/releaseresource.ts + - src/models/releaseresourceinput.ts + - src/models/runtimemode.ts + - src/models/searchparam.ts + - src/models/security.ts + - src/models/selectoption.ts + - src/models/sortdirection.ts + - src/models/systemresource.ts + - src/models/tagdetailsresource.ts + - src/models/tagresource.ts + - src/models/taskresource.ts + - src/models/tvsearchparam.ts + - src/models/uiconfigresource.ts + - src/models/updatechanges.ts + - src/models/updatemechanism.ts + - src/models/updateresource.ts + - src/models/useragentstatistics.ts + - src/sdk/apiinfo.ts + - src/sdk/application.ts + - src/sdk/appprofile.ts + - src/sdk/authentication.ts + - src/sdk/backup.ts + - src/sdk/command.ts + - src/sdk/customfilter.ts + - src/sdk/developmentconfig.ts + - src/sdk/downloadclient.ts + - src/sdk/downloadclientconfig.ts + - src/sdk/filesystem.ts + - src/sdk/health.ts + - src/sdk/history.ts + - src/sdk/hostconfig.ts + - src/sdk/index.ts + - src/sdk/indexer.ts + - src/sdk/indexerdefaultcategories.ts + - src/sdk/indexerproxy.ts + - src/sdk/indexerstats.ts + - src/sdk/indexerstatus.ts + - src/sdk/localization.ts + - src/sdk/log.ts + - src/sdk/logfile.ts + - src/sdk/newznab.ts + - src/sdk/notification.ts + - src/sdk/ping.ts + - src/sdk/sdk.ts + - src/sdk/search.ts + - src/sdk/staticresource.ts + - src/sdk/system.ts + - src/sdk/tag.ts + - src/sdk/tagdetails.ts + - src/sdk/task.ts + - src/sdk/uiconfig.ts + - src/sdk/update.ts + - src/sdk/updatelogfile.ts + - src/types/async.ts + - src/types/blobs.ts + - src/types/constdatetime.ts + - src/types/enums.ts + - src/types/fp.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - src/types/streams.ts + - tsconfig.json +examples: + get_/api: + speakeasy-default-get-/api: + responses: + "200": + application/json: {} + get_/api/v1/applications/{id}: + speakeasy-default-get-/api/v1-/applications/{id}: + parameters: + path: + id: 282902 + responses: + "200": + application/json: {} + put_/api/v1/applications/{id}: + speakeasy-default-put-/api/v1-/applications/{id}: + parameters: + path: + id: "" + query: + forceSave: false + responses: + "200": + application/json: {} + delete_/api/v1/applications/{id}: + speakeasy-default-delete-/api/v1-/applications/{id}: + parameters: + path: + id: 915442 + get_/api/v1/applications: + speakeasy-default-get-/api/v1-/applications: + responses: + "200": + application/json: [{}, {}] + post_/api/v1/applications: + speakeasy-default-post-/api/v1-/applications: + parameters: + query: + forceSave: false + responses: + "200": + application/json: {} + put_/api/v1/applications/bulk: + speakeasy-default-put-/api/v1-/applications/bulk: + responses: + "200": + application/json: {} + delete_/api/v1/applications/bulk: {} + get_/api/v1/applications/schema: + speakeasy-default-get-/api/v1-/applications/schema: + responses: + "200": + application/json: [{}, {}, {}] + post_/api/v1/applications/test: + speakeasy-default-post-/api/v1-/applications/test: + parameters: + query: + forceTest: false + post_/api/v1/applications/testall: {} + post_/api/v1/applications/action/{name}: + speakeasy-default-post-/api/v1-/applications/action/{name}: + parameters: + path: + name: "" + post_/api/v1/appprofile: + speakeasy-default-post-/api/v1-/appprofile: + responses: + "200": + application/json: {} + get_/api/v1/appprofile: + speakeasy-default-get-/api/v1-/appprofile: + responses: + "200": + application/json: [{}, {}] + delete_/api/v1/appprofile/{id}: + speakeasy-default-delete-/api/v1-/appprofile/{id}: + parameters: + path: + id: 344853 + put_/api/v1/appprofile/{id}: + speakeasy-default-put-/api/v1-/appprofile/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + get_/api/v1/appprofile/{id}: + speakeasy-default-get-/api/v1-/appprofile/{id}: + parameters: + path: + id: 92439 + responses: + "200": + application/json: {} + get_/api/v1/appprofile/schema: + speakeasy-default-get-/api/v1-/appprofile/schema: + responses: + "200": + application/json: {} + get_/login: {} + get_/content/{path}: + speakeasy-default-get-/content/{path}: + parameters: + path: + path: "/dev" + get_/: {} + get_/{path}: + speakeasy-default-get-/{path}: + parameters: + path: + path: "/etc/defaults" + get_/logout: {} + get_/api/v1/system/backup: + speakeasy-default-get-/api/v1-/system/backup: + responses: + "200": + application/json: [{}, {}] + delete_/api/v1/system/backup/{id}: + speakeasy-default-delete-/api/v1-/system/backup/{id}: + parameters: + path: + id: 305836 + post_/api/v1/system/backup/restore/{id}: + speakeasy-default-post-/api/v1-/system/backup/restore/{id}: + parameters: + path: + id: 246520 + post_/api/v1/system/backup/restore/upload: {} + get_/api/v1/command/{id}: + speakeasy-default-get-/api/v1-/command/{id}: + parameters: + path: + id: 274829 + responses: + "200": + application/json: {} + delete_/api/v1/command/{id}: + speakeasy-default-delete-/api/v1-/command/{id}: + parameters: + path: + id: 932632 + post_/api/v1/command: + speakeasy-default-post-/api/v1-/command: + responses: + "200": + application/json: {} + get_/api/v1/command: + speakeasy-default-get-/api/v1-/command: + responses: + "200": + application/json: [{}, {}] + get_/api/v1/customfilter/{id}: + speakeasy-default-get-/api/v1-/customfilter/{id}: + parameters: + path: + id: 367030 + responses: + "200": + application/json: {} + put_/api/v1/customfilter/{id}: + speakeasy-default-put-/api/v1-/customfilter/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + delete_/api/v1/customfilter/{id}: + speakeasy-default-delete-/api/v1-/customfilter/{id}: + parameters: + path: + id: 400472 + get_/api/v1/customfilter: + speakeasy-default-get-/api/v1-/customfilter: + responses: + "200": + application/json: [{}] + post_/api/v1/customfilter: + speakeasy-default-post-/api/v1-/customfilter: + responses: + "200": + application/json: {} + put_/api/v1/config/development/{id}: + speakeasy-default-put-/api/v1-/config/development/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + get_/api/v1/config/development/{id}: + speakeasy-default-get-/api/v1-/config/development/{id}: + parameters: + path: + id: 820899 + responses: + "200": + application/json: {} + get_/api/v1/config/development: + speakeasy-default-get-/api/v1-/config/development: + responses: + "200": + application/json: {} + get_/api/v1/downloadclient/{id}: + speakeasy-default-get-/api/v1-/downloadclient/{id}: + parameters: + path: + id: 335668 + responses: + "200": + application/json: {} + put_/api/v1/downloadclient/{id}: + speakeasy-default-put-/api/v1-/downloadclient/{id}: + parameters: + path: + id: "" + query: + forceSave: false + responses: + "200": + application/json: {} + delete_/api/v1/downloadclient/{id}: + speakeasy-default-delete-/api/v1-/downloadclient/{id}: + parameters: + path: + id: 670627 + get_/api/v1/downloadclient: + speakeasy-default-get-/api/v1-/downloadclient: + responses: + "200": + application/json: [{}] + post_/api/v1/downloadclient: + speakeasy-default-post-/api/v1-/downloadclient: + parameters: + query: + forceSave: false + responses: + "200": + application/json: {} + put_/api/v1/downloadclient/bulk: + speakeasy-default-put-/api/v1-/downloadclient/bulk: + responses: + "200": + application/json: {} + delete_/api/v1/downloadclient/bulk: {} + get_/api/v1/downloadclient/schema: + speakeasy-default-get-/api/v1-/downloadclient/schema: + responses: + "200": + application/json: [{}] + post_/api/v1/downloadclient/test: + speakeasy-default-post-/api/v1-/downloadclient/test: + parameters: + query: + forceTest: false + post_/api/v1/downloadclient/testall: {} + post_/api/v1/downloadclient/action/{name}: + speakeasy-default-post-/api/v1-/downloadclient/action/{name}: + parameters: + path: + name: "" + get_/api/v1/config/downloadclient/{id}: + speakeasy-default-get-/api/v1-/config/downloadclient/{id}: + parameters: + path: + id: 300484 + responses: + "200": + application/json: {} + put_/api/v1/config/downloadclient/{id}: + speakeasy-default-put-/api/v1-/config/downloadclient/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + get_/api/v1/config/downloadclient: + speakeasy-default-get-/api/v1-/config/downloadclient: + responses: + "200": + application/json: {} + get_/api/v1/filesystem: + speakeasy-default-get-/api/v1-/filesystem: + parameters: + query: + includeFiles: false + allowFoldersWithoutTrailingSlashes: false + get_/api/v1/filesystem/type: {} + get_/api/v1/health: + speakeasy-default-get-/api/v1-/health: + responses: + "200": + application/json: [{}] + get_/api/v1/history: + speakeasy-default-get-/api/v1-/history: + parameters: + query: + page: 1 + pageSize: 10 + responses: + "200": + application/json: {} + get_/api/v1/history/since: + speakeasy-default-get-/api/v1-/history/since: + responses: + "200": + application/json: [{}] + get_/api/v1/history/indexer: + speakeasy-default-get-/api/v1-/history/indexer: + responses: + "200": + application/json: [{}] + get_/api/v1/config/host/{id}: + speakeasy-default-get-/api/v1-/config/host/{id}: + parameters: + path: + id: 316887 + responses: + "200": + application/json: {} + put_/api/v1/config/host/{id}: + speakeasy-default-put-/api/v1-/config/host/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + get_/api/v1/config/host: + speakeasy-default-get-/api/v1-/config/host: + responses: + "200": + application/json: {} + get_/api/v1/indexer/{id}: + speakeasy-default-get-/api/v1-/indexer/{id}: + parameters: + path: + id: 596285 + responses: + "200": + application/json: {} + put_/api/v1/indexer/{id}: + speakeasy-default-put-/api/v1-/indexer/{id}: + parameters: + path: + id: "" + query: + forceSave: false + responses: + "200": + application/json: {} + delete_/api/v1/indexer/{id}: + speakeasy-default-delete-/api/v1-/indexer/{id}: + parameters: + path: + id: 158662 + get_/api/v1/indexer: + speakeasy-default-get-/api/v1-/indexer: + responses: + "200": + application/json: [{}] + post_/api/v1/indexer: + speakeasy-default-post-/api/v1-/indexer: + parameters: + query: + forceSave: false + responses: + "200": + application/json: {} + put_/api/v1/indexer/bulk: + speakeasy-default-put-/api/v1-/indexer/bulk: + responses: + "200": + application/json: {} + delete_/api/v1/indexer/bulk: {} + get_/api/v1/indexer/schema: + speakeasy-default-get-/api/v1-/indexer/schema: + responses: + "200": + application/json: [{}] + post_/api/v1/indexer/test: + speakeasy-default-post-/api/v1-/indexer/test: + parameters: + query: + forceTest: false + post_/api/v1/indexer/testall: {} + post_/api/v1/indexer/action/{name}: + speakeasy-default-post-/api/v1-/indexer/action/{name}: + parameters: + path: + name: "" + get_/api/v1/indexer/categories: + speakeasy-default-get-/api/v1-/indexer/categories: + responses: + "200": + application/json: [{}, {}, {}] + get_/api/v1/indexerproxy/{id}: + speakeasy-default-get-/api/v1-/indexerproxy/{id}: + parameters: + path: + id: 624797 + responses: + "200": + application/json: {} + put_/api/v1/indexerproxy/{id}: + speakeasy-default-put-/api/v1-/indexerproxy/{id}: + parameters: + path: + id: "" + query: + forceSave: false + responses: + "200": + application/json: {} + delete_/api/v1/indexerproxy/{id}: + speakeasy-default-delete-/api/v1-/indexerproxy/{id}: + parameters: + path: + id: 291937 + get_/api/v1/indexerproxy: + speakeasy-default-get-/api/v1-/indexerproxy: + responses: + "200": + application/json: [{}] + post_/api/v1/indexerproxy: + speakeasy-default-post-/api/v1-/indexerproxy: + parameters: + query: + forceSave: false + responses: + "200": + application/json: {} + get_/api/v1/indexerproxy/schema: + speakeasy-default-get-/api/v1-/indexerproxy/schema: + responses: + "200": + application/json: [{}] + post_/api/v1/indexerproxy/test: + speakeasy-default-post-/api/v1-/indexerproxy/test: + parameters: + query: + forceTest: false + post_/api/v1/indexerproxy/testall: {} + post_/api/v1/indexerproxy/action/{name}: + speakeasy-default-post-/api/v1-/indexerproxy/action/{name}: + parameters: + path: + name: "" + get_/api/v1/indexerstats: + speakeasy-default-get-/api/v1-/indexerstats: + responses: + "200": + application/json: {} + get_/api/v1/indexerstatus: + speakeasy-default-get-/api/v1-/indexerstatus: + responses: + "200": + application/json: [{}, {}, {}] + get_/api/v1/localization: {} + get_/api/v1/localization/options: + speakeasy-default-get-/api/v1-/localization/options: + responses: + "200": + application/json: [{}, {}, {}] + get_/api/v1/log: + speakeasy-default-get-/api/v1-/log: + parameters: + query: + page: 1 + pageSize: 10 + responses: + "200": + application/json: {} + get_/api/v1/log/file: + speakeasy-default-get-/api/v1-/log/file: + responses: + "200": + application/json: [{}, {}] + get_/api/v1/log/file/{filename}: + speakeasy-default-get-/api/v1-/log/file/{filename}: + parameters: + path: + filename: "example.file" + responses: + "200": + text/plain: "" + get_/api/v1/indexer/{id}/newznab: + speakeasy-default-get-/api/v1-/indexer/{id}/newznab: + parameters: + path: + id: 395958 + query: {} + get_/{id}/api: + speakeasy-default-get-/{id}/api: + parameters: + path: + id: 915193 + query: {} + get_/api/v1/indexer/{id}/download: + speakeasy-default-get-/api/v1-/indexer/{id}/download: + parameters: + path: + id: 159549 + query: {} + get_/{id}/download: + speakeasy-default-get-/{id}/download: + parameters: + path: + id: 531578 + query: {} + get_/api/v1/notification/{id}: + speakeasy-default-get-/api/v1-/notification/{id}: + parameters: + path: + id: 383207 + responses: + "200": + application/json: {} + put_/api/v1/notification/{id}: + speakeasy-default-put-/api/v1-/notification/{id}: + parameters: + path: + id: "" + query: + forceSave: false + responses: + "200": + application/json: {} + delete_/api/v1/notification/{id}: + speakeasy-default-delete-/api/v1-/notification/{id}: + parameters: + path: + id: 312155 + get_/api/v1/notification: + speakeasy-default-get-/api/v1-/notification: + responses: + "200": + application/json: [{}, {}] + post_/api/v1/notification: + speakeasy-default-post-/api/v1-/notification: + parameters: + query: + forceSave: false + responses: + "200": + application/json: {} + get_/api/v1/notification/schema: + speakeasy-default-get-/api/v1-/notification/schema: + responses: + "200": + application/json: [{}, {}, {}] + post_/api/v1/notification/test: + speakeasy-default-post-/api/v1-/notification/test: + parameters: + query: + forceTest: false + post_/api/v1/notification/testall: {} + post_/api/v1/notification/action/{name}: + speakeasy-default-post-/api/v1-/notification/action/{name}: + parameters: + path: + name: "" + get_/ping: + speakeasy-default-get-/ping: + responses: + "200": + application/json: {} + head_/ping: + speakeasy-default-head-/ping: + responses: + "200": + application/json: {} + post_/api/v1/search: + speakeasy-default-post-/api/v1-/search: + responses: + "200": + application/json: {} + get_/api/v1/search: + speakeasy-default-get-/api/v1-/search: + responses: + "200": + application/json: [{}, {}] + post_/api/v1/search/bulk: + speakeasy-default-post-/api/v1-/search/bulk: + responses: + "200": + application/json: {} + get_/api/v1/system/status: + speakeasy-default-get-/api/v1-/system/status: + responses: + "200": + application/json: {} + get_/api/v1/system/routes: {} + get_/api/v1/system/routes/duplicate: {} + post_/api/v1/system/shutdown: {} + post_/api/v1/system/restart: {} + get_/api/v1/tag/{id}: + speakeasy-default-get-/api/v1-/tag/{id}: + parameters: + path: + id: 828174 + responses: + "200": + application/json: {} + put_/api/v1/tag/{id}: + speakeasy-default-put-/api/v1-/tag/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + delete_/api/v1/tag/{id}: + speakeasy-default-delete-/api/v1-/tag/{id}: + parameters: + path: + id: 465312 + get_/api/v1/tag: + speakeasy-default-get-/api/v1-/tag: + responses: + "200": + application/json: [{}, {}, {}] + post_/api/v1/tag: + speakeasy-default-post-/api/v1-/tag: + responses: + "200": + application/json: {} + get_/api/v1/tag/detail/{id}: + speakeasy-default-get-/api/v1-/tag/detail/{id}: + parameters: + path: + id: 303785 + responses: + "200": + application/json: {} + get_/api/v1/tag/detail: + speakeasy-default-get-/api/v1-/tag/detail: + responses: + "200": + application/json: [{}, {}] + get_/api/v1/system/task: + speakeasy-default-get-/api/v1-/system/task: + responses: + "200": + application/json: [{}, {}, {}] + get_/api/v1/system/task/{id}: + speakeasy-default-get-/api/v1-/system/task/{id}: + parameters: + path: + id: 459582 + responses: + "200": + application/json: {} + put_/api/v1/config/ui/{id}: + speakeasy-default-put-/api/v1-/config/ui/{id}: + parameters: + path: + id: "" + responses: + "200": + application/json: {} + get_/api/v1/config/ui/{id}: + speakeasy-default-get-/api/v1-/config/ui/{id}: + parameters: + path: + id: 410001 + responses: + "200": + application/json: {} + get_/api/v1/config/ui: + speakeasy-default-get-/api/v1-/config/ui: + responses: + "200": + application/json: {} + get_/api/v1/update: + speakeasy-default-get-/api/v1-/update: + responses: + "200": + application/json: [{}] + get_/api/v1/log/file/update: + speakeasy-default-get-/api/v1-/log/file/update: + responses: + "200": + application/json: [{}, {}] + get_/api/v1/log/file/update/{filename}: + speakeasy-default-get-/api/v1-/log/file/update/{filename}: + parameters: + path: + filename: "example.file" + responses: + "200": + text/plain: "" +examplesVersion: 1.0.2 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml new file mode 100644 index 0000000..df8d5f4 --- /dev/null +++ b/.speakeasy/gen.yaml @@ -0,0 +1,55 @@ +configVersion: 2.0.0 +generation: + devContainers: + enabled: true + schemaPath: https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json + sdkClassName: Prowlarr + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + useClassNamesForArrayFields: true + fixes: + nameResolutionDec2023: true + nameResolutionFeb2025: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + securityFeb2025: true + sharedErrorComponentsApr2025: false + auth: + oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: true +typescript: + version: 0.0.1 + additionalDependencies: + dependencies: {} + devDependencies: {} + peerDependencies: {} + additionalPackageJSON: {} + author: Speakeasy + clientServerStatusCodesAsErrors: true + defaultErrorName: APIError + enableCustomCodeRegions: false + enableMCPServer: true + enableReactQuery: false + enumFormat: union + envVarPrefix: PROWLARR + flattenGlobalSecurity: true + flatteningOrder: parameters-first + imports: + option: openapi + paths: + callbacks: models/callbacks + errors: models/errors + operations: models/operations + shared: models + webhooks: models/webhooks + inputModelSuffix: input + jsonpath: rfc9535 + maxMethodParams: 0 + methodArguments: require-security-and-request + moduleFormat: dual + outputModelSuffix: output + packageName: prowlarr + responseFormat: flat + templateVersion: v2 + useIndexModules: true diff --git a/.speakeasy/speakeasy-modifications-overlay.yaml b/.speakeasy/speakeasy-modifications-overlay.yaml new file mode 100644 index 0000000..18cf287 --- /dev/null +++ b/.speakeasy/speakeasy-modifications-overlay.yaml @@ -0,0 +1,15 @@ +overlay: 1.0.0 +x-speakeasy-jsonpath: rfc9535 +info: + title: Speakeasy Modifications + version: 0.0.1 + x-speakeasy-metadata: + type: speakeasy-modifications + before: "" + after: "" +actions: + - target: $["paths"]["/"]["get"]["parameters"] + remove: true + x-speakeasy-metadata: + created_at: 1747432805089 + type: user-edit diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..65e0462 --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,28 @@ +speakeasyVersion: 1.546.1 +sources: {} +targets: + prowlarr: + source: Prowlarr + codeSamplesNamespace: prowlarr-typescript-code-samples + codeSamplesRevisionDigest: sha256:7afc8f22dd3763349bcacd94c8ea523e1f5414b3feaa39a6c30c85fd7e687643 +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + Prowlarr: + inputs: + - location: https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json + overlays: + - location: .speakeasy/speakeasy-modifications-overlay.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/prowlarr + targets: + prowlarr: + target: typescript + source: Prowlarr + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/prowlarr-typescript-code-samples + labelOverride: + fixedValue: Typescript (SDK) + blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..5a807bc --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,20 @@ +workflowVersion: 1.0.0 +speakeasyVersion: latest +sources: + Prowlarr: + inputs: + - location: https://raw.githubusercontent.com/Prowlarr/Prowlarr/develop/src/Prowlarr.Api.V1/openapi.json + overlays: + - location: .speakeasy/speakeasy-modifications-overlay.yaml + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/prowlarr +targets: + prowlarr: + target: typescript + source: Prowlarr + codeSamples: + registry: + location: registry.speakeasyapi.dev/lukehagar/lukehagar/prowlarr-typescript-code-samples + labelOverride: + fixedValue: Typescript (SDK) + blocking: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d585717 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/FUNCTIONS.md b/FUNCTIONS.md new file mode 100644 index 0000000..1fd4b7a --- /dev/null +++ b/FUNCTIONS.md @@ -0,0 +1,106 @@ +# Standalone Functions + +> [!NOTE] +> This section is useful if you are using a bundler and targetting browsers and +> runtimes where the size of an application affects performance and load times. + +Every method in this SDK is also available as a standalone function. This +alternative API is suitable when targetting the browser or serverless runtimes +and using a bundler to build your application since all unused functionality +will be tree-shaken away. This includes code for unused methods, Zod schemas, +encoding helpers and response handlers. The result is dramatically smaller +impact on the application's final bundle size which grows very slowly as you use +more and more functionality from this SDK. + +Calling methods through the main SDK class remains a valid and generally more +more ergonomic option. Standalone functions represent an optimisation for a +specific category of applications. + +## Example + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { apiInfoGetApi } from "prowlarr/funcs/apiInfoGetApi.js"; +import { SDKValidationError } from "prowlarr/models/errors/sdkvalidationerror.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await apiInfoGetApi(prowlarr); + + switch (true) { + case res.ok: + // The success case will be handled outside of the switch block + break; + case res.error instanceof SDKValidationError: + // Pretty-print validation errors. + return console.log(res.error.pretty()); + case res.error instanceof Error: + return console.log(res.error); + default: + // TypeScript's type checking will fail on the following line if the above + // cases were not exhaustive. + res.error satisfies never; + throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error); + } + + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +## Result types + +Standalone functions differ from SDK methods in that they return a +`Result` type to capture _known errors_ and document them using +the type system. By avoiding throwing errors, application code maintains clear +control flow and error-handling become part of the regular flow of application +code. + +> We use the term "known errors" because standalone functions, and JavaScript +> code in general, can still throw unexpected errors such as `TypeError`s, +> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be +> something this SDK addresses in the future. Nevertheless, there is still a lot +> of benefit from capturing most errors and turning them into values. + +The second reason for this style of programming is because these functions will +typically be used in front-end applications where exception throwing is +sometimes discouraged or considered unidiomatic. React and similar ecosystems +and libraries tend to promote this style of programming so that components +render useful content under all states (loading, success, error and so on). + +The general pattern when calling standalone functions looks like this: + +```typescript +import { Core } from ""; +import { fetchSomething } from "/funcs/fetchSomething.js"; + +const client = new Core(); + +async function run() { + const result = await fetchSomething(client, { id: "123" }); + if (!result.ok) { + // You can throw the error or handle it. It's your choice now. + throw result.error; + } + + console.log(result.value); +} + +run(); +``` + +Notably, `result.error` above will have an explicit type compared to a try-catch +variation where the error in the catch block can only be of type `unknown` (or +`any` depending on your TypeScript settings). \ No newline at end of file diff --git a/README.md b/README.md index 3a323ff..4385090 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,875 @@ # Prowlarr-TS-SDK # Prowlarr-TS-SDK + + +## Summary + +Prowlarr: Prowlarr API docs + + + +## Table of Contents + +* [Prowlarr-TS-SDK](#prowlarr-ts-sdk) +* [Prowlarr-TS-SDK](#prowlarr-ts-sdk-1) + * [SDK Installation](#sdk-installation) + * [Requirements](#requirements) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Standalone functions](#standalone-functions) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Debugging](#debugging) + + + + +## SDK Installation + +> [!TIP] +> To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide). + + +The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers. + +### NPM + +```bash +npm add +``` + +### PNPM + +```bash +pnpm add +``` + +### Bun + +```bash +bun add +``` + +### Yarn + +```bash +yarn add zod + +# Note that Yarn does not install peer dependencies automatically. You will need +# to install zod as shown above. +``` + +> [!NOTE] +> This package is published with CommonJS and ES Modules (ESM) support. + + +### Model Context Protocol (MCP) Server + +This SDK is also an installable MCP server where the various SDK methods are +exposed as tools that can be invoked by AI applications. + +> Node.js v20 or greater is required to run the MCP server from npm. + +
+Claude installation steps + +Add the following server definition to your `claude_desktop_config.json` file: + +```json +{ + "mcpServers": { + "Prowlarr": { + "command": "npx", + "args": [ + "-y", "--package", "prowlarr", + "--", + "mcp", "start", + "--x-api-key", "...", + "--apikey", "..." + ] + } + } +} +``` + +
+ +
+Cursor installation steps + +Create a `.cursor/mcp.json` file in your project root with the following content: + +```json +{ + "mcpServers": { + "Prowlarr": { + "command": "npx", + "args": [ + "-y", "--package", "prowlarr", + "--", + "mcp", "start", + "--x-api-key", "...", + "--apikey", "..." + ] + } + } +} +``` + +
+ +You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases: + +```bash +curl -L -o mcp-server \ + https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \ +chmod +x mcp-server +``` + +If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`. + + +```json +{ + "mcpServers": { + "Todos": { + "command": "./DOWNLOAD/PATH/mcp-server", + "args": [ + "start" + ] + } + } +} +``` + +For a full list of server arguments, run: + +```sh +npx -y --package prowlarr -- mcp start --help +``` + + + +## Requirements + +For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + + + +## SDK Example Usage + +### Example + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security schemes globally: + +| Name | Type | Scheme | Environment Variable | +| --------- | ------ | ------- | -------------------- | +| `xApiKey` | apiKey | API key | `PROWLARR_X_API_KEY` | +| `apikey` | apiKey | API key | `PROWLARR_APIKEY` | + +You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example: +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Available Resources and Operations + +
+Available methods + +### [apiInfo](docs/sdks/apiinfo/README.md) + +* [getApi](docs/sdks/apiinfo/README.md#getapi) + +### [application](docs/sdks/application/README.md) + +* [getApiV1ApplicationsId](docs/sdks/application/README.md#getapiv1applicationsid) +* [putApiV1ApplicationsId](docs/sdks/application/README.md#putapiv1applicationsid) +* [deleteApiV1ApplicationsId](docs/sdks/application/README.md#deleteapiv1applicationsid) +* [getApiV1Applications](docs/sdks/application/README.md#getapiv1applications) +* [postApiV1Applications](docs/sdks/application/README.md#postapiv1applications) +* [putApiV1ApplicationsBulk](docs/sdks/application/README.md#putapiv1applicationsbulk) +* [deleteApiV1ApplicationsBulk](docs/sdks/application/README.md#deleteapiv1applicationsbulk) +* [getApiV1ApplicationsSchema](docs/sdks/application/README.md#getapiv1applicationsschema) +* [postApiV1ApplicationsTest](docs/sdks/application/README.md#postapiv1applicationstest) +* [postApiV1ApplicationsTestall](docs/sdks/application/README.md#postapiv1applicationstestall) +* [postApiV1ApplicationsActionName](docs/sdks/application/README.md#postapiv1applicationsactionname) + +### [appProfile](docs/sdks/appprofile/README.md) + +* [postApiV1Appprofile](docs/sdks/appprofile/README.md#postapiv1appprofile) +* [getApiV1Appprofile](docs/sdks/appprofile/README.md#getapiv1appprofile) +* [deleteApiV1AppprofileId](docs/sdks/appprofile/README.md#deleteapiv1appprofileid) +* [putApiV1AppprofileId](docs/sdks/appprofile/README.md#putapiv1appprofileid) +* [getApiV1AppprofileId](docs/sdks/appprofile/README.md#getapiv1appprofileid) +* [getApiV1AppprofileSchema](docs/sdks/appprofile/README.md#getapiv1appprofileschema) + +### [authentication](docs/sdks/authentication/README.md) + +* [getLogout](docs/sdks/authentication/README.md#getlogout) + +### [backup](docs/sdks/backup/README.md) + +* [getApiV1SystemBackup](docs/sdks/backup/README.md#getapiv1systembackup) +* [deleteApiV1SystemBackupId](docs/sdks/backup/README.md#deleteapiv1systembackupid) +* [postApiV1SystemBackupRestoreId](docs/sdks/backup/README.md#postapiv1systembackuprestoreid) +* [postApiV1SystemBackupRestoreUpload](docs/sdks/backup/README.md#postapiv1systembackuprestoreupload) + +### [command](docs/sdks/command/README.md) + +* [getApiV1CommandId](docs/sdks/command/README.md#getapiv1commandid) +* [deleteApiV1CommandId](docs/sdks/command/README.md#deleteapiv1commandid) +* [postApiV1Command](docs/sdks/command/README.md#postapiv1command) +* [getApiV1Command](docs/sdks/command/README.md#getapiv1command) + +### [customFilter](docs/sdks/customfilter/README.md) + +* [getApiV1CustomfilterId](docs/sdks/customfilter/README.md#getapiv1customfilterid) +* [putApiV1CustomfilterId](docs/sdks/customfilter/README.md#putapiv1customfilterid) +* [deleteApiV1CustomfilterId](docs/sdks/customfilter/README.md#deleteapiv1customfilterid) +* [getApiV1Customfilter](docs/sdks/customfilter/README.md#getapiv1customfilter) +* [postApiV1Customfilter](docs/sdks/customfilter/README.md#postapiv1customfilter) + +### [developmentConfig](docs/sdks/developmentconfig/README.md) + +* [putApiV1ConfigDevelopmentId](docs/sdks/developmentconfig/README.md#putapiv1configdevelopmentid) +* [getApiV1ConfigDevelopmentId](docs/sdks/developmentconfig/README.md#getapiv1configdevelopmentid) +* [getApiV1ConfigDevelopment](docs/sdks/developmentconfig/README.md#getapiv1configdevelopment) + +### [downloadClient](docs/sdks/downloadclient/README.md) + +* [getApiV1DownloadclientId](docs/sdks/downloadclient/README.md#getapiv1downloadclientid) +* [putApiV1DownloadclientId](docs/sdks/downloadclient/README.md#putapiv1downloadclientid) +* [deleteApiV1DownloadclientId](docs/sdks/downloadclient/README.md#deleteapiv1downloadclientid) +* [getApiV1Downloadclient](docs/sdks/downloadclient/README.md#getapiv1downloadclient) +* [postApiV1Downloadclient](docs/sdks/downloadclient/README.md#postapiv1downloadclient) +* [putApiV1DownloadclientBulk](docs/sdks/downloadclient/README.md#putapiv1downloadclientbulk) +* [deleteApiV1DownloadclientBulk](docs/sdks/downloadclient/README.md#deleteapiv1downloadclientbulk) +* [getApiV1DownloadclientSchema](docs/sdks/downloadclient/README.md#getapiv1downloadclientschema) +* [postApiV1DownloadclientTest](docs/sdks/downloadclient/README.md#postapiv1downloadclienttest) +* [postApiV1DownloadclientTestall](docs/sdks/downloadclient/README.md#postapiv1downloadclienttestall) +* [postApiV1DownloadclientActionName](docs/sdks/downloadclient/README.md#postapiv1downloadclientactionname) + +### [downloadClientConfig](docs/sdks/downloadclientconfig/README.md) + +* [getApiV1ConfigDownloadclientId](docs/sdks/downloadclientconfig/README.md#getapiv1configdownloadclientid) +* [putApiV1ConfigDownloadclientId](docs/sdks/downloadclientconfig/README.md#putapiv1configdownloadclientid) +* [getApiV1ConfigDownloadclient](docs/sdks/downloadclientconfig/README.md#getapiv1configdownloadclient) + +### [fileSystem](docs/sdks/filesystem/README.md) + +* [getApiV1Filesystem](docs/sdks/filesystem/README.md#getapiv1filesystem) +* [getApiV1FilesystemType](docs/sdks/filesystem/README.md#getapiv1filesystemtype) + +### [health](docs/sdks/health/README.md) + +* [getApiV1Health](docs/sdks/health/README.md#getapiv1health) + +### [history](docs/sdks/history/README.md) + +* [getApiV1History](docs/sdks/history/README.md#getapiv1history) +* [getApiV1HistorySince](docs/sdks/history/README.md#getapiv1historysince) +* [getApiV1HistoryIndexer](docs/sdks/history/README.md#getapiv1historyindexer) + +### [hostConfig](docs/sdks/hostconfig/README.md) + +* [getApiV1ConfigHostId](docs/sdks/hostconfig/README.md#getapiv1confighostid) +* [putApiV1ConfigHostId](docs/sdks/hostconfig/README.md#putapiv1confighostid) +* [getApiV1ConfigHost](docs/sdks/hostconfig/README.md#getapiv1confighost) + +### [indexer](docs/sdks/indexer/README.md) + +* [getApiV1IndexerId](docs/sdks/indexer/README.md#getapiv1indexerid) +* [putApiV1IndexerId](docs/sdks/indexer/README.md#putapiv1indexerid) +* [deleteApiV1IndexerId](docs/sdks/indexer/README.md#deleteapiv1indexerid) +* [getApiV1Indexer](docs/sdks/indexer/README.md#getapiv1indexer) +* [postApiV1Indexer](docs/sdks/indexer/README.md#postapiv1indexer) +* [putApiV1IndexerBulk](docs/sdks/indexer/README.md#putapiv1indexerbulk) +* [deleteApiV1IndexerBulk](docs/sdks/indexer/README.md#deleteapiv1indexerbulk) +* [getApiV1IndexerSchema](docs/sdks/indexer/README.md#getapiv1indexerschema) +* [postApiV1IndexerTest](docs/sdks/indexer/README.md#postapiv1indexertest) +* [postApiV1IndexerTestall](docs/sdks/indexer/README.md#postapiv1indexertestall) +* [postApiV1IndexerActionName](docs/sdks/indexer/README.md#postapiv1indexeractionname) + +### [indexerDefaultCategories](docs/sdks/indexerdefaultcategories/README.md) + +* [getApiV1IndexerCategories](docs/sdks/indexerdefaultcategories/README.md#getapiv1indexercategories) + +### [indexerProxy](docs/sdks/indexerproxy/README.md) + +* [getApiV1IndexerproxyId](docs/sdks/indexerproxy/README.md#getapiv1indexerproxyid) +* [putApiV1IndexerproxyId](docs/sdks/indexerproxy/README.md#putapiv1indexerproxyid) +* [deleteApiV1IndexerproxyId](docs/sdks/indexerproxy/README.md#deleteapiv1indexerproxyid) +* [getApiV1Indexerproxy](docs/sdks/indexerproxy/README.md#getapiv1indexerproxy) +* [postApiV1Indexerproxy](docs/sdks/indexerproxy/README.md#postapiv1indexerproxy) +* [getApiV1IndexerproxySchema](docs/sdks/indexerproxy/README.md#getapiv1indexerproxyschema) +* [postApiV1IndexerproxyTest](docs/sdks/indexerproxy/README.md#postapiv1indexerproxytest) +* [postApiV1IndexerproxyTestall](docs/sdks/indexerproxy/README.md#postapiv1indexerproxytestall) +* [postApiV1IndexerproxyActionName](docs/sdks/indexerproxy/README.md#postapiv1indexerproxyactionname) + +### [indexerStats](docs/sdks/indexerstats/README.md) + +* [getApiV1Indexerstats](docs/sdks/indexerstats/README.md#getapiv1indexerstats) + +### [indexerStatus](docs/sdks/indexerstatus/README.md) + +* [getApiV1Indexerstatus](docs/sdks/indexerstatus/README.md#getapiv1indexerstatus) + +### [localization](docs/sdks/localization/README.md) + +* [getApiV1Localization](docs/sdks/localization/README.md#getapiv1localization) +* [getApiV1LocalizationOptions](docs/sdks/localization/README.md#getapiv1localizationoptions) + +### [log](docs/sdks/log/README.md) + +* [getApiV1Log](docs/sdks/log/README.md#getapiv1log) + +### [logFile](docs/sdks/logfile/README.md) + +* [getApiV1LogFile](docs/sdks/logfile/README.md#getapiv1logfile) +* [getApiV1LogFileFilename](docs/sdks/logfile/README.md#getapiv1logfilefilename) + +### [newznab](docs/sdks/newznab/README.md) + +* [getApiV1IndexerIdNewznab](docs/sdks/newznab/README.md#getapiv1indexeridnewznab) +* [getIdApi](docs/sdks/newznab/README.md#getidapi) +* [getApiV1IndexerIdDownload](docs/sdks/newznab/README.md#getapiv1indexeriddownload) +* [getIdDownload](docs/sdks/newznab/README.md#getiddownload) + +### [notification](docs/sdks/notification/README.md) + +* [getApiV1NotificationId](docs/sdks/notification/README.md#getapiv1notificationid) +* [putApiV1NotificationId](docs/sdks/notification/README.md#putapiv1notificationid) +* [deleteApiV1NotificationId](docs/sdks/notification/README.md#deleteapiv1notificationid) +* [getApiV1Notification](docs/sdks/notification/README.md#getapiv1notification) +* [postApiV1Notification](docs/sdks/notification/README.md#postapiv1notification) +* [getApiV1NotificationSchema](docs/sdks/notification/README.md#getapiv1notificationschema) +* [postApiV1NotificationTest](docs/sdks/notification/README.md#postapiv1notificationtest) +* [postApiV1NotificationTestall](docs/sdks/notification/README.md#postapiv1notificationtestall) +* [postApiV1NotificationActionName](docs/sdks/notification/README.md#postapiv1notificationactionname) + +### [ping](docs/sdks/ping/README.md) + +* [getPing](docs/sdks/ping/README.md#getping) +* [headPing](docs/sdks/ping/README.md#headping) + + +### [search](docs/sdks/search/README.md) + +* [postApiV1Search](docs/sdks/search/README.md#postapiv1search) +* [getApiV1Search](docs/sdks/search/README.md#getapiv1search) +* [postApiV1SearchBulk](docs/sdks/search/README.md#postapiv1searchbulk) + +### [staticResource](docs/sdks/staticresource/README.md) + +* [getLogin](docs/sdks/staticresource/README.md#getlogin) +* [getContentPath](docs/sdks/staticresource/README.md#getcontentpath) +* [get](docs/sdks/staticresource/README.md#get) +* [getPath](docs/sdks/staticresource/README.md#getpath) + +### [system](docs/sdks/system/README.md) + +* [getApiV1SystemStatus](docs/sdks/system/README.md#getapiv1systemstatus) +* [getApiV1SystemRoutes](docs/sdks/system/README.md#getapiv1systemroutes) +* [getApiV1SystemRoutesDuplicate](docs/sdks/system/README.md#getapiv1systemroutesduplicate) +* [postApiV1SystemShutdown](docs/sdks/system/README.md#postapiv1systemshutdown) +* [postApiV1SystemRestart](docs/sdks/system/README.md#postapiv1systemrestart) + +### [tag](docs/sdks/tag/README.md) + +* [getApiV1TagId](docs/sdks/tag/README.md#getapiv1tagid) +* [putApiV1TagId](docs/sdks/tag/README.md#putapiv1tagid) +* [deleteApiV1TagId](docs/sdks/tag/README.md#deleteapiv1tagid) +* [getApiV1Tag](docs/sdks/tag/README.md#getapiv1tag) +* [postApiV1Tag](docs/sdks/tag/README.md#postapiv1tag) + +### [tagDetails](docs/sdks/tagdetails/README.md) + +* [getApiV1TagDetailId](docs/sdks/tagdetails/README.md#getapiv1tagdetailid) +* [getApiV1TagDetail](docs/sdks/tagdetails/README.md#getapiv1tagdetail) + +### [task](docs/sdks/task/README.md) + +* [getApiV1SystemTask](docs/sdks/task/README.md#getapiv1systemtask) +* [getApiV1SystemTaskId](docs/sdks/task/README.md#getapiv1systemtaskid) + +### [uiConfig](docs/sdks/uiconfig/README.md) + +* [putApiV1ConfigUiId](docs/sdks/uiconfig/README.md#putapiv1configuiid) +* [getApiV1ConfigUiId](docs/sdks/uiconfig/README.md#getapiv1configuiid) +* [getApiV1ConfigUi](docs/sdks/uiconfig/README.md#getapiv1configui) + +### [update](docs/sdks/update/README.md) + +* [getApiV1Update](docs/sdks/update/README.md#getapiv1update) + +### [updateLogFile](docs/sdks/updatelogfile/README.md) + +* [getApiV1LogFileUpdate](docs/sdks/updatelogfile/README.md#getapiv1logfileupdate) +* [getApiV1LogFileUpdateFilename](docs/sdks/updatelogfile/README.md#getapiv1logfileupdatefilename) + +
+ + + +## Standalone functions + +All the methods listed above are available as standalone functions. These +functions are ideal for use in applications running in the browser, serverless +runtimes or other environments where application bundle size is a primary +concern. When using a bundler to build your application, all unused +functionality will be either excluded from the final bundle or tree-shaken away. + +To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). + +
+ +Available standalone functions + +- [`apiInfoGetApi`](docs/sdks/apiinfo/README.md#getapi) +- [`applicationDeleteApiV1ApplicationsBulk`](docs/sdks/application/README.md#deleteapiv1applicationsbulk) +- [`applicationDeleteApiV1ApplicationsId`](docs/sdks/application/README.md#deleteapiv1applicationsid) +- [`applicationGetApiV1Applications`](docs/sdks/application/README.md#getapiv1applications) +- [`applicationGetApiV1ApplicationsId`](docs/sdks/application/README.md#getapiv1applicationsid) +- [`applicationGetApiV1ApplicationsSchema`](docs/sdks/application/README.md#getapiv1applicationsschema) +- [`applicationPostApiV1Applications`](docs/sdks/application/README.md#postapiv1applications) +- [`applicationPostApiV1ApplicationsActionName`](docs/sdks/application/README.md#postapiv1applicationsactionname) +- [`applicationPostApiV1ApplicationsTest`](docs/sdks/application/README.md#postapiv1applicationstest) +- [`applicationPostApiV1ApplicationsTestall`](docs/sdks/application/README.md#postapiv1applicationstestall) +- [`applicationPutApiV1ApplicationsBulk`](docs/sdks/application/README.md#putapiv1applicationsbulk) +- [`applicationPutApiV1ApplicationsId`](docs/sdks/application/README.md#putapiv1applicationsid) +- [`appProfileDeleteApiV1AppprofileId`](docs/sdks/appprofile/README.md#deleteapiv1appprofileid) +- [`appProfileGetApiV1Appprofile`](docs/sdks/appprofile/README.md#getapiv1appprofile) +- [`appProfileGetApiV1AppprofileId`](docs/sdks/appprofile/README.md#getapiv1appprofileid) +- [`appProfileGetApiV1AppprofileSchema`](docs/sdks/appprofile/README.md#getapiv1appprofileschema) +- [`appProfilePostApiV1Appprofile`](docs/sdks/appprofile/README.md#postapiv1appprofile) +- [`appProfilePutApiV1AppprofileId`](docs/sdks/appprofile/README.md#putapiv1appprofileid) +- [`authenticationGetLogout`](docs/sdks/authentication/README.md#getlogout) +- [`backupDeleteApiV1SystemBackupId`](docs/sdks/backup/README.md#deleteapiv1systembackupid) +- [`backupGetApiV1SystemBackup`](docs/sdks/backup/README.md#getapiv1systembackup) +- [`backupPostApiV1SystemBackupRestoreId`](docs/sdks/backup/README.md#postapiv1systembackuprestoreid) +- [`backupPostApiV1SystemBackupRestoreUpload`](docs/sdks/backup/README.md#postapiv1systembackuprestoreupload) +- [`commandDeleteApiV1CommandId`](docs/sdks/command/README.md#deleteapiv1commandid) +- [`commandGetApiV1Command`](docs/sdks/command/README.md#getapiv1command) +- [`commandGetApiV1CommandId`](docs/sdks/command/README.md#getapiv1commandid) +- [`commandPostApiV1Command`](docs/sdks/command/README.md#postapiv1command) +- [`customFilterDeleteApiV1CustomfilterId`](docs/sdks/customfilter/README.md#deleteapiv1customfilterid) +- [`customFilterGetApiV1Customfilter`](docs/sdks/customfilter/README.md#getapiv1customfilter) +- [`customFilterGetApiV1CustomfilterId`](docs/sdks/customfilter/README.md#getapiv1customfilterid) +- [`customFilterPostApiV1Customfilter`](docs/sdks/customfilter/README.md#postapiv1customfilter) +- [`customFilterPutApiV1CustomfilterId`](docs/sdks/customfilter/README.md#putapiv1customfilterid) +- [`developmentConfigGetApiV1ConfigDevelopment`](docs/sdks/developmentconfig/README.md#getapiv1configdevelopment) +- [`developmentConfigGetApiV1ConfigDevelopmentId`](docs/sdks/developmentconfig/README.md#getapiv1configdevelopmentid) +- [`developmentConfigPutApiV1ConfigDevelopmentId`](docs/sdks/developmentconfig/README.md#putapiv1configdevelopmentid) +- [`downloadClientConfigGetApiV1ConfigDownloadclient`](docs/sdks/downloadclientconfig/README.md#getapiv1configdownloadclient) +- [`downloadClientConfigGetApiV1ConfigDownloadclientId`](docs/sdks/downloadclientconfig/README.md#getapiv1configdownloadclientid) +- [`downloadClientConfigPutApiV1ConfigDownloadclientId`](docs/sdks/downloadclientconfig/README.md#putapiv1configdownloadclientid) +- [`downloadClientDeleteApiV1DownloadclientBulk`](docs/sdks/downloadclient/README.md#deleteapiv1downloadclientbulk) +- [`downloadClientDeleteApiV1DownloadclientId`](docs/sdks/downloadclient/README.md#deleteapiv1downloadclientid) +- [`downloadClientGetApiV1Downloadclient`](docs/sdks/downloadclient/README.md#getapiv1downloadclient) +- [`downloadClientGetApiV1DownloadclientId`](docs/sdks/downloadclient/README.md#getapiv1downloadclientid) +- [`downloadClientGetApiV1DownloadclientSchema`](docs/sdks/downloadclient/README.md#getapiv1downloadclientschema) +- [`downloadClientPostApiV1Downloadclient`](docs/sdks/downloadclient/README.md#postapiv1downloadclient) +- [`downloadClientPostApiV1DownloadclientActionName`](docs/sdks/downloadclient/README.md#postapiv1downloadclientactionname) +- [`downloadClientPostApiV1DownloadclientTest`](docs/sdks/downloadclient/README.md#postapiv1downloadclienttest) +- [`downloadClientPostApiV1DownloadclientTestall`](docs/sdks/downloadclient/README.md#postapiv1downloadclienttestall) +- [`downloadClientPutApiV1DownloadclientBulk`](docs/sdks/downloadclient/README.md#putapiv1downloadclientbulk) +- [`downloadClientPutApiV1DownloadclientId`](docs/sdks/downloadclient/README.md#putapiv1downloadclientid) +- [`fileSystemGetApiV1Filesystem`](docs/sdks/filesystem/README.md#getapiv1filesystem) +- [`fileSystemGetApiV1FilesystemType`](docs/sdks/filesystem/README.md#getapiv1filesystemtype) +- [`healthGetApiV1Health`](docs/sdks/health/README.md#getapiv1health) +- [`historyGetApiV1History`](docs/sdks/history/README.md#getapiv1history) +- [`historyGetApiV1HistoryIndexer`](docs/sdks/history/README.md#getapiv1historyindexer) +- [`historyGetApiV1HistorySince`](docs/sdks/history/README.md#getapiv1historysince) +- [`hostConfigGetApiV1ConfigHost`](docs/sdks/hostconfig/README.md#getapiv1confighost) +- [`hostConfigGetApiV1ConfigHostId`](docs/sdks/hostconfig/README.md#getapiv1confighostid) +- [`hostConfigPutApiV1ConfigHostId`](docs/sdks/hostconfig/README.md#putapiv1confighostid) +- [`indexerDefaultCategoriesGetApiV1IndexerCategories`](docs/sdks/indexerdefaultcategories/README.md#getapiv1indexercategories) +- [`indexerDeleteApiV1IndexerBulk`](docs/sdks/indexer/README.md#deleteapiv1indexerbulk) +- [`indexerDeleteApiV1IndexerId`](docs/sdks/indexer/README.md#deleteapiv1indexerid) +- [`indexerGetApiV1Indexer`](docs/sdks/indexer/README.md#getapiv1indexer) +- [`indexerGetApiV1IndexerId`](docs/sdks/indexer/README.md#getapiv1indexerid) +- [`indexerGetApiV1IndexerSchema`](docs/sdks/indexer/README.md#getapiv1indexerschema) +- [`indexerPostApiV1Indexer`](docs/sdks/indexer/README.md#postapiv1indexer) +- [`indexerPostApiV1IndexerActionName`](docs/sdks/indexer/README.md#postapiv1indexeractionname) +- [`indexerPostApiV1IndexerTest`](docs/sdks/indexer/README.md#postapiv1indexertest) +- [`indexerPostApiV1IndexerTestall`](docs/sdks/indexer/README.md#postapiv1indexertestall) +- [`indexerProxyDeleteApiV1IndexerproxyId`](docs/sdks/indexerproxy/README.md#deleteapiv1indexerproxyid) +- [`indexerProxyGetApiV1Indexerproxy`](docs/sdks/indexerproxy/README.md#getapiv1indexerproxy) +- [`indexerProxyGetApiV1IndexerproxyId`](docs/sdks/indexerproxy/README.md#getapiv1indexerproxyid) +- [`indexerProxyGetApiV1IndexerproxySchema`](docs/sdks/indexerproxy/README.md#getapiv1indexerproxyschema) +- [`indexerProxyPostApiV1Indexerproxy`](docs/sdks/indexerproxy/README.md#postapiv1indexerproxy) +- [`indexerProxyPostApiV1IndexerproxyActionName`](docs/sdks/indexerproxy/README.md#postapiv1indexerproxyactionname) +- [`indexerProxyPostApiV1IndexerproxyTest`](docs/sdks/indexerproxy/README.md#postapiv1indexerproxytest) +- [`indexerProxyPostApiV1IndexerproxyTestall`](docs/sdks/indexerproxy/README.md#postapiv1indexerproxytestall) +- [`indexerProxyPutApiV1IndexerproxyId`](docs/sdks/indexerproxy/README.md#putapiv1indexerproxyid) +- [`indexerPutApiV1IndexerBulk`](docs/sdks/indexer/README.md#putapiv1indexerbulk) +- [`indexerPutApiV1IndexerId`](docs/sdks/indexer/README.md#putapiv1indexerid) +- [`indexerStatsGetApiV1Indexerstats`](docs/sdks/indexerstats/README.md#getapiv1indexerstats) +- [`indexerStatusGetApiV1Indexerstatus`](docs/sdks/indexerstatus/README.md#getapiv1indexerstatus) +- [`localizationGetApiV1Localization`](docs/sdks/localization/README.md#getapiv1localization) +- [`localizationGetApiV1LocalizationOptions`](docs/sdks/localization/README.md#getapiv1localizationoptions) +- [`logFileGetApiV1LogFile`](docs/sdks/logfile/README.md#getapiv1logfile) +- [`logFileGetApiV1LogFileFilename`](docs/sdks/logfile/README.md#getapiv1logfilefilename) +- [`logGetApiV1Log`](docs/sdks/log/README.md#getapiv1log) +- [`newznabGetApiV1IndexerIdDownload`](docs/sdks/newznab/README.md#getapiv1indexeriddownload) +- [`newznabGetApiV1IndexerIdNewznab`](docs/sdks/newznab/README.md#getapiv1indexeridnewznab) +- [`newznabGetIdApi`](docs/sdks/newznab/README.md#getidapi) +- [`newznabGetIdDownload`](docs/sdks/newznab/README.md#getiddownload) +- [`notificationDeleteApiV1NotificationId`](docs/sdks/notification/README.md#deleteapiv1notificationid) +- [`notificationGetApiV1Notification`](docs/sdks/notification/README.md#getapiv1notification) +- [`notificationGetApiV1NotificationId`](docs/sdks/notification/README.md#getapiv1notificationid) +- [`notificationGetApiV1NotificationSchema`](docs/sdks/notification/README.md#getapiv1notificationschema) +- [`notificationPostApiV1Notification`](docs/sdks/notification/README.md#postapiv1notification) +- [`notificationPostApiV1NotificationActionName`](docs/sdks/notification/README.md#postapiv1notificationactionname) +- [`notificationPostApiV1NotificationTest`](docs/sdks/notification/README.md#postapiv1notificationtest) +- [`notificationPostApiV1NotificationTestall`](docs/sdks/notification/README.md#postapiv1notificationtestall) +- [`notificationPutApiV1NotificationId`](docs/sdks/notification/README.md#putapiv1notificationid) +- [`pingGetPing`](docs/sdks/ping/README.md#getping) +- [`pingHeadPing`](docs/sdks/ping/README.md#headping) +- [`searchGetApiV1Search`](docs/sdks/search/README.md#getapiv1search) +- [`searchPostApiV1Search`](docs/sdks/search/README.md#postapiv1search) +- [`searchPostApiV1SearchBulk`](docs/sdks/search/README.md#postapiv1searchbulk) +- [`staticResourceGet`](docs/sdks/staticresource/README.md#get) +- [`staticResourceGetContentPath`](docs/sdks/staticresource/README.md#getcontentpath) +- [`staticResourceGetLogin`](docs/sdks/staticresource/README.md#getlogin) +- [`staticResourceGetPath`](docs/sdks/staticresource/README.md#getpath) +- [`systemGetApiV1SystemRoutes`](docs/sdks/system/README.md#getapiv1systemroutes) +- [`systemGetApiV1SystemRoutesDuplicate`](docs/sdks/system/README.md#getapiv1systemroutesduplicate) +- [`systemGetApiV1SystemStatus`](docs/sdks/system/README.md#getapiv1systemstatus) +- [`systemPostApiV1SystemRestart`](docs/sdks/system/README.md#postapiv1systemrestart) +- [`systemPostApiV1SystemShutdown`](docs/sdks/system/README.md#postapiv1systemshutdown) +- [`tagDeleteApiV1TagId`](docs/sdks/tag/README.md#deleteapiv1tagid) +- [`tagDetailsGetApiV1TagDetail`](docs/sdks/tagdetails/README.md#getapiv1tagdetail) +- [`tagDetailsGetApiV1TagDetailId`](docs/sdks/tagdetails/README.md#getapiv1tagdetailid) +- [`tagGetApiV1Tag`](docs/sdks/tag/README.md#getapiv1tag) +- [`tagGetApiV1TagId`](docs/sdks/tag/README.md#getapiv1tagid) +- [`tagPostApiV1Tag`](docs/sdks/tag/README.md#postapiv1tag) +- [`tagPutApiV1TagId`](docs/sdks/tag/README.md#putapiv1tagid) +- [`taskGetApiV1SystemTask`](docs/sdks/task/README.md#getapiv1systemtask) +- [`taskGetApiV1SystemTaskId`](docs/sdks/task/README.md#getapiv1systemtaskid) +- [`uiConfigGetApiV1ConfigUi`](docs/sdks/uiconfig/README.md#getapiv1configui) +- [`uiConfigGetApiV1ConfigUiId`](docs/sdks/uiconfig/README.md#getapiv1configuiid) +- [`uiConfigPutApiV1ConfigUiId`](docs/sdks/uiconfig/README.md#putapiv1configuiid) +- [`updateGetApiV1Update`](docs/sdks/update/README.md#getapiv1update) +- [`updateLogFileGetApiV1LogFileUpdate`](docs/sdks/updatelogfile/README.md#getapiv1logfileupdate) +- [`updateLogFileGetApiV1LogFileUpdateFilename`](docs/sdks/updatelogfile/README.md#getapiv1logfileupdatefilename) + +
+ + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); + + // Handle the result + console.log(result); +} + +run(); + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Error Handling + +If the request fails due to, for example 4XX or 5XX status codes, it will throw a `APIError`. + +| Error Type | Status Code | Content Type | +| --------------- | ----------- | ------------ | +| errors.APIError | 4XX, 5XX | \*/\* | + +```typescript +import { Prowlarr } from "prowlarr"; +import { SDKValidationError } from "prowlarr/models/errors"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + let result; + try { + result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); + } catch (err) { + switch (true) { + // The server response does not match the expected SDK schema + case (err instanceof SDKValidationError): + { + // Pretty-print will provide a human-readable multi-line error message + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + apierror.js; + // Server returned an error status code or an unknown content type + case (err instanceof APIError): { + console.error(err.statusCode); + console.error(err.rawResponse.body); + return; + } + default: { + // Other errors such as network errors, see HTTPClientErrors for more details + throw err; + } + } + } +} + +run(); + +``` + +Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging. + +In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module: + +| HTTP Client Error | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | +| RequestAbortedError | HTTP request was aborted by the client | +| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | +| ConnectionError | HTTP client was unable to make a request to a server | +| InvalidRequestError | Any input used to create a request is invalid | +| UnexpectedClientError | Unrecognised or unexpected error | + + + +## Server Selection + +### Server Variables + +The default server `{protocol}://{hostpath}` contains variables and is set to `http://localhost:9696` by default. To override default values, the following parameters are available when initializing the SDK client instance: + +| Variable | Parameter | Supported Values | Default | Description | +| ---------- | --------------------------------- | -------------------------- | ------------------ | ----------- | +| `protocol` | `protocol: models.ServerProtocol` | - `"http"`
- `"https"` | `"http"` | | +| `hostpath` | `hostpath: string` | string | `"localhost:9696"` | | + +#### Example + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + protocol: "https", + hostpath: "", + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + +### Override Server URL Per-Client + +The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + serverURL: "http://localhost:9696", + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + + + +## Custom HTTP Client + +The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native +[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This +client is a thin wrapper around `fetch` and provides the ability to attach hooks +around the request lifecycle that can be used to modify the request or handle +errors and response. + +The `HTTPClient` constructor takes an optional `fetcher` argument that can be +used to integrate a third-party HTTP client or when writing tests to mock out +the HTTP client and feed in fixtures. + +The following example shows how to use the `"beforeRequest"` hook to to add a +custom header and a timeout to requests and how to use the `"requestError"` hook +to log errors: + +```typescript +import { Prowlarr } from "prowlarr"; +import { HTTPClient } from "prowlarr/lib/http"; + +const httpClient = new HTTPClient({ + // fetcher takes a function that has the same signature as native `fetch`. + fetcher: (request) => { + return fetch(request); + } +}); + +httpClient.addHook("beforeRequest", (request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000) + }); + + nextRequest.headers.set("x-custom-header", "custom value"); + + return nextRequest; +}); + +httpClient.addHook("requestError", (error, request) => { + console.group("Request Error"); + console.log("Reason:", `${error}`); + console.log("Endpoint:", `${request.method} ${request.url}`); + console.groupEnd(); +}); + +const sdk = new Prowlarr({ httpClient }); +``` + + + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass a logger that matches `console`'s interface as an SDK option. + +> [!WARNING] +> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production. + +```typescript +import { Prowlarr } from "prowlarr"; + +const sdk = new Prowlarr({ debugLogger: console }); +``` + +You can also enable a default debug logger by setting an environment variable `PROWLARR_DEBUG` to true. + + + diff --git a/RUNTIMES.md b/RUNTIMES.md new file mode 100644 index 0000000..db7ea94 --- /dev/null +++ b/RUNTIMES.md @@ -0,0 +1,48 @@ +# Supported JavaScript runtimes + +This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: + +* [Web Fetch API][web-fetch] +* [Web Streams API][web-streams] and in particular `ReadableStream` +* [Async iterables][async-iter] using `Symbol.asyncIterator` + +[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API +[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API +[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols + +Runtime environments that are explicitly supported are: + +- Evergreen browsers which include: Chrome, Safari, Edge, Firefox +- Node.js active and maintenance LTS releases + - Currently, this is v18 and v20 +- Bun v1 and above +- Deno v1.39 + - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming]) + +[deno-file-streaming]: https://github.com/denoland/deno/issues/11018 + +## Recommended TypeScript compiler options + +The following `tsconfig.json` options are recommended for projects using this +SDK in order to get static type support for features like async iterables, +streams and `fetch`-related APIs ([`for await...of`][for-await-of], +[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and +so on): + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of +[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal +[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request +[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response + +```jsonc +{ + "compilerOptions": { + "target": "es2020", // or higher + "lib": ["es2020", "dom", "dom.iterable"], + } +} +``` + +While `target` can be set to older ECMAScript versions, it may result in extra, +unnecessary compatibility code being generated if you are not targeting old +runtimes. \ No newline at end of file diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..cbd8f87 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,21 @@ + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); + +``` + \ No newline at end of file diff --git a/docs/lib/utils/retryconfig.md b/docs/lib/utils/retryconfig.md new file mode 100644 index 0000000..08f95f4 --- /dev/null +++ b/docs/lib/utils/retryconfig.md @@ -0,0 +1,24 @@ +# RetryConfig + +Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | +| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | +| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | ------------ | ----------------------------------------- | -------- | +| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | +| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | +| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/docs/models/apiinforesource.md b/docs/models/apiinforesource.md new file mode 100644 index 0000000..f1ecc6f --- /dev/null +++ b/docs/models/apiinforesource.md @@ -0,0 +1,16 @@ +# ApiInfoResource + +## Example Usage + +```typescript +import { ApiInfoResource } from "prowlarr"; + +let value: ApiInfoResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `current` | *string* | :heavy_minus_sign: | N/A | +| `deprecated` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/applicationbulkresource.md b/docs/models/applicationbulkresource.md new file mode 100644 index 0000000..e3d6a2c --- /dev/null +++ b/docs/models/applicationbulkresource.md @@ -0,0 +1,18 @@ +# ApplicationBulkResource + +## Example Usage + +```typescript +import { ApplicationBulkResource } from "prowlarr"; + +let value: ApplicationBulkResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `ids` | *number*[] | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `applyTags` | [models.ApplyTags](../models/applytags.md) | :heavy_minus_sign: | N/A | +| `syncLevel` | [models.ApplicationSyncLevel](../models/applicationsynclevel.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/applicationresource.md b/docs/models/applicationresource.md new file mode 100644 index 0000000..236d4e8 --- /dev/null +++ b/docs/models/applicationresource.md @@ -0,0 +1,26 @@ +# ApplicationResource + +## Example Usage + +```typescript +import { ApplicationResource } from "prowlarr"; + +let value: ApplicationResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.ApplicationResource](../models/applicationresource.md)[] | :heavy_minus_sign: | N/A | +| `syncLevel` | [models.ApplicationSyncLevel](../models/applicationsynclevel.md) | :heavy_minus_sign: | N/A | +| `testCommand` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/applicationsynclevel.md b/docs/models/applicationsynclevel.md new file mode 100644 index 0000000..c1073dc --- /dev/null +++ b/docs/models/applicationsynclevel.md @@ -0,0 +1,15 @@ +# ApplicationSyncLevel + +## Example Usage + +```typescript +import { ApplicationSyncLevel } from "prowlarr"; + +let value: ApplicationSyncLevel = "addOnly"; +``` + +## Values + +```typescript +"disabled" | "addOnly" | "fullSync" +``` \ No newline at end of file diff --git a/docs/models/applytags.md b/docs/models/applytags.md new file mode 100644 index 0000000..fca1c7d --- /dev/null +++ b/docs/models/applytags.md @@ -0,0 +1,15 @@ +# ApplyTags + +## Example Usage + +```typescript +import { ApplyTags } from "prowlarr"; + +let value: ApplyTags = "replace"; +``` + +## Values + +```typescript +"add" | "remove" | "replace" +``` \ No newline at end of file diff --git a/docs/models/appprofileresource.md b/docs/models/appprofileresource.md new file mode 100644 index 0000000..7619acf --- /dev/null +++ b/docs/models/appprofileresource.md @@ -0,0 +1,20 @@ +# AppProfileResource + +## Example Usage + +```typescript +import { AppProfileResource } from "prowlarr"; + +let value: AppProfileResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `enableRss` | *boolean* | :heavy_minus_sign: | N/A | +| `enableAutomaticSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `enableInteractiveSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `minimumSeeders` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/authenticationrequiredtype.md b/docs/models/authenticationrequiredtype.md new file mode 100644 index 0000000..dd0f3b0 --- /dev/null +++ b/docs/models/authenticationrequiredtype.md @@ -0,0 +1,15 @@ +# AuthenticationRequiredType + +## Example Usage + +```typescript +import { AuthenticationRequiredType } from "prowlarr"; + +let value: AuthenticationRequiredType = "enabled"; +``` + +## Values + +```typescript +"enabled" | "disabledForLocalAddresses" +``` \ No newline at end of file diff --git a/docs/models/authenticationtype.md b/docs/models/authenticationtype.md new file mode 100644 index 0000000..ab0d316 --- /dev/null +++ b/docs/models/authenticationtype.md @@ -0,0 +1,15 @@ +# AuthenticationType + +## Example Usage + +```typescript +import { AuthenticationType } from "prowlarr"; + +let value: AuthenticationType = "none"; +``` + +## Values + +```typescript +"none" | "basic" | "forms" | "external" +``` \ No newline at end of file diff --git a/docs/models/backupresource.md b/docs/models/backupresource.md new file mode 100644 index 0000000..b8f69f1 --- /dev/null +++ b/docs/models/backupresource.md @@ -0,0 +1,20 @@ +# BackupResource + +## Example Usage + +```typescript +import { BackupResource } from "prowlarr"; + +let value: BackupResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `path` | *string* | :heavy_minus_sign: | N/A | +| `type` | [models.BackupType](../models/backuptype.md) | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `time` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/backuptype.md b/docs/models/backuptype.md new file mode 100644 index 0000000..7e952ed --- /dev/null +++ b/docs/models/backuptype.md @@ -0,0 +1,15 @@ +# BackupType + +## Example Usage + +```typescript +import { BackupType } from "prowlarr"; + +let value: BackupType = "update"; +``` + +## Values + +```typescript +"scheduled" | "manual" | "update" +``` \ No newline at end of file diff --git a/docs/models/booksearchparam.md b/docs/models/booksearchparam.md new file mode 100644 index 0000000..cb891d8 --- /dev/null +++ b/docs/models/booksearchparam.md @@ -0,0 +1,15 @@ +# BookSearchParam + +## Example Usage + +```typescript +import { BookSearchParam } from "prowlarr"; + +let value: BookSearchParam = "q"; +``` + +## Values + +```typescript +"q" | "title" | "author" | "publisher" | "genre" | "year" +``` \ No newline at end of file diff --git a/docs/models/certificatevalidationtype.md b/docs/models/certificatevalidationtype.md new file mode 100644 index 0000000..48776c8 --- /dev/null +++ b/docs/models/certificatevalidationtype.md @@ -0,0 +1,15 @@ +# CertificateValidationType + +## Example Usage + +```typescript +import { CertificateValidationType } from "prowlarr"; + +let value: CertificateValidationType = "enabled"; +``` + +## Values + +```typescript +"enabled" | "disabledForLocalAddresses" | "disabled" +``` \ No newline at end of file diff --git a/docs/models/command.md b/docs/models/command.md new file mode 100644 index 0000000..897ed41 --- /dev/null +++ b/docs/models/command.md @@ -0,0 +1,26 @@ +# Command + +## Example Usage + +```typescript +import { Command } from "prowlarr"; + +let value: Command = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sendUpdatesToClient` | *boolean* | :heavy_minus_sign: | N/A | +| `updateScheduledTask` | *boolean* | :heavy_minus_sign: | N/A | +| `completionMessage` | *string* | :heavy_minus_sign: | N/A | +| `requiresDiskAccess` | *boolean* | :heavy_minus_sign: | N/A | +| `isExclusive` | *boolean* | :heavy_minus_sign: | N/A | +| `isTypeExclusive` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `lastExecutionTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `lastStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `trigger` | [models.CommandTrigger](../models/commandtrigger.md) | :heavy_minus_sign: | N/A | +| `suppressMessages` | *boolean* | :heavy_minus_sign: | N/A | +| `clientUserAgent` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/commandinput.md b/docs/models/commandinput.md new file mode 100644 index 0000000..8478fa8 --- /dev/null +++ b/docs/models/commandinput.md @@ -0,0 +1,20 @@ +# CommandInput + +## Example Usage + +```typescript +import { CommandInput } from "prowlarr"; + +let value: CommandInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sendUpdatesToClient` | *boolean* | :heavy_minus_sign: | N/A | +| `lastExecutionTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `lastStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `trigger` | [models.CommandTrigger](../models/commandtrigger.md) | :heavy_minus_sign: | N/A | +| `suppressMessages` | *boolean* | :heavy_minus_sign: | N/A | +| `clientUserAgent` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/commandpriority.md b/docs/models/commandpriority.md new file mode 100644 index 0000000..e3b5372 --- /dev/null +++ b/docs/models/commandpriority.md @@ -0,0 +1,15 @@ +# CommandPriority + +## Example Usage + +```typescript +import { CommandPriority } from "prowlarr"; + +let value: CommandPriority = "high"; +``` + +## Values + +```typescript +"normal" | "high" | "low" +``` \ No newline at end of file diff --git a/docs/models/commandresource.md b/docs/models/commandresource.md new file mode 100644 index 0000000..99de671 --- /dev/null +++ b/docs/models/commandresource.md @@ -0,0 +1,32 @@ +# CommandResource + +## Example Usage + +```typescript +import { CommandResource } from "prowlarr"; + +let value: CommandResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `commandName` | *string* | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `body` | [models.Command](../models/command.md) | :heavy_minus_sign: | N/A | +| `priority` | [models.CommandPriority](../models/commandpriority.md) | :heavy_minus_sign: | N/A | +| `status` | [models.CommandStatus](../models/commandstatus.md) | :heavy_minus_sign: | N/A | +| `queued` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `started` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `ended` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `duration` | *string* | :heavy_minus_sign: | N/A | +| `exception` | *string* | :heavy_minus_sign: | N/A | +| `trigger` | [models.CommandTrigger](../models/commandtrigger.md) | :heavy_minus_sign: | N/A | +| `clientUserAgent` | *string* | :heavy_minus_sign: | N/A | +| `stateChangeTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `sendUpdatesToClient` | *boolean* | :heavy_minus_sign: | N/A | +| `updateScheduledTask` | *boolean* | :heavy_minus_sign: | N/A | +| `lastExecutionTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/commandresourceinput.md b/docs/models/commandresourceinput.md new file mode 100644 index 0000000..d160a67 --- /dev/null +++ b/docs/models/commandresourceinput.md @@ -0,0 +1,32 @@ +# CommandResourceInput + +## Example Usage + +```typescript +import { CommandResourceInput } from "prowlarr"; + +let value: CommandResourceInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `commandName` | *string* | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `body` | [models.CommandInput](../models/commandinput.md) | :heavy_minus_sign: | N/A | +| `priority` | [models.CommandPriority](../models/commandpriority.md) | :heavy_minus_sign: | N/A | +| `status` | [models.CommandStatus](../models/commandstatus.md) | :heavy_minus_sign: | N/A | +| `queued` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `started` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `ended` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `duration` | *string* | :heavy_minus_sign: | N/A | +| `exception` | *string* | :heavy_minus_sign: | N/A | +| `trigger` | [models.CommandTrigger](../models/commandtrigger.md) | :heavy_minus_sign: | N/A | +| `clientUserAgent` | *string* | :heavy_minus_sign: | N/A | +| `stateChangeTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `sendUpdatesToClient` | *boolean* | :heavy_minus_sign: | N/A | +| `updateScheduledTask` | *boolean* | :heavy_minus_sign: | N/A | +| `lastExecutionTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/commandstatus.md b/docs/models/commandstatus.md new file mode 100644 index 0000000..19a395c --- /dev/null +++ b/docs/models/commandstatus.md @@ -0,0 +1,15 @@ +# CommandStatus + +## Example Usage + +```typescript +import { CommandStatus } from "prowlarr"; + +let value: CommandStatus = "orphaned"; +``` + +## Values + +```typescript +"queued" | "started" | "completed" | "failed" | "aborted" | "cancelled" | "orphaned" +``` \ No newline at end of file diff --git a/docs/models/commandtrigger.md b/docs/models/commandtrigger.md new file mode 100644 index 0000000..2f04e4b --- /dev/null +++ b/docs/models/commandtrigger.md @@ -0,0 +1,15 @@ +# CommandTrigger + +## Example Usage + +```typescript +import { CommandTrigger } from "prowlarr"; + +let value: CommandTrigger = "unspecified"; +``` + +## Values + +```typescript +"unspecified" | "manual" | "scheduled" +``` \ No newline at end of file diff --git a/docs/models/customfilterresource.md b/docs/models/customfilterresource.md new file mode 100644 index 0000000..d2b8d58 --- /dev/null +++ b/docs/models/customfilterresource.md @@ -0,0 +1,18 @@ +# CustomFilterResource + +## Example Usage + +```typescript +import { CustomFilterResource } from "prowlarr"; + +let value: CustomFilterResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `filters` | Record[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/databasetype.md b/docs/models/databasetype.md new file mode 100644 index 0000000..9a85b84 --- /dev/null +++ b/docs/models/databasetype.md @@ -0,0 +1,15 @@ +# DatabaseType + +## Example Usage + +```typescript +import { DatabaseType } from "prowlarr"; + +let value: DatabaseType = "sqLite"; +``` + +## Values + +```typescript +"sqLite" | "postgreSQL" +``` \ No newline at end of file diff --git a/docs/models/developmentconfigresource.md b/docs/models/developmentconfigresource.md new file mode 100644 index 0000000..b21ecee --- /dev/null +++ b/docs/models/developmentconfigresource.md @@ -0,0 +1,20 @@ +# DevelopmentConfigResource + +## Example Usage + +```typescript +import { DevelopmentConfigResource } from "prowlarr"; + +let value: DevelopmentConfigResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `consoleLogLevel` | *string* | :heavy_minus_sign: | N/A | +| `logSql` | *boolean* | :heavy_minus_sign: | N/A | +| `logIndexerResponse` | *boolean* | :heavy_minus_sign: | N/A | +| `logRotate` | *number* | :heavy_minus_sign: | N/A | +| `filterSentryEvents` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/downloadclientbulkresource.md b/docs/models/downloadclientbulkresource.md new file mode 100644 index 0000000..00d0294 --- /dev/null +++ b/docs/models/downloadclientbulkresource.md @@ -0,0 +1,19 @@ +# DownloadClientBulkResource + +## Example Usage + +```typescript +import { DownloadClientBulkResource } from "prowlarr"; + +let value: DownloadClientBulkResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `ids` | *number*[] | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `applyTags` | [models.ApplyTags](../models/applytags.md) | :heavy_minus_sign: | N/A | +| `enable` | *boolean* | :heavy_minus_sign: | N/A | +| `priority` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/downloadclientcategory.md b/docs/models/downloadclientcategory.md new file mode 100644 index 0000000..a6b2b3e --- /dev/null +++ b/docs/models/downloadclientcategory.md @@ -0,0 +1,16 @@ +# DownloadClientCategory + +## Example Usage + +```typescript +import { DownloadClientCategory } from "prowlarr"; + +let value: DownloadClientCategory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `clientCategory` | *string* | :heavy_minus_sign: | N/A | +| `categories` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/downloadclientconfigresource.md b/docs/models/downloadclientconfigresource.md new file mode 100644 index 0000000..bb09b50 --- /dev/null +++ b/docs/models/downloadclientconfigresource.md @@ -0,0 +1,15 @@ +# DownloadClientConfigResource + +## Example Usage + +```typescript +import { DownloadClientConfigResource } from "prowlarr"; + +let value: DownloadClientConfigResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/downloadclientresource.md b/docs/models/downloadclientresource.md new file mode 100644 index 0000000..4914c49 --- /dev/null +++ b/docs/models/downloadclientresource.md @@ -0,0 +1,29 @@ +# DownloadClientResource + +## Example Usage + +```typescript +import { DownloadClientResource } from "prowlarr"; + +let value: DownloadClientResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.DownloadClientResource](../models/downloadclientresource.md)[] | :heavy_minus_sign: | N/A | +| `enable` | *boolean* | :heavy_minus_sign: | N/A | +| `protocol` | [models.DownloadProtocol](../models/downloadprotocol.md) | :heavy_minus_sign: | N/A | +| `priority` | *number* | :heavy_minus_sign: | N/A | +| `categories` | [models.DownloadClientCategory](../models/downloadclientcategory.md)[] | :heavy_minus_sign: | N/A | +| `supportsCategories` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/downloadprotocol.md b/docs/models/downloadprotocol.md new file mode 100644 index 0000000..8a6dbf1 --- /dev/null +++ b/docs/models/downloadprotocol.md @@ -0,0 +1,15 @@ +# DownloadProtocol + +## Example Usage + +```typescript +import { DownloadProtocol } from "prowlarr"; + +let value: DownloadProtocol = "torrent"; +``` + +## Values + +```typescript +"unknown" | "usenet" | "torrent" +``` \ No newline at end of file diff --git a/docs/models/field.md b/docs/models/field.md new file mode 100644 index 0000000..8039990 --- /dev/null +++ b/docs/models/field.md @@ -0,0 +1,31 @@ +# Field + +## Example Usage + +```typescript +import { Field } from "prowlarr"; + +let value: Field = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `order` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `unit` | *string* | :heavy_minus_sign: | N/A | +| `helpText` | *string* | :heavy_minus_sign: | N/A | +| `helpTextWarning` | *string* | :heavy_minus_sign: | N/A | +| `helpLink` | *string* | :heavy_minus_sign: | N/A | +| `value` | *any* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `advanced` | *boolean* | :heavy_minus_sign: | N/A | +| `selectOptions` | [models.SelectOption](../models/selectoption.md)[] | :heavy_minus_sign: | N/A | +| `selectOptionsProviderAction` | *string* | :heavy_minus_sign: | N/A | +| `section` | *string* | :heavy_minus_sign: | N/A | +| `hidden` | *string* | :heavy_minus_sign: | N/A | +| `privacy` | [models.PrivacyLevel](../models/privacylevel.md) | :heavy_minus_sign: | N/A | +| `placeholder` | *string* | :heavy_minus_sign: | N/A | +| `isFloat` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/healthcheckresult.md b/docs/models/healthcheckresult.md new file mode 100644 index 0000000..570292a --- /dev/null +++ b/docs/models/healthcheckresult.md @@ -0,0 +1,15 @@ +# HealthCheckResult + +## Example Usage + +```typescript +import { HealthCheckResult } from "prowlarr"; + +let value: HealthCheckResult = "warning"; +``` + +## Values + +```typescript +"ok" | "notice" | "warning" | "error" +``` \ No newline at end of file diff --git a/docs/models/healthresource.md b/docs/models/healthresource.md new file mode 100644 index 0000000..3e1d135 --- /dev/null +++ b/docs/models/healthresource.md @@ -0,0 +1,19 @@ +# HealthResource + +## Example Usage + +```typescript +import { HealthResource } from "prowlarr"; + +let value: HealthResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `source` | *string* | :heavy_minus_sign: | N/A | +| `type` | [models.HealthCheckResult](../models/healthcheckresult.md) | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `wikiUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/historyeventtype.md b/docs/models/historyeventtype.md new file mode 100644 index 0000000..115b779 --- /dev/null +++ b/docs/models/historyeventtype.md @@ -0,0 +1,15 @@ +# HistoryEventType + +## Example Usage + +```typescript +import { HistoryEventType } from "prowlarr"; + +let value: HistoryEventType = "indexerRss"; +``` + +## Values + +```typescript +"unknown" | "releaseGrabbed" | "indexerQuery" | "indexerRss" | "indexerAuth" | "indexerInfo" +``` \ No newline at end of file diff --git a/docs/models/historyresource.md b/docs/models/historyresource.md new file mode 100644 index 0000000..053bef3 --- /dev/null +++ b/docs/models/historyresource.md @@ -0,0 +1,21 @@ +# HistoryResource + +## Example Usage + +```typescript +import { HistoryResource } from "prowlarr"; + +let value: HistoryResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `downloadId` | *string* | :heavy_minus_sign: | N/A | +| `successful` | *boolean* | :heavy_minus_sign: | N/A | +| `eventType` | [models.HistoryEventType](../models/historyeventtype.md) | :heavy_minus_sign: | N/A | +| `data` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/historyresourcepagingresource.md b/docs/models/historyresourcepagingresource.md new file mode 100644 index 0000000..ec8b554 --- /dev/null +++ b/docs/models/historyresourcepagingresource.md @@ -0,0 +1,20 @@ +# HistoryResourcePagingResource + +## Example Usage + +```typescript +import { HistoryResourcePagingResource } from "prowlarr"; + +let value: HistoryResourcePagingResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortKey` | *string* | :heavy_minus_sign: | N/A | +| `sortDirection` | [models.SortDirection](../models/sortdirection.md) | :heavy_minus_sign: | N/A | +| `totalRecords` | *number* | :heavy_minus_sign: | N/A | +| `records` | [models.HistoryResource](../models/historyresource.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/hostconfigresource.md b/docs/models/hostconfigresource.md new file mode 100644 index 0000000..20e405a --- /dev/null +++ b/docs/models/hostconfigresource.md @@ -0,0 +1,53 @@ +# HostConfigResource + +## Example Usage + +```typescript +import { HostConfigResource } from "prowlarr"; + +let value: HostConfigResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `bindAddress` | *string* | :heavy_minus_sign: | N/A | +| `port` | *number* | :heavy_minus_sign: | N/A | +| `sslPort` | *number* | :heavy_minus_sign: | N/A | +| `enableSsl` | *boolean* | :heavy_minus_sign: | N/A | +| `launchBrowser` | *boolean* | :heavy_minus_sign: | N/A | +| `authenticationMethod` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `authenticationRequired` | [models.AuthenticationRequiredType](../models/authenticationrequiredtype.md) | :heavy_minus_sign: | N/A | +| `analyticsEnabled` | *boolean* | :heavy_minus_sign: | N/A | +| `username` | *string* | :heavy_minus_sign: | N/A | +| `password` | *string* | :heavy_minus_sign: | N/A | +| `passwordConfirmation` | *string* | :heavy_minus_sign: | N/A | +| `logLevel` | *string* | :heavy_minus_sign: | N/A | +| `logSizeLimit` | *number* | :heavy_minus_sign: | N/A | +| `consoleLogLevel` | *string* | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `apiKey` | *string* | :heavy_minus_sign: | N/A | +| `sslCertPath` | *string* | :heavy_minus_sign: | N/A | +| `sslCertPassword` | *string* | :heavy_minus_sign: | N/A | +| `urlBase` | *string* | :heavy_minus_sign: | N/A | +| `instanceName` | *string* | :heavy_minus_sign: | N/A | +| `applicationUrl` | *string* | :heavy_minus_sign: | N/A | +| `updateAutomatically` | *boolean* | :heavy_minus_sign: | N/A | +| `updateMechanism` | [models.UpdateMechanism](../models/updatemechanism.md) | :heavy_minus_sign: | N/A | +| `updateScriptPath` | *string* | :heavy_minus_sign: | N/A | +| `proxyEnabled` | *boolean* | :heavy_minus_sign: | N/A | +| `proxyType` | [models.ProxyType](../models/proxytype.md) | :heavy_minus_sign: | N/A | +| `proxyHostname` | *string* | :heavy_minus_sign: | N/A | +| `proxyPort` | *number* | :heavy_minus_sign: | N/A | +| `proxyUsername` | *string* | :heavy_minus_sign: | N/A | +| `proxyPassword` | *string* | :heavy_minus_sign: | N/A | +| `proxyBypassFilter` | *string* | :heavy_minus_sign: | N/A | +| `proxyBypassLocalAddresses` | *boolean* | :heavy_minus_sign: | N/A | +| `certificateValidation` | [models.CertificateValidationType](../models/certificatevalidationtype.md) | :heavy_minus_sign: | N/A | +| `backupFolder` | *string* | :heavy_minus_sign: | N/A | +| `backupInterval` | *number* | :heavy_minus_sign: | N/A | +| `backupRetention` | *number* | :heavy_minus_sign: | N/A | +| `historyCleanupDays` | *number* | :heavy_minus_sign: | N/A | +| `trustCgnatIpAddresses` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/hoststatistics.md b/docs/models/hoststatistics.md new file mode 100644 index 0000000..88c01e8 --- /dev/null +++ b/docs/models/hoststatistics.md @@ -0,0 +1,17 @@ +# HostStatistics + +## Example Usage + +```typescript +import { HostStatistics } from "prowlarr"; + +let value: HostStatistics = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `host` | *string* | :heavy_minus_sign: | N/A | +| `numberOfQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfGrabs` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerbulkresource.md b/docs/models/indexerbulkresource.md new file mode 100644 index 0000000..d439300 --- /dev/null +++ b/docs/models/indexerbulkresource.md @@ -0,0 +1,25 @@ +# IndexerBulkResource + +## Example Usage + +```typescript +import { IndexerBulkResource } from "prowlarr"; + +let value: IndexerBulkResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `ids` | *number*[] | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `applyTags` | [models.ApplyTags](../models/applytags.md) | :heavy_minus_sign: | N/A | +| `enable` | *boolean* | :heavy_minus_sign: | N/A | +| `appProfileId` | *number* | :heavy_minus_sign: | N/A | +| `priority` | *number* | :heavy_minus_sign: | N/A | +| `minimumSeeders` | *number* | :heavy_minus_sign: | N/A | +| `seedRatio` | *number* | :heavy_minus_sign: | N/A | +| `seedTime` | *number* | :heavy_minus_sign: | N/A | +| `packSeedTime` | *number* | :heavy_minus_sign: | N/A | +| `preferMagnetUrl` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexercapabilityresource.md b/docs/models/indexercapabilityresource.md new file mode 100644 index 0000000..e73ed87 --- /dev/null +++ b/docs/models/indexercapabilityresource.md @@ -0,0 +1,24 @@ +# IndexerCapabilityResource + +## Example Usage + +```typescript +import { IndexerCapabilityResource } from "prowlarr"; + +let value: IndexerCapabilityResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `limitsMax` | *number* | :heavy_minus_sign: | N/A | +| `limitsDefault` | *number* | :heavy_minus_sign: | N/A | +| `categories` | [models.IndexerCategory](../models/indexercategory.md)[] | :heavy_minus_sign: | N/A | +| `supportsRawSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `searchParams` | [models.SearchParam](../models/searchparam.md)[] | :heavy_minus_sign: | N/A | +| `tvSearchParams` | [models.TvSearchParam](../models/tvsearchparam.md)[] | :heavy_minus_sign: | N/A | +| `movieSearchParams` | [models.MovieSearchParam](../models/moviesearchparam.md)[] | :heavy_minus_sign: | N/A | +| `musicSearchParams` | [models.MusicSearchParam](../models/musicsearchparam.md)[] | :heavy_minus_sign: | N/A | +| `bookSearchParams` | [models.BookSearchParam](../models/booksearchparam.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexercapabilityresourceinput.md b/docs/models/indexercapabilityresourceinput.md new file mode 100644 index 0000000..7bf469c --- /dev/null +++ b/docs/models/indexercapabilityresourceinput.md @@ -0,0 +1,24 @@ +# IndexerCapabilityResourceInput + +## Example Usage + +```typescript +import { IndexerCapabilityResourceInput } from "prowlarr"; + +let value: IndexerCapabilityResourceInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `limitsMax` | *number* | :heavy_minus_sign: | N/A | +| `limitsDefault` | *number* | :heavy_minus_sign: | N/A | +| `categories` | [models.IndexerCategoryInput](../models/indexercategoryinput.md)[] | :heavy_minus_sign: | N/A | +| `supportsRawSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `searchParams` | [models.SearchParam](../models/searchparam.md)[] | :heavy_minus_sign: | N/A | +| `tvSearchParams` | [models.TvSearchParam](../models/tvsearchparam.md)[] | :heavy_minus_sign: | N/A | +| `movieSearchParams` | [models.MovieSearchParam](../models/moviesearchparam.md)[] | :heavy_minus_sign: | N/A | +| `musicSearchParams` | [models.MusicSearchParam](../models/musicsearchparam.md)[] | :heavy_minus_sign: | N/A | +| `bookSearchParams` | [models.BookSearchParam](../models/booksearchparam.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexercategory.md b/docs/models/indexercategory.md new file mode 100644 index 0000000..057de02 --- /dev/null +++ b/docs/models/indexercategory.md @@ -0,0 +1,18 @@ +# IndexerCategory + +## Example Usage + +```typescript +import { IndexerCategory } from "prowlarr"; + +let value: IndexerCategory = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `subCategories` | [models.IndexerCategory](../models/indexercategory.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexercategoryinput.md b/docs/models/indexercategoryinput.md new file mode 100644 index 0000000..e0dee2d --- /dev/null +++ b/docs/models/indexercategoryinput.md @@ -0,0 +1,17 @@ +# IndexerCategoryInput + +## Example Usage + +```typescript +import { IndexerCategoryInput } from "prowlarr"; + +let value: IndexerCategoryInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerprivacy.md b/docs/models/indexerprivacy.md new file mode 100644 index 0000000..b42f79b --- /dev/null +++ b/docs/models/indexerprivacy.md @@ -0,0 +1,15 @@ +# IndexerPrivacy + +## Example Usage + +```typescript +import { IndexerPrivacy } from "prowlarr"; + +let value: IndexerPrivacy = "public"; +``` + +## Values + +```typescript +"public" | "semiPrivate" | "private" +``` \ No newline at end of file diff --git a/docs/models/indexerproxyresource.md b/docs/models/indexerproxyresource.md new file mode 100644 index 0000000..b155880 --- /dev/null +++ b/docs/models/indexerproxyresource.md @@ -0,0 +1,29 @@ +# IndexerProxyResource + +## Example Usage + +```typescript +import { IndexerProxyResource } from "prowlarr"; + +let value: IndexerProxyResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.IndexerProxyResource](../models/indexerproxyresource.md)[] | :heavy_minus_sign: | N/A | +| `link` | *string* | :heavy_minus_sign: | N/A | +| `onHealthIssue` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsOnHealthIssue` | *boolean* | :heavy_minus_sign: | N/A | +| `includeHealthWarnings` | *boolean* | :heavy_minus_sign: | N/A | +| `testCommand` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerresource.md b/docs/models/indexerresource.md new file mode 100644 index 0000000..c7199a7 --- /dev/null +++ b/docs/models/indexerresource.md @@ -0,0 +1,45 @@ +# IndexerResource + +## Example Usage + +```typescript +import { IndexerResource } from "prowlarr"; + +let value: IndexerResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.IndexerResource](../models/indexerresource.md)[] | :heavy_minus_sign: | N/A | +| `indexerUrls` | *string*[] | :heavy_minus_sign: | N/A | +| `legacyUrls` | *string*[] | :heavy_minus_sign: | N/A | +| `definitionName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `encoding` | *string* | :heavy_minus_sign: | N/A | +| `enable` | *boolean* | :heavy_minus_sign: | N/A | +| `redirect` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsRss` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsRedirect` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsPagination` | *boolean* | :heavy_minus_sign: | N/A | +| `appProfileId` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | [models.DownloadProtocol](../models/downloadprotocol.md) | :heavy_minus_sign: | N/A | +| `privacy` | [models.IndexerPrivacy](../models/indexerprivacy.md) | :heavy_minus_sign: | N/A | +| `capabilities` | [models.IndexerCapabilityResource](../models/indexercapabilityresource.md) | :heavy_minus_sign: | N/A | +| `priority` | *number* | :heavy_minus_sign: | N/A | +| `downloadClientId` | *number* | :heavy_minus_sign: | N/A | +| `added` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `status` | [models.IndexerStatusResource](../models/indexerstatusresource.md) | :heavy_minus_sign: | N/A | +| `sortName` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerresourceinput.md b/docs/models/indexerresourceinput.md new file mode 100644 index 0000000..07ef836 --- /dev/null +++ b/docs/models/indexerresourceinput.md @@ -0,0 +1,45 @@ +# IndexerResourceInput + +## Example Usage + +```typescript +import { IndexerResourceInput } from "prowlarr"; + +let value: IndexerResourceInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.IndexerResourceInput](../models/indexerresourceinput.md)[] | :heavy_minus_sign: | N/A | +| `indexerUrls` | *string*[] | :heavy_minus_sign: | N/A | +| `legacyUrls` | *string*[] | :heavy_minus_sign: | N/A | +| `definitionName` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `language` | *string* | :heavy_minus_sign: | N/A | +| `encoding` | *string* | :heavy_minus_sign: | N/A | +| `enable` | *boolean* | :heavy_minus_sign: | N/A | +| `redirect` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsRss` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsSearch` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsRedirect` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsPagination` | *boolean* | :heavy_minus_sign: | N/A | +| `appProfileId` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | [models.DownloadProtocol](../models/downloadprotocol.md) | :heavy_minus_sign: | N/A | +| `privacy` | [models.IndexerPrivacy](../models/indexerprivacy.md) | :heavy_minus_sign: | N/A | +| `capabilities` | [models.IndexerCapabilityResourceInput](../models/indexercapabilityresourceinput.md) | :heavy_minus_sign: | N/A | +| `priority` | *number* | :heavy_minus_sign: | N/A | +| `downloadClientId` | *number* | :heavy_minus_sign: | N/A | +| `added` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `status` | [models.IndexerStatusResource](../models/indexerstatusresource.md) | :heavy_minus_sign: | N/A | +| `sortName` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerstatistics.md b/docs/models/indexerstatistics.md new file mode 100644 index 0000000..0abe867 --- /dev/null +++ b/docs/models/indexerstatistics.md @@ -0,0 +1,26 @@ +# IndexerStatistics + +## Example Usage + +```typescript +import { IndexerStatistics } from "prowlarr"; + +let value: IndexerStatistics = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `indexerName` | *string* | :heavy_minus_sign: | N/A | +| `averageResponseTime` | *number* | :heavy_minus_sign: | N/A | +| `averageGrabResponseTime` | *number* | :heavy_minus_sign: | N/A | +| `numberOfQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfGrabs` | *number* | :heavy_minus_sign: | N/A | +| `numberOfRssQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfAuthQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfFailedQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfFailedGrabs` | *number* | :heavy_minus_sign: | N/A | +| `numberOfFailedRssQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfFailedAuthQueries` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerstatsresource.md b/docs/models/indexerstatsresource.md new file mode 100644 index 0000000..0ffcfe7 --- /dev/null +++ b/docs/models/indexerstatsresource.md @@ -0,0 +1,18 @@ +# IndexerStatsResource + +## Example Usage + +```typescript +import { IndexerStatsResource } from "prowlarr"; + +let value: IndexerStatsResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `indexers` | [models.IndexerStatistics](../models/indexerstatistics.md)[] | :heavy_minus_sign: | N/A | +| `userAgents` | [models.UserAgentStatistics](../models/useragentstatistics.md)[] | :heavy_minus_sign: | N/A | +| `hosts` | [models.HostStatistics](../models/hoststatistics.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/indexerstatusresource.md b/docs/models/indexerstatusresource.md new file mode 100644 index 0000000..9d03328 --- /dev/null +++ b/docs/models/indexerstatusresource.md @@ -0,0 +1,19 @@ +# IndexerStatusResource + +## Example Usage + +```typescript +import { IndexerStatusResource } from "prowlarr"; + +let value: IndexerStatusResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `disabledTill` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `mostRecentFailure` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `initialFailure` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/localizationoption.md b/docs/models/localizationoption.md new file mode 100644 index 0000000..7af2667 --- /dev/null +++ b/docs/models/localizationoption.md @@ -0,0 +1,16 @@ +# LocalizationOption + +## Example Usage + +```typescript +import { LocalizationOption } from "prowlarr"; + +let value: LocalizationOption = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/logfileresource.md b/docs/models/logfileresource.md new file mode 100644 index 0000000..67b47c1 --- /dev/null +++ b/docs/models/logfileresource.md @@ -0,0 +1,19 @@ +# LogFileResource + +## Example Usage + +```typescript +import { LogFileResource } from "prowlarr"; + +let value: LogFileResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `filename` | *string* | :heavy_minus_sign: | N/A | +| `lastWriteTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `contentsUrl` | *string* | :heavy_minus_sign: | N/A | +| `downloadUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/logresource.md b/docs/models/logresource.md new file mode 100644 index 0000000..c1784d0 --- /dev/null +++ b/docs/models/logresource.md @@ -0,0 +1,22 @@ +# LogResource + +## Example Usage + +```typescript +import { LogResource } from "prowlarr"; + +let value: LogResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `time` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `exception` | *string* | :heavy_minus_sign: | N/A | +| `exceptionType` | *string* | :heavy_minus_sign: | N/A | +| `level` | *string* | :heavy_minus_sign: | N/A | +| `logger` | *string* | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `method` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/logresourcepagingresource.md b/docs/models/logresourcepagingresource.md new file mode 100644 index 0000000..879f0fa --- /dev/null +++ b/docs/models/logresourcepagingresource.md @@ -0,0 +1,20 @@ +# LogResourcePagingResource + +## Example Usage + +```typescript +import { LogResourcePagingResource } from "prowlarr"; + +let value: LogResourcePagingResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortKey` | *string* | :heavy_minus_sign: | N/A | +| `sortDirection` | [models.SortDirection](../models/sortdirection.md) | :heavy_minus_sign: | N/A | +| `totalRecords` | *number* | :heavy_minus_sign: | N/A | +| `records` | [models.LogResource](../models/logresource.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moviesearchparam.md b/docs/models/moviesearchparam.md new file mode 100644 index 0000000..9aba41c --- /dev/null +++ b/docs/models/moviesearchparam.md @@ -0,0 +1,15 @@ +# MovieSearchParam + +## Example Usage + +```typescript +import { MovieSearchParam } from "prowlarr"; + +let value: MovieSearchParam = "tmdbId"; +``` + +## Values + +```typescript +"q" | "imdbId" | "tmdbId" | "imdbTitle" | "imdbYear" | "traktId" | "genre" | "doubanId" | "year" +``` \ No newline at end of file diff --git a/docs/models/musicsearchparam.md b/docs/models/musicsearchparam.md new file mode 100644 index 0000000..055310b --- /dev/null +++ b/docs/models/musicsearchparam.md @@ -0,0 +1,15 @@ +# MusicSearchParam + +## Example Usage + +```typescript +import { MusicSearchParam } from "prowlarr"; + +let value: MusicSearchParam = "album"; +``` + +## Values + +```typescript +"q" | "album" | "artist" | "label" | "year" | "genre" | "track" +``` \ No newline at end of file diff --git a/docs/models/notificationresource.md b/docs/models/notificationresource.md new file mode 100644 index 0000000..6e28220 --- /dev/null +++ b/docs/models/notificationresource.md @@ -0,0 +1,36 @@ +# NotificationResource + +## Example Usage + +```typescript +import { NotificationResource } from "prowlarr"; + +let value: NotificationResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `fields` | [models.Field](../models/field.md)[] | :heavy_minus_sign: | N/A | +| `implementationName` | *string* | :heavy_minus_sign: | N/A | +| `implementation` | *string* | :heavy_minus_sign: | N/A | +| `configContract` | *string* | :heavy_minus_sign: | N/A | +| `infoLink` | *string* | :heavy_minus_sign: | N/A | +| `message` | [models.ProviderMessage](../models/providermessage.md) | :heavy_minus_sign: | N/A | +| `tags` | *number*[] | :heavy_minus_sign: | N/A | +| `presets` | [models.NotificationResource](../models/notificationresource.md)[] | :heavy_minus_sign: | N/A | +| `link` | *string* | :heavy_minus_sign: | N/A | +| `onGrab` | *boolean* | :heavy_minus_sign: | N/A | +| `onHealthIssue` | *boolean* | :heavy_minus_sign: | N/A | +| `onHealthRestored` | *boolean* | :heavy_minus_sign: | N/A | +| `onApplicationUpdate` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsOnGrab` | *boolean* | :heavy_minus_sign: | N/A | +| `includeManualGrabs` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsOnHealthIssue` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsOnHealthRestored` | *boolean* | :heavy_minus_sign: | N/A | +| `includeHealthWarnings` | *boolean* | :heavy_minus_sign: | N/A | +| `supportsOnApplicationUpdate` | *boolean* | :heavy_minus_sign: | N/A | +| `testCommand` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1applicationsidrequest.md b/docs/models/operations/deleteapiv1applicationsidrequest.md new file mode 100644 index 0000000..fe509e0 --- /dev/null +++ b/docs/models/operations/deleteapiv1applicationsidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1ApplicationsIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1ApplicationsIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1ApplicationsIdRequest = { + id: 257282, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1appprofileidrequest.md b/docs/models/operations/deleteapiv1appprofileidrequest.md new file mode 100644 index 0000000..21471b2 --- /dev/null +++ b/docs/models/operations/deleteapiv1appprofileidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1AppprofileIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1AppprofileIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1AppprofileIdRequest = { + id: 754406, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1commandidrequest.md b/docs/models/operations/deleteapiv1commandidrequest.md new file mode 100644 index 0000000..7e3f1ca --- /dev/null +++ b/docs/models/operations/deleteapiv1commandidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1CommandIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1CommandIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1CommandIdRequest = { + id: 160068, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1customfilteridrequest.md b/docs/models/operations/deleteapiv1customfilteridrequest.md new file mode 100644 index 0000000..feeab57 --- /dev/null +++ b/docs/models/operations/deleteapiv1customfilteridrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1CustomfilterIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1CustomfilterIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1CustomfilterIdRequest = { + id: 273790, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1downloadclientidrequest.md b/docs/models/operations/deleteapiv1downloadclientidrequest.md new file mode 100644 index 0000000..9d05498 --- /dev/null +++ b/docs/models/operations/deleteapiv1downloadclientidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1DownloadclientIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1DownloadclientIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1DownloadclientIdRequest = { + id: 356423, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1indexeridrequest.md b/docs/models/operations/deleteapiv1indexeridrequest.md new file mode 100644 index 0000000..ceb52e9 --- /dev/null +++ b/docs/models/operations/deleteapiv1indexeridrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1IndexerIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1IndexerIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1IndexerIdRequest = { + id: 204134, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1indexerproxyidrequest.md b/docs/models/operations/deleteapiv1indexerproxyidrequest.md new file mode 100644 index 0000000..8dba5ec --- /dev/null +++ b/docs/models/operations/deleteapiv1indexerproxyidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1IndexerproxyIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1IndexerproxyIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1IndexerproxyIdRequest = { + id: 447102, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1notificationidrequest.md b/docs/models/operations/deleteapiv1notificationidrequest.md new file mode 100644 index 0000000..9c56b8a --- /dev/null +++ b/docs/models/operations/deleteapiv1notificationidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1NotificationIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1NotificationIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1NotificationIdRequest = { + id: 415026, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1systembackupidrequest.md b/docs/models/operations/deleteapiv1systembackupidrequest.md new file mode 100644 index 0000000..02d8d41 --- /dev/null +++ b/docs/models/operations/deleteapiv1systembackupidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1SystemBackupIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1SystemBackupIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1SystemBackupIdRequest = { + id: 463312, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteapiv1tagidrequest.md b/docs/models/operations/deleteapiv1tagidrequest.md new file mode 100644 index 0000000..03b6691 --- /dev/null +++ b/docs/models/operations/deleteapiv1tagidrequest.md @@ -0,0 +1,17 @@ +# DeleteApiV1TagIdRequest + +## Example Usage + +```typescript +import { DeleteApiV1TagIdRequest } from "prowlarr/models/operations"; + +let value: DeleteApiV1TagIdRequest = { + id: 664637, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1applicationsidrequest.md b/docs/models/operations/getapiv1applicationsidrequest.md new file mode 100644 index 0000000..ddf07d5 --- /dev/null +++ b/docs/models/operations/getapiv1applicationsidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1ApplicationsIdRequest + +## Example Usage + +```typescript +import { GetApiV1ApplicationsIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1ApplicationsIdRequest = { + id: 487837, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1appprofileidrequest.md b/docs/models/operations/getapiv1appprofileidrequest.md new file mode 100644 index 0000000..6108d1a --- /dev/null +++ b/docs/models/operations/getapiv1appprofileidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1AppprofileIdRequest + +## Example Usage + +```typescript +import { GetApiV1AppprofileIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1AppprofileIdRequest = { + id: 46413, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1commandidrequest.md b/docs/models/operations/getapiv1commandidrequest.md new file mode 100644 index 0000000..c497870 --- /dev/null +++ b/docs/models/operations/getapiv1commandidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1CommandIdRequest + +## Example Usage + +```typescript +import { GetApiV1CommandIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1CommandIdRequest = { + id: 612496, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1configdevelopmentidrequest.md b/docs/models/operations/getapiv1configdevelopmentidrequest.md new file mode 100644 index 0000000..fe39a57 --- /dev/null +++ b/docs/models/operations/getapiv1configdevelopmentidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1ConfigDevelopmentIdRequest + +## Example Usage + +```typescript +import { GetApiV1ConfigDevelopmentIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1ConfigDevelopmentIdRequest = { + id: 540985, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1configdownloadclientidrequest.md b/docs/models/operations/getapiv1configdownloadclientidrequest.md new file mode 100644 index 0000000..7e31b7f --- /dev/null +++ b/docs/models/operations/getapiv1configdownloadclientidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1ConfigDownloadclientIdRequest + +## Example Usage + +```typescript +import { GetApiV1ConfigDownloadclientIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1ConfigDownloadclientIdRequest = { + id: 581042, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1confighostidrequest.md b/docs/models/operations/getapiv1confighostidrequest.md new file mode 100644 index 0000000..26830e7 --- /dev/null +++ b/docs/models/operations/getapiv1confighostidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1ConfigHostIdRequest + +## Example Usage + +```typescript +import { GetApiV1ConfigHostIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1ConfigHostIdRequest = { + id: 283372, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1configuiidrequest.md b/docs/models/operations/getapiv1configuiidrequest.md new file mode 100644 index 0000000..85dff98 --- /dev/null +++ b/docs/models/operations/getapiv1configuiidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1ConfigUiIdRequest + +## Example Usage + +```typescript +import { GetApiV1ConfigUiIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1ConfigUiIdRequest = { + id: 968816, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1customfilteridrequest.md b/docs/models/operations/getapiv1customfilteridrequest.md new file mode 100644 index 0000000..0aa56e0 --- /dev/null +++ b/docs/models/operations/getapiv1customfilteridrequest.md @@ -0,0 +1,17 @@ +# GetApiV1CustomfilterIdRequest + +## Example Usage + +```typescript +import { GetApiV1CustomfilterIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1CustomfilterIdRequest = { + id: 40710, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1downloadclientidrequest.md b/docs/models/operations/getapiv1downloadclientidrequest.md new file mode 100644 index 0000000..4cda783 --- /dev/null +++ b/docs/models/operations/getapiv1downloadclientidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1DownloadclientIdRequest + +## Example Usage + +```typescript +import { GetApiV1DownloadclientIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1DownloadclientIdRequest = { + id: 969540, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1filesystemrequest.md b/docs/models/operations/getapiv1filesystemrequest.md new file mode 100644 index 0000000..c12315b --- /dev/null +++ b/docs/models/operations/getapiv1filesystemrequest.md @@ -0,0 +1,17 @@ +# GetApiV1FilesystemRequest + +## Example Usage + +```typescript +import { GetApiV1FilesystemRequest } from "prowlarr/models/operations"; + +let value: GetApiV1FilesystemRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `path` | *string* | :heavy_minus_sign: | N/A | +| `includeFiles` | *boolean* | :heavy_minus_sign: | N/A | +| `allowFoldersWithoutTrailingSlashes` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1filesystemtyperequest.md b/docs/models/operations/getapiv1filesystemtyperequest.md new file mode 100644 index 0000000..a737e9b --- /dev/null +++ b/docs/models/operations/getapiv1filesystemtyperequest.md @@ -0,0 +1,15 @@ +# GetApiV1FilesystemTypeRequest + +## Example Usage + +```typescript +import { GetApiV1FilesystemTypeRequest } from "prowlarr/models/operations"; + +let value: GetApiV1FilesystemTypeRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `path` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1historyindexerrequest.md b/docs/models/operations/getapiv1historyindexerrequest.md new file mode 100644 index 0000000..0666ab9 --- /dev/null +++ b/docs/models/operations/getapiv1historyindexerrequest.md @@ -0,0 +1,17 @@ +# GetApiV1HistoryIndexerRequest + +## Example Usage + +```typescript +import { GetApiV1HistoryIndexerRequest } from "prowlarr/models/operations"; + +let value: GetApiV1HistoryIndexerRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `eventType` | [models.HistoryEventType](../../models/historyeventtype.md) | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1historyrequest.md b/docs/models/operations/getapiv1historyrequest.md new file mode 100644 index 0000000..e61739c --- /dev/null +++ b/docs/models/operations/getapiv1historyrequest.md @@ -0,0 +1,22 @@ +# GetApiV1HistoryRequest + +## Example Usage + +```typescript +import { GetApiV1HistoryRequest } from "prowlarr/models/operations"; + +let value: GetApiV1HistoryRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortKey` | *string* | :heavy_minus_sign: | N/A | +| `sortDirection` | [models.SortDirection](../../models/sortdirection.md) | :heavy_minus_sign: | N/A | +| `eventType` | *number*[] | :heavy_minus_sign: | N/A | +| `successful` | *boolean* | :heavy_minus_sign: | N/A | +| `downloadId` | *string* | :heavy_minus_sign: | N/A | +| `indexerIds` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1historysincerequest.md b/docs/models/operations/getapiv1historysincerequest.md new file mode 100644 index 0000000..7aec77e --- /dev/null +++ b/docs/models/operations/getapiv1historysincerequest.md @@ -0,0 +1,16 @@ +# GetApiV1HistorySinceRequest + +## Example Usage + +```typescript +import { GetApiV1HistorySinceRequest } from "prowlarr/models/operations"; + +let value: GetApiV1HistorySinceRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `date` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `eventType` | [models.HistoryEventType](../../models/historyeventtype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1indexeriddownloadrequest.md b/docs/models/operations/getapiv1indexeriddownloadrequest.md new file mode 100644 index 0000000..ae6d94c --- /dev/null +++ b/docs/models/operations/getapiv1indexeriddownloadrequest.md @@ -0,0 +1,19 @@ +# GetApiV1IndexerIdDownloadRequest + +## Example Usage + +```typescript +import { GetApiV1IndexerIdDownloadRequest } from "prowlarr/models/operations"; + +let value: GetApiV1IndexerIdDownloadRequest = { + id: 634018, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | +| `link` | *string* | :heavy_minus_sign: | N/A | +| `file` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1indexeridnewznabrequest.md b/docs/models/operations/getapiv1indexeridnewznabrequest.md new file mode 100644 index 0000000..61bbc79 --- /dev/null +++ b/docs/models/operations/getapiv1indexeridnewznabrequest.md @@ -0,0 +1,49 @@ +# GetApiV1IndexerIdNewznabRequest + +## Example Usage + +```typescript +import { GetApiV1IndexerIdNewznabRequest } from "prowlarr/models/operations"; + +let value: GetApiV1IndexerIdNewznabRequest = { + id: 657661, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | +| `t` | *string* | :heavy_minus_sign: | N/A | +| `q` | *string* | :heavy_minus_sign: | N/A | +| `cat` | *string* | :heavy_minus_sign: | N/A | +| `imdbid` | *string* | :heavy_minus_sign: | N/A | +| `tmdbid` | *number* | :heavy_minus_sign: | N/A | +| `extended` | *string* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | N/A | +| `minage` | *number* | :heavy_minus_sign: | N/A | +| `maxage` | *number* | :heavy_minus_sign: | N/A | +| `minsize` | *number* | :heavy_minus_sign: | N/A | +| `maxsize` | *number* | :heavy_minus_sign: | N/A | +| `rid` | *number* | :heavy_minus_sign: | N/A | +| `tvmazeid` | *number* | :heavy_minus_sign: | N/A | +| `traktid` | *number* | :heavy_minus_sign: | N/A | +| `tvdbid` | *number* | :heavy_minus_sign: | N/A | +| `doubanid` | *number* | :heavy_minus_sign: | N/A | +| `season` | *number* | :heavy_minus_sign: | N/A | +| `ep` | *string* | :heavy_minus_sign: | N/A | +| `album` | *string* | :heavy_minus_sign: | N/A | +| `artist` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `track` | *string* | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | N/A | +| `genre` | *string* | :heavy_minus_sign: | N/A | +| `author` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `publisher` | *string* | :heavy_minus_sign: | N/A | +| `configured` | *string* | :heavy_minus_sign: | N/A | +| `source` | *string* | :heavy_minus_sign: | N/A | +| `host` | *string* | :heavy_minus_sign: | N/A | +| `server` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1indexeridrequest.md b/docs/models/operations/getapiv1indexeridrequest.md new file mode 100644 index 0000000..d9a36b5 --- /dev/null +++ b/docs/models/operations/getapiv1indexeridrequest.md @@ -0,0 +1,17 @@ +# GetApiV1IndexerIdRequest + +## Example Usage + +```typescript +import { GetApiV1IndexerIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1IndexerIdRequest = { + id: 644176, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1indexerproxyidrequest.md b/docs/models/operations/getapiv1indexerproxyidrequest.md new file mode 100644 index 0000000..c155fe3 --- /dev/null +++ b/docs/models/operations/getapiv1indexerproxyidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1IndexerproxyIdRequest + +## Example Usage + +```typescript +import { GetApiV1IndexerproxyIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1IndexerproxyIdRequest = { + id: 939321, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1indexerstatsrequest.md b/docs/models/operations/getapiv1indexerstatsrequest.md new file mode 100644 index 0000000..a583c61 --- /dev/null +++ b/docs/models/operations/getapiv1indexerstatsrequest.md @@ -0,0 +1,19 @@ +# GetApiV1IndexerstatsRequest + +## Example Usage + +```typescript +import { GetApiV1IndexerstatsRequest } from "prowlarr/models/operations"; + +let value: GetApiV1IndexerstatsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `indexers` | *string* | :heavy_minus_sign: | N/A | +| `protocols` | *string* | :heavy_minus_sign: | N/A | +| `tags` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1logfilefilenamerequest.md b/docs/models/operations/getapiv1logfilefilenamerequest.md new file mode 100644 index 0000000..d3176cf --- /dev/null +++ b/docs/models/operations/getapiv1logfilefilenamerequest.md @@ -0,0 +1,17 @@ +# GetApiV1LogFileFilenameRequest + +## Example Usage + +```typescript +import { GetApiV1LogFileFilenameRequest } from "prowlarr/models/operations"; + +let value: GetApiV1LogFileFilenameRequest = { + filename: "example.file", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `filename` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1logfileupdatefilenamerequest.md b/docs/models/operations/getapiv1logfileupdatefilenamerequest.md new file mode 100644 index 0000000..c589036 --- /dev/null +++ b/docs/models/operations/getapiv1logfileupdatefilenamerequest.md @@ -0,0 +1,17 @@ +# GetApiV1LogFileUpdateFilenameRequest + +## Example Usage + +```typescript +import { GetApiV1LogFileUpdateFilenameRequest } from "prowlarr/models/operations"; + +let value: GetApiV1LogFileUpdateFilenameRequest = { + filename: "example.file", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `filename` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1logrequest.md b/docs/models/operations/getapiv1logrequest.md new file mode 100644 index 0000000..1a90e13 --- /dev/null +++ b/docs/models/operations/getapiv1logrequest.md @@ -0,0 +1,19 @@ +# GetApiV1LogRequest + +## Example Usage + +```typescript +import { GetApiV1LogRequest } from "prowlarr/models/operations"; + +let value: GetApiV1LogRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `pageSize` | *number* | :heavy_minus_sign: | N/A | +| `sortKey` | *string* | :heavy_minus_sign: | N/A | +| `sortDirection` | [models.SortDirection](../../models/sortdirection.md) | :heavy_minus_sign: | N/A | +| `level` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1notificationidrequest.md b/docs/models/operations/getapiv1notificationidrequest.md new file mode 100644 index 0000000..a271d45 --- /dev/null +++ b/docs/models/operations/getapiv1notificationidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1NotificationIdRequest + +## Example Usage + +```typescript +import { GetApiV1NotificationIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1NotificationIdRequest = { + id: 387311, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1searchrequest.md b/docs/models/operations/getapiv1searchrequest.md new file mode 100644 index 0000000..c5fa8f5 --- /dev/null +++ b/docs/models/operations/getapiv1searchrequest.md @@ -0,0 +1,20 @@ +# GetApiV1SearchRequest + +## Example Usage + +```typescript +import { GetApiV1SearchRequest } from "prowlarr/models/operations"; + +let value: GetApiV1SearchRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `query` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `indexerIds` | *number*[] | :heavy_minus_sign: | N/A | +| `categories` | *number*[] | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1systemtaskidrequest.md b/docs/models/operations/getapiv1systemtaskidrequest.md new file mode 100644 index 0000000..4b28023 --- /dev/null +++ b/docs/models/operations/getapiv1systemtaskidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1SystemTaskIdRequest + +## Example Usage + +```typescript +import { GetApiV1SystemTaskIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1SystemTaskIdRequest = { + id: 829975, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1tagdetailidrequest.md b/docs/models/operations/getapiv1tagdetailidrequest.md new file mode 100644 index 0000000..0163633 --- /dev/null +++ b/docs/models/operations/getapiv1tagdetailidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1TagDetailIdRequest + +## Example Usage + +```typescript +import { GetApiV1TagDetailIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1TagDetailIdRequest = { + id: 210863, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getapiv1tagidrequest.md b/docs/models/operations/getapiv1tagidrequest.md new file mode 100644 index 0000000..0fe219e --- /dev/null +++ b/docs/models/operations/getapiv1tagidrequest.md @@ -0,0 +1,17 @@ +# GetApiV1TagIdRequest + +## Example Usage + +```typescript +import { GetApiV1TagIdRequest } from "prowlarr/models/operations"; + +let value: GetApiV1TagIdRequest = { + id: 906448, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getcontentpathrequest.md b/docs/models/operations/getcontentpathrequest.md new file mode 100644 index 0000000..cc988ea --- /dev/null +++ b/docs/models/operations/getcontentpathrequest.md @@ -0,0 +1,17 @@ +# GetContentPathRequest + +## Example Usage + +```typescript +import { GetContentPathRequest } from "prowlarr/models/operations"; + +let value: GetContentPathRequest = { + path: "/opt/sbin", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `path` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getidapirequest.md b/docs/models/operations/getidapirequest.md new file mode 100644 index 0000000..d58bc1d --- /dev/null +++ b/docs/models/operations/getidapirequest.md @@ -0,0 +1,49 @@ +# GetIdApiRequest + +## Example Usage + +```typescript +import { GetIdApiRequest } from "prowlarr/models/operations"; + +let value: GetIdApiRequest = { + id: 383000, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | +| `t` | *string* | :heavy_minus_sign: | N/A | +| `q` | *string* | :heavy_minus_sign: | N/A | +| `cat` | *string* | :heavy_minus_sign: | N/A | +| `imdbid` | *string* | :heavy_minus_sign: | N/A | +| `tmdbid` | *number* | :heavy_minus_sign: | N/A | +| `extended` | *string* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | +| `offset` | *number* | :heavy_minus_sign: | N/A | +| `minage` | *number* | :heavy_minus_sign: | N/A | +| `maxage` | *number* | :heavy_minus_sign: | N/A | +| `minsize` | *number* | :heavy_minus_sign: | N/A | +| `maxsize` | *number* | :heavy_minus_sign: | N/A | +| `rid` | *number* | :heavy_minus_sign: | N/A | +| `tvmazeid` | *number* | :heavy_minus_sign: | N/A | +| `traktid` | *number* | :heavy_minus_sign: | N/A | +| `tvdbid` | *number* | :heavy_minus_sign: | N/A | +| `doubanid` | *number* | :heavy_minus_sign: | N/A | +| `season` | *number* | :heavy_minus_sign: | N/A | +| `ep` | *string* | :heavy_minus_sign: | N/A | +| `album` | *string* | :heavy_minus_sign: | N/A | +| `artist` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `track` | *string* | :heavy_minus_sign: | N/A | +| `year` | *number* | :heavy_minus_sign: | N/A | +| `genre` | *string* | :heavy_minus_sign: | N/A | +| `author` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `publisher` | *string* | :heavy_minus_sign: | N/A | +| `configured` | *string* | :heavy_minus_sign: | N/A | +| `source` | *string* | :heavy_minus_sign: | N/A | +| `host` | *string* | :heavy_minus_sign: | N/A | +| `server` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getiddownloadrequest.md b/docs/models/operations/getiddownloadrequest.md new file mode 100644 index 0000000..bda58a2 --- /dev/null +++ b/docs/models/operations/getiddownloadrequest.md @@ -0,0 +1,19 @@ +# GetIdDownloadRequest + +## Example Usage + +```typescript +import { GetIdDownloadRequest } from "prowlarr/models/operations"; + +let value: GetIdDownloadRequest = { + id: 895787, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | +| `link` | *string* | :heavy_minus_sign: | N/A | +| `file` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getpathrequest.md b/docs/models/operations/getpathrequest.md new file mode 100644 index 0000000..a292abb --- /dev/null +++ b/docs/models/operations/getpathrequest.md @@ -0,0 +1,17 @@ +# GetPathRequest + +## Example Usage + +```typescript +import { GetPathRequest } from "prowlarr/models/operations"; + +let value: GetPathRequest = { + path: "/usr/share", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `path` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1applicationsactionnamerequest.md b/docs/models/operations/postapiv1applicationsactionnamerequest.md new file mode 100644 index 0000000..3387767 --- /dev/null +++ b/docs/models/operations/postapiv1applicationsactionnamerequest.md @@ -0,0 +1,18 @@ +# PostApiV1ApplicationsActionNameRequest + +## Example Usage + +```typescript +import { PostApiV1ApplicationsActionNameRequest } from "prowlarr/models/operations"; + +let value: PostApiV1ApplicationsActionNameRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `applicationResource` | [models.ApplicationResource](../../models/applicationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1applicationsrequest.md b/docs/models/operations/postapiv1applicationsrequest.md new file mode 100644 index 0000000..ff98985 --- /dev/null +++ b/docs/models/operations/postapiv1applicationsrequest.md @@ -0,0 +1,16 @@ +# PostApiV1ApplicationsRequest + +## Example Usage + +```typescript +import { PostApiV1ApplicationsRequest } from "prowlarr/models/operations"; + +let value: PostApiV1ApplicationsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `applicationResource` | [models.ApplicationResource](../../models/applicationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1applicationstestrequest.md b/docs/models/operations/postapiv1applicationstestrequest.md new file mode 100644 index 0000000..50d489d --- /dev/null +++ b/docs/models/operations/postapiv1applicationstestrequest.md @@ -0,0 +1,16 @@ +# PostApiV1ApplicationsTestRequest + +## Example Usage + +```typescript +import { PostApiV1ApplicationsTestRequest } from "prowlarr/models/operations"; + +let value: PostApiV1ApplicationsTestRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `forceTest` | *boolean* | :heavy_minus_sign: | N/A | +| `applicationResource` | [models.ApplicationResource](../../models/applicationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1downloadclientactionnamerequest.md b/docs/models/operations/postapiv1downloadclientactionnamerequest.md new file mode 100644 index 0000000..6701316 --- /dev/null +++ b/docs/models/operations/postapiv1downloadclientactionnamerequest.md @@ -0,0 +1,18 @@ +# PostApiV1DownloadclientActionNameRequest + +## Example Usage + +```typescript +import { PostApiV1DownloadclientActionNameRequest } from "prowlarr/models/operations"; + +let value: PostApiV1DownloadclientActionNameRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `downloadClientResource` | [models.DownloadClientResource](../../models/downloadclientresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1downloadclientrequest.md b/docs/models/operations/postapiv1downloadclientrequest.md new file mode 100644 index 0000000..45c098b --- /dev/null +++ b/docs/models/operations/postapiv1downloadclientrequest.md @@ -0,0 +1,16 @@ +# PostApiV1DownloadclientRequest + +## Example Usage + +```typescript +import { PostApiV1DownloadclientRequest } from "prowlarr/models/operations"; + +let value: PostApiV1DownloadclientRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `downloadClientResource` | [models.DownloadClientResource](../../models/downloadclientresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1downloadclienttestrequest.md b/docs/models/operations/postapiv1downloadclienttestrequest.md new file mode 100644 index 0000000..45abd73 --- /dev/null +++ b/docs/models/operations/postapiv1downloadclienttestrequest.md @@ -0,0 +1,16 @@ +# PostApiV1DownloadclientTestRequest + +## Example Usage + +```typescript +import { PostApiV1DownloadclientTestRequest } from "prowlarr/models/operations"; + +let value: PostApiV1DownloadclientTestRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `forceTest` | *boolean* | :heavy_minus_sign: | N/A | +| `downloadClientResource` | [models.DownloadClientResource](../../models/downloadclientresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexeractionnamerequest.md b/docs/models/operations/postapiv1indexeractionnamerequest.md new file mode 100644 index 0000000..fb1ffd5 --- /dev/null +++ b/docs/models/operations/postapiv1indexeractionnamerequest.md @@ -0,0 +1,18 @@ +# PostApiV1IndexerActionNameRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerActionNameRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerActionNameRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `indexerResource` | [models.IndexerResourceInput](../../models/indexerresourceinput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexerproxyactionnamerequest.md b/docs/models/operations/postapiv1indexerproxyactionnamerequest.md new file mode 100644 index 0000000..bb77310 --- /dev/null +++ b/docs/models/operations/postapiv1indexerproxyactionnamerequest.md @@ -0,0 +1,18 @@ +# PostApiV1IndexerproxyActionNameRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerproxyActionNameRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerproxyActionNameRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `indexerProxyResource` | [models.IndexerProxyResource](../../models/indexerproxyresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexerproxyrequest.md b/docs/models/operations/postapiv1indexerproxyrequest.md new file mode 100644 index 0000000..5c562b4 --- /dev/null +++ b/docs/models/operations/postapiv1indexerproxyrequest.md @@ -0,0 +1,16 @@ +# PostApiV1IndexerproxyRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerproxyRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerproxyRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `indexerProxyResource` | [models.IndexerProxyResource](../../models/indexerproxyresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexerproxytestrequest.md b/docs/models/operations/postapiv1indexerproxytestrequest.md new file mode 100644 index 0000000..8a22c61 --- /dev/null +++ b/docs/models/operations/postapiv1indexerproxytestrequest.md @@ -0,0 +1,16 @@ +# PostApiV1IndexerproxyTestRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerproxyTestRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerproxyTestRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceTest` | *boolean* | :heavy_minus_sign: | N/A | +| `indexerProxyResource` | [models.IndexerProxyResource](../../models/indexerproxyresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexerrequest.md b/docs/models/operations/postapiv1indexerrequest.md new file mode 100644 index 0000000..01ed68a --- /dev/null +++ b/docs/models/operations/postapiv1indexerrequest.md @@ -0,0 +1,16 @@ +# PostApiV1IndexerRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `indexerResource` | [models.IndexerResourceInput](../../models/indexerresourceinput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1indexertestrequest.md b/docs/models/operations/postapiv1indexertestrequest.md new file mode 100644 index 0000000..e678788 --- /dev/null +++ b/docs/models/operations/postapiv1indexertestrequest.md @@ -0,0 +1,16 @@ +# PostApiV1IndexerTestRequest + +## Example Usage + +```typescript +import { PostApiV1IndexerTestRequest } from "prowlarr/models/operations"; + +let value: PostApiV1IndexerTestRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceTest` | *boolean* | :heavy_minus_sign: | N/A | +| `indexerResource` | [models.IndexerResourceInput](../../models/indexerresourceinput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1notificationactionnamerequest.md b/docs/models/operations/postapiv1notificationactionnamerequest.md new file mode 100644 index 0000000..a8ed506 --- /dev/null +++ b/docs/models/operations/postapiv1notificationactionnamerequest.md @@ -0,0 +1,18 @@ +# PostApiV1NotificationActionNameRequest + +## Example Usage + +```typescript +import { PostApiV1NotificationActionNameRequest } from "prowlarr/models/operations"; + +let value: PostApiV1NotificationActionNameRequest = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `notificationResource` | [models.NotificationResource](../../models/notificationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1notificationrequest.md b/docs/models/operations/postapiv1notificationrequest.md new file mode 100644 index 0000000..dcf7ca4 --- /dev/null +++ b/docs/models/operations/postapiv1notificationrequest.md @@ -0,0 +1,16 @@ +# PostApiV1NotificationRequest + +## Example Usage + +```typescript +import { PostApiV1NotificationRequest } from "prowlarr/models/operations"; + +let value: PostApiV1NotificationRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `notificationResource` | [models.NotificationResource](../../models/notificationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1notificationtestrequest.md b/docs/models/operations/postapiv1notificationtestrequest.md new file mode 100644 index 0000000..33fe3a1 --- /dev/null +++ b/docs/models/operations/postapiv1notificationtestrequest.md @@ -0,0 +1,16 @@ +# PostApiV1NotificationTestRequest + +## Example Usage + +```typescript +import { PostApiV1NotificationTestRequest } from "prowlarr/models/operations"; + +let value: PostApiV1NotificationTestRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceTest` | *boolean* | :heavy_minus_sign: | N/A | +| `notificationResource` | [models.NotificationResource](../../models/notificationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postapiv1systembackuprestoreidrequest.md b/docs/models/operations/postapiv1systembackuprestoreidrequest.md new file mode 100644 index 0000000..e8c5b72 --- /dev/null +++ b/docs/models/operations/postapiv1systembackuprestoreidrequest.md @@ -0,0 +1,17 @@ +# PostApiV1SystemBackupRestoreIdRequest + +## Example Usage + +```typescript +import { PostApiV1SystemBackupRestoreIdRequest } from "prowlarr/models/operations"; + +let value: PostApiV1SystemBackupRestoreIdRequest = { + id: 583710, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1applicationsidrequest.md b/docs/models/operations/putapiv1applicationsidrequest.md new file mode 100644 index 0000000..63da373 --- /dev/null +++ b/docs/models/operations/putapiv1applicationsidrequest.md @@ -0,0 +1,19 @@ +# PutApiV1ApplicationsIdRequest + +## Example Usage + +```typescript +import { PutApiV1ApplicationsIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1ApplicationsIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `applicationResource` | [models.ApplicationResource](../../models/applicationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1appprofileidrequest.md b/docs/models/operations/putapiv1appprofileidrequest.md new file mode 100644 index 0000000..f606612 --- /dev/null +++ b/docs/models/operations/putapiv1appprofileidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1AppprofileIdRequest + +## Example Usage + +```typescript +import { PutApiV1AppprofileIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1AppprofileIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `appProfileResource` | [models.AppProfileResource](../../models/appprofileresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1configdevelopmentidrequest.md b/docs/models/operations/putapiv1configdevelopmentidrequest.md new file mode 100644 index 0000000..820f879 --- /dev/null +++ b/docs/models/operations/putapiv1configdevelopmentidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1ConfigDevelopmentIdRequest + +## Example Usage + +```typescript +import { PutApiV1ConfigDevelopmentIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1ConfigDevelopmentIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `developmentConfigResource` | [models.DevelopmentConfigResource](../../models/developmentconfigresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1configdownloadclientidrequest.md b/docs/models/operations/putapiv1configdownloadclientidrequest.md new file mode 100644 index 0000000..e5d87c4 --- /dev/null +++ b/docs/models/operations/putapiv1configdownloadclientidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1ConfigDownloadclientIdRequest + +## Example Usage + +```typescript +import { PutApiV1ConfigDownloadclientIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1ConfigDownloadclientIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `downloadClientConfigResource` | [models.DownloadClientConfigResource](../../models/downloadclientconfigresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1confighostidrequest.md b/docs/models/operations/putapiv1confighostidrequest.md new file mode 100644 index 0000000..9fda173 --- /dev/null +++ b/docs/models/operations/putapiv1confighostidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1ConfigHostIdRequest + +## Example Usage + +```typescript +import { PutApiV1ConfigHostIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1ConfigHostIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `hostConfigResource` | [models.HostConfigResource](../../models/hostconfigresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1configuiidrequest.md b/docs/models/operations/putapiv1configuiidrequest.md new file mode 100644 index 0000000..eba1067 --- /dev/null +++ b/docs/models/operations/putapiv1configuiidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1ConfigUiIdRequest + +## Example Usage + +```typescript +import { PutApiV1ConfigUiIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1ConfigUiIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `uiConfigResource` | [models.UiConfigResource](../../models/uiconfigresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1customfilteridrequest.md b/docs/models/operations/putapiv1customfilteridrequest.md new file mode 100644 index 0000000..6de65ff --- /dev/null +++ b/docs/models/operations/putapiv1customfilteridrequest.md @@ -0,0 +1,18 @@ +# PutApiV1CustomfilterIdRequest + +## Example Usage + +```typescript +import { PutApiV1CustomfilterIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1CustomfilterIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `customFilterResource` | [models.CustomFilterResource](../../models/customfilterresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1downloadclientidrequest.md b/docs/models/operations/putapiv1downloadclientidrequest.md new file mode 100644 index 0000000..09a01b7 --- /dev/null +++ b/docs/models/operations/putapiv1downloadclientidrequest.md @@ -0,0 +1,19 @@ +# PutApiV1DownloadclientIdRequest + +## Example Usage + +```typescript +import { PutApiV1DownloadclientIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1DownloadclientIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `downloadClientResource` | [models.DownloadClientResource](../../models/downloadclientresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1indexeridrequest.md b/docs/models/operations/putapiv1indexeridrequest.md new file mode 100644 index 0000000..b73760d --- /dev/null +++ b/docs/models/operations/putapiv1indexeridrequest.md @@ -0,0 +1,19 @@ +# PutApiV1IndexerIdRequest + +## Example Usage + +```typescript +import { PutApiV1IndexerIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1IndexerIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `indexerResource` | [models.IndexerResourceInput](../../models/indexerresourceinput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1indexerproxyidrequest.md b/docs/models/operations/putapiv1indexerproxyidrequest.md new file mode 100644 index 0000000..c01fb03 --- /dev/null +++ b/docs/models/operations/putapiv1indexerproxyidrequest.md @@ -0,0 +1,19 @@ +# PutApiV1IndexerproxyIdRequest + +## Example Usage + +```typescript +import { PutApiV1IndexerproxyIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1IndexerproxyIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `indexerProxyResource` | [models.IndexerProxyResource](../../models/indexerproxyresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1notificationidrequest.md b/docs/models/operations/putapiv1notificationidrequest.md new file mode 100644 index 0000000..0d482a9 --- /dev/null +++ b/docs/models/operations/putapiv1notificationidrequest.md @@ -0,0 +1,19 @@ +# PutApiV1NotificationIdRequest + +## Example Usage + +```typescript +import { PutApiV1NotificationIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1NotificationIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `forceSave` | *boolean* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `notificationResource` | [models.NotificationResource](../../models/notificationresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/putapiv1tagidrequest.md b/docs/models/operations/putapiv1tagidrequest.md new file mode 100644 index 0000000..51042b1 --- /dev/null +++ b/docs/models/operations/putapiv1tagidrequest.md @@ -0,0 +1,18 @@ +# PutApiV1TagIdRequest + +## Example Usage + +```typescript +import { PutApiV1TagIdRequest } from "prowlarr/models/operations"; + +let value: PutApiV1TagIdRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `tagResource` | [models.TagResource](../../models/tagresource.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/pingresource.md b/docs/models/pingresource.md new file mode 100644 index 0000000..cbf2531 --- /dev/null +++ b/docs/models/pingresource.md @@ -0,0 +1,15 @@ +# PingResource + +## Example Usage + +```typescript +import { PingResource } from "prowlarr"; + +let value: PingResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `status` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/privacylevel.md b/docs/models/privacylevel.md new file mode 100644 index 0000000..359db47 --- /dev/null +++ b/docs/models/privacylevel.md @@ -0,0 +1,15 @@ +# PrivacyLevel + +## Example Usage + +```typescript +import { PrivacyLevel } from "prowlarr"; + +let value: PrivacyLevel = "apiKey"; +``` + +## Values + +```typescript +"normal" | "password" | "apiKey" | "userName" +``` \ No newline at end of file diff --git a/docs/models/providermessage.md b/docs/models/providermessage.md new file mode 100644 index 0000000..c8540ff --- /dev/null +++ b/docs/models/providermessage.md @@ -0,0 +1,16 @@ +# ProviderMessage + +## Example Usage + +```typescript +import { ProviderMessage } from "prowlarr"; + +let value: ProviderMessage = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `type` | [models.ProviderMessageType](../models/providermessagetype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/providermessagetype.md b/docs/models/providermessagetype.md new file mode 100644 index 0000000..edd71eb --- /dev/null +++ b/docs/models/providermessagetype.md @@ -0,0 +1,15 @@ +# ProviderMessageType + +## Example Usage + +```typescript +import { ProviderMessageType } from "prowlarr"; + +let value: ProviderMessageType = "warning"; +``` + +## Values + +```typescript +"info" | "warning" | "error" +``` \ No newline at end of file diff --git a/docs/models/proxytype.md b/docs/models/proxytype.md new file mode 100644 index 0000000..9ae5172 --- /dev/null +++ b/docs/models/proxytype.md @@ -0,0 +1,15 @@ +# ProxyType + +## Example Usage + +```typescript +import { ProxyType } from "prowlarr"; + +let value: ProxyType = "http"; +``` + +## Values + +```typescript +"http" | "socks4" | "socks5" +``` \ No newline at end of file diff --git a/docs/models/releaseresource.md b/docs/models/releaseresource.md new file mode 100644 index 0000000..3282be9 --- /dev/null +++ b/docs/models/releaseresource.md @@ -0,0 +1,46 @@ +# ReleaseResource + +## Example Usage + +```typescript +import { ReleaseResource } from "prowlarr"; + +let value: ReleaseResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `guid` | *string* | :heavy_minus_sign: | N/A | +| `age` | *number* | :heavy_minus_sign: | N/A | +| `ageHours` | *number* | :heavy_minus_sign: | N/A | +| `ageMinutes` | *number* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `files` | *number* | :heavy_minus_sign: | N/A | +| `grabs` | *number* | :heavy_minus_sign: | N/A | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `indexer` | *string* | :heavy_minus_sign: | N/A | +| `subGroup` | *string* | :heavy_minus_sign: | N/A | +| `releaseHash` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `sortTitle` | *string* | :heavy_minus_sign: | N/A | +| `imdbId` | *number* | :heavy_minus_sign: | N/A | +| `tmdbId` | *number* | :heavy_minus_sign: | N/A | +| `tvdbId` | *number* | :heavy_minus_sign: | N/A | +| `tvMazeId` | *number* | :heavy_minus_sign: | N/A | +| `publishDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `commentUrl` | *string* | :heavy_minus_sign: | N/A | +| `downloadUrl` | *string* | :heavy_minus_sign: | N/A | +| `infoUrl` | *string* | :heavy_minus_sign: | N/A | +| `posterUrl` | *string* | :heavy_minus_sign: | N/A | +| `indexerFlags` | *string*[] | :heavy_minus_sign: | N/A | +| `categories` | [models.IndexerCategory](../models/indexercategory.md)[] | :heavy_minus_sign: | N/A | +| `magnetUrl` | *string* | :heavy_minus_sign: | N/A | +| `infoHash` | *string* | :heavy_minus_sign: | N/A | +| `seeders` | *number* | :heavy_minus_sign: | N/A | +| `leechers` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | [models.DownloadProtocol](../models/downloadprotocol.md) | :heavy_minus_sign: | N/A | +| `fileName` | *string* | :heavy_minus_sign: | N/A | +| `downloadClientId` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/releaseresourceinput.md b/docs/models/releaseresourceinput.md new file mode 100644 index 0000000..619c391 --- /dev/null +++ b/docs/models/releaseresourceinput.md @@ -0,0 +1,45 @@ +# ReleaseResourceInput + +## Example Usage + +```typescript +import { ReleaseResourceInput } from "prowlarr"; + +let value: ReleaseResourceInput = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `guid` | *string* | :heavy_minus_sign: | N/A | +| `age` | *number* | :heavy_minus_sign: | N/A | +| `ageHours` | *number* | :heavy_minus_sign: | N/A | +| `ageMinutes` | *number* | :heavy_minus_sign: | N/A | +| `size` | *number* | :heavy_minus_sign: | N/A | +| `files` | *number* | :heavy_minus_sign: | N/A | +| `grabs` | *number* | :heavy_minus_sign: | N/A | +| `indexerId` | *number* | :heavy_minus_sign: | N/A | +| `indexer` | *string* | :heavy_minus_sign: | N/A | +| `subGroup` | *string* | :heavy_minus_sign: | N/A | +| `releaseHash` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `sortTitle` | *string* | :heavy_minus_sign: | N/A | +| `imdbId` | *number* | :heavy_minus_sign: | N/A | +| `tmdbId` | *number* | :heavy_minus_sign: | N/A | +| `tvdbId` | *number* | :heavy_minus_sign: | N/A | +| `tvMazeId` | *number* | :heavy_minus_sign: | N/A | +| `publishDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `commentUrl` | *string* | :heavy_minus_sign: | N/A | +| `downloadUrl` | *string* | :heavy_minus_sign: | N/A | +| `infoUrl` | *string* | :heavy_minus_sign: | N/A | +| `posterUrl` | *string* | :heavy_minus_sign: | N/A | +| `indexerFlags` | *string*[] | :heavy_minus_sign: | N/A | +| `categories` | [models.IndexerCategoryInput](../models/indexercategoryinput.md)[] | :heavy_minus_sign: | N/A | +| `magnetUrl` | *string* | :heavy_minus_sign: | N/A | +| `infoHash` | *string* | :heavy_minus_sign: | N/A | +| `seeders` | *number* | :heavy_minus_sign: | N/A | +| `leechers` | *number* | :heavy_minus_sign: | N/A | +| `protocol` | [models.DownloadProtocol](../models/downloadprotocol.md) | :heavy_minus_sign: | N/A | +| `downloadClientId` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/runtimemode.md b/docs/models/runtimemode.md new file mode 100644 index 0000000..5abdb66 --- /dev/null +++ b/docs/models/runtimemode.md @@ -0,0 +1,15 @@ +# RuntimeMode + +## Example Usage + +```typescript +import { RuntimeMode } from "prowlarr"; + +let value: RuntimeMode = "console"; +``` + +## Values + +```typescript +"console" | "service" | "tray" +``` \ No newline at end of file diff --git a/docs/models/searchparam.md b/docs/models/searchparam.md new file mode 100644 index 0000000..423e2a5 --- /dev/null +++ b/docs/models/searchparam.md @@ -0,0 +1,15 @@ +# SearchParam + +## Example Usage + +```typescript +import { SearchParam } from "prowlarr"; + +let value: SearchParam = "q"; +``` + +## Values + +```typescript +"q" +``` \ No newline at end of file diff --git a/docs/models/security.md b/docs/models/security.md new file mode 100644 index 0000000..db92a67 --- /dev/null +++ b/docs/models/security.md @@ -0,0 +1,16 @@ +# Security + +## Example Usage + +```typescript +import { Security } from "prowlarr"; + +let value: Security = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `xApiKey` | *string* | :heavy_minus_sign: | N/A | +| `apikey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/selectoption.md b/docs/models/selectoption.md new file mode 100644 index 0000000..9f2989b --- /dev/null +++ b/docs/models/selectoption.md @@ -0,0 +1,19 @@ +# SelectOption + +## Example Usage + +```typescript +import { SelectOption } from "prowlarr"; + +let value: SelectOption = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `order` | *number* | :heavy_minus_sign: | N/A | +| `hint` | *string* | :heavy_minus_sign: | N/A | +| `parentValue` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/sortdirection.md b/docs/models/sortdirection.md new file mode 100644 index 0000000..74efc77 --- /dev/null +++ b/docs/models/sortdirection.md @@ -0,0 +1,15 @@ +# SortDirection + +## Example Usage + +```typescript +import { SortDirection } from "prowlarr"; + +let value: SortDirection = "default"; +``` + +## Values + +```typescript +"default" | "ascending" | "descending" +``` \ No newline at end of file diff --git a/docs/models/systemresource.md b/docs/models/systemresource.md new file mode 100644 index 0000000..a828abd --- /dev/null +++ b/docs/models/systemresource.md @@ -0,0 +1,45 @@ +# SystemResource + +## Example Usage + +```typescript +import { SystemResource } from "prowlarr"; + +let value: SystemResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `appName` | *string* | :heavy_minus_sign: | N/A | +| `instanceName` | *string* | :heavy_minus_sign: | N/A | +| `version` | *string* | :heavy_minus_sign: | N/A | +| `buildTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `isDebug` | *boolean* | :heavy_minus_sign: | N/A | +| `isProduction` | *boolean* | :heavy_minus_sign: | N/A | +| `isAdmin` | *boolean* | :heavy_minus_sign: | N/A | +| `isUserInteractive` | *boolean* | :heavy_minus_sign: | N/A | +| `startupPath` | *string* | :heavy_minus_sign: | N/A | +| `appData` | *string* | :heavy_minus_sign: | N/A | +| `osName` | *string* | :heavy_minus_sign: | N/A | +| `osVersion` | *string* | :heavy_minus_sign: | N/A | +| `isNetCore` | *boolean* | :heavy_minus_sign: | N/A | +| `isLinux` | *boolean* | :heavy_minus_sign: | N/A | +| `isOsx` | *boolean* | :heavy_minus_sign: | N/A | +| `isWindows` | *boolean* | :heavy_minus_sign: | N/A | +| `isDocker` | *boolean* | :heavy_minus_sign: | N/A | +| `mode` | [models.RuntimeMode](../models/runtimemode.md) | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `databaseType` | [models.DatabaseType](../models/databasetype.md) | :heavy_minus_sign: | N/A | +| `databaseVersion` | *string* | :heavy_minus_sign: | N/A | +| `authentication` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `migrationVersion` | *number* | :heavy_minus_sign: | N/A | +| `urlBase` | *string* | :heavy_minus_sign: | N/A | +| `runtimeVersion` | *string* | :heavy_minus_sign: | N/A | +| `runtimeName` | *string* | :heavy_minus_sign: | N/A | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `packageVersion` | *string* | :heavy_minus_sign: | N/A | +| `packageAuthor` | *string* | :heavy_minus_sign: | N/A | +| `packageUpdateMechanism` | [models.UpdateMechanism](../models/updatemechanism.md) | :heavy_minus_sign: | N/A | +| `packageUpdateMechanismMessage` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tagdetailsresource.md b/docs/models/tagdetailsresource.md new file mode 100644 index 0000000..3c8a36b --- /dev/null +++ b/docs/models/tagdetailsresource.md @@ -0,0 +1,20 @@ +# TagDetailsResource + +## Example Usage + +```typescript +import { TagDetailsResource } from "prowlarr"; + +let value: TagDetailsResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `notificationIds` | *number*[] | :heavy_minus_sign: | N/A | +| `indexerIds` | *number*[] | :heavy_minus_sign: | N/A | +| `indexerProxyIds` | *number*[] | :heavy_minus_sign: | N/A | +| `applicationIds` | *number*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tagresource.md b/docs/models/tagresource.md new file mode 100644 index 0000000..fda3954 --- /dev/null +++ b/docs/models/tagresource.md @@ -0,0 +1,16 @@ +# TagResource + +## Example Usage + +```typescript +import { TagResource } from "prowlarr"; + +let value: TagResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/taskresource.md b/docs/models/taskresource.md new file mode 100644 index 0000000..424c438 --- /dev/null +++ b/docs/models/taskresource.md @@ -0,0 +1,22 @@ +# TaskResource + +## Example Usage + +```typescript +import { TaskResource } from "prowlarr"; + +let value: TaskResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `taskName` | *string* | :heavy_minus_sign: | N/A | +| `interval` | *number* | :heavy_minus_sign: | N/A | +| `lastExecution` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `lastStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `nextExecution` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `lastDuration` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tvsearchparam.md b/docs/models/tvsearchparam.md new file mode 100644 index 0000000..4a8035c --- /dev/null +++ b/docs/models/tvsearchparam.md @@ -0,0 +1,15 @@ +# TvSearchParam + +## Example Usage + +```typescript +import { TvSearchParam } from "prowlarr"; + +let value: TvSearchParam = "tvMazeId"; +``` + +## Values + +```typescript +"q" | "season" | "ep" | "imdbId" | "tvdbId" | "rId" | "tvMazeId" | "traktId" | "tmdbId" | "doubanId" | "genre" | "year" +``` \ No newline at end of file diff --git a/docs/models/uiconfigresource.md b/docs/models/uiconfigresource.md new file mode 100644 index 0000000..3ecda79 --- /dev/null +++ b/docs/models/uiconfigresource.md @@ -0,0 +1,24 @@ +# UiConfigResource + +## Example Usage + +```typescript +import { UiConfigResource } from "prowlarr"; + +let value: UiConfigResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `firstDayOfWeek` | *number* | :heavy_minus_sign: | N/A | +| `calendarWeekColumnHeader` | *string* | :heavy_minus_sign: | N/A | +| `shortDateFormat` | *string* | :heavy_minus_sign: | N/A | +| `longDateFormat` | *string* | :heavy_minus_sign: | N/A | +| `timeFormat` | *string* | :heavy_minus_sign: | N/A | +| `showRelativeDates` | *boolean* | :heavy_minus_sign: | N/A | +| `enableColorImpairedMode` | *boolean* | :heavy_minus_sign: | N/A | +| `uiLanguage` | *string* | :heavy_minus_sign: | N/A | +| `theme` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatechanges.md b/docs/models/updatechanges.md new file mode 100644 index 0000000..52b838c --- /dev/null +++ b/docs/models/updatechanges.md @@ -0,0 +1,16 @@ +# UpdateChanges + +## Example Usage + +```typescript +import { UpdateChanges } from "prowlarr"; + +let value: UpdateChanges = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `new` | *string*[] | :heavy_minus_sign: | N/A | +| `fixed` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatemechanism.md b/docs/models/updatemechanism.md new file mode 100644 index 0000000..12fe2b7 --- /dev/null +++ b/docs/models/updatemechanism.md @@ -0,0 +1,15 @@ +# UpdateMechanism + +## Example Usage + +```typescript +import { UpdateMechanism } from "prowlarr"; + +let value: UpdateMechanism = "script"; +``` + +## Values + +```typescript +"builtIn" | "script" | "external" | "apt" | "docker" +``` \ No newline at end of file diff --git a/docs/models/updateresource.md b/docs/models/updateresource.md new file mode 100644 index 0000000..8272e01 --- /dev/null +++ b/docs/models/updateresource.md @@ -0,0 +1,26 @@ +# UpdateResource + +## Example Usage + +```typescript +import { UpdateResource } from "prowlarr"; + +let value: UpdateResource = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *number* | :heavy_minus_sign: | N/A | +| `version` | *string* | :heavy_minus_sign: | N/A | +| `branch` | *string* | :heavy_minus_sign: | N/A | +| `releaseDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `fileName` | *string* | :heavy_minus_sign: | N/A | +| `url` | *string* | :heavy_minus_sign: | N/A | +| `installed` | *boolean* | :heavy_minus_sign: | N/A | +| `installedOn` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `installable` | *boolean* | :heavy_minus_sign: | N/A | +| `latest` | *boolean* | :heavy_minus_sign: | N/A | +| `changes` | [models.UpdateChanges](../models/updatechanges.md) | :heavy_minus_sign: | N/A | +| `hash` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/useragentstatistics.md b/docs/models/useragentstatistics.md new file mode 100644 index 0000000..9573535 --- /dev/null +++ b/docs/models/useragentstatistics.md @@ -0,0 +1,17 @@ +# UserAgentStatistics + +## Example Usage + +```typescript +import { UserAgentStatistics } from "prowlarr"; + +let value: UserAgentStatistics = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `userAgent` | *string* | :heavy_minus_sign: | N/A | +| `numberOfQueries` | *number* | :heavy_minus_sign: | N/A | +| `numberOfGrabs` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/apiinfo/README.md b/docs/sdks/apiinfo/README.md new file mode 100644 index 0000000..13f84aa --- /dev/null +++ b/docs/sdks/apiinfo/README.md @@ -0,0 +1,81 @@ +# ApiInfo +(*apiInfo*) + +## Overview + +### Available Operations + +* [getApi](#getapi) + +## getApi + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.apiInfo.getApi(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { apiInfoGetApi } from "prowlarr/funcs/apiInfoGetApi.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await apiInfoGetApi(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApiInfoResource](../../models/apiinforesource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/application/README.md b/docs/sdks/application/README.md new file mode 100644 index 0000000..5971e55 --- /dev/null +++ b/docs/sdks/application/README.md @@ -0,0 +1,835 @@ +# Application +(*application*) + +## Overview + +### Available Operations + +* [getApiV1ApplicationsId](#getapiv1applicationsid) +* [putApiV1ApplicationsId](#putapiv1applicationsid) +* [deleteApiV1ApplicationsId](#deleteapiv1applicationsid) +* [getApiV1Applications](#getapiv1applications) +* [postApiV1Applications](#postapiv1applications) +* [putApiV1ApplicationsBulk](#putapiv1applicationsbulk) +* [deleteApiV1ApplicationsBulk](#deleteapiv1applicationsbulk) +* [getApiV1ApplicationsSchema](#getapiv1applicationsschema) +* [postApiV1ApplicationsTest](#postapiv1applicationstest) +* [postApiV1ApplicationsTestall](#postapiv1applicationstestall) +* [postApiV1ApplicationsActionName](#postapiv1applicationsactionname) + +## getApiV1ApplicationsId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.getApiV1ApplicationsId({ + id: 282902, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationGetApiV1ApplicationsId } from "prowlarr/funcs/applicationGetApiV1ApplicationsId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationGetApiV1ApplicationsId(prowlarr, { + id: 282902, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1ApplicationsIdRequest](../../models/operations/getapiv1applicationsidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource](../../models/applicationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1ApplicationsId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.putApiV1ApplicationsId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPutApiV1ApplicationsId } from "prowlarr/funcs/applicationPutApiV1ApplicationsId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPutApiV1ApplicationsId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1ApplicationsIdRequest](../../models/operations/putapiv1applicationsidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource](../../models/applicationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1ApplicationsId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.application.deleteApiV1ApplicationsId({ + id: 915442, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationDeleteApiV1ApplicationsId } from "prowlarr/funcs/applicationDeleteApiV1ApplicationsId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationDeleteApiV1ApplicationsId(prowlarr, { + id: 915442, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1ApplicationsIdRequest](../../models/operations/deleteapiv1applicationsidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Applications + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.getApiV1Applications(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationGetApiV1Applications } from "prowlarr/funcs/applicationGetApiV1Applications.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationGetApiV1Applications(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Applications + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.postApiV1Applications({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPostApiV1Applications } from "prowlarr/funcs/applicationPostApiV1Applications.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPostApiV1Applications(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1ApplicationsRequest](../../models/operations/postapiv1applicationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource](../../models/applicationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1ApplicationsBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.putApiV1ApplicationsBulk(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPutApiV1ApplicationsBulk } from "prowlarr/funcs/applicationPutApiV1ApplicationsBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPutApiV1ApplicationsBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.ApplicationBulkResource](../../models/applicationbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource](../../models/applicationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1ApplicationsBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.application.deleteApiV1ApplicationsBulk(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationDeleteApiV1ApplicationsBulk } from "prowlarr/funcs/applicationDeleteApiV1ApplicationsBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationDeleteApiV1ApplicationsBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.ApplicationBulkResource](../../models/applicationbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ApplicationsSchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.application.getApiV1ApplicationsSchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationGetApiV1ApplicationsSchema } from "prowlarr/funcs/applicationGetApiV1ApplicationsSchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationGetApiV1ApplicationsSchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ApplicationResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1ApplicationsTest + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.application.postApiV1ApplicationsTest({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPostApiV1ApplicationsTest } from "prowlarr/funcs/applicationPostApiV1ApplicationsTest.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPostApiV1ApplicationsTest(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1ApplicationsTestRequest](../../models/operations/postapiv1applicationstestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1ApplicationsTestall + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.application.postApiV1ApplicationsTestall(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPostApiV1ApplicationsTestall } from "prowlarr/funcs/applicationPostApiV1ApplicationsTestall.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPostApiV1ApplicationsTestall(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1ApplicationsActionName + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.application.postApiV1ApplicationsActionName({ + name: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { applicationPostApiV1ApplicationsActionName } from "prowlarr/funcs/applicationPostApiV1ApplicationsActionName.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await applicationPostApiV1ApplicationsActionName(prowlarr, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1ApplicationsActionNameRequest](../../models/operations/postapiv1applicationsactionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/appprofile/README.md b/docs/sdks/appprofile/README.md new file mode 100644 index 0000000..52e91d8 --- /dev/null +++ b/docs/sdks/appprofile/README.md @@ -0,0 +1,465 @@ +# AppProfile +(*appProfile*) + +## Overview + +### Available Operations + +* [postApiV1Appprofile](#postapiv1appprofile) +* [getApiV1Appprofile](#getapiv1appprofile) +* [deleteApiV1AppprofileId](#deleteapiv1appprofileid) +* [putApiV1AppprofileId](#putapiv1appprofileid) +* [getApiV1AppprofileId](#getapiv1appprofileid) +* [getApiV1AppprofileSchema](#getapiv1appprofileschema) + +## postApiV1Appprofile + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.appProfile.postApiV1Appprofile(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfilePostApiV1Appprofile } from "prowlarr/funcs/appProfilePostApiV1Appprofile.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfilePostApiV1Appprofile(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.AppProfileResource](../../models/appprofileresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AppProfileResource](../../models/appprofileresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Appprofile + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.appProfile.getApiV1Appprofile(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfileGetApiV1Appprofile } from "prowlarr/funcs/appProfileGetApiV1Appprofile.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfileGetApiV1Appprofile(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AppProfileResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1AppprofileId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.appProfile.deleteApiV1AppprofileId({ + id: 344853, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfileDeleteApiV1AppprofileId } from "prowlarr/funcs/appProfileDeleteApiV1AppprofileId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfileDeleteApiV1AppprofileId(prowlarr, { + id: 344853, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1AppprofileIdRequest](../../models/operations/deleteapiv1appprofileidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1AppprofileId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.appProfile.putApiV1AppprofileId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfilePutApiV1AppprofileId } from "prowlarr/funcs/appProfilePutApiV1AppprofileId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfilePutApiV1AppprofileId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1AppprofileIdRequest](../../models/operations/putapiv1appprofileidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AppProfileResource](../../models/appprofileresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1AppprofileId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.appProfile.getApiV1AppprofileId({ + id: 92439, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfileGetApiV1AppprofileId } from "prowlarr/funcs/appProfileGetApiV1AppprofileId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfileGetApiV1AppprofileId(prowlarr, { + id: 92439, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1AppprofileIdRequest](../../models/operations/getapiv1appprofileidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AppProfileResource](../../models/appprofileresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1AppprofileSchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.appProfile.getApiV1AppprofileSchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { appProfileGetApiV1AppprofileSchema } from "prowlarr/funcs/appProfileGetApiV1AppprofileSchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await appProfileGetApiV1AppprofileSchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.AppProfileResource](../../models/appprofileresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md new file mode 100644 index 0000000..27fdd5c --- /dev/null +++ b/docs/sdks/authentication/README.md @@ -0,0 +1,79 @@ +# Authentication +(*authentication*) + +## Overview + +### Available Operations + +* [getLogout](#getlogout) + +## getLogout + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.authentication.getLogout(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { authenticationGetLogout } from "prowlarr/funcs/authenticationGetLogout.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await authenticationGetLogout(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/backup/README.md b/docs/sdks/backup/README.md new file mode 100644 index 0000000..28ea329 --- /dev/null +++ b/docs/sdks/backup/README.md @@ -0,0 +1,307 @@ +# Backup +(*backup*) + +## Overview + +### Available Operations + +* [getApiV1SystemBackup](#getapiv1systembackup) +* [deleteApiV1SystemBackupId](#deleteapiv1systembackupid) +* [postApiV1SystemBackupRestoreId](#postapiv1systembackuprestoreid) +* [postApiV1SystemBackupRestoreUpload](#postapiv1systembackuprestoreupload) + +## getApiV1SystemBackup + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.backup.getApiV1SystemBackup(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { backupGetApiV1SystemBackup } from "prowlarr/funcs/backupGetApiV1SystemBackup.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await backupGetApiV1SystemBackup(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.BackupResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1SystemBackupId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.backup.deleteApiV1SystemBackupId({ + id: 305836, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { backupDeleteApiV1SystemBackupId } from "prowlarr/funcs/backupDeleteApiV1SystemBackupId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await backupDeleteApiV1SystemBackupId(prowlarr, { + id: 305836, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1SystemBackupIdRequest](../../models/operations/deleteapiv1systembackupidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1SystemBackupRestoreId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.backup.postApiV1SystemBackupRestoreId({ + id: 246520, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { backupPostApiV1SystemBackupRestoreId } from "prowlarr/funcs/backupPostApiV1SystemBackupRestoreId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await backupPostApiV1SystemBackupRestoreId(prowlarr, { + id: 246520, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1SystemBackupRestoreIdRequest](../../models/operations/postapiv1systembackuprestoreidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1SystemBackupRestoreUpload + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.backup.postApiV1SystemBackupRestoreUpload(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { backupPostApiV1SystemBackupRestoreUpload } from "prowlarr/funcs/backupPostApiV1SystemBackupRestoreUpload.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await backupPostApiV1SystemBackupRestoreUpload(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/command/README.md b/docs/sdks/command/README.md new file mode 100644 index 0000000..7d08c7b --- /dev/null +++ b/docs/sdks/command/README.md @@ -0,0 +1,312 @@ +# Command +(*command*) + +## Overview + +### Available Operations + +* [getApiV1CommandId](#getapiv1commandid) +* [deleteApiV1CommandId](#deleteapiv1commandid) +* [postApiV1Command](#postapiv1command) +* [getApiV1Command](#getapiv1command) + +## getApiV1CommandId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.command.getApiV1CommandId({ + id: 274829, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { commandGetApiV1CommandId } from "prowlarr/funcs/commandGetApiV1CommandId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await commandGetApiV1CommandId(prowlarr, { + id: 274829, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1CommandIdRequest](../../models/operations/getapiv1commandidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CommandResource](../../models/commandresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1CommandId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.command.deleteApiV1CommandId({ + id: 932632, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { commandDeleteApiV1CommandId } from "prowlarr/funcs/commandDeleteApiV1CommandId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await commandDeleteApiV1CommandId(prowlarr, { + id: 932632, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1CommandIdRequest](../../models/operations/deleteapiv1commandidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Command + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.command.postApiV1Command(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { commandPostApiV1Command } from "prowlarr/funcs/commandPostApiV1Command.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await commandPostApiV1Command(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.CommandResourceInput](../../models/commandresourceinput.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CommandResource](../../models/commandresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Command + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.command.getApiV1Command(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { commandGetApiV1Command } from "prowlarr/funcs/commandGetApiV1Command.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await commandGetApiV1Command(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CommandResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/customfilter/README.md b/docs/sdks/customfilter/README.md new file mode 100644 index 0000000..c59fb91 --- /dev/null +++ b/docs/sdks/customfilter/README.md @@ -0,0 +1,391 @@ +# CustomFilter +(*customFilter*) + +## Overview + +### Available Operations + +* [getApiV1CustomfilterId](#getapiv1customfilterid) +* [putApiV1CustomfilterId](#putapiv1customfilterid) +* [deleteApiV1CustomfilterId](#deleteapiv1customfilterid) +* [getApiV1Customfilter](#getapiv1customfilter) +* [postApiV1Customfilter](#postapiv1customfilter) + +## getApiV1CustomfilterId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.customFilter.getApiV1CustomfilterId({ + id: 367030, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { customFilterGetApiV1CustomfilterId } from "prowlarr/funcs/customFilterGetApiV1CustomfilterId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await customFilterGetApiV1CustomfilterId(prowlarr, { + id: 367030, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1CustomfilterIdRequest](../../models/operations/getapiv1customfilteridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CustomFilterResource](../../models/customfilterresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1CustomfilterId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.customFilter.putApiV1CustomfilterId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { customFilterPutApiV1CustomfilterId } from "prowlarr/funcs/customFilterPutApiV1CustomfilterId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await customFilterPutApiV1CustomfilterId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1CustomfilterIdRequest](../../models/operations/putapiv1customfilteridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CustomFilterResource](../../models/customfilterresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1CustomfilterId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.customFilter.deleteApiV1CustomfilterId({ + id: 400472, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { customFilterDeleteApiV1CustomfilterId } from "prowlarr/funcs/customFilterDeleteApiV1CustomfilterId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await customFilterDeleteApiV1CustomfilterId(prowlarr, { + id: 400472, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1CustomfilterIdRequest](../../models/operations/deleteapiv1customfilteridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Customfilter + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.customFilter.getApiV1Customfilter(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { customFilterGetApiV1Customfilter } from "prowlarr/funcs/customFilterGetApiV1Customfilter.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await customFilterGetApiV1Customfilter(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CustomFilterResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Customfilter + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.customFilter.postApiV1Customfilter(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { customFilterPostApiV1Customfilter } from "prowlarr/funcs/customFilterPostApiV1Customfilter.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await customFilterPostApiV1Customfilter(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.CustomFilterResource](../../models/customfilterresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.CustomFilterResource](../../models/customfilterresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/developmentconfig/README.md b/docs/sdks/developmentconfig/README.md new file mode 100644 index 0000000..7d226de --- /dev/null +++ b/docs/sdks/developmentconfig/README.md @@ -0,0 +1,239 @@ +# DevelopmentConfig +(*developmentConfig*) + +## Overview + +### Available Operations + +* [putApiV1ConfigDevelopmentId](#putapiv1configdevelopmentid) +* [getApiV1ConfigDevelopmentId](#getapiv1configdevelopmentid) +* [getApiV1ConfigDevelopment](#getapiv1configdevelopment) + +## putApiV1ConfigDevelopmentId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.developmentConfig.putApiV1ConfigDevelopmentId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { developmentConfigPutApiV1ConfigDevelopmentId } from "prowlarr/funcs/developmentConfigPutApiV1ConfigDevelopmentId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await developmentConfigPutApiV1ConfigDevelopmentId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1ConfigDevelopmentIdRequest](../../models/operations/putapiv1configdevelopmentidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DevelopmentConfigResource](../../models/developmentconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigDevelopmentId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.developmentConfig.getApiV1ConfigDevelopmentId({ + id: 820899, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { developmentConfigGetApiV1ConfigDevelopmentId } from "prowlarr/funcs/developmentConfigGetApiV1ConfigDevelopmentId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await developmentConfigGetApiV1ConfigDevelopmentId(prowlarr, { + id: 820899, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1ConfigDevelopmentIdRequest](../../models/operations/getapiv1configdevelopmentidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DevelopmentConfigResource](../../models/developmentconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigDevelopment + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.developmentConfig.getApiV1ConfigDevelopment(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { developmentConfigGetApiV1ConfigDevelopment } from "prowlarr/funcs/developmentConfigGetApiV1ConfigDevelopment.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await developmentConfigGetApiV1ConfigDevelopment(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DevelopmentConfigResource](../../models/developmentconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/downloadclient/README.md b/docs/sdks/downloadclient/README.md new file mode 100644 index 0000000..aebeea7 --- /dev/null +++ b/docs/sdks/downloadclient/README.md @@ -0,0 +1,835 @@ +# DownloadClient +(*downloadClient*) + +## Overview + +### Available Operations + +* [getApiV1DownloadclientId](#getapiv1downloadclientid) +* [putApiV1DownloadclientId](#putapiv1downloadclientid) +* [deleteApiV1DownloadclientId](#deleteapiv1downloadclientid) +* [getApiV1Downloadclient](#getapiv1downloadclient) +* [postApiV1Downloadclient](#postapiv1downloadclient) +* [putApiV1DownloadclientBulk](#putapiv1downloadclientbulk) +* [deleteApiV1DownloadclientBulk](#deleteapiv1downloadclientbulk) +* [getApiV1DownloadclientSchema](#getapiv1downloadclientschema) +* [postApiV1DownloadclientTest](#postapiv1downloadclienttest) +* [postApiV1DownloadclientTestall](#postapiv1downloadclienttestall) +* [postApiV1DownloadclientActionName](#postapiv1downloadclientactionname) + +## getApiV1DownloadclientId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.getApiV1DownloadclientId({ + id: 335668, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientGetApiV1DownloadclientId } from "prowlarr/funcs/downloadClientGetApiV1DownloadclientId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientGetApiV1DownloadclientId(prowlarr, { + id: 335668, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1DownloadclientIdRequest](../../models/operations/getapiv1downloadclientidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource](../../models/downloadclientresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1DownloadclientId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.putApiV1DownloadclientId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPutApiV1DownloadclientId } from "prowlarr/funcs/downloadClientPutApiV1DownloadclientId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPutApiV1DownloadclientId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1DownloadclientIdRequest](../../models/operations/putapiv1downloadclientidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource](../../models/downloadclientresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1DownloadclientId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.downloadClient.deleteApiV1DownloadclientId({ + id: 670627, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientDeleteApiV1DownloadclientId } from "prowlarr/funcs/downloadClientDeleteApiV1DownloadclientId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientDeleteApiV1DownloadclientId(prowlarr, { + id: 670627, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1DownloadclientIdRequest](../../models/operations/deleteapiv1downloadclientidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Downloadclient + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.getApiV1Downloadclient(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientGetApiV1Downloadclient } from "prowlarr/funcs/downloadClientGetApiV1Downloadclient.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientGetApiV1Downloadclient(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Downloadclient + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.postApiV1Downloadclient({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPostApiV1Downloadclient } from "prowlarr/funcs/downloadClientPostApiV1Downloadclient.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPostApiV1Downloadclient(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1DownloadclientRequest](../../models/operations/postapiv1downloadclientrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource](../../models/downloadclientresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1DownloadclientBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.putApiV1DownloadclientBulk(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPutApiV1DownloadclientBulk } from "prowlarr/funcs/downloadClientPutApiV1DownloadclientBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPutApiV1DownloadclientBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.DownloadClientBulkResource](../../models/downloadclientbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource](../../models/downloadclientresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1DownloadclientBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.downloadClient.deleteApiV1DownloadclientBulk(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientDeleteApiV1DownloadclientBulk } from "prowlarr/funcs/downloadClientDeleteApiV1DownloadclientBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientDeleteApiV1DownloadclientBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.DownloadClientBulkResource](../../models/downloadclientbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1DownloadclientSchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClient.getApiV1DownloadclientSchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientGetApiV1DownloadclientSchema } from "prowlarr/funcs/downloadClientGetApiV1DownloadclientSchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientGetApiV1DownloadclientSchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1DownloadclientTest + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.downloadClient.postApiV1DownloadclientTest({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPostApiV1DownloadclientTest } from "prowlarr/funcs/downloadClientPostApiV1DownloadclientTest.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPostApiV1DownloadclientTest(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1DownloadclientTestRequest](../../models/operations/postapiv1downloadclienttestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1DownloadclientTestall + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.downloadClient.postApiV1DownloadclientTestall(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPostApiV1DownloadclientTestall } from "prowlarr/funcs/downloadClientPostApiV1DownloadclientTestall.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPostApiV1DownloadclientTestall(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1DownloadclientActionName + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.downloadClient.postApiV1DownloadclientActionName({ + name: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientPostApiV1DownloadclientActionName } from "prowlarr/funcs/downloadClientPostApiV1DownloadclientActionName.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientPostApiV1DownloadclientActionName(prowlarr, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1DownloadclientActionNameRequest](../../models/operations/postapiv1downloadclientactionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/downloadclientconfig/README.md b/docs/sdks/downloadclientconfig/README.md new file mode 100644 index 0000000..9e02e73 --- /dev/null +++ b/docs/sdks/downloadclientconfig/README.md @@ -0,0 +1,239 @@ +# DownloadClientConfig +(*downloadClientConfig*) + +## Overview + +### Available Operations + +* [getApiV1ConfigDownloadclientId](#getapiv1configdownloadclientid) +* [putApiV1ConfigDownloadclientId](#putapiv1configdownloadclientid) +* [getApiV1ConfigDownloadclient](#getapiv1configdownloadclient) + +## getApiV1ConfigDownloadclientId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClientConfig.getApiV1ConfigDownloadclientId({ + id: 300484, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientConfigGetApiV1ConfigDownloadclientId } from "prowlarr/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientConfigGetApiV1ConfigDownloadclientId(prowlarr, { + id: 300484, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1ConfigDownloadclientIdRequest](../../models/operations/getapiv1configdownloadclientidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientConfigResource](../../models/downloadclientconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1ConfigDownloadclientId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClientConfig.putApiV1ConfigDownloadclientId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientConfigPutApiV1ConfigDownloadclientId } from "prowlarr/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientConfigPutApiV1ConfigDownloadclientId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1ConfigDownloadclientIdRequest](../../models/operations/putapiv1configdownloadclientidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientConfigResource](../../models/downloadclientconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigDownloadclient + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.downloadClientConfig.getApiV1ConfigDownloadclient(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { downloadClientConfigGetApiV1ConfigDownloadclient } from "prowlarr/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await downloadClientConfigGetApiV1ConfigDownloadclient(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DownloadClientConfigResource](../../models/downloadclientconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/filesystem/README.md b/docs/sdks/filesystem/README.md new file mode 100644 index 0000000..15dcebe --- /dev/null +++ b/docs/sdks/filesystem/README.md @@ -0,0 +1,153 @@ +# FileSystem +(*fileSystem*) + +## Overview + +### Available Operations + +* [getApiV1Filesystem](#getapiv1filesystem) +* [getApiV1FilesystemType](#getapiv1filesystemtype) + +## getApiV1Filesystem + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.fileSystem.getApiV1Filesystem({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { fileSystemGetApiV1Filesystem } from "prowlarr/funcs/fileSystemGetApiV1Filesystem.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await fileSystemGetApiV1Filesystem(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1FilesystemRequest](../../models/operations/getapiv1filesystemrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1FilesystemType + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.fileSystem.getApiV1FilesystemType({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { fileSystemGetApiV1FilesystemType } from "prowlarr/funcs/fileSystemGetApiV1FilesystemType.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await fileSystemGetApiV1FilesystemType(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1FilesystemTypeRequest](../../models/operations/getapiv1filesystemtyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/health/README.md b/docs/sdks/health/README.md new file mode 100644 index 0000000..3f8ab33 --- /dev/null +++ b/docs/sdks/health/README.md @@ -0,0 +1,81 @@ +# Health +(*health*) + +## Overview + +### Available Operations + +* [getApiV1Health](#getapiv1health) + +## getApiV1Health + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.health.getApiV1Health(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { healthGetApiV1Health } from "prowlarr/funcs/healthGetApiV1Health.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await healthGetApiV1Health(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HealthResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/history/README.md b/docs/sdks/history/README.md new file mode 100644 index 0000000..32c4210 --- /dev/null +++ b/docs/sdks/history/README.md @@ -0,0 +1,232 @@ +# History +(*history*) + +## Overview + +### Available Operations + +* [getApiV1History](#getapiv1history) +* [getApiV1HistorySince](#getapiv1historysince) +* [getApiV1HistoryIndexer](#getapiv1historyindexer) + +## getApiV1History + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.history.getApiV1History({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { historyGetApiV1History } from "prowlarr/funcs/historyGetApiV1History.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await historyGetApiV1History(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1HistoryRequest](../../models/operations/getapiv1historyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HistoryResourcePagingResource](../../models/historyresourcepagingresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1HistorySince + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.history.getApiV1HistorySince({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { historyGetApiV1HistorySince } from "prowlarr/funcs/historyGetApiV1HistorySince.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await historyGetApiV1HistorySince(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1HistorySinceRequest](../../models/operations/getapiv1historysincerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HistoryResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1HistoryIndexer + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.history.getApiV1HistoryIndexer({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { historyGetApiV1HistoryIndexer } from "prowlarr/funcs/historyGetApiV1HistoryIndexer.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await historyGetApiV1HistoryIndexer(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1HistoryIndexerRequest](../../models/operations/getapiv1historyindexerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HistoryResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/hostconfig/README.md b/docs/sdks/hostconfig/README.md new file mode 100644 index 0000000..c07563a --- /dev/null +++ b/docs/sdks/hostconfig/README.md @@ -0,0 +1,239 @@ +# HostConfig +(*hostConfig*) + +## Overview + +### Available Operations + +* [getApiV1ConfigHostId](#getapiv1confighostid) +* [putApiV1ConfigHostId](#putapiv1confighostid) +* [getApiV1ConfigHost](#getapiv1confighost) + +## getApiV1ConfigHostId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.hostConfig.getApiV1ConfigHostId({ + id: 316887, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { hostConfigGetApiV1ConfigHostId } from "prowlarr/funcs/hostConfigGetApiV1ConfigHostId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await hostConfigGetApiV1ConfigHostId(prowlarr, { + id: 316887, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1ConfigHostIdRequest](../../models/operations/getapiv1confighostidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HostConfigResource](../../models/hostconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1ConfigHostId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.hostConfig.putApiV1ConfigHostId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { hostConfigPutApiV1ConfigHostId } from "prowlarr/funcs/hostConfigPutApiV1ConfigHostId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await hostConfigPutApiV1ConfigHostId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1ConfigHostIdRequest](../../models/operations/putapiv1confighostidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HostConfigResource](../../models/hostconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigHost + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.hostConfig.getApiV1ConfigHost(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { hostConfigGetApiV1ConfigHost } from "prowlarr/funcs/hostConfigGetApiV1ConfigHost.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await hostConfigGetApiV1ConfigHost(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.HostConfigResource](../../models/hostconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexer/README.md b/docs/sdks/indexer/README.md new file mode 100644 index 0000000..4afdef7 --- /dev/null +++ b/docs/sdks/indexer/README.md @@ -0,0 +1,835 @@ +# Indexer +(*indexer*) + +## Overview + +### Available Operations + +* [getApiV1IndexerId](#getapiv1indexerid) +* [putApiV1IndexerId](#putapiv1indexerid) +* [deleteApiV1IndexerId](#deleteapiv1indexerid) +* [getApiV1Indexer](#getapiv1indexer) +* [postApiV1Indexer](#postapiv1indexer) +* [putApiV1IndexerBulk](#putapiv1indexerbulk) +* [deleteApiV1IndexerBulk](#deleteapiv1indexerbulk) +* [getApiV1IndexerSchema](#getapiv1indexerschema) +* [postApiV1IndexerTest](#postapiv1indexertest) +* [postApiV1IndexerTestall](#postapiv1indexertestall) +* [postApiV1IndexerActionName](#postapiv1indexeractionname) + +## getApiV1IndexerId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.getApiV1IndexerId({ + id: 596285, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerGetApiV1IndexerId } from "prowlarr/funcs/indexerGetApiV1IndexerId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerGetApiV1IndexerId(prowlarr, { + id: 596285, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1IndexerIdRequest](../../models/operations/getapiv1indexeridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource](../../models/indexerresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1IndexerId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.putApiV1IndexerId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPutApiV1IndexerId } from "prowlarr/funcs/indexerPutApiV1IndexerId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPutApiV1IndexerId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1IndexerIdRequest](../../models/operations/putapiv1indexeridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource](../../models/indexerresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1IndexerId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexer.deleteApiV1IndexerId({ + id: 158662, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerDeleteApiV1IndexerId } from "prowlarr/funcs/indexerDeleteApiV1IndexerId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerDeleteApiV1IndexerId(prowlarr, { + id: 158662, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1IndexerIdRequest](../../models/operations/deleteapiv1indexeridrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Indexer + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.getApiV1Indexer(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerGetApiV1Indexer } from "prowlarr/funcs/indexerGetApiV1Indexer.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerGetApiV1Indexer(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Indexer + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.postApiV1Indexer({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPostApiV1Indexer } from "prowlarr/funcs/indexerPostApiV1Indexer.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPostApiV1Indexer(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerRequest](../../models/operations/postapiv1indexerrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource](../../models/indexerresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1IndexerBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.putApiV1IndexerBulk(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPutApiV1IndexerBulk } from "prowlarr/funcs/indexerPutApiV1IndexerBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPutApiV1IndexerBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.IndexerBulkResource](../../models/indexerbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource](../../models/indexerresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1IndexerBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexer.deleteApiV1IndexerBulk(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerDeleteApiV1IndexerBulk } from "prowlarr/funcs/indexerDeleteApiV1IndexerBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerDeleteApiV1IndexerBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.IndexerBulkResource](../../models/indexerbulkresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1IndexerSchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexer.getApiV1IndexerSchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerGetApiV1IndexerSchema } from "prowlarr/funcs/indexerGetApiV1IndexerSchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerGetApiV1IndexerSchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerTest + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexer.postApiV1IndexerTest({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPostApiV1IndexerTest } from "prowlarr/funcs/indexerPostApiV1IndexerTest.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPostApiV1IndexerTest(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerTestRequest](../../models/operations/postapiv1indexertestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerTestall + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexer.postApiV1IndexerTestall(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPostApiV1IndexerTestall } from "prowlarr/funcs/indexerPostApiV1IndexerTestall.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPostApiV1IndexerTestall(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerActionName + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexer.postApiV1IndexerActionName({ + name: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerPostApiV1IndexerActionName } from "prowlarr/funcs/indexerPostApiV1IndexerActionName.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerPostApiV1IndexerActionName(prowlarr, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerActionNameRequest](../../models/operations/postapiv1indexeractionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexerdefaultcategories/README.md b/docs/sdks/indexerdefaultcategories/README.md new file mode 100644 index 0000000..aad4503 --- /dev/null +++ b/docs/sdks/indexerdefaultcategories/README.md @@ -0,0 +1,81 @@ +# IndexerDefaultCategories +(*indexerDefaultCategories*) + +## Overview + +### Available Operations + +* [getApiV1IndexerCategories](#getapiv1indexercategories) + +## getApiV1IndexerCategories + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerDefaultCategories.getApiV1IndexerCategories(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerDefaultCategoriesGetApiV1IndexerCategories } from "prowlarr/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerDefaultCategoriesGetApiV1IndexerCategories(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerCategory[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexerproxy/README.md b/docs/sdks/indexerproxy/README.md new file mode 100644 index 0000000..1b07506 --- /dev/null +++ b/docs/sdks/indexerproxy/README.md @@ -0,0 +1,687 @@ +# IndexerProxy +(*indexerProxy*) + +## Overview + +### Available Operations + +* [getApiV1IndexerproxyId](#getapiv1indexerproxyid) +* [putApiV1IndexerproxyId](#putapiv1indexerproxyid) +* [deleteApiV1IndexerproxyId](#deleteapiv1indexerproxyid) +* [getApiV1Indexerproxy](#getapiv1indexerproxy) +* [postApiV1Indexerproxy](#postapiv1indexerproxy) +* [getApiV1IndexerproxySchema](#getapiv1indexerproxyschema) +* [postApiV1IndexerproxyTest](#postapiv1indexerproxytest) +* [postApiV1IndexerproxyTestall](#postapiv1indexerproxytestall) +* [postApiV1IndexerproxyActionName](#postapiv1indexerproxyactionname) + +## getApiV1IndexerproxyId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerProxy.getApiV1IndexerproxyId({ + id: 624797, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyGetApiV1IndexerproxyId } from "prowlarr/funcs/indexerProxyGetApiV1IndexerproxyId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyGetApiV1IndexerproxyId(prowlarr, { + id: 624797, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1IndexerproxyIdRequest](../../models/operations/getapiv1indexerproxyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerProxyResource](../../models/indexerproxyresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1IndexerproxyId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerProxy.putApiV1IndexerproxyId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyPutApiV1IndexerproxyId } from "prowlarr/funcs/indexerProxyPutApiV1IndexerproxyId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyPutApiV1IndexerproxyId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1IndexerproxyIdRequest](../../models/operations/putapiv1indexerproxyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerProxyResource](../../models/indexerproxyresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1IndexerproxyId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexerProxy.deleteApiV1IndexerproxyId({ + id: 291937, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyDeleteApiV1IndexerproxyId } from "prowlarr/funcs/indexerProxyDeleteApiV1IndexerproxyId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyDeleteApiV1IndexerproxyId(prowlarr, { + id: 291937, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1IndexerproxyIdRequest](../../models/operations/deleteapiv1indexerproxyidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Indexerproxy + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerProxy.getApiV1Indexerproxy(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyGetApiV1Indexerproxy } from "prowlarr/funcs/indexerProxyGetApiV1Indexerproxy.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyGetApiV1Indexerproxy(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerProxyResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Indexerproxy + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerProxy.postApiV1Indexerproxy({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyPostApiV1Indexerproxy } from "prowlarr/funcs/indexerProxyPostApiV1Indexerproxy.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyPostApiV1Indexerproxy(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerproxyRequest](../../models/operations/postapiv1indexerproxyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerProxyResource](../../models/indexerproxyresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1IndexerproxySchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerProxy.getApiV1IndexerproxySchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyGetApiV1IndexerproxySchema } from "prowlarr/funcs/indexerProxyGetApiV1IndexerproxySchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyGetApiV1IndexerproxySchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerProxyResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerproxyTest + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexerProxy.postApiV1IndexerproxyTest({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyPostApiV1IndexerproxyTest } from "prowlarr/funcs/indexerProxyPostApiV1IndexerproxyTest.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyPostApiV1IndexerproxyTest(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerproxyTestRequest](../../models/operations/postapiv1indexerproxytestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerproxyTestall + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexerProxy.postApiV1IndexerproxyTestall(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyPostApiV1IndexerproxyTestall } from "prowlarr/funcs/indexerProxyPostApiV1IndexerproxyTestall.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyPostApiV1IndexerproxyTestall(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1IndexerproxyActionName + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.indexerProxy.postApiV1IndexerproxyActionName({ + name: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerProxyPostApiV1IndexerproxyActionName } from "prowlarr/funcs/indexerProxyPostApiV1IndexerproxyActionName.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerProxyPostApiV1IndexerproxyActionName(prowlarr, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1IndexerproxyActionNameRequest](../../models/operations/postapiv1indexerproxyactionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexerstats/README.md b/docs/sdks/indexerstats/README.md new file mode 100644 index 0000000..abc808d --- /dev/null +++ b/docs/sdks/indexerstats/README.md @@ -0,0 +1,82 @@ +# IndexerStats +(*indexerStats*) + +## Overview + +### Available Operations + +* [getApiV1Indexerstats](#getapiv1indexerstats) + +## getApiV1Indexerstats + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerStats.getApiV1Indexerstats({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerStatsGetApiV1Indexerstats } from "prowlarr/funcs/indexerStatsGetApiV1Indexerstats.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerStatsGetApiV1Indexerstats(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1IndexerstatsRequest](../../models/operations/getapiv1indexerstatsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerStatsResource](../../models/indexerstatsresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexerstatus/README.md b/docs/sdks/indexerstatus/README.md new file mode 100644 index 0000000..0e3f4b5 --- /dev/null +++ b/docs/sdks/indexerstatus/README.md @@ -0,0 +1,81 @@ +# IndexerStatus +(*indexerStatus*) + +## Overview + +### Available Operations + +* [getApiV1Indexerstatus](#getapiv1indexerstatus) + +## getApiV1Indexerstatus + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.indexerStatus.getApiV1Indexerstatus(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { indexerStatusGetApiV1Indexerstatus } from "prowlarr/funcs/indexerStatusGetApiV1Indexerstatus.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await indexerStatusGetApiV1Indexerstatus(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.IndexerStatusResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/localization/README.md b/docs/sdks/localization/README.md new file mode 100644 index 0000000..0b26d15 --- /dev/null +++ b/docs/sdks/localization/README.md @@ -0,0 +1,153 @@ +# Localization +(*localization*) + +## Overview + +### Available Operations + +* [getApiV1Localization](#getapiv1localization) +* [getApiV1LocalizationOptions](#getapiv1localizationoptions) + +## getApiV1Localization + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.localization.getApiV1Localization(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { localizationGetApiV1Localization } from "prowlarr/funcs/localizationGetApiV1Localization.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await localizationGetApiV1Localization(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1LocalizationOptions + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.localization.getApiV1LocalizationOptions(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { localizationGetApiV1LocalizationOptions } from "prowlarr/funcs/localizationGetApiV1LocalizationOptions.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await localizationGetApiV1LocalizationOptions(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.LocalizationOption[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md new file mode 100644 index 0000000..c16775d --- /dev/null +++ b/docs/sdks/log/README.md @@ -0,0 +1,82 @@ +# Log +(*log*) + +## Overview + +### Available Operations + +* [getApiV1Log](#getapiv1log) + +## getApiV1Log + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.log.getApiV1Log({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { logGetApiV1Log } from "prowlarr/funcs/logGetApiV1Log.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await logGetApiV1Log(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1LogRequest](../../models/operations/getapiv1logrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.LogResourcePagingResource](../../models/logresourcepagingresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/logfile/README.md b/docs/sdks/logfile/README.md new file mode 100644 index 0000000..9ca424e --- /dev/null +++ b/docs/sdks/logfile/README.md @@ -0,0 +1,160 @@ +# LogFile +(*logFile*) + +## Overview + +### Available Operations + +* [getApiV1LogFile](#getapiv1logfile) +* [getApiV1LogFileFilename](#getapiv1logfilefilename) + +## getApiV1LogFile + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.logFile.getApiV1LogFile(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { logFileGetApiV1LogFile } from "prowlarr/funcs/logFileGetApiV1LogFile.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await logFileGetApiV1LogFile(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.LogFileResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1LogFileFilename + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.logFile.getApiV1LogFileFilename({ + filename: "example.file", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { logFileGetApiV1LogFileFilename } from "prowlarr/funcs/logFileGetApiV1LogFileFilename.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await logFileGetApiV1LogFileFilename(prowlarr, { + filename: "example.file", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1LogFileFilenameRequest](../../models/operations/getapiv1logfilefilenamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/newznab/README.md b/docs/sdks/newznab/README.md new file mode 100644 index 0000000..7a764c9 --- /dev/null +++ b/docs/sdks/newznab/README.md @@ -0,0 +1,315 @@ +# Newznab +(*newznab*) + +## Overview + +### Available Operations + +* [getApiV1IndexerIdNewznab](#getapiv1indexeridnewznab) +* [getIdApi](#getidapi) +* [getApiV1IndexerIdDownload](#getapiv1indexeriddownload) +* [getIdDownload](#getiddownload) + +## getApiV1IndexerIdNewznab + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.newznab.getApiV1IndexerIdNewznab({ + id: 395958, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { newznabGetApiV1IndexerIdNewznab } from "prowlarr/funcs/newznabGetApiV1IndexerIdNewznab.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await newznabGetApiV1IndexerIdNewznab(prowlarr, { + id: 395958, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1IndexerIdNewznabRequest](../../models/operations/getapiv1indexeridnewznabrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getIdApi + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.newznab.getIdApi({ + id: 915193, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { newznabGetIdApi } from "prowlarr/funcs/newznabGetIdApi.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await newznabGetIdApi(prowlarr, { + id: 915193, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetIdApiRequest](../../models/operations/getidapirequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1IndexerIdDownload + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.newznab.getApiV1IndexerIdDownload({ + id: 159549, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { newznabGetApiV1IndexerIdDownload } from "prowlarr/funcs/newznabGetApiV1IndexerIdDownload.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await newznabGetApiV1IndexerIdDownload(prowlarr, { + id: 159549, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1IndexerIdDownloadRequest](../../models/operations/getapiv1indexeriddownloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getIdDownload + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.newznab.getIdDownload({ + id: 531578, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { newznabGetIdDownload } from "prowlarr/funcs/newznabGetIdDownload.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await newznabGetIdDownload(prowlarr, { + id: 531578, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetIdDownloadRequest](../../models/operations/getiddownloadrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/notification/README.md b/docs/sdks/notification/README.md new file mode 100644 index 0000000..2b05b30 --- /dev/null +++ b/docs/sdks/notification/README.md @@ -0,0 +1,687 @@ +# Notification +(*notification*) + +## Overview + +### Available Operations + +* [getApiV1NotificationId](#getapiv1notificationid) +* [putApiV1NotificationId](#putapiv1notificationid) +* [deleteApiV1NotificationId](#deleteapiv1notificationid) +* [getApiV1Notification](#getapiv1notification) +* [postApiV1Notification](#postapiv1notification) +* [getApiV1NotificationSchema](#getapiv1notificationschema) +* [postApiV1NotificationTest](#postapiv1notificationtest) +* [postApiV1NotificationTestall](#postapiv1notificationtestall) +* [postApiV1NotificationActionName](#postapiv1notificationactionname) + +## getApiV1NotificationId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.notification.getApiV1NotificationId({ + id: 383207, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationGetApiV1NotificationId } from "prowlarr/funcs/notificationGetApiV1NotificationId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationGetApiV1NotificationId(prowlarr, { + id: 383207, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1NotificationIdRequest](../../models/operations/getapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1NotificationId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.notification.putApiV1NotificationId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationPutApiV1NotificationId } from "prowlarr/funcs/notificationPutApiV1NotificationId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationPutApiV1NotificationId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1NotificationIdRequest](../../models/operations/putapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1NotificationId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.notification.deleteApiV1NotificationId({ + id: 312155, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationDeleteApiV1NotificationId } from "prowlarr/funcs/notificationDeleteApiV1NotificationId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationDeleteApiV1NotificationId(prowlarr, { + id: 312155, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1NotificationIdRequest](../../models/operations/deleteapiv1notificationidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Notification + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.notification.getApiV1Notification(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationGetApiV1Notification } from "prowlarr/funcs/notificationGetApiV1Notification.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationGetApiV1Notification(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.NotificationResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Notification + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.notification.postApiV1Notification({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationPostApiV1Notification } from "prowlarr/funcs/notificationPostApiV1Notification.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationPostApiV1Notification(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1NotificationRequest](../../models/operations/postapiv1notificationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.NotificationResource](../../models/notificationresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1NotificationSchema + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.notification.getApiV1NotificationSchema(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationGetApiV1NotificationSchema } from "prowlarr/funcs/notificationGetApiV1NotificationSchema.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationGetApiV1NotificationSchema(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.NotificationResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1NotificationTest + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.notification.postApiV1NotificationTest({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationPostApiV1NotificationTest } from "prowlarr/funcs/notificationPostApiV1NotificationTest.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationPostApiV1NotificationTest(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1NotificationTestRequest](../../models/operations/postapiv1notificationtestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1NotificationTestall + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.notification.postApiV1NotificationTestall(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationPostApiV1NotificationTestall } from "prowlarr/funcs/notificationPostApiV1NotificationTestall.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationPostApiV1NotificationTestall(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1NotificationActionName + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.notification.postApiV1NotificationActionName({ + name: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { notificationPostApiV1NotificationActionName } from "prowlarr/funcs/notificationPostApiV1NotificationActionName.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await notificationPostApiV1NotificationActionName(prowlarr, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PostApiV1NotificationActionNameRequest](../../models/operations/postapiv1notificationactionnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ping/README.md b/docs/sdks/ping/README.md new file mode 100644 index 0000000..02f39b1 --- /dev/null +++ b/docs/sdks/ping/README.md @@ -0,0 +1,155 @@ +# Ping +(*ping*) + +## Overview + +### Available Operations + +* [getPing](#getping) +* [headPing](#headping) + +## getPing + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.ping.getPing(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { pingGetPing } from "prowlarr/funcs/pingGetPing.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await pingGetPing(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PingResource](../../models/pingresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## headPing + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.ping.headPing(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { pingHeadPing } from "prowlarr/funcs/pingHeadPing.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await pingHeadPing(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PingResource](../../models/pingresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/prowlarr/README.md b/docs/sdks/prowlarr/README.md new file mode 100644 index 0000000..828e40f --- /dev/null +++ b/docs/sdks/prowlarr/README.md @@ -0,0 +1,7 @@ +# Prowlarr SDK + +## Overview + +Prowlarr: Prowlarr API docs + +### Available Operations diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md new file mode 100644 index 0000000..d6af83f --- /dev/null +++ b/docs/sdks/search/README.md @@ -0,0 +1,232 @@ +# Search +(*search*) + +## Overview + +### Available Operations + +* [postApiV1Search](#postapiv1search) +* [getApiV1Search](#getapiv1search) +* [postApiV1SearchBulk](#postapiv1searchbulk) + +## postApiV1Search + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.search.postApiV1Search(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { searchPostApiV1Search } from "prowlarr/funcs/searchPostApiV1Search.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await searchPostApiV1Search(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.ReleaseResourceInput](../../models/releaseresourceinput.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ReleaseResource](../../models/releaseresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Search + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.search.getApiV1Search({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { searchGetApiV1Search } from "prowlarr/funcs/searchGetApiV1Search.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await searchGetApiV1Search(prowlarr, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1SearchRequest](../../models/operations/getapiv1searchrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ReleaseResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1SearchBulk + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.search.postApiV1SearchBulk(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { searchPostApiV1SearchBulk } from "prowlarr/funcs/searchPostApiV1SearchBulk.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await searchPostApiV1SearchBulk(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.ReleaseResourceInput[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ReleaseResource](../../models/releaseresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/staticresource/README.md b/docs/sdks/staticresource/README.md new file mode 100644 index 0000000..18dd11e --- /dev/null +++ b/docs/sdks/staticresource/README.md @@ -0,0 +1,305 @@ +# StaticResource +(*staticResource*) + +## Overview + +### Available Operations + +* [getLogin](#getlogin) +* [getContentPath](#getcontentpath) +* [get](#get) +* [getPath](#getpath) + +## getLogin + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.staticResource.getLogin(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { staticResourceGetLogin } from "prowlarr/funcs/staticResourceGetLogin.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await staticResourceGetLogin(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getContentPath + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.staticResource.getContentPath({ + path: "/dev", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { staticResourceGetContentPath } from "prowlarr/funcs/staticResourceGetContentPath.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await staticResourceGetContentPath(prowlarr, { + path: "/dev", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetContentPathRequest](../../models/operations/getcontentpathrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.staticResource.get(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { staticResourceGet } from "prowlarr/funcs/staticResourceGet.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await staticResourceGet(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getPath + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.staticResource.getPath({ + path: "/etc/defaults", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { staticResourceGetPath } from "prowlarr/funcs/staticResourceGetPath.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await staticResourceGetPath(prowlarr, { + path: "/etc/defaults", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPathRequest](../../models/operations/getpathrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/system/README.md b/docs/sdks/system/README.md new file mode 100644 index 0000000..a76e455 --- /dev/null +++ b/docs/sdks/system/README.md @@ -0,0 +1,369 @@ +# System +(*system*) + +## Overview + +### Available Operations + +* [getApiV1SystemStatus](#getapiv1systemstatus) +* [getApiV1SystemRoutes](#getapiv1systemroutes) +* [getApiV1SystemRoutesDuplicate](#getapiv1systemroutesduplicate) +* [postApiV1SystemShutdown](#postapiv1systemshutdown) +* [postApiV1SystemRestart](#postapiv1systemrestart) + +## getApiV1SystemStatus + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.system.getApiV1SystemStatus(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { systemGetApiV1SystemStatus } from "prowlarr/funcs/systemGetApiV1SystemStatus.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await systemGetApiV1SystemStatus(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.SystemResource](../../models/systemresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1SystemRoutes + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.system.getApiV1SystemRoutes(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { systemGetApiV1SystemRoutes } from "prowlarr/funcs/systemGetApiV1SystemRoutes.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await systemGetApiV1SystemRoutes(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1SystemRoutesDuplicate + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.system.getApiV1SystemRoutesDuplicate(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { systemGetApiV1SystemRoutesDuplicate } from "prowlarr/funcs/systemGetApiV1SystemRoutesDuplicate.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await systemGetApiV1SystemRoutesDuplicate(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1SystemShutdown + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.system.postApiV1SystemShutdown(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { systemPostApiV1SystemShutdown } from "prowlarr/funcs/systemPostApiV1SystemShutdown.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await systemPostApiV1SystemShutdown(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1SystemRestart + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.system.postApiV1SystemRestart(); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { systemPostApiV1SystemRestart } from "prowlarr/funcs/systemPostApiV1SystemRestart.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await systemPostApiV1SystemRestart(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/tag/README.md b/docs/sdks/tag/README.md new file mode 100644 index 0000000..e7beb32 --- /dev/null +++ b/docs/sdks/tag/README.md @@ -0,0 +1,391 @@ +# Tag +(*tag*) + +## Overview + +### Available Operations + +* [getApiV1TagId](#getapiv1tagid) +* [putApiV1TagId](#putapiv1tagid) +* [deleteApiV1TagId](#deleteapiv1tagid) +* [getApiV1Tag](#getapiv1tag) +* [postApiV1Tag](#postapiv1tag) + +## getApiV1TagId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tag.getApiV1TagId({ + id: 828174, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagGetApiV1TagId } from "prowlarr/funcs/tagGetApiV1TagId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagGetApiV1TagId(prowlarr, { + id: 828174, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1TagIdRequest](../../models/operations/getapiv1tagidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagResource](../../models/tagresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## putApiV1TagId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tag.putApiV1TagId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagPutApiV1TagId } from "prowlarr/funcs/tagPutApiV1TagId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagPutApiV1TagId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1TagIdRequest](../../models/operations/putapiv1tagidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagResource](../../models/tagresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteApiV1TagId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + await prowlarr.tag.deleteApiV1TagId({ + id: 465312, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagDeleteApiV1TagId } from "prowlarr/funcs/tagDeleteApiV1TagId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagDeleteApiV1TagId(prowlarr, { + id: 465312, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteApiV1TagIdRequest](../../models/operations/deleteapiv1tagidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1Tag + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tag.getApiV1Tag(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagGetApiV1Tag } from "prowlarr/funcs/tagGetApiV1Tag.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagGetApiV1Tag(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## postApiV1Tag + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tag.postApiV1Tag(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagPostApiV1Tag } from "prowlarr/funcs/tagPostApiV1Tag.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagPostApiV1Tag(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [models.TagResource](../../models/tagresource.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagResource](../../models/tagresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/tagdetails/README.md b/docs/sdks/tagdetails/README.md new file mode 100644 index 0000000..3d573bf --- /dev/null +++ b/docs/sdks/tagdetails/README.md @@ -0,0 +1,160 @@ +# TagDetails +(*tagDetails*) + +## Overview + +### Available Operations + +* [getApiV1TagDetailId](#getapiv1tagdetailid) +* [getApiV1TagDetail](#getapiv1tagdetail) + +## getApiV1TagDetailId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tagDetails.getApiV1TagDetailId({ + id: 303785, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagDetailsGetApiV1TagDetailId } from "prowlarr/funcs/tagDetailsGetApiV1TagDetailId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagDetailsGetApiV1TagDetailId(prowlarr, { + id: 303785, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1TagDetailIdRequest](../../models/operations/getapiv1tagdetailidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagDetailsResource](../../models/tagdetailsresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1TagDetail + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.tagDetails.getApiV1TagDetail(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { tagDetailsGetApiV1TagDetail } from "prowlarr/funcs/tagDetailsGetApiV1TagDetail.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await tagDetailsGetApiV1TagDetail(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TagDetailsResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/task/README.md b/docs/sdks/task/README.md new file mode 100644 index 0000000..2cf301f --- /dev/null +++ b/docs/sdks/task/README.md @@ -0,0 +1,160 @@ +# Task +(*task*) + +## Overview + +### Available Operations + +* [getApiV1SystemTask](#getapiv1systemtask) +* [getApiV1SystemTaskId](#getapiv1systemtaskid) + +## getApiV1SystemTask + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.task.getApiV1SystemTask(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { taskGetApiV1SystemTask } from "prowlarr/funcs/taskGetApiV1SystemTask.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await taskGetApiV1SystemTask(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TaskResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1SystemTaskId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.task.getApiV1SystemTaskId({ + id: 459582, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { taskGetApiV1SystemTaskId } from "prowlarr/funcs/taskGetApiV1SystemTaskId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await taskGetApiV1SystemTaskId(prowlarr, { + id: 459582, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1SystemTaskIdRequest](../../models/operations/getapiv1systemtaskidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.TaskResource](../../models/taskresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/uiconfig/README.md b/docs/sdks/uiconfig/README.md new file mode 100644 index 0000000..b1866eb --- /dev/null +++ b/docs/sdks/uiconfig/README.md @@ -0,0 +1,239 @@ +# UiConfig +(*uiConfig*) + +## Overview + +### Available Operations + +* [putApiV1ConfigUiId](#putapiv1configuiid) +* [getApiV1ConfigUiId](#getapiv1configuiid) +* [getApiV1ConfigUi](#getapiv1configui) + +## putApiV1ConfigUiId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.uiConfig.putApiV1ConfigUiId({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { uiConfigPutApiV1ConfigUiId } from "prowlarr/funcs/uiConfigPutApiV1ConfigUiId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await uiConfigPutApiV1ConfigUiId(prowlarr, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.PutApiV1ConfigUiIdRequest](../../models/operations/putapiv1configuiidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.UiConfigResource](../../models/uiconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigUiId + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.uiConfig.getApiV1ConfigUiId({ + id: 410001, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { uiConfigGetApiV1ConfigUiId } from "prowlarr/funcs/uiConfigGetApiV1ConfigUiId.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await uiConfigGetApiV1ConfigUiId(prowlarr, { + id: 410001, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1ConfigUiIdRequest](../../models/operations/getapiv1configuiidrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.UiConfigResource](../../models/uiconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1ConfigUi + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.uiConfig.getApiV1ConfigUi(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { uiConfigGetApiV1ConfigUi } from "prowlarr/funcs/uiConfigGetApiV1ConfigUi.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await uiConfigGetApiV1ConfigUi(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.UiConfigResource](../../models/uiconfigresource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/update/README.md b/docs/sdks/update/README.md new file mode 100644 index 0000000..9cb9f15 --- /dev/null +++ b/docs/sdks/update/README.md @@ -0,0 +1,81 @@ +# Update +(*update*) + +## Overview + +### Available Operations + +* [getApiV1Update](#getapiv1update) + +## getApiV1Update + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.update.getApiV1Update(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { updateGetApiV1Update } from "prowlarr/funcs/updateGetApiV1Update.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await updateGetApiV1Update(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.UpdateResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/updatelogfile/README.md b/docs/sdks/updatelogfile/README.md new file mode 100644 index 0000000..501b8c7 --- /dev/null +++ b/docs/sdks/updatelogfile/README.md @@ -0,0 +1,160 @@ +# UpdateLogFile +(*updateLogFile*) + +## Overview + +### Available Operations + +* [getApiV1LogFileUpdate](#getapiv1logfileupdate) +* [getApiV1LogFileUpdateFilename](#getapiv1logfileupdatefilename) + +## getApiV1LogFileUpdate + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.updateLogFile.getApiV1LogFileUpdate(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { updateLogFileGetApiV1LogFileUpdate } from "prowlarr/funcs/updateLogFileGetApiV1LogFileUpdate.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await updateLogFileGetApiV1LogFileUpdate(prowlarr); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.LogFileResource[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getApiV1LogFileUpdateFilename + +### Example Usage + +```typescript +import { Prowlarr } from "prowlarr"; + +const prowlarr = new Prowlarr({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const result = await prowlarr.updateLogFile.getApiV1LogFileUpdateFilename({ + filename: "example.file", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { ProwlarrCore } from "prowlarr/core.js"; +import { updateLogFileGetApiV1LogFileUpdateFilename } from "prowlarr/funcs/updateLogFileGetApiV1LogFileUpdateFilename.js"; + +// Use `ProwlarrCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const prowlarr = new ProwlarrCore({ + security: { + xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "", + }, +}); + +async function run() { + const res = await updateLogFileGetApiV1LogFileUpdateFilename(prowlarr, { + filename: "example.file", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetApiV1LogFileUpdateFilenameRequest](../../models/operations/getapiv1logfileupdatefilenamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[string](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..67bccfe --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,22 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { files: ["**/*.{js,mjs,cjs,ts}"] }, + { languageOptions: { globals: globals.browser } }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + rules: { + "no-constant-condition": "off", + "no-useless-escape": "off", + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-namespace": "off", + }, + }, +]; diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..3c3a0f4 --- /dev/null +++ b/jsr.json @@ -0,0 +1,27 @@ + + +{ + "name": "prowlarr", + "version": "0.0.1", + "exports": { + ".": "./src/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models": "./src/models/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./lib/config": "./src/lib/config.ts", + "./lib/http": "./src/lib/http.ts", + "./lib/retries": "./src/lib/retries.ts", + "./lib/sdks": "./src/lib/sdks.ts", + "./types": "./src/types/index.ts" + }, + "publish": { + "include": [ + "LICENSE", + "README.md", + "RUNTIMES.md", + "USAGE.md", + "jsr.json", + "src/**/*.ts" + ] + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..073371c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4014 @@ +{ + "name": "prowlarr", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "prowlarr", + "version": "0.0.1", + "bin": { + "mcp": "bin/mcp-server.js" + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "^1.2.2", + "bun-types": "^1.2.2", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "tshy": "^2.0.0", + "typescript": "^5.4.5", + "typescript-eslint": "^8.22.0", + "zod": "^3.23.4" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "zod": ">= 3" + }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + } + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", + "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.14.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.9.0.tgz", + "integrity": "sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.3", + "eventsource": "^3.0.2", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/express": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oven/bun-darwin-aarch64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.13.tgz", + "integrity": "sha512-AOU4O9jxRp2TXeqoEfOjEaUNZb3+SUPBN8TIEnUjpnyLWPoYJGCeNdQuCDcUkmF3MJEmEuJdyF1IeOITozpC6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.13.tgz", + "integrity": "sha512-kJ2iOvxY8uz5/nu+8zIjKf4LmRIHBH9pJJM2q+tA47U04Tod6k6rtntDOI8SdmRe2M5c87RfbadWdxhpYHFIWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.13.tgz", + "integrity": "sha512-bZpIUOvx9np07AmH5MVXGYHWZ40m2vCpNV74fma6sCzBlssJclS2V3BZgO+lLvtUKSqnW3HAyJBGsRF34wPbNw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-linux-aarch64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.13.tgz", + "integrity": "sha512-hocSJmblX4CCjP1HpaM64I65erB+CONUCCwKzGGOfLGLobVi+vn/G56UaYWsje1y/Z7WlVaUSgKYVWl7EJ6T9g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-aarch64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.13.tgz", + "integrity": "sha512-P56m718KXeyu4Vq5fsESFktfu+0Us1jhu/ZzgHYFRYJcm/hjs6AUA/RJtUAifFy5PNAM5IJdrYl3xPsE8Wa+pg==", + "cpu": [ + "aarch64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.13.tgz", + "integrity": "sha512-pf8+Kn2GLrFKLcb8JSLM6Z147Af6L9GQODpnOHM4gvXQv6E/GwQg47/o+7f1XCfzib3fdzOTJlDPvvO1rnXOTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.13.tgz", + "integrity": "sha512-9n1ai2ejEpxEMqpbHQMWFyvacq3MYsB7gh5mxRlFwhNFPCWu/Sv6gyrO+q2vkOYgcEIGhJb6dqJ6L9vBNaL61A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.13.tgz", + "integrity": "sha512-w5Ob+GM3Ww4yRA6f1N845o6wEvuwHSmipFUGaRaVp4UELrFnIV9G3pmrlBbYHFnWhk13o8Q7H1/4ZphOkCRJmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.13.tgz", + "integrity": "sha512-VI8hVdfqk0QmbAbyrsIdo2O95n3fkbt72E0h3Wu69cHD1iKJqRXG28R8QoHdehoLSJnKVzRTwsUzHp764nefWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-windows-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.13.tgz", + "integrity": "sha512-sArgbRmT7V3mUdNFaAdUcuJsuS+oeMDZLPWFSg0gtQZpRrURs9nPzEnZMmVCFo4+kPF9Tb5ujQT9uDySh6/qVg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oven/bun-windows-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.13.tgz", + "integrity": "sha512-Aiezu99fOUJJpzGuylOJryd6w9Syg2TBigHeXV2+RJsouBzvAnIEYIBA94ZspRq1ulD26Wmkk8Ae+jZ4edk9GA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@stricli/core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@stricli/core/-/core-1.1.2.tgz", + "integrity": "sha512-/yWSoHUxo9mF8rgUyZkJgdrAoyIiOOhez1jo9vHTUJa8HTZYhioQUXtQU+rhi52m/hnV9Z2VGC2ap3OTH4NvUg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.15.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.18.tgz", + "integrity": "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/qs": { + "version": "6.9.18", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", + "integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.32.1", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/body-parser/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bun": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.13.tgz", + "integrity": "sha512-EhP1MhFbicqtaRSFCbEZdkcFco8Ov47cNJcB9QmKS8U4cojKHfLU+dQR14lCvLYmtBvGgwv/Lp+9SSver2OPzQ==", + "cpu": [ + "arm64", + "x64", + "aarch64" + ], + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32" + ], + "bin": { + "bun": "bin/bun.exe", + "bunx": "bin/bun.exe" + }, + "optionalDependencies": { + "@oven/bun-darwin-aarch64": "1.2.13", + "@oven/bun-darwin-x64": "1.2.13", + "@oven/bun-darwin-x64-baseline": "1.2.13", + "@oven/bun-linux-aarch64": "1.2.13", + "@oven/bun-linux-aarch64-musl": "1.2.13", + "@oven/bun-linux-x64": "1.2.13", + "@oven/bun-linux-x64-baseline": "1.2.13", + "@oven/bun-linux-x64-musl": "1.2.13", + "@oven/bun-linux-x64-musl-baseline": "1.2.13", + "@oven/bun-windows-x64": "1.2.13", + "@oven/bun-windows-x64-baseline": "1.2.13" + } + }, + "node_modules/bun-types": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.13.tgz", + "integrity": "sha512-rRjA1T6n7wto4gxhAO/ErZEtOXyEZEmnIHQfl0Dt1QQSB4QV0iP6BZ9/YB5fZaHFQ2dwHFrmPaRQ9GGMX01k9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.20.0", + "@eslint/config-helpers": "^0.2.1", + "@eslint/core": "^0.14.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.2.tgz", + "integrity": "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", + "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "^4.11 || 5 || ^5.0.0-beta.1" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/polite-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-5.0.0.tgz", + "integrity": "sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.6.3", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-import": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz", + "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.3.3", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/router/node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sync-content": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", + "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.2.6", + "mkdirp": "^3.0.1", + "path-scurry": "^1.9.2", + "rimraf": "^5.0.1" + }, + "bin": { + "sync-content": "dist/mjs/bin.mjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tshy": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tshy/-/tshy-2.0.1.tgz", + "integrity": "sha512-U5fC+3pMaGfmULhPTVpxKMd62AcX13yfsFrjhAP/daTLG6LFRLIuxqYOmkejJ4MT/s5bEa29+1Jy/9mXkMiMfA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "foreground-child": "^3.1.1", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", + "polite-json": "^5.0.0", + "resolve-import": "^1.4.5", + "rimraf": "^5.0.1", + "sync-content": "^1.0.2", + "typescript": "5", + "walk-up-path": "^3.0.1" + }, + "bin": { + "tshy": "dist/esm/index.js" + }, + "engines": { + "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" + } + }, + "node_modules/tshy/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/tshy/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tshy/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/walk-up-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "dev": true, + "license": "ISC" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.24.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", + "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f51dc0f --- /dev/null +++ b/package.json @@ -0,0 +1,139 @@ +{ + "name": "prowlarr", + "version": "0.0.1", + "author": "Speakeasy", + "type": "module", + "bin": { + "mcp": "bin/mcp-server.js" + }, + "tshy": { + "sourceDialects": [ + "prowlarr/source" + ], + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json", + "./types": "./src/types/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models": "./src/models/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./*.js": "./src/*.ts", + "./*": "./src/*.ts" + } + }, + "sideEffects": false, + "scripts": { + "lint": "eslint --cache --max-warnings=0 src", + "build:mcp": "bun src/mcp-server/build.mts", + "build": "npm run build:mcp && tshy", + "prepublishOnly": "npm run build" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "zod": ">= 3" + }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + } + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "^1.2.2", + "bun-types": "^1.2.2", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "tshy": "^2.0.0", + "typescript": "^5.4.5", + "typescript-eslint": "^8.22.0", + "zod": "^3.23.4" + }, + "dependencies": {}, + "exports": { + ".": { + "import": { + "prowlarr/source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./package.json": "./package.json", + "./types": { + "import": { + "prowlarr/source": "./src/types/index.ts", + "types": "./dist/esm/types/index.d.ts", + "default": "./dist/esm/types/index.js" + }, + "require": { + "types": "./dist/commonjs/types/index.d.ts", + "default": "./dist/commonjs/types/index.js" + } + }, + "./models/errors": { + "import": { + "prowlarr/source": "./src/models/errors/index.ts", + "types": "./dist/esm/models/errors/index.d.ts", + "default": "./dist/esm/models/errors/index.js" + }, + "require": { + "types": "./dist/commonjs/models/errors/index.d.ts", + "default": "./dist/commonjs/models/errors/index.js" + } + }, + "./models": { + "import": { + "prowlarr/source": "./src/models/index.ts", + "types": "./dist/esm/models/index.d.ts", + "default": "./dist/esm/models/index.js" + }, + "require": { + "types": "./dist/commonjs/models/index.d.ts", + "default": "./dist/commonjs/models/index.js" + } + }, + "./models/operations": { + "import": { + "prowlarr/source": "./src/models/operations/index.ts", + "types": "./dist/esm/models/operations/index.d.ts", + "default": "./dist/esm/models/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/models/operations/index.d.ts", + "default": "./dist/commonjs/models/operations/index.js" + } + }, + "./*.js": { + "import": { + "prowlarr/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + }, + "./*": { + "import": { + "prowlarr/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" +} diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 0000000..e62548d --- /dev/null +++ b/src/core.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "./lib/sdks.js"; + +/** + * A minimal client to use when calling standalone SDK functions. Typically, an + * instance of this class would be instantiated once at the start of an + * application and passed around through some dependency injection mechanism to + * parts of an application that need to make SDK calls. + */ +export class ProwlarrCore extends ClientSDK {} diff --git a/src/funcs/apiInfoGetApi.ts b/src/funcs/apiInfoGetApi.ts new file mode 100644 index 0000000..80b5caa --- /dev/null +++ b/src/funcs/apiInfoGetApi.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function apiInfoGetApi( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ApiInfoResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ApiInfoResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ApiInfoResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ApiInfoResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfileDeleteApiV1AppprofileId.ts b/src/funcs/appProfileDeleteApiV1AppprofileId.ts new file mode 100644 index 0000000..89eff2c --- /dev/null +++ b/src/funcs/appProfileDeleteApiV1AppprofileId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfileDeleteApiV1AppprofileId( + client: ProwlarrCore, + request: operations.DeleteApiV1AppprofileIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1AppprofileIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1AppprofileIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/appprofile/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/appprofile/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfileGetApiV1Appprofile.ts b/src/funcs/appProfileGetApiV1Appprofile.ts new file mode 100644 index 0000000..88c0d64 --- /dev/null +++ b/src/funcs/appProfileGetApiV1Appprofile.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfileGetApiV1Appprofile( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/appprofile")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/appprofile", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.AppProfileResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfileGetApiV1AppprofileId.ts b/src/funcs/appProfileGetApiV1AppprofileId.ts new file mode 100644 index 0000000..4d49001 --- /dev/null +++ b/src/funcs/appProfileGetApiV1AppprofileId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfileGetApiV1AppprofileId( + client: ProwlarrCore, + request: operations.GetApiV1AppprofileIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1AppprofileIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1AppprofileIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/appprofile/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/appprofile/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["404", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.AppProfileResource$inboundSchema), + M.fail([404, "4XX"]), + M.fail([500, "5XX"]), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfileGetApiV1AppprofileSchema.ts b/src/funcs/appProfileGetApiV1AppprofileSchema.ts new file mode 100644 index 0000000..d8ec7ea --- /dev/null +++ b/src/funcs/appProfileGetApiV1AppprofileSchema.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfileGetApiV1AppprofileSchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/appprofile/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/appprofile/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.AppProfileResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfilePostApiV1Appprofile.ts b/src/funcs/appProfilePostApiV1Appprofile.ts new file mode 100644 index 0000000..579f8a6 --- /dev/null +++ b/src/funcs/appProfilePostApiV1Appprofile.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfilePostApiV1Appprofile( + client: ProwlarrCore, + request?: models.AppProfileResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.AppProfileResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => models.AppProfileResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/appprofile")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/appprofile", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.AppProfileResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/appProfilePutApiV1AppprofileId.ts b/src/funcs/appProfilePutApiV1AppprofileId.ts new file mode 100644 index 0000000..62cd291 --- /dev/null +++ b/src/funcs/appProfilePutApiV1AppprofileId.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function appProfilePutApiV1AppprofileId( + client: ProwlarrCore, + request: operations.PutApiV1AppprofileIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1AppprofileIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1AppprofileIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.AppProfileResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/appprofile/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/appprofile/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.AppProfileResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.AppProfileResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationDeleteApiV1ApplicationsBulk.ts b/src/funcs/applicationDeleteApiV1ApplicationsBulk.ts new file mode 100644 index 0000000..be58462 --- /dev/null +++ b/src/funcs/applicationDeleteApiV1ApplicationsBulk.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationDeleteApiV1ApplicationsBulk( + client: ProwlarrCore, + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.ApplicationBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/applications/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/applications/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationDeleteApiV1ApplicationsId.ts b/src/funcs/applicationDeleteApiV1ApplicationsId.ts new file mode 100644 index 0000000..4bc0caa --- /dev/null +++ b/src/funcs/applicationDeleteApiV1ApplicationsId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationDeleteApiV1ApplicationsId( + client: ProwlarrCore, + request: operations.DeleteApiV1ApplicationsIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1ApplicationsIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1ApplicationsIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/applications/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/applications/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationGetApiV1Applications.ts b/src/funcs/applicationGetApiV1Applications.ts new file mode 100644 index 0000000..796ad55 --- /dev/null +++ b/src/funcs/applicationGetApiV1Applications.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationGetApiV1Applications( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/applications")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/applications", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.ApplicationResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationGetApiV1ApplicationsId.ts b/src/funcs/applicationGetApiV1ApplicationsId.ts new file mode 100644 index 0000000..4b0821c --- /dev/null +++ b/src/funcs/applicationGetApiV1ApplicationsId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationGetApiV1ApplicationsId( + client: ProwlarrCore, + request: operations.GetApiV1ApplicationsIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1ApplicationsIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1ApplicationsIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/applications/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/applications/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ApplicationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationGetApiV1ApplicationsSchema.ts b/src/funcs/applicationGetApiV1ApplicationsSchema.ts new file mode 100644 index 0000000..0ba90a3 --- /dev/null +++ b/src/funcs/applicationGetApiV1ApplicationsSchema.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationGetApiV1ApplicationsSchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/applications/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/applications/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.ApplicationResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPostApiV1Applications.ts b/src/funcs/applicationPostApiV1Applications.ts new file mode 100644 index 0000000..6d57e92 --- /dev/null +++ b/src/funcs/applicationPostApiV1Applications.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPostApiV1Applications( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1ApplicationsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ApplicationResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/applications")(); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/applications", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ApplicationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPostApiV1ApplicationsActionName.ts b/src/funcs/applicationPostApiV1ApplicationsActionName.ts new file mode 100644 index 0000000..deb68cc --- /dev/null +++ b/src/funcs/applicationPostApiV1ApplicationsActionName.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPostApiV1ApplicationsActionName( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsActionNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsActionNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1ApplicationsActionNameRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ApplicationResource, { + explode: true, + }); + + const pathParams = { + name: encodeSimple("name", payload.name, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/applications/action/{name}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/applications/action/{name}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPostApiV1ApplicationsTest.ts b/src/funcs/applicationPostApiV1ApplicationsTest.ts new file mode 100644 index 0000000..45a3af7 --- /dev/null +++ b/src/funcs/applicationPostApiV1ApplicationsTest.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPostApiV1ApplicationsTest( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsTestRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1ApplicationsTestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1ApplicationsTestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ApplicationResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/applications/test")(); + + const query = encodeFormQuery({ + "forceTest": payload.forceTest, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/applications/test", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPostApiV1ApplicationsTestall.ts b/src/funcs/applicationPostApiV1ApplicationsTestall.ts new file mode 100644 index 0000000..2a74fcb --- /dev/null +++ b/src/funcs/applicationPostApiV1ApplicationsTestall.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPostApiV1ApplicationsTestall( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/applications/testall")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/applications/testall", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPutApiV1ApplicationsBulk.ts b/src/funcs/applicationPutApiV1ApplicationsBulk.ts new file mode 100644 index 0000000..57c76ed --- /dev/null +++ b/src/funcs/applicationPutApiV1ApplicationsBulk.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPutApiV1ApplicationsBulk( + client: ProwlarrCore, + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.ApplicationBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/applications/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/applications/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ApplicationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/applicationPutApiV1ApplicationsId.ts b/src/funcs/applicationPutApiV1ApplicationsId.ts new file mode 100644 index 0000000..24ca3b2 --- /dev/null +++ b/src/funcs/applicationPutApiV1ApplicationsId.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function applicationPutApiV1ApplicationsId( + client: ProwlarrCore, + request: operations.PutApiV1ApplicationsIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1ApplicationsIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1ApplicationsIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ApplicationResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/applications/{id}")(pathParams); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/applications/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ApplicationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ApplicationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/authenticationGetLogout.ts b/src/funcs/authenticationGetLogout.ts new file mode 100644 index 0000000..4547974 --- /dev/null +++ b/src/funcs/authenticationGetLogout.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function authenticationGetLogout( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/logout")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/logout", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupDeleteApiV1SystemBackupId.ts b/src/funcs/backupDeleteApiV1SystemBackupId.ts new file mode 100644 index 0000000..c6abf31 --- /dev/null +++ b/src/funcs/backupDeleteApiV1SystemBackupId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupDeleteApiV1SystemBackupId( + client: ProwlarrCore, + request: operations.DeleteApiV1SystemBackupIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1SystemBackupIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1SystemBackupIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/system/backup/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/system/backup/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupGetApiV1SystemBackup.ts b/src/funcs/backupGetApiV1SystemBackup.ts new file mode 100644 index 0000000..5fd23e8 --- /dev/null +++ b/src/funcs/backupGetApiV1SystemBackup.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupGetApiV1SystemBackup( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/backup")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/backup", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.BackupResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupPostApiV1SystemBackupRestoreId.ts b/src/funcs/backupPostApiV1SystemBackupRestoreId.ts new file mode 100644 index 0000000..d8f83e5 --- /dev/null +++ b/src/funcs/backupPostApiV1SystemBackupRestoreId.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupPostApiV1SystemBackupRestoreId( + client: ProwlarrCore, + request: operations.PostApiV1SystemBackupRestoreIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1SystemBackupRestoreIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1SystemBackupRestoreIdRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/system/backup/restore/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/system/backup/restore/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/backupPostApiV1SystemBackupRestoreUpload.ts b/src/funcs/backupPostApiV1SystemBackupRestoreUpload.ts new file mode 100644 index 0000000..72e7673 --- /dev/null +++ b/src/funcs/backupPostApiV1SystemBackupRestoreUpload.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function backupPostApiV1SystemBackupRestoreUpload( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/backup/restore/upload")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/system/backup/restore/upload", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/commandDeleteApiV1CommandId.ts b/src/funcs/commandDeleteApiV1CommandId.ts new file mode 100644 index 0000000..89dcbb6 --- /dev/null +++ b/src/funcs/commandDeleteApiV1CommandId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function commandDeleteApiV1CommandId( + client: ProwlarrCore, + request: operations.DeleteApiV1CommandIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1CommandIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1CommandIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/command/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/command/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/commandGetApiV1Command.ts b/src/funcs/commandGetApiV1Command.ts new file mode 100644 index 0000000..29b1e24 --- /dev/null +++ b/src/funcs/commandGetApiV1Command.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function commandGetApiV1Command( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/command")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/command", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.CommandResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/commandGetApiV1CommandId.ts b/src/funcs/commandGetApiV1CommandId.ts new file mode 100644 index 0000000..3fb973d --- /dev/null +++ b/src/funcs/commandGetApiV1CommandId.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function commandGetApiV1CommandId( + client: ProwlarrCore, + request: operations.GetApiV1CommandIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1CommandIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1CommandIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/command/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/command/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.CommandResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/commandPostApiV1Command.ts b/src/funcs/commandPostApiV1Command.ts new file mode 100644 index 0000000..4fe4da6 --- /dev/null +++ b/src/funcs/commandPostApiV1Command.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function commandPostApiV1Command( + client: ProwlarrCore, + request?: models.CommandResourceInput | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.CommandResourceInput | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.CommandResourceInput$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/command")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/command", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.CommandResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.CommandResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/customFilterDeleteApiV1CustomfilterId.ts b/src/funcs/customFilterDeleteApiV1CustomfilterId.ts new file mode 100644 index 0000000..08ee8cd --- /dev/null +++ b/src/funcs/customFilterDeleteApiV1CustomfilterId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function customFilterDeleteApiV1CustomfilterId( + client: ProwlarrCore, + request: operations.DeleteApiV1CustomfilterIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1CustomfilterIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1CustomfilterIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/customfilter/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/customfilter/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/customFilterGetApiV1Customfilter.ts b/src/funcs/customFilterGetApiV1Customfilter.ts new file mode 100644 index 0000000..f152b86 --- /dev/null +++ b/src/funcs/customFilterGetApiV1Customfilter.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function customFilterGetApiV1Customfilter( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/customfilter")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/customfilter", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.CustomFilterResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/customFilterGetApiV1CustomfilterId.ts b/src/funcs/customFilterGetApiV1CustomfilterId.ts new file mode 100644 index 0000000..5c219f1 --- /dev/null +++ b/src/funcs/customFilterGetApiV1CustomfilterId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function customFilterGetApiV1CustomfilterId( + client: ProwlarrCore, + request: operations.GetApiV1CustomfilterIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1CustomfilterIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1CustomfilterIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/customfilter/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/customfilter/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.CustomFilterResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/customFilterPostApiV1Customfilter.ts b/src/funcs/customFilterPostApiV1Customfilter.ts new file mode 100644 index 0000000..2bd71a8 --- /dev/null +++ b/src/funcs/customFilterPostApiV1Customfilter.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function customFilterPostApiV1Customfilter( + client: ProwlarrCore, + request?: models.CustomFilterResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.CustomFilterResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.CustomFilterResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/customfilter")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/customfilter", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.CustomFilterResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/customFilterPutApiV1CustomfilterId.ts b/src/funcs/customFilterPutApiV1CustomfilterId.ts new file mode 100644 index 0000000..aa8ebc4 --- /dev/null +++ b/src/funcs/customFilterPutApiV1CustomfilterId.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function customFilterPutApiV1CustomfilterId( + client: ProwlarrCore, + request: operations.PutApiV1CustomfilterIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1CustomfilterIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1CustomfilterIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CustomFilterResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/customfilter/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/customfilter/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.CustomFilterResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.CustomFilterResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/developmentConfigGetApiV1ConfigDevelopment.ts b/src/funcs/developmentConfigGetApiV1ConfigDevelopment.ts new file mode 100644 index 0000000..843a152 --- /dev/null +++ b/src/funcs/developmentConfigGetApiV1ConfigDevelopment.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function developmentConfigGetApiV1ConfigDevelopment( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/config/development")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/development", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DevelopmentConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/developmentConfigGetApiV1ConfigDevelopmentId.ts b/src/funcs/developmentConfigGetApiV1ConfigDevelopmentId.ts new file mode 100644 index 0000000..4c138b1 --- /dev/null +++ b/src/funcs/developmentConfigGetApiV1ConfigDevelopmentId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function developmentConfigGetApiV1ConfigDevelopmentId( + client: ProwlarrCore, + request: operations.GetApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1ConfigDevelopmentIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/development/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/development/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DevelopmentConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/developmentConfigPutApiV1ConfigDevelopmentId.ts b/src/funcs/developmentConfigPutApiV1ConfigDevelopmentId.ts new file mode 100644 index 0000000..3a8849c --- /dev/null +++ b/src/funcs/developmentConfigPutApiV1ConfigDevelopmentId.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function developmentConfigPutApiV1ConfigDevelopmentId( + client: ProwlarrCore, + request: operations.PutApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1ConfigDevelopmentIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DevelopmentConfigResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/development/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/config/development/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DevelopmentConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DevelopmentConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.ts b/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.ts new file mode 100644 index 0000000..4693435 --- /dev/null +++ b/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclient.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientConfigGetApiV1ConfigDownloadclient( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/config/downloadclient")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/downloadclient", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.ts b/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.ts new file mode 100644 index 0000000..61896fe --- /dev/null +++ b/src/funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientConfigGetApiV1ConfigDownloadclientId( + client: ProwlarrCore, + request: operations.GetApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1ConfigDownloadclientIdRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/downloadclient/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/downloadclient/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.ts b/src/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.ts new file mode 100644 index 0000000..86491c4 --- /dev/null +++ b/src/funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientConfigPutApiV1ConfigDownloadclientId( + client: ProwlarrCore, + request: operations.PutApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1ConfigDownloadclientIdRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DownloadClientConfigResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/downloadclient/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/config/downloadclient/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientDeleteApiV1DownloadclientBulk.ts b/src/funcs/downloadClientDeleteApiV1DownloadclientBulk.ts new file mode 100644 index 0000000..3ec7b2b --- /dev/null +++ b/src/funcs/downloadClientDeleteApiV1DownloadclientBulk.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientDeleteApiV1DownloadclientBulk( + client: ProwlarrCore, + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.DownloadClientBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/downloadclient/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/downloadclient/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientDeleteApiV1DownloadclientId.ts b/src/funcs/downloadClientDeleteApiV1DownloadclientId.ts new file mode 100644 index 0000000..a420135 --- /dev/null +++ b/src/funcs/downloadClientDeleteApiV1DownloadclientId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientDeleteApiV1DownloadclientId( + client: ProwlarrCore, + request: operations.DeleteApiV1DownloadclientIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1DownloadclientIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1DownloadclientIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/downloadclient/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/downloadclient/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientGetApiV1Downloadclient.ts b/src/funcs/downloadClientGetApiV1Downloadclient.ts new file mode 100644 index 0000000..f22556b --- /dev/null +++ b/src/funcs/downloadClientGetApiV1Downloadclient.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientGetApiV1Downloadclient( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/downloadclient")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/downloadclient", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.DownloadClientResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientGetApiV1DownloadclientId.ts b/src/funcs/downloadClientGetApiV1DownloadclientId.ts new file mode 100644 index 0000000..21bc0be --- /dev/null +++ b/src/funcs/downloadClientGetApiV1DownloadclientId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientGetApiV1DownloadclientId( + client: ProwlarrCore, + request: operations.GetApiV1DownloadclientIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1DownloadclientIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1DownloadclientIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/downloadclient/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/downloadclient/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientGetApiV1DownloadclientSchema.ts b/src/funcs/downloadClientGetApiV1DownloadclientSchema.ts new file mode 100644 index 0000000..cc33909 --- /dev/null +++ b/src/funcs/downloadClientGetApiV1DownloadclientSchema.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientGetApiV1DownloadclientSchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/downloadclient/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/downloadclient/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.DownloadClientResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPostApiV1Downloadclient.ts b/src/funcs/downloadClientPostApiV1Downloadclient.ts new file mode 100644 index 0000000..34f162b --- /dev/null +++ b/src/funcs/downloadClientPostApiV1Downloadclient.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPostApiV1Downloadclient( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1DownloadclientRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DownloadClientResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/downloadclient")(); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/downloadclient", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPostApiV1DownloadclientActionName.ts b/src/funcs/downloadClientPostApiV1DownloadclientActionName.ts new file mode 100644 index 0000000..350a8f6 --- /dev/null +++ b/src/funcs/downloadClientPostApiV1DownloadclientActionName.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPostApiV1DownloadclientActionName( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientActionNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientActionNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1DownloadclientActionNameRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DownloadClientResource, { + explode: true, + }); + + const pathParams = { + name: encodeSimple("name", payload.name, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/downloadclient/action/{name}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/downloadclient/action/{name}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPostApiV1DownloadclientTest.ts b/src/funcs/downloadClientPostApiV1DownloadclientTest.ts new file mode 100644 index 0000000..f2a25e4 --- /dev/null +++ b/src/funcs/downloadClientPostApiV1DownloadclientTest.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPostApiV1DownloadclientTest( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientTestRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1DownloadclientTestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1DownloadclientTestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DownloadClientResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/downloadclient/test")(); + + const query = encodeFormQuery({ + "forceTest": payload.forceTest, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/downloadclient/test", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPostApiV1DownloadclientTestall.ts b/src/funcs/downloadClientPostApiV1DownloadclientTestall.ts new file mode 100644 index 0000000..49e7ce9 --- /dev/null +++ b/src/funcs/downloadClientPostApiV1DownloadclientTestall.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPostApiV1DownloadclientTestall( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/downloadclient/testall")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/downloadclient/testall", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPutApiV1DownloadclientBulk.ts b/src/funcs/downloadClientPutApiV1DownloadclientBulk.ts new file mode 100644 index 0000000..774d3d4 --- /dev/null +++ b/src/funcs/downloadClientPutApiV1DownloadclientBulk.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPutApiV1DownloadclientBulk( + client: ProwlarrCore, + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.DownloadClientBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/downloadclient/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/downloadclient/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/downloadClientPutApiV1DownloadclientId.ts b/src/funcs/downloadClientPutApiV1DownloadclientId.ts new file mode 100644 index 0000000..3f13b85 --- /dev/null +++ b/src/funcs/downloadClientPutApiV1DownloadclientId.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function downloadClientPutApiV1DownloadclientId( + client: ProwlarrCore, + request: operations.PutApiV1DownloadclientIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1DownloadclientIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1DownloadclientIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.DownloadClientResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/downloadclient/{id}")(pathParams); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/downloadclient/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.DownloadClientResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.DownloadClientResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/fileSystemGetApiV1Filesystem.ts b/src/funcs/fileSystemGetApiV1Filesystem.ts new file mode 100644 index 0000000..3ecd207 --- /dev/null +++ b/src/funcs/fileSystemGetApiV1Filesystem.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function fileSystemGetApiV1Filesystem( + client: ProwlarrCore, + request: operations.GetApiV1FilesystemRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1FilesystemRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1FilesystemRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/filesystem")(); + + const query = encodeFormQuery({ + "allowFoldersWithoutTrailingSlashes": + payload.allowFoldersWithoutTrailingSlashes, + "includeFiles": payload.includeFiles, + "path": payload.path, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/filesystem", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/fileSystemGetApiV1FilesystemType.ts b/src/funcs/fileSystemGetApiV1FilesystemType.ts new file mode 100644 index 0000000..b754602 --- /dev/null +++ b/src/funcs/fileSystemGetApiV1FilesystemType.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function fileSystemGetApiV1FilesystemType( + client: ProwlarrCore, + request: operations.GetApiV1FilesystemTypeRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1FilesystemTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1FilesystemTypeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/filesystem/type")(); + + const query = encodeFormQuery({ + "path": payload.path, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/filesystem/type", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/healthGetApiV1Health.ts b/src/funcs/healthGetApiV1Health.ts new file mode 100644 index 0000000..930d0f7 --- /dev/null +++ b/src/funcs/healthGetApiV1Health.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function healthGetApiV1Health( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/health")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/health", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.HealthResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/historyGetApiV1History.ts b/src/funcs/historyGetApiV1History.ts new file mode 100644 index 0000000..616e61d --- /dev/null +++ b/src/funcs/historyGetApiV1History.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function historyGetApiV1History( + client: ProwlarrCore, + request: operations.GetApiV1HistoryRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.HistoryResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1HistoryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.HistoryResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1HistoryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/history")(); + + const query = encodeFormQuery({ + "downloadId": payload.downloadId, + "eventType": payload.eventType, + "indexerIds": payload.indexerIds, + "page": payload.page, + "pageSize": payload.pageSize, + "sortDirection": payload.sortDirection, + "sortKey": payload.sortKey, + "successful": payload.successful, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/history", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.HistoryResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.HistoryResourcePagingResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/historyGetApiV1HistoryIndexer.ts b/src/funcs/historyGetApiV1HistoryIndexer.ts new file mode 100644 index 0000000..781e0c0 --- /dev/null +++ b/src/funcs/historyGetApiV1HistoryIndexer.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function historyGetApiV1HistoryIndexer( + client: ProwlarrCore, + request: operations.GetApiV1HistoryIndexerRequest, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1HistoryIndexerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1HistoryIndexerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/history/indexer")(); + + const query = encodeFormQuery({ + "eventType": payload.eventType, + "indexerId": payload.indexerId, + "limit": payload.limit, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/history/indexer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.HistoryResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/historyGetApiV1HistorySince.ts b/src/funcs/historyGetApiV1HistorySince.ts new file mode 100644 index 0000000..3e066c7 --- /dev/null +++ b/src/funcs/historyGetApiV1HistorySince.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function historyGetApiV1HistorySince( + client: ProwlarrCore, + request: operations.GetApiV1HistorySinceRequest, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1HistorySinceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1HistorySinceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/history/since")(); + + const query = encodeFormQuery({ + "date": payload.date, + "eventType": payload.eventType, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/history/since", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.HistoryResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hostConfigGetApiV1ConfigHost.ts b/src/funcs/hostConfigGetApiV1ConfigHost.ts new file mode 100644 index 0000000..f6b2d8c --- /dev/null +++ b/src/funcs/hostConfigGetApiV1ConfigHost.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function hostConfigGetApiV1ConfigHost( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/config/host")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/host", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.HostConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hostConfigGetApiV1ConfigHostId.ts b/src/funcs/hostConfigGetApiV1ConfigHostId.ts new file mode 100644 index 0000000..9f6f24c --- /dev/null +++ b/src/funcs/hostConfigGetApiV1ConfigHostId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function hostConfigGetApiV1ConfigHostId( + client: ProwlarrCore, + request: operations.GetApiV1ConfigHostIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1ConfigHostIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1ConfigHostIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/host/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/host/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.HostConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/hostConfigPutApiV1ConfigHostId.ts b/src/funcs/hostConfigPutApiV1ConfigHostId.ts new file mode 100644 index 0000000..9249c09 --- /dev/null +++ b/src/funcs/hostConfigPutApiV1ConfigHostId.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function hostConfigPutApiV1ConfigHostId( + client: ProwlarrCore, + request: operations.PutApiV1ConfigHostIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1ConfigHostIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1ConfigHostIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.HostConfigResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/host/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/config/host/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.HostConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.HostConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.ts b/src/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.ts new file mode 100644 index 0000000..ccdc66a --- /dev/null +++ b/src/funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerDefaultCategoriesGetApiV1IndexerCategories( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexer/categories")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer/categories", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerCategory$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerDeleteApiV1IndexerBulk.ts b/src/funcs/indexerDeleteApiV1IndexerBulk.ts new file mode 100644 index 0000000..01fbc62 --- /dev/null +++ b/src/funcs/indexerDeleteApiV1IndexerBulk.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerDeleteApiV1IndexerBulk( + client: ProwlarrCore, + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.IndexerBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/indexer/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/indexer/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerDeleteApiV1IndexerId.ts b/src/funcs/indexerDeleteApiV1IndexerId.ts new file mode 100644 index 0000000..4d3c06b --- /dev/null +++ b/src/funcs/indexerDeleteApiV1IndexerId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerDeleteApiV1IndexerId( + client: ProwlarrCore, + request: operations.DeleteApiV1IndexerIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1IndexerIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1IndexerIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/indexer/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerGetApiV1Indexer.ts b/src/funcs/indexerGetApiV1Indexer.ts new file mode 100644 index 0000000..41ce695 --- /dev/null +++ b/src/funcs/indexerGetApiV1Indexer.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerGetApiV1Indexer( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexer")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerGetApiV1IndexerId.ts b/src/funcs/indexerGetApiV1IndexerId.ts new file mode 100644 index 0000000..df5a6a7 --- /dev/null +++ b/src/funcs/indexerGetApiV1IndexerId.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerGetApiV1IndexerId( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1IndexerIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerGetApiV1IndexerSchema.ts b/src/funcs/indexerGetApiV1IndexerSchema.ts new file mode 100644 index 0000000..f924e00 --- /dev/null +++ b/src/funcs/indexerGetApiV1IndexerSchema.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerGetApiV1IndexerSchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexer/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPostApiV1Indexer.ts b/src/funcs/indexerPostApiV1Indexer.ts new file mode 100644 index 0000000..1e2f6bf --- /dev/null +++ b/src/funcs/indexerPostApiV1Indexer.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPostApiV1Indexer( + client: ProwlarrCore, + request: operations.PostApiV1IndexerRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PostApiV1IndexerRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerResource, { explode: true }); + + const path = pathToFunc("/api/v1/indexer")(); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexer", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPostApiV1IndexerActionName.ts b/src/funcs/indexerPostApiV1IndexerActionName.ts new file mode 100644 index 0000000..b86a694 --- /dev/null +++ b/src/funcs/indexerPostApiV1IndexerActionName.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPostApiV1IndexerActionName( + client: ProwlarrCore, + request: operations.PostApiV1IndexerActionNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerActionNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1IndexerActionNameRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerResource, { explode: true }); + + const pathParams = { + name: encodeSimple("name", payload.name, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/action/{name}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexer/action/{name}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPostApiV1IndexerTest.ts b/src/funcs/indexerPostApiV1IndexerTest.ts new file mode 100644 index 0000000..e3a9605 --- /dev/null +++ b/src/funcs/indexerPostApiV1IndexerTest.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPostApiV1IndexerTest( + client: ProwlarrCore, + request: operations.PostApiV1IndexerTestRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerTestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1IndexerTestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerResource, { explode: true }); + + const path = pathToFunc("/api/v1/indexer/test")(); + + const query = encodeFormQuery({ + "forceTest": payload.forceTest, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexer/test", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPostApiV1IndexerTestall.ts b/src/funcs/indexerPostApiV1IndexerTestall.ts new file mode 100644 index 0000000..1bca1df --- /dev/null +++ b/src/funcs/indexerPostApiV1IndexerTestall.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPostApiV1IndexerTestall( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexer/testall")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexer/testall", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyDeleteApiV1IndexerproxyId.ts b/src/funcs/indexerProxyDeleteApiV1IndexerproxyId.ts new file mode 100644 index 0000000..0390c8d --- /dev/null +++ b/src/funcs/indexerProxyDeleteApiV1IndexerproxyId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyDeleteApiV1IndexerproxyId( + client: ProwlarrCore, + request: operations.DeleteApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1IndexerproxyIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexerproxy/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/indexerproxy/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyGetApiV1Indexerproxy.ts b/src/funcs/indexerProxyGetApiV1Indexerproxy.ts new file mode 100644 index 0000000..2c0cd67 --- /dev/null +++ b/src/funcs/indexerProxyGetApiV1Indexerproxy.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyGetApiV1Indexerproxy( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexerproxy")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexerproxy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerProxyResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyGetApiV1IndexerproxyId.ts b/src/funcs/indexerProxyGetApiV1IndexerproxyId.ts new file mode 100644 index 0000000..b523f29 --- /dev/null +++ b/src/funcs/indexerProxyGetApiV1IndexerproxyId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyGetApiV1IndexerproxyId( + client: ProwlarrCore, + request: operations.GetApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1IndexerproxyIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexerproxy/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexerproxy/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerProxyResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyGetApiV1IndexerproxySchema.ts b/src/funcs/indexerProxyGetApiV1IndexerproxySchema.ts new file mode 100644 index 0000000..2efba33 --- /dev/null +++ b/src/funcs/indexerProxyGetApiV1IndexerproxySchema.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyGetApiV1IndexerproxySchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexerproxy/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexerproxy/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerProxyResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyPostApiV1Indexerproxy.ts b/src/funcs/indexerProxyPostApiV1Indexerproxy.ts new file mode 100644 index 0000000..97e3a18 --- /dev/null +++ b/src/funcs/indexerProxyPostApiV1Indexerproxy.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyPostApiV1Indexerproxy( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1IndexerproxyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerProxyResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/indexerproxy")(); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexerproxy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerProxyResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyPostApiV1IndexerproxyActionName.ts b/src/funcs/indexerProxyPostApiV1IndexerproxyActionName.ts new file mode 100644 index 0000000..26dc00f --- /dev/null +++ b/src/funcs/indexerProxyPostApiV1IndexerproxyActionName.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyPostApiV1IndexerproxyActionName( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyActionNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyActionNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1IndexerproxyActionNameRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerProxyResource, { + explode: true, + }); + + const pathParams = { + name: encodeSimple("name", payload.name, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexerproxy/action/{name}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexerproxy/action/{name}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyPostApiV1IndexerproxyTest.ts b/src/funcs/indexerProxyPostApiV1IndexerproxyTest.ts new file mode 100644 index 0000000..2cb67cd --- /dev/null +++ b/src/funcs/indexerProxyPostApiV1IndexerproxyTest.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyPostApiV1IndexerproxyTest( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyTestRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1IndexerproxyTestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1IndexerproxyTestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerProxyResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/indexerproxy/test")(); + + const query = encodeFormQuery({ + "forceTest": payload.forceTest, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexerproxy/test", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyPostApiV1IndexerproxyTestall.ts b/src/funcs/indexerProxyPostApiV1IndexerproxyTestall.ts new file mode 100644 index 0000000..3624872 --- /dev/null +++ b/src/funcs/indexerProxyPostApiV1IndexerproxyTestall.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyPostApiV1IndexerproxyTestall( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexerproxy/testall")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/indexerproxy/testall", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerProxyPutApiV1IndexerproxyId.ts b/src/funcs/indexerProxyPutApiV1IndexerproxyId.ts new file mode 100644 index 0000000..cd747a7 --- /dev/null +++ b/src/funcs/indexerProxyPutApiV1IndexerproxyId.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerProxyPutApiV1IndexerproxyId( + client: ProwlarrCore, + request: operations.PutApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1IndexerproxyIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1IndexerproxyIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerProxyResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexerproxy/{id}")(pathParams); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/indexerproxy/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerProxyResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerProxyResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPutApiV1IndexerBulk.ts b/src/funcs/indexerPutApiV1IndexerBulk.ts new file mode 100644 index 0000000..92276c2 --- /dev/null +++ b/src/funcs/indexerPutApiV1IndexerBulk.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPutApiV1IndexerBulk( + client: ProwlarrCore, + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.IndexerBulkResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/indexer/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/indexer/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerPutApiV1IndexerId.ts b/src/funcs/indexerPutApiV1IndexerId.ts new file mode 100644 index 0000000..9860a36 --- /dev/null +++ b/src/funcs/indexerPutApiV1IndexerId.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerPutApiV1IndexerId( + client: ProwlarrCore, + request: operations.PutApiV1IndexerIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1IndexerIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PutApiV1IndexerIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.IndexerResource, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/{id}")(pathParams); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/indexer/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerStatsGetApiV1Indexerstats.ts b/src/funcs/indexerStatsGetApiV1Indexerstats.ts new file mode 100644 index 0000000..38be398 --- /dev/null +++ b/src/funcs/indexerStatsGetApiV1Indexerstats.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerStatsGetApiV1Indexerstats( + client: ProwlarrCore, + request: operations.GetApiV1IndexerstatsRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.IndexerStatsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1IndexerstatsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.IndexerStatsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1IndexerstatsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/indexerstats")(); + + const query = encodeFormQuery({ + "endDate": payload.endDate, + "indexers": payload.indexers, + "protocols": payload.protocols, + "startDate": payload.startDate, + "tags": payload.tags, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexerstats", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.IndexerStatsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.IndexerStatsResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/indexerStatusGetApiV1Indexerstatus.ts b/src/funcs/indexerStatusGetApiV1Indexerstatus.ts new file mode 100644 index 0000000..6317001 --- /dev/null +++ b/src/funcs/indexerStatusGetApiV1Indexerstatus.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function indexerStatusGetApiV1Indexerstatus( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/indexerstatus")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexerstatus", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.IndexerStatusResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/localizationGetApiV1Localization.ts b/src/funcs/localizationGetApiV1Localization.ts new file mode 100644 index 0000000..6e27775 --- /dev/null +++ b/src/funcs/localizationGetApiV1Localization.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function localizationGetApiV1Localization( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/localization")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/localization", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/localizationGetApiV1LocalizationOptions.ts b/src/funcs/localizationGetApiV1LocalizationOptions.ts new file mode 100644 index 0000000..ee5a74a --- /dev/null +++ b/src/funcs/localizationGetApiV1LocalizationOptions.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function localizationGetApiV1LocalizationOptions( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/localization/options")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/localization/options", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.LocalizationOption$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logFileGetApiV1LogFile.ts b/src/funcs/logFileGetApiV1LogFile.ts new file mode 100644 index 0000000..2102f2e --- /dev/null +++ b/src/funcs/logFileGetApiV1LogFile.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function logFileGetApiV1LogFile( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/log/file")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/log/file", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.LogFileResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logFileGetApiV1LogFileFilename.ts b/src/funcs/logFileGetApiV1LogFileFilename.ts new file mode 100644 index 0000000..0e4433b --- /dev/null +++ b/src/funcs/logFileGetApiV1LogFileFilename.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function logFileGetApiV1LogFileFilename( + client: ProwlarrCore, + request: operations.GetApiV1LogFileFilenameRequest, + options?: RequestOptions, +): APIPromise< + Result< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1LogFileFilenameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1LogFileFilenameRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + filename: encodeSimple("filename", payload.filename, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/log/file/{filename}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "text/plain", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/log/file/{filename}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.text(200, z.string()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/logGetApiV1Log.ts b/src/funcs/logGetApiV1Log.ts new file mode 100644 index 0000000..1981ddf --- /dev/null +++ b/src/funcs/logGetApiV1Log.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function logGetApiV1Log( + client: ProwlarrCore, + request: operations.GetApiV1LogRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.LogResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1LogRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.LogResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1LogRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/log")(); + + const query = encodeFormQuery({ + "level": payload.level, + "page": payload.page, + "pageSize": payload.pageSize, + "sortDirection": payload.sortDirection, + "sortKey": payload.sortKey, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/log", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.LogResourcePagingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.LogResourcePagingResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/newznabGetApiV1IndexerIdDownload.ts b/src/funcs/newznabGetApiV1IndexerIdDownload.ts new file mode 100644 index 0000000..d4041af --- /dev/null +++ b/src/funcs/newznabGetApiV1IndexerIdDownload.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function newznabGetApiV1IndexerIdDownload( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdDownloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdDownloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1IndexerIdDownloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/{id}/download")(pathParams); + + const query = encodeFormQuery({ + "file": payload.file, + "link": payload.link, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer/{id}/download", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/newznabGetApiV1IndexerIdNewznab.ts b/src/funcs/newznabGetApiV1IndexerIdNewznab.ts new file mode 100644 index 0000000..36cb2a4 --- /dev/null +++ b/src/funcs/newznabGetApiV1IndexerIdNewznab.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function newznabGetApiV1IndexerIdNewznab( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdNewznabRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1IndexerIdNewznabRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1IndexerIdNewznabRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/indexer/{id}/newznab")(pathParams); + + const query = encodeFormQuery({ + "album": payload.album, + "artist": payload.artist, + "author": payload.author, + "cat": payload.cat, + "configured": payload.configured, + "doubanid": payload.doubanid, + "ep": payload.ep, + "extended": payload.extended, + "genre": payload.genre, + "host": payload.host, + "imdbid": payload.imdbid, + "label": payload.label, + "limit": payload.limit, + "maxage": payload.maxage, + "maxsize": payload.maxsize, + "minage": payload.minage, + "minsize": payload.minsize, + "offset": payload.offset, + "publisher": payload.publisher, + "q": payload.q, + "rid": payload.rid, + "season": payload.season, + "server": payload.server, + "source": payload.source, + "t": payload.t, + "title": payload.title, + "tmdbid": payload.tmdbid, + "track": payload.track, + "traktid": payload.traktid, + "tvdbid": payload.tvdbid, + "tvmazeid": payload.tvmazeid, + "year": payload.year, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/indexer/{id}/newznab", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/newznabGetIdApi.ts b/src/funcs/newznabGetIdApi.ts new file mode 100644 index 0000000..0cd4dd4 --- /dev/null +++ b/src/funcs/newznabGetIdApi.ts @@ -0,0 +1,190 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function newznabGetIdApi( + client: ProwlarrCore, + request: operations.GetIdApiRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetIdApiRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIdApiRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{id}/api")(pathParams); + + const query = encodeFormQuery({ + "album": payload.album, + "artist": payload.artist, + "author": payload.author, + "cat": payload.cat, + "configured": payload.configured, + "doubanid": payload.doubanid, + "ep": payload.ep, + "extended": payload.extended, + "genre": payload.genre, + "host": payload.host, + "imdbid": payload.imdbid, + "label": payload.label, + "limit": payload.limit, + "maxage": payload.maxage, + "maxsize": payload.maxsize, + "minage": payload.minage, + "minsize": payload.minsize, + "offset": payload.offset, + "publisher": payload.publisher, + "q": payload.q, + "rid": payload.rid, + "season": payload.season, + "server": payload.server, + "source": payload.source, + "t": payload.t, + "title": payload.title, + "tmdbid": payload.tmdbid, + "track": payload.track, + "traktid": payload.traktid, + "tvdbid": payload.tvdbid, + "tvmazeid": payload.tvmazeid, + "year": payload.year, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/{id}/api", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/newznabGetIdDownload.ts b/src/funcs/newznabGetIdDownload.ts new file mode 100644 index 0000000..e312644 --- /dev/null +++ b/src/funcs/newznabGetIdDownload.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function newznabGetIdDownload( + client: ProwlarrCore, + request: operations.GetIdDownloadRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetIdDownloadRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIdDownloadRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{id}/download")(pathParams); + + const query = encodeFormQuery({ + "file": payload.file, + "link": payload.link, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/{id}/download", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationDeleteApiV1NotificationId.ts b/src/funcs/notificationDeleteApiV1NotificationId.ts new file mode 100644 index 0000000..fa69a3a --- /dev/null +++ b/src/funcs/notificationDeleteApiV1NotificationId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationDeleteApiV1NotificationId( + client: ProwlarrCore, + request: operations.DeleteApiV1NotificationIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1NotificationIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteApiV1NotificationIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/notification/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/notification/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationGetApiV1Notification.ts b/src/funcs/notificationGetApiV1Notification.ts new file mode 100644 index 0000000..ff1bf5e --- /dev/null +++ b/src/funcs/notificationGetApiV1Notification.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationGetApiV1Notification( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/notification")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/notification", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.NotificationResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationGetApiV1NotificationId.ts b/src/funcs/notificationGetApiV1NotificationId.ts new file mode 100644 index 0000000..cd85a6d --- /dev/null +++ b/src/funcs/notificationGetApiV1NotificationId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationGetApiV1NotificationId( + client: ProwlarrCore, + request: operations.GetApiV1NotificationIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1NotificationIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1NotificationIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/notification/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/notification/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.NotificationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationGetApiV1NotificationSchema.ts b/src/funcs/notificationGetApiV1NotificationSchema.ts new file mode 100644 index 0000000..e7a7f84 --- /dev/null +++ b/src/funcs/notificationGetApiV1NotificationSchema.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationGetApiV1NotificationSchema( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/notification/schema")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/notification/schema", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.NotificationResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationPostApiV1Notification.ts b/src/funcs/notificationPostApiV1Notification.ts new file mode 100644 index 0000000..41a5369 --- /dev/null +++ b/src/funcs/notificationPostApiV1Notification.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationPostApiV1Notification( + client: ProwlarrCore, + request: operations.PostApiV1NotificationRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1NotificationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1NotificationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.NotificationResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/notification")(); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/notification", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.NotificationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationPostApiV1NotificationActionName.ts b/src/funcs/notificationPostApiV1NotificationActionName.ts new file mode 100644 index 0000000..6099748 --- /dev/null +++ b/src/funcs/notificationPostApiV1NotificationActionName.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationPostApiV1NotificationActionName( + client: ProwlarrCore, + request: operations.PostApiV1NotificationActionNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1NotificationActionNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1NotificationActionNameRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.NotificationResource, { + explode: true, + }); + + const pathParams = { + name: encodeSimple("name", payload.name, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/notification/action/{name}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/notification/action/{name}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationPostApiV1NotificationTest.ts b/src/funcs/notificationPostApiV1NotificationTest.ts new file mode 100644 index 0000000..46dc3c0 --- /dev/null +++ b/src/funcs/notificationPostApiV1NotificationTest.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationPostApiV1NotificationTest( + client: ProwlarrCore, + request: operations.PostApiV1NotificationTestRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PostApiV1NotificationTestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PostApiV1NotificationTestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.NotificationResource, { + explode: true, + }); + + const path = pathToFunc("/api/v1/notification/test")(); + + const query = encodeFormQuery({ + "forceTest": payload.forceTest, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/notification/test", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationPostApiV1NotificationTestall.ts b/src/funcs/notificationPostApiV1NotificationTestall.ts new file mode 100644 index 0000000..bef645d --- /dev/null +++ b/src/funcs/notificationPostApiV1NotificationTestall.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationPostApiV1NotificationTestall( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/notification/testall")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/notification/testall", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/notificationPutApiV1NotificationId.ts b/src/funcs/notificationPutApiV1NotificationId.ts new file mode 100644 index 0000000..a474bc4 --- /dev/null +++ b/src/funcs/notificationPutApiV1NotificationId.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function notificationPutApiV1NotificationId( + client: ProwlarrCore, + request: operations.PutApiV1NotificationIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1NotificationIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PutApiV1NotificationIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.NotificationResource, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/notification/{id}")(pathParams); + + const query = encodeFormQuery({ + "forceSave": payload.forceSave, + }); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/notification/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.NotificationResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.NotificationResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/pingGetPing.ts b/src/funcs/pingGetPing.ts new file mode 100644 index 0000000..6dab0c1 --- /dev/null +++ b/src/funcs/pingGetPing.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function pingGetPing( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/ping")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/ping", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.PingResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/pingHeadPing.ts b/src/funcs/pingHeadPing.ts new file mode 100644 index 0000000..cf38234 --- /dev/null +++ b/src/funcs/pingHeadPing.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function pingHeadPing( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/ping")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "head_/ping", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "HEAD", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.PingResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.PingResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchGetApiV1Search.ts b/src/funcs/searchGetApiV1Search.ts new file mode 100644 index 0000000..8168a9c --- /dev/null +++ b/src/funcs/searchGetApiV1Search.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function searchGetApiV1Search( + client: ProwlarrCore, + request: operations.GetApiV1SearchRequest, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1SearchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1SearchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/v1/search")(); + + const query = encodeFormQuery({ + "categories": payload.categories, + "indexerIds": payload.indexerIds, + "limit": payload.limit, + "offset": payload.offset, + "query": payload.query, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/search", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.ReleaseResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchPostApiV1Search.ts b/src/funcs/searchPostApiV1Search.ts new file mode 100644 index 0000000..ee1f84e --- /dev/null +++ b/src/funcs/searchPostApiV1Search.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function searchPostApiV1Search( + client: ProwlarrCore, + request?: models.ReleaseResourceInput | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.ReleaseResourceInput | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + models.ReleaseResourceInput$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/search")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/search", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ReleaseResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/searchPostApiV1SearchBulk.ts b/src/funcs/searchPostApiV1SearchBulk.ts new file mode 100644 index 0000000..d9c9fc9 --- /dev/null +++ b/src/funcs/searchPostApiV1SearchBulk.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function searchPostApiV1SearchBulk( + client: ProwlarrCore, + request?: Array | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: Array | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + z.array(models.ReleaseResourceInput$outboundSchema).optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/search/bulk")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/search/bulk", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.ReleaseResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.ReleaseResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/staticResourceGet.ts b/src/funcs/staticResourceGet.ts new file mode 100644 index 0000000..a8ad824 --- /dev/null +++ b/src/funcs/staticResourceGet.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function staticResourceGet( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/staticResourceGetContentPath.ts b/src/funcs/staticResourceGetContentPath.ts new file mode 100644 index 0000000..029284a --- /dev/null +++ b/src/funcs/staticResourceGetContentPath.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function staticResourceGetContentPath( + client: ProwlarrCore, + request: operations.GetContentPathRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetContentPathRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetContentPathRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + path: encodeSimple("path", payload.path, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/content/{path}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/content/{path}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/staticResourceGetLogin.ts b/src/funcs/staticResourceGetLogin.ts new file mode 100644 index 0000000..afbdb7d --- /dev/null +++ b/src/funcs/staticResourceGetLogin.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function staticResourceGetLogin( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/login")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/login", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/staticResourceGetPath.ts b/src/funcs/staticResourceGetPath.ts new file mode 100644 index 0000000..1374195 --- /dev/null +++ b/src/funcs/staticResourceGetPath.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function staticResourceGetPath( + client: ProwlarrCore, + request: operations.GetPathRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetPathRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPathRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + path: encodeSimple("path", payload.path, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/{path}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/{path}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/systemGetApiV1SystemRoutes.ts b/src/funcs/systemGetApiV1SystemRoutes.ts new file mode 100644 index 0000000..1720fc1 --- /dev/null +++ b/src/funcs/systemGetApiV1SystemRoutes.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function systemGetApiV1SystemRoutes( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/routes")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/routes", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/systemGetApiV1SystemRoutesDuplicate.ts b/src/funcs/systemGetApiV1SystemRoutesDuplicate.ts new file mode 100644 index 0000000..ebe3ad9 --- /dev/null +++ b/src/funcs/systemGetApiV1SystemRoutesDuplicate.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function systemGetApiV1SystemRoutesDuplicate( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/routes/duplicate")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/routes/duplicate", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/systemGetApiV1SystemStatus.ts b/src/funcs/systemGetApiV1SystemStatus.ts new file mode 100644 index 0000000..40f83f5 --- /dev/null +++ b/src/funcs/systemGetApiV1SystemStatus.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function systemGetApiV1SystemStatus( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.SystemResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.SystemResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/status")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/status", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.SystemResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.SystemResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/systemPostApiV1SystemRestart.ts b/src/funcs/systemPostApiV1SystemRestart.ts new file mode 100644 index 0000000..fc87a15 --- /dev/null +++ b/src/funcs/systemPostApiV1SystemRestart.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function systemPostApiV1SystemRestart( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/restart")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/system/restart", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/systemPostApiV1SystemShutdown.ts b/src/funcs/systemPostApiV1SystemShutdown.ts new file mode 100644 index 0000000..5d16c33 --- /dev/null +++ b/src/funcs/systemPostApiV1SystemShutdown.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function systemPostApiV1SystemShutdown( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/shutdown")(); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/system/shutdown", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagDeleteApiV1TagId.ts b/src/funcs/tagDeleteApiV1TagId.ts new file mode 100644 index 0000000..ecfdcc6 --- /dev/null +++ b/src/funcs/tagDeleteApiV1TagId.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagDeleteApiV1TagId( + client: ProwlarrCore, + request: operations.DeleteApiV1TagIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.DeleteApiV1TagIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteApiV1TagIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/tag/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_/api/v1/tag/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagDetailsGetApiV1TagDetail.ts b/src/funcs/tagDetailsGetApiV1TagDetail.ts new file mode 100644 index 0000000..977e7f5 --- /dev/null +++ b/src/funcs/tagDetailsGetApiV1TagDetail.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagDetailsGetApiV1TagDetail( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/tag/detail")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/tag/detail", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.TagDetailsResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagDetailsGetApiV1TagDetailId.ts b/src/funcs/tagDetailsGetApiV1TagDetailId.ts new file mode 100644 index 0000000..02f6364 --- /dev/null +++ b/src/funcs/tagDetailsGetApiV1TagDetailId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagDetailsGetApiV1TagDetailId( + client: ProwlarrCore, + request: operations.GetApiV1TagDetailIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.TagDetailsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1TagDetailIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.TagDetailsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1TagDetailIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/tag/detail/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/tag/detail/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.TagDetailsResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.TagDetailsResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagGetApiV1Tag.ts b/src/funcs/tagGetApiV1Tag.ts new file mode 100644 index 0000000..8d73b18 --- /dev/null +++ b/src/funcs/tagGetApiV1Tag.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagGetApiV1Tag( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/tag")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/tag", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.TagResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagGetApiV1TagId.ts b/src/funcs/tagGetApiV1TagId.ts new file mode 100644 index 0000000..f030585 --- /dev/null +++ b/src/funcs/tagGetApiV1TagId.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagGetApiV1TagId( + client: ProwlarrCore, + request: operations.GetApiV1TagIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1TagIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1TagIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/tag/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/tag/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.TagResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagPostApiV1Tag.ts b/src/funcs/tagPostApiV1Tag.ts new file mode 100644 index 0000000..f02203d --- /dev/null +++ b/src/funcs/tagPostApiV1Tag.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagPostApiV1Tag( + client: ProwlarrCore, + request?: models.TagResource | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request?: models.TagResource | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => models.TagResource$outboundSchema.optional().parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = payload === undefined + ? null + : encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/api/v1/tag")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "post_/api/v1/tag", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.TagResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tagPutApiV1TagId.ts b/src/funcs/tagPutApiV1TagId.ts new file mode 100644 index 0000000..3a0644f --- /dev/null +++ b/src/funcs/tagPutApiV1TagId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function tagPutApiV1TagId( + client: ProwlarrCore, + request: operations.PutApiV1TagIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1TagIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PutApiV1TagIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.TagResource, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/tag/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/tag/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.TagResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.TagResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/taskGetApiV1SystemTask.ts b/src/funcs/taskGetApiV1SystemTask.ts new file mode 100644 index 0000000..8035ab6 --- /dev/null +++ b/src/funcs/taskGetApiV1SystemTask.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function taskGetApiV1SystemTask( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/system/task")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.TaskResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/taskGetApiV1SystemTaskId.ts b/src/funcs/taskGetApiV1SystemTaskId.ts new file mode 100644 index 0000000..c1962aa --- /dev/null +++ b/src/funcs/taskGetApiV1SystemTaskId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function taskGetApiV1SystemTaskId( + client: ProwlarrCore, + request: operations.GetApiV1SystemTaskIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.TaskResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1SystemTaskIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.TaskResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1SystemTaskIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/system/task/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/system/task/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.TaskResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.TaskResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/uiConfigGetApiV1ConfigUi.ts b/src/funcs/uiConfigGetApiV1ConfigUi.ts new file mode 100644 index 0000000..c06ed29 --- /dev/null +++ b/src/funcs/uiConfigGetApiV1ConfigUi.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function uiConfigGetApiV1ConfigUi( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/config/ui")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/ui", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.UiConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/uiConfigGetApiV1ConfigUiId.ts b/src/funcs/uiConfigGetApiV1ConfigUiId.ts new file mode 100644 index 0000000..320405f --- /dev/null +++ b/src/funcs/uiConfigGetApiV1ConfigUiId.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function uiConfigGetApiV1ConfigUiId( + client: ProwlarrCore, + request: operations.GetApiV1ConfigUiIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1ConfigUiIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetApiV1ConfigUiIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/ui/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/config/ui/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.UiConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/uiConfigPutApiV1ConfigUiId.ts b/src/funcs/uiConfigPutApiV1ConfigUiId.ts new file mode 100644 index 0000000..7f8cc97 --- /dev/null +++ b/src/funcs/uiConfigPutApiV1ConfigUiId.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ProwlarrCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function uiConfigPutApiV1ConfigUiId( + client: ProwlarrCore, + request: operations.PutApiV1ConfigUiIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.PutApiV1ConfigUiIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PutApiV1ConfigUiIdRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UiConfigResource, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/config/ui/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "put_/api/v1/config/ui/{id}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + models.UiConfigResource, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, models.UiConfigResource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/updateGetApiV1Update.ts b/src/funcs/updateGetApiV1Update.ts new file mode 100644 index 0000000..ea2153b --- /dev/null +++ b/src/funcs/updateGetApiV1Update.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function updateGetApiV1Update( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/update")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.UpdateResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/updateLogFileGetApiV1LogFileUpdate.ts b/src/funcs/updateLogFileGetApiV1LogFileUpdate.ts new file mode 100644 index 0000000..afe7173 --- /dev/null +++ b/src/funcs/updateLogFileGetApiV1LogFileUpdate.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function updateLogFileGetApiV1LogFileUpdate( + client: ProwlarrCore, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: ProwlarrCore, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/api/v1/log/file/update")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/log/file/update", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(models.LogFileResource$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/updateLogFileGetApiV1LogFileUpdateFilename.ts b/src/funcs/updateLogFileGetApiV1LogFileUpdateFilename.ts new file mode 100644 index 0000000..083e8ef --- /dev/null +++ b/src/funcs/updateLogFileGetApiV1LogFileUpdateFilename.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ProwlarrCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +export function updateLogFileGetApiV1LogFileUpdateFilename( + client: ProwlarrCore, + request: operations.GetApiV1LogFileUpdateFilenameRequest, + options?: RequestOptions, +): APIPromise< + Result< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: ProwlarrCore, + request: operations.GetApiV1LogFileUpdateFilenameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetApiV1LogFileUpdateFilenameRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + filename: encodeSimple("filename", payload.filename, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/api/v1/log/file/update/{filename}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "text/plain", + })); + + const securityInput = await extractSecurity(client._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_/api/v1/log/file/update/{filename}", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.security, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + string, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.text(200, z.string()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts new file mode 100644 index 0000000..d34c884 --- /dev/null +++ b/src/hooks/hooks.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { RequestInput } from "../lib/http.js"; +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hook, + 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[] = []; + + constructor() { + const presetHooks: Array = []; + + for (const hook of presetHooks) { + if ("sdkInit" in hook) { + this.registerSDKInitHook(hook); + } + if ("beforeCreateRequest" in hook) { + this.registerBeforeCreateRequestHook(hook); + } + if ("beforeRequest" in hook) { + this.registerBeforeRequestHook(hook); + } + if ("afterSuccess" in hook) { + this.registerAfterSuccessHook(hook); + } + if ("afterError" in hook) { + this.registerAfterErrorHook(hook); + } + } + 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); + } + + 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 }; + } +} diff --git a/src/hooks/index.ts b/src/hooks/index.ts new file mode 100644 index 0000000..f60ec7a --- /dev/null +++ b/src/hooks/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts new file mode 100644 index 0000000..7064973 --- /dev/null +++ b/src/hooks/registration.ts @@ -0,0 +1,14 @@ +import { Hooks } from "./types.js"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance +} diff --git a/src/hooks/types.ts b/src/hooks/types.ts new file mode 100644 index 0000000..1d56c6f --- /dev/null +++ b/src/hooks/types.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient, RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; +import { SecurityState } from "../lib/security.js"; + +export type HookContext = { + baseURL: string | URL; + operationID: string; + oAuth2Scopes: string[] | null; + securitySource?: any | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; +}; + +export type Awaitable = T | Promise; + +export type SDKInitOptions = { + baseURL: URL | null; + client: HTTPClient; +}; + +export type BeforeCreateRequestContext = HookContext & {}; +export type BeforeRequestContext = HookContext & {}; +export type AfterSuccessContext = HookContext & {}; +export type AfterErrorContext = HookContext & {}; + +/** + * SDKInitHook is called when the SDK is initializing. The + * hook can return a new baseURL and HTTP client to be used by the SDK. + */ +export interface SDKInitHook { + 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; +} + +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; +} + +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; +} + +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; + }>; +} + +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; +} + +export type Hook = + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..5ddc765 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./lib/config.js"; +export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/base64.ts b/src/lib/base64.ts new file mode 100644 index 0000000..c2d5b38 --- /dev/null +++ b/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 0000000..a5f3449 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as models from "../models/index.js"; +import { ClosedEnum } from "../types/enums.js"; +import { HTTPClient } from "./http.js"; +import { Logger } from "./logger.js"; +import { RetryConfig } from "./retries.js"; +import { Params, pathToFunc } from "./url.js"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + "{protocol}://{hostpath}", +] as const; + +export const ServerProtocol = { + Http: "http", + Https: "https", +} as const; +export type ServerProtocol = ClosedEnum; + +export type SDKOptions = { + /** + * The security details required to authenticate the SDK + */ + security?: models.Security | (() => Promise) | undefined; + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number | undefined; + /** + * Sets the protocol variable for url substitution + */ + protocol?: ServerProtocol | undefined; + /** + * Sets the hostpath variable for url substitution + */ + hostpath?: string | undefined; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string | undefined; + /** + * 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; + + const serverParams: Params[] = [ + { + "protocol": options.protocol ?? "http", + "hostpath": options.hostpath ?? "localhost:9696", + }, + ]; + 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] || {}; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = { + language: "typescript", + openapiDocVersion: "1.0.0", + sdkVersion: "0.0.1", + genVersion: "2.604.2", + userAgent: "speakeasy-sdk/typescript 0.0.1 2.604.2 1.0.0 prowlarr", +} as const; diff --git a/src/lib/dlv.ts b/src/lib/dlv.ts new file mode 100644 index 0000000..e81091f --- /dev/null +++ b/src/lib/dlv.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) 2024 Jason Miller (http://jasonformat.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** + * @param obj The object to walk + * @param key The key path to walk the object with + * @param def A default value to return if the result is undefined + * + * @example + * dlv(obj, "a.b.c.d") + * @example + * dlv(object, ["a", "b", "c", "d"]) + * @example + * dlv(object, "foo.bar.baz", "Hello, default value!") + */ +export function dlv( + obj: any, + key: string | string[], + def?: T, + p?: number, + undef?: never, +): T | undefined { + key = Array.isArray(key) ? key : key.split("."); + for (p = 0; p < key.length; p++) { + const k = key[p]; + obj = k != null && obj ? obj[k] : undef; + } + return obj === undef ? def : obj; +} diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts new file mode 100644 index 0000000..25c9dcb --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,483 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64.js"; +import { isPlainObject } from "./is-plain-object.js"; + +export class EncodingError extends Error { + constructor(message: string) { + super(message); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + encValue = mapped?.join("").slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + if (encValue == null) { + return; + } + + const keyPrefix = encodeString(pk); + tmp = `${keyPrefix}=${encValue}`; + // trim trailing '=' if value was empty + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let encValue: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }); + encValue = mapped?.join("").slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += encValue == null ? "" : `.${encValue}`; + }); + + return out; +} + +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string | undefined; + +function formEncoder(sep: string): FormEncoder { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; + })?.join(encodedSep); + } else { + encValue = `${encodeValue(pv)}`; + } + + if (encValue == null) { + return; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + let out = ""; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError(`Expected parameter '${key}' to be an object.`); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv == null) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += objOut == null ? "" : `&${objOut}`; + + return; + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + const encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + })?.join("&"); + + out += encoded == null ? "" : `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + if (typeof value === "undefined") { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + if (pairs.every(([_, v]) => v == null)) { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + tmp = mapped?.join("").slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + out += tmp ? `,${tmp}` : ""; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function serializeValue(value: unknown): string { + if (value == null) { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown): unknown { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { + return acc; + } + + const m = mapper(v); + if (m == null) { + return acc; + } + + acc.push(m); + + return acc; + }, []); + + return res.length ? res : null; +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] | null { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v == null) { + continue; + } + + const m = mapper([k, v]); + if (m == null) { + continue; + } + + acc.push(m); + } + + return acc.length ? acc : null; +} + +export function queryJoin(...args: (string | undefined)[]): string { + return args.filter(Boolean).join("&"); +} + +type QueryEncoderOptions = { + explode?: boolean; + charEncoding?: "percent" | "none"; +}; + +type QueryEncoder = ( + key: string, + value: unknown, + options?: QueryEncoderOptions, +) => string | undefined; + +type BulkQueryEncoder = ( + values: Record, + options?: QueryEncoderOptions, +) => string; + +export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { + const bulkEncode = function ( + values: Record, + options?: QueryEncoderOptions, + ): string { + const opts: QueryEncoderOptions = { + ...options, + explode: options?.explode ?? true, + charEncoding: options?.charEncoding ?? "percent", + }; + + const encoded = Object.entries(values).map(([key, value]) => { + return f(key, value, opts); + }); + return queryJoin(...encoded); + }; + + return bulkEncode; +} + +export const encodeJSONQuery = queryEncoder(encodeJSON); +export const encodeFormQuery = queryEncoder(encodeForm); +export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); +export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); +export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/src/lib/env.ts b/src/lib/env.ts new file mode 100644 index 0000000..4a34678 --- /dev/null +++ b/src/lib/env.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { dlv } from "./dlv.js"; + +import * as z from "zod"; + +export interface Env { + PROWLARR_X_API_KEY?: string | undefined; + PROWLARR_APIKEY?: string | undefined; + + PROWLARR_DEBUG?: boolean | undefined; +} + +export const envSchema: z.ZodType = z.object({ + PROWLARR_X_API_KEY: z.string().optional(), + PROWLARR_APIKEY: z.string().optional(), + + PROWLARR_DEBUG: z.coerce.boolean().optional(), +}); + +let envMemo: Env | undefined = undefined; +/** + * Reads and validates environment variables. + */ +export function env(): Env { + if (envMemo) { + return envMemo; + } + + envMemo = envSchema.parse( + dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {}, + ); + return envMemo; +} + +/** + * Clears the cached env object. Useful for testing with a fresh environment. + */ +export function resetEnv() { + envMemo = undefined; +} diff --git a/src/lib/files.ts b/src/lib/files.ts new file mode 100644 index 0000000..59d15f0 --- /dev/null +++ b/src/lib/files.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Consumes a stream and returns a concatenated array buffer. Useful in + * situations where we need to read the whole file because it forms part of a + * larger payload containing other fields, and we can't modify the underlying + * request structure. + */ +export async function readableStreamToArrayBuffer( + readable: ReadableStream, +): Promise { + const reader = readable.getReader(); + const chunks: Uint8Array[] = []; + + let totalLength = 0; + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + + if (doneReading) { + done = true; + } else { + chunks.push(value); + totalLength += value.length; + } + } + + const concatenatedChunks = new Uint8Array(totalLength); + let offset = 0; + + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + + return concatenatedChunks.buffer as ArrayBuffer; +} diff --git a/src/lib/http.ts b/src/lib/http.ts new file mode 100644 index 0000000..13cf1fd --- /dev/null +++ b/src/lib/http.ts @@ -0,0 +1,323 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +export type Awaitable = T | Promise; + +const DEFAULT_FETCHER: Fetcher = (input, init) => { + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } +}; + +export type RequestInput = { + /** + * The URL the request will use. + */ + url: URL; + /** + * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + */ + options?: RequestInit | undefined; +}; + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } + + try { + const res = await this.fetcher(req); + + for (const hook of this.responseHooks) { + await hook(res, req); + } + + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ): this { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export type StatusCodePredicate = number | string | (number | string)[]; + +// A semicolon surrounded by optional whitespace characters is used to separate +// segments in a media type string. +const mediaParamSeparator = /\s*;\s*/g; + +export function matchContentType(response: Response, pattern: string): boolean { + // `*` is a special case which means anything is acceptable. + if (pattern === "*") { + return true; + } + + let contentType = + response.headers.get("content-type")?.trim() || "application/octet-stream"; + contentType = contentType.toLowerCase(); + + const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); + const [wantType = "", ...wantParams] = wantParts; + + if (wantType.split("/").length !== 2) { + return false; + } + + const gotParts = contentType.split(mediaParamSeparator); + const [gotType = "", ...gotParams] = gotParts; + + const [type = "", subtype = ""] = gotType.split("/"); + if (!type || !subtype) { + return false; + } + + if ( + wantType !== "*/*" && + gotType !== wantType && + `${type}/*` !== wantType && + `*/${subtype}` !== wantType + ) { + return false; + } + + if (gotParams.length < wantParams.length) { + return false; + } + + const params = new Set(gotParams); + for (const wantParam of wantParams) { + if (!params.has(wantParam)) { + return false; + } + } + + return true; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: StatusCodePredicate, +): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: StatusCodePredicate, + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +/** + * Uses various heurisitics to determine if an error is a connection error. + */ +export function isConnectionError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +/** + * Uses various heurisitics to determine if an error is a timeout error. + */ +export function isTimeoutError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + const isLegacyNative = "code" in err && err.code === 23; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} + +/** + * Uses various heurisitics to determine if an error is a abort error. + */ +export function isAbortError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "AbortError"; + const isLegacyNative = "code" in err && err.code === 20; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} diff --git a/src/lib/is-plain-object.ts b/src/lib/is-plain-object.ts new file mode 100644 index 0000000..61070d3 --- /dev/null +++ b/src/lib/is-plain-object.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js + +export function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value === null) { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in value) && + !(Symbol.iterator in value) + ); +} diff --git a/src/lib/logger.ts b/src/lib/logger.ts new file mode 100644 index 0000000..d181f29 --- /dev/null +++ b/src/lib/logger.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export interface Logger { + group(label?: string): void; + groupEnd(): void; + log(message: any, ...args: any[]): void; +} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts new file mode 100644 index 0000000..17151be --- /dev/null +++ b/src/lib/matchers.ts @@ -0,0 +1,342 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { APIError } from "../models/errors/apierror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../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 = + | "jsonl" + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; + +const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", + 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; +}; + +export type ValueMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; +}; + +export type ErrorMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; +}; + +export type FailMatcher = { + enc: "fail"; + codes: StatusCodePredicate; +}; + +export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; + +export function jsonErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "json", codes, schema }; +} +export function json( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "json", codes, schema }; +} + +export function jsonl( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "jsonl", codes, schema }; +} + +export function jsonlErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "jsonl", codes, schema }; +} +export function textErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "text", codes, schema }; +} +export function text( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "text", codes, schema }; +} + +export function bytesErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "bytes", codes, schema }; +} +export function bytes( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "bytes", codes, schema }; +} + +export function streamErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "stream", codes, schema }; +} +export function stream( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "stream", codes, schema }; +} + +export function sseErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "sse", codes, schema }; +} +export function sse( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "sse", codes, schema }; +} + +export function nilErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "nil", codes, schema }; +} +export function nil( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "nil", codes, schema }; +} + +export function fail(codes: StatusCodePredicate): FailMatcher { + return { enc: "fail", codes }; +} + +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 }, +) => Promise<[result: Result, raw: unknown]>; + +export function match( + ...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; + } + } + + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new APIError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } + + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "jsonl": + raw = response.body; + break; + case "bytes": + raw = new Uint8Array(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 APIError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } + + 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) { + 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 = /, */; +/** + * Iterates over a Headers object and returns an object with all the header + * entries. Values are represented as an array to account for repeated headers. + */ +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + return out; +} + +/** + * Discards the response body to free up resources. + * + * To learn why this is need, see the undici docs: + * https://undici.nodejs.org/#/?id=garbage-collection + */ +export async function discardResponseBody(res: Response) { + 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(); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts new file mode 100644 index 0000000..d21f1dc --- /dev/null +++ b/src/lib/primitives.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +class InvariantError extends Error { + constructor(message: string) { + super(message); + this.name = "InvariantError"; + } +} + +export function invariant( + condition: unknown, + message: string, +): asserts condition { + if (!condition) { + throw new InvariantError(message); + } +} + +export type ExactPartial = { + [P in keyof T]?: T[P] | undefined; +}; + +export type Remap = { + [k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */ + ? Mapping[k] + : Mapping[k] extends null /* if the mapping is to `null` then drop the key */ + ? never + : k /* otherwise keep the key as-is */]: Inp[k]; +}; + +/** + * Converts or omits an object's keys according to a mapping. + * + * @param inp An object whose keys will be remapped + * @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object. + * @returns A new object with keys remapped or omitted according to the mappings + */ +export function remap< + Inp extends Record, + const Mapping extends { [k in keyof Inp]?: string | null }, +>(inp: Inp, mappings: Mapping): Remap { + let out: any = {}; + + if (!Object.keys(mappings).length) { + out = inp; + return out; + } + + for (const [k, v] of Object.entries(inp)) { + const j = mappings[k]; + if (j === null) { + continue; + } + out[j ?? k] = v; + } + + return out; +} + +export function combineSignals( + ...signals: Array +): AbortSignal | null { + const filtered: AbortSignal[] = []; + for (const signal of signals) { + if (signal) { + filtered.push(signal); + } + } + + switch (filtered.length) { + case 0: + case 1: + return filtered[0] || null; + default: + if ("any" in AbortSignal && typeof AbortSignal.any === "function") { + return AbortSignal.any(filtered); + } + return abortSignalAny(filtered); + } +} + +export function abortSignalAny(signals: AbortSignal[]): AbortSignal { + const controller = new AbortController(); + const result = controller.signal; + if (!signals.length) { + return controller.signal; + } + + if (signals.length === 1) { + return signals[0] || controller.signal; + } + + for (const signal of signals) { + if (signal.aborted) { + return signal; + } + } + + function abort(this: AbortSignal) { + controller.abort(this.reason); + clean(); + } + + const signalRefs: WeakRef[] = []; + function clean() { + for (const signalRef of signalRefs) { + const signal = signalRef.deref(); + if (signal) { + signal.removeEventListener("abort", abort); + } + } + } + + for (const signal of signals) { + signalRefs.push(new WeakRef(signal)); + signal.addEventListener("abort", abort); + } + + return result; +} + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} + +export function allRequired>( + v: V, +): + | { + [K in keyof V]: NonNullable; + } + | undefined { + if (Object.values(v).every((x) => x == null)) { + return void 0; + } + + return v as ReturnType>; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 0000000..e3ce9ab --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { isConnectionError, isTimeoutError } from "./http.js"; + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +/** + * PermanentError is an error that is not recoverable. Throwing this error will + * cause a retry loop to terminate. + */ +export class PermanentError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + + constructor(message: string, options?: { cause?: unknown }) { + let msg = message; + if (options?.cause) { + msg += `: ${options.cause}`; + } + + super(msg, options); + this.name = "PermanentError"; + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = options?.cause; + } + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +/** + * TemporaryError is an error is used to signal that an HTTP request can be + * retried as part of a retry loop. If retry attempts are exhausted and this + * error is thrown, the response will be returned to the caller. + */ +export class TemporaryError extends Error { + response: Response; + + constructor(message: string, response: Response) { + super(message); + this.response = response; + this.name = "TemporaryError"; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError( + "Response failed with retryable status code", + res, + ); + } + + return res; + } catch (err: unknown) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError("Permanent error", { cause: err }); + } + }; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + while (true) { + try { + const res = await fn(); + return res; + } catch (err: unknown) { + if (err instanceof PermanentError) { + throw err.cause; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.response; + } + + throw err; + } + + let retryInterval = 0; + if (err instanceof TemporaryError) { + retryInterval = retryIntervalFromResponse(err.response); + } + + if (retryInterval <= 0) { + retryInterval = + initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + + const d = Math.min(retryInterval, maxInterval); + + await delay(d); + x++; + } + } +} + +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + + const parsedNumber = Number(retryVal); + if (Number.isInteger(parsedNumber)) { + return parsedNumber * 1000; + } + + const parsedDate = Date.parse(retryVal); + if (Number.isInteger(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + return deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + + return 0; +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts new file mode 100644 index 0000000..0e340b7 --- /dev/null +++ b/src/lib/schemas.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { ERR, OK, Result } from "../types/fp.js"; + +/** + * Utility function that executes some code which may throw a ZodError. It + * 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; + } +} + +/** + * Utility function that executes some code which may result in a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function safeParse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Result { + 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, +>( + obj: ZodObject, + extrasKey: K, + optional: boolean, +): ZodEffects< + 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; + } + + const v = val[key]; + if (typeof v === "undefined") { + continue; + } + + extras[key] = v; + delete val[key]; + } + + if (optional && Object.keys(extras).length === 0) { + return val; + } + + return { ...val, [extrasKey]: extras }; + }); +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 0000000..1b78d6a --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,401 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks/hooks.js"; +import { HookContext } from "../hooks/types.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { ERR, OK, Result } from "../types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { env } from "./env.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[]; + /** + * Overrides the base server URL that will be used by an operation. + */ + serverURL?: string | URL; + /** + * @deprecated `fetchOptions` has been flattened into `RequestOptions`. + * + * 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; +} & Omit; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL | undefined; + 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"); + +export class ClientSDK { + readonly #httpClient: HTTPClient; + readonly #hooks: SDKHooks; + readonly #logger?: Logger | undefined; + public readonly _baseURL: URL | null; + 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 }; + + 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; + if (!this.#logger && env().PROWLARR_DEBUG) { + this.#logger = console; + } + } + + 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 += reqURL.pathname.endsWith("/") ? "" : "/"; + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } + } + 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?.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); + } + + const fetchOptions: Omit = { + ...options?.fetchOptions, + ...options, + }; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + fetchOptions.signal = timeoutSignal; + } + + if (conf.body instanceof ReadableStream) { + Object.assign(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; + retryCodes: string[]; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + + 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); + + try { + 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); + } + } finally { + await logResponse(this.#logger, response, req) + .catch(e => this.#logger?.log("Failed to log response:", e)); + } + + return response; + }, + { config: options.retryConfig, statusCodes: options.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|text)\/.*?\+*json.*/; +const jsonlLikeContentTypeRE = + /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/; +async function logRequest(logger: Logger | undefined, req: Request) { + 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(); + + logger.groupEnd(); +} + +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) && !jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "application/jsonl") + || jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().text()); + 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(); +} diff --git a/src/lib/security.ts b/src/lib/security.ts new file mode 100644 index 0000000..70c37af --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,268 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as models from "../models/index.js"; +import { env } from "./env.js"; + +type OAuth2PasswordFlow = { + username: string; + password?: string | undefined; + clientID: string; + clientSecret?: string | undefined; + tokenURL: string; +}; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + 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}`, + ); + } +} + +export type SecurityState = { + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; + oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" }; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; +}; + +type SecurityInputBearer = { + 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 SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2ClientCredentials = { + type: "oauth2:client_credentials"; + value: + | { clientID?: string | undefined; clientSecret?: string | undefined } + | null + | string + | undefined; + fieldName?: string; +}; + +type SecurityInputOAuth2PasswordCredentials = { + type: "oauth2:password"; + value: + | string + | null + | undefined; + fieldName?: string; +}; + +type SecurityInputCustom = { + type: "http:custom"; + value: any | null | undefined; + fieldName?: string; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOAuth2PasswordCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: {}, + headers: {}, + queryParams: {}, + cookies: {}, + oauth2: { type: "none" }, + }; + + 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:password") { + return ( + typeof o.value === "string" && !!o.value + ); + } else if (o.type === "oauth2:client_credentials") { + if (typeof o.value == "string") { + return !!o.value; + } + 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; + } + + 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:password": + 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; +} + +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } + + state.basic = spec.value; +} + +function applyBearer( + state: SecurityState, + spec: + | SecurityInputBearer + | SecurityInputOAuth2 + | SecurityInputOIDC + | SecurityInputOAuth2PasswordCredentials, +) { + if (typeof spec.value !== "string" || !spec.value) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + if (spec.fieldName !== undefined) { + state.headers[spec.fieldName] = value; + } +} + +export function resolveGlobalSecurity( + security: Partial | null | undefined, +): SecurityState | null { + return resolveSecurity( + [ + { + fieldName: "X-Api-Key", + type: "apiKey:header", + value: security?.xApiKey ?? env().PROWLARR_X_API_KEY, + }, + ], + [ + { + fieldName: "apikey", + type: "apiKey:query", + value: security?.apikey ?? env().PROWLARR_APIKEY, + }, + ], + ); +} + +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } + + return typeof sec === "function" ? sec() : sec; +} diff --git a/src/lib/url.ts b/src/lib/url.ts new file mode 100644 index 0000000..6bc6356 --- /dev/null +++ b/src/lib/url.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export type Params = Partial>; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Params) => string { + const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/src/mcp-server/build.mts b/src/mcp-server/build.mts new file mode 100644 index 0000000..a04739f --- /dev/null +++ b/src/mcp-server/build.mts @@ -0,0 +1,16 @@ +/// + +import { build } from "bun"; + +const entrypoint = "./src/mcp-server/mcp-server.ts"; + +await build({ + entrypoints: [entrypoint], + outdir: "./bin", + sourcemap: "linked", + target: "node", + format: "esm", + minify: false, + throw: true, + banner: "#!/usr/bin/env node", +}); diff --git a/src/mcp-server/cli.ts b/src/mcp-server/cli.ts new file mode 100644 index 0000000..b878d8d --- /dev/null +++ b/src/mcp-server/cli.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CommandContext, StricliProcess } from "@stricli/core"; + +export interface LocalContext extends CommandContext { + readonly process: StricliProcess; +} + +export function buildContext(process: NodeJS.Process): LocalContext { + return { process: process as StricliProcess }; +} diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts new file mode 100644 index 0000000..77ebde4 --- /dev/null +++ b/src/mcp-server/cli/start/command.ts @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { buildCommand } from "@stricli/core"; +import { numberParser } from "@stricli/core"; +import * as z from "zod"; +import { ServerProtocol } from "../../../lib/config.js"; +import { consoleLoggerLevels } from "../../console-logger.js"; +import { mcpScopes } from "../../scopes.js"; + +export const startCommand = buildCommand({ + loader: async () => { + const { main } = await import("./impl.js"); + return main; + }, + parameters: { + flags: { + transport: { + kind: "enum", + brief: "The transport to use for communicating with the server", + default: "stdio", + values: ["stdio", "sse"], + }, + port: { + kind: "parsed", + brief: "The port to use when the SSE transport is enabled", + default: "2718", + parse: (val: string) => + z.coerce.number().int().gte(0).lt(65536).parse(val), + }, + tool: { + kind: "parsed", + brief: "Specify tools to mount on the server", + optional: true, + variadic: true, + parse: (value) => { + return z.string().parse(value); + }, + }, + ...(mcpScopes.length + ? { + scope: { + kind: "enum", + brief: + "Mount tools/resources that match given scope (repeatable flag)", + values: mcpScopes, + variadic: true, + optional: true, + }, + } + : {}), + "x-api-key": { + kind: "parsed", + brief: "Sets the xApiKey auth field for the API", + optional: true, + parse: (value) => { + return z.string().parse(value); + }, + }, + apikey: { + kind: "parsed", + brief: "Sets the apikey auth field for the API", + optional: true, + parse: (value) => { + return z.string().parse(value); + }, + }, + "server-url": { + kind: "parsed", + brief: "Overrides the default server URL used by the SDK", + optional: true, + parse: (value) => new URL(value).toString(), + }, + "server-index": { + kind: "parsed", + brief: "Selects a predefined server used by the SDK", + optional: true, + parse: numberParser, + }, + protocol: { + kind: "enum", + brief: "Sets the protocol variable for url substitution", + optional: true, + values: Object.values(ServerProtocol) as Array, + }, + hostpath: { + kind: "parsed", + brief: "Sets the hostpath variable for url substitution", + optional: true, + parse: (value) => value, + }, + "log-level": { + kind: "enum", + brief: "The log level to use for the server", + default: "info", + values: consoleLoggerLevels, + }, + env: { + kind: "parsed", + brief: "Environment variables made available to the server", + optional: true, + variadic: true, + parse: (val: string) => { + const sepIdx = val.indexOf("="); + if (sepIdx === -1) { + throw new Error("Invalid environment variable format"); + } + + const key = val.slice(0, sepIdx); + const value = val.slice(sepIdx + 1); + + return [ + z.string().nonempty({ + message: "Environment variable key must be a non-empty string", + }).parse(key), + z.string().nonempty({ + message: "Environment variable value must be a non-empty string", + }).parse(value), + ] satisfies [string, string]; + }, + }, + }, + }, + docs: { + brief: "Run the Model Context Protocol server", + }, +}); diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts new file mode 100644 index 0000000..552bc33 --- /dev/null +++ b/src/mcp-server/cli/start/impl.ts @@ -0,0 +1,141 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import express from "express"; +import { SDKOptions } from "../../../lib/config.js"; +import { LocalContext } from "../../cli.js"; +import { + ConsoleLoggerLevel, + createConsoleLogger, +} from "../../console-logger.js"; +import { MCPScope } from "../../scopes.js"; +import { createMCPServer } from "../../server.js"; + +interface StartCommandFlags { + readonly transport: "stdio" | "sse"; + readonly port: number; + readonly tool?: string[]; + readonly scope?: MCPScope[]; + readonly "x-api-key"?: string | undefined; + readonly apikey?: string | undefined; + readonly "server-url"?: string; + readonly "server-index"?: SDKOptions["serverIdx"]; + readonly protocol?: SDKOptions["protocol"]; + readonly hostpath?: SDKOptions["hostpath"]; + readonly "log-level": ConsoleLoggerLevel; + readonly env?: [string, string][]; +} + +export async function main(this: LocalContext, flags: StartCommandFlags) { + flags.env?.forEach(([key, value]) => { + process.env[key] = value; + }); + + switch (flags.transport) { + case "stdio": + await startStdio(flags); + break; + case "sse": + await startSSE(flags); + break; + default: + throw new Error(`Invalid transport: ${flags.transport}`); + } +} + +async function startStdio(flags: StartCommandFlags) { + const logger = createConsoleLogger(flags["log-level"]); + const transport = new StdioServerTransport(); + const server = createMCPServer({ + logger, + allowedTools: flags.tool, + scopes: flags.scope, + security: { xApiKey: flags["x-api-key"], apikey: flags.apikey }, + serverURL: flags["server-url"], + serverIdx: flags["server-index"], + protocol: flags.protocol, + hostpath: flags.hostpath, + }); + await server.connect(transport); + + const abort = async () => { + await server.close(); + process.exit(0); + }; + process.on("SIGTERM", abort); + process.on("SIGINT", abort); +} + +async function startSSE(flags: StartCommandFlags) { + const logger = createConsoleLogger(flags["log-level"]); + const app = express(); + const mcpServer = createMCPServer({ + logger, + allowedTools: flags.tool, + scopes: flags.scope, + security: { xApiKey: flags["x-api-key"], apikey: flags.apikey }, + serverURL: flags["server-url"], + serverIdx: flags["server-index"], + protocol: flags.protocol, + hostpath: flags.hostpath, + }); + let transport: SSEServerTransport | undefined; + const controller = new AbortController(); + + app.get("/sse", async (_req, res) => { + transport = new SSEServerTransport("/message", res); + + await mcpServer.connect(transport); + + mcpServer.server.onclose = async () => { + res.end(); + }; + }); + + app.post("/message", async (req, res) => { + if (!transport) { + throw new Error("Server transport not initialized"); + } + + await transport.handlePostMessage(req, res); + }); + + const httpServer = app.listen(flags.port, "0.0.0.0", () => { + const ha = httpServer.address(); + const host = typeof ha === "string" ? ha : `${ha?.address}:${ha?.port}`; + logger.info("MCP HTTP server started", { host }); + }); + + let closing = false; + controller.signal.addEventListener("abort", async () => { + if (closing) { + logger.info("Received second signal. Forcing shutdown."); + process.exit(1); + } + closing = true; + + logger.info("Shutting down MCP server"); + + await mcpServer.close(); + + logger.info("Shutting down HTTP server"); + + const timer = setTimeout(() => { + logger.info("Forcing shutdown"); + process.exit(1); + }, 5000); + + httpServer.close(() => { + clearTimeout(timer); + logger.info("Graceful shutdown complete"); + process.exit(0); + }); + }); + + const abort = () => controller.abort(); + process.on("SIGTERM", abort); + process.on("SIGINT", abort); +} diff --git a/src/mcp-server/console-logger.ts b/src/mcp-server/console-logger.ts new file mode 100644 index 0000000..d65a295 --- /dev/null +++ b/src/mcp-server/console-logger.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export const consoleLoggerLevels = [ + "debug", + "warning", + "info", + "error", +] as const; + +export type ConsoleLoggerLevel = (typeof consoleLoggerLevels)[number]; + +export type ConsoleLogger = { + [key in ConsoleLoggerLevel]: ( + message: string, + data?: Record, + ) => void; +}; + +export function createConsoleLogger(level: ConsoleLoggerLevel): ConsoleLogger { + const min = consoleLoggerLevels.indexOf(level); + const noop = () => {}; + + const logger: ConsoleLogger = { + debug: noop, + warning: noop, + info: noop, + error: noop, + }; + + return consoleLoggerLevels.reduce((logger, level, i) => { + if (i < min) { + return logger; + } + + logger[level] = log.bind(null, level); + + return logger; + }, logger); +} + +function log( + level: ConsoleLoggerLevel, + message: string, + data?: Record, +) { + let line = ""; + const allData = [{ msg: message, l: level }, data]; + + for (const ctx of allData) { + for (const [key, value] of Object.entries(ctx || {})) { + if (value == null) { + line += ` ${key}=<${value}>`; + } else if (typeof value === "function") { + line += ` ${key}=`; + } else if (typeof value === "symbol") { + line += ` ${key}=${value.toString()}`; + } else if (typeof value === "string") { + const v = value.search(/\s/g) >= 0 ? JSON.stringify(value) : value; + line += ` ${key}=${v}`; + } else if (typeof value !== "object") { + line += ` ${key}=${value}`; + } else { + line += ` ${key}="${JSON.stringify(value)}"`; + } + } + } + + console.error(line); +} diff --git a/src/mcp-server/extensions.ts b/src/mcp-server/extensions.ts new file mode 100644 index 0000000..7aab280 --- /dev/null +++ b/src/mcp-server/extensions.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ZodRawShape } from "zod"; +import { PromptArgsRawShape, PromptDefinition } from "./prompts.js"; +import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js"; +import { ToolDefinition } from "./tools.js"; + +export type Register = { + tool: (def: ToolDefinition) => void; + resource: (def: ResourceDefinition) => void; + resourceTemplate: (def: ResourceTemplateDefinition) => void; + prompt: ( + prompt: PromptDefinition, + ) => void; +}; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts new file mode 100644 index 0000000..4f70ead --- /dev/null +++ b/src/mcp-server/mcp-server.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { buildApplication, buildRouteMap, run } from "@stricli/core"; +import process from "node:process"; +import { buildContext } from "./cli.js"; +import { startCommand } from "./cli/start/command.js"; + +const routes = buildRouteMap({ + routes: { + start: startCommand, + }, + docs: { + brief: "MCP server CLI", + }, +}); + +export const app = buildApplication(routes, { + name: "mcp", + versionInfo: { + currentVersion: "0.0.1", + }, +}); + +run(app, process.argv.slice(2), buildContext(process)); diff --git a/src/mcp-server/prompts.ts b/src/mcp-server/prompts.ts new file mode 100644 index 0000000..838c8c6 --- /dev/null +++ b/src/mcp-server/prompts.ts @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js"; +import { + objectOutputType, + ZodOptional, + ZodType, + ZodTypeAny, + ZodTypeDef, +} from "zod"; +import { ProwlarrCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; + +// '@modelcontextprotocol/sdk' currently does not export this type +export type PromptArgsRawShape = { + [k: string]: + | ZodType + | ZodOptional>; +}; + +export type PromptDefinition< + Args extends undefined | PromptArgsRawShape = undefined, +> = Args extends PromptArgsRawShape ? { + name: string; + description?: string; + scopes?: MCPScope[]; + args: Args; + prompt: ( + client: ProwlarrCore, + args: objectOutputType, + extra: RequestHandlerExtra, + ) => GetPromptResult | Promise; + } + : { + name: string; + description?: string; + scopes?: MCPScope[]; + args?: undefined; + prompt: ( + client: ProwlarrCore, + extra: RequestHandlerExtra, + ) => GetPromptResult | Promise; + }; + +// Optional function to assist with formatting prompt results +export async function formatResult(value: string): Promise { + return { + messages: [ + { + role: "user", + content: { + type: "text", + text: value, + }, + }, + ], + }; +} + +export function createRegisterPrompt( + logger: ConsoleLogger, + server: McpServer, + sdk: ProwlarrCore, + allowedScopes: Set, +): ( + prompt: PromptDefinition, +) => void { + return ( + prompt: PromptDefinition, + ): void => { + const scopes = prompt.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + if (prompt.args) { + if (prompt.description) { + server.prompt( + prompt.name, + prompt.description, + prompt.args, + async (args, ctx) => prompt.prompt(sdk, args, ctx), + ); + } else { + server.prompt( + prompt.name, + prompt.args, + async (args, ctx) => prompt.prompt(sdk, args, ctx), + ); + } + } else { + if (prompt.description) { + server.prompt( + prompt.name, + prompt.description, + async (ctx) => prompt.prompt(sdk, ctx), + ); + } else { + server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx)); + } + } + + logger.debug("Registered prompt", { name: prompt.name }); + }; +} diff --git a/src/mcp-server/resources.ts b/src/mcp-server/resources.ts new file mode 100644 index 0000000..f70f688 --- /dev/null +++ b/src/mcp-server/resources.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + McpServer, + ResourceMetadata, + ResourceTemplate, +} from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { Variables } from "@modelcontextprotocol/sdk/shared/uriTemplate.js"; +import { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js"; +import { ProwlarrCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; +import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js"; + +export type ReadResourceCallback = ( + client: ProwlarrCore, + uri: URL, + extra: RequestHandlerExtra, +) => ReadResourceResult | Promise; + +export type ResourceDefinition = { + name: string; + description?: string; + metadata?: ResourceMetadata; + scopes?: MCPScope[]; + resource: string; + read: ReadResourceCallback; +}; + +export type ReadResourceTemplateCallback = ( + client: ProwlarrCore, + uri: URL, + vars: Variables, + extra: RequestHandlerExtra, +) => ReadResourceResult | Promise; + +export type ResourceTemplateDefinition = { + name: string; + description: string; + metadata?: ResourceMetadata; + scopes?: MCPScope[]; + resource: ResourceTemplate; + read: ReadResourceTemplateCallback; +}; + +// Optional function to assist with formatting resource results +export async function formatResult( + value: unknown, + uri: URL, + init: { mimeType?: string | undefined; response?: Response | undefined }, +): Promise { + if (typeof value === "undefined") { + return { contents: [] }; + } + + let contents: ReadResourceResult["contents"] = []; + + const mimeType = init.mimeType ?? init.response?.headers.get("content-type") + ?? ""; + + if (mimeType.search(/\bjson\b/g) !== -1) { + contents = [{ uri: uri.toString(), mimeType, text: JSON.stringify(value) }]; + } else if ( + mimeType.startsWith("text/event-stream") + && isAsyncIterable(value) + ) { + contents = [ + { + uri: uri.toString(), + mimeType: "application/json", + text: await stringifySSEToJSON(value), + }, + ]; + } else if ( + (mimeType.startsWith("text/") || mimeType.startsWith("application/")) + && typeof value === "string" + ) { + contents = [{ uri: uri.toString(), mimeType, text: value }]; + } else if (isBinaryData(value)) { + const blob = await valueToBase64(value); + contents = blob == null ? [] : [{ uri: uri.toString(), blob, mimeType }]; + } else { + throw new Error(`Unsupported content type: "${mimeType}"`); + } + + return { contents }; +} + +async function stringifySSEToJSON( + value: AsyncIterable, +): Promise { + const payloads = []; + + for await (const chunk of value) { + payloads.push(chunk); + } + + return JSON.stringify(payloads); +} + +export function createRegisterResource( + logger: ConsoleLogger, + server: McpServer, + sdk: ProwlarrCore, + allowedScopes: Set, +): (resource: ResourceDefinition) => void { + return (resource: ResourceDefinition): void => { + const scopes = resource.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + const metadata: ResourceMetadata = { + ...resource.metadata, + description: resource.description, + }; + + server.resource( + resource.name, + resource.resource, + metadata, + async (uri, ctx) => resource.read(sdk, uri, ctx), + ); + + logger.debug("Registered resource", { name: resource.name }); + }; +} + +export function createRegisterResourceTemplate( + logger: ConsoleLogger, + server: McpServer, + sdk: ProwlarrCore, + allowedScopes: Set, +): (resource: ResourceTemplateDefinition) => void { + return (resource: ResourceTemplateDefinition): void => { + const scopes = resource.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + const metadata: ResourceMetadata = { + ...resource.metadata, + description: resource.description, + }; + + server.resource( + resource.name, + resource.resource, + metadata, + async (uri, vars, ctx) => resource.read(sdk, uri, vars, ctx), + ); + + logger.debug("Registered resource template", { name: resource.name }); + }; +} diff --git a/src/mcp-server/scopes.ts b/src/mcp-server/scopes.ts new file mode 100644 index 0000000..c25696d --- /dev/null +++ b/src/mcp-server/scopes.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export const mcpScopes = [] as const; + +export type MCPScope = (typeof mcpScopes)[number]; diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts new file mode 100644 index 0000000..d9eb950 --- /dev/null +++ b/src/mcp-server/server.ts @@ -0,0 +1,319 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { ProwlarrCore } from "../core.js"; +import { SDKOptions } from "../lib/config.js"; +import type { ConsoleLogger } from "./console-logger.js"; +import { createRegisterPrompt } from "./prompts.js"; +import { + createRegisterResource, + createRegisterResourceTemplate, +} from "./resources.js"; +import { MCPScope } from "./scopes.js"; +import { createRegisterTool } from "./tools.js"; +import { tool$apiInfoGetApi } from "./tools/apiInfoGetApi.js"; +import { tool$applicationDeleteApiV1ApplicationsBulk } from "./tools/applicationDeleteApiV1ApplicationsBulk.js"; +import { tool$applicationDeleteApiV1ApplicationsId } from "./tools/applicationDeleteApiV1ApplicationsId.js"; +import { tool$applicationGetApiV1Applications } from "./tools/applicationGetApiV1Applications.js"; +import { tool$applicationGetApiV1ApplicationsId } from "./tools/applicationGetApiV1ApplicationsId.js"; +import { tool$applicationGetApiV1ApplicationsSchema } from "./tools/applicationGetApiV1ApplicationsSchema.js"; +import { tool$applicationPostApiV1Applications } from "./tools/applicationPostApiV1Applications.js"; +import { tool$applicationPostApiV1ApplicationsActionName } from "./tools/applicationPostApiV1ApplicationsActionName.js"; +import { tool$applicationPostApiV1ApplicationsTest } from "./tools/applicationPostApiV1ApplicationsTest.js"; +import { tool$applicationPostApiV1ApplicationsTestall } from "./tools/applicationPostApiV1ApplicationsTestall.js"; +import { tool$applicationPutApiV1ApplicationsBulk } from "./tools/applicationPutApiV1ApplicationsBulk.js"; +import { tool$applicationPutApiV1ApplicationsId } from "./tools/applicationPutApiV1ApplicationsId.js"; +import { tool$appProfileDeleteApiV1AppprofileId } from "./tools/appProfileDeleteApiV1AppprofileId.js"; +import { tool$appProfileGetApiV1Appprofile } from "./tools/appProfileGetApiV1Appprofile.js"; +import { tool$appProfileGetApiV1AppprofileId } from "./tools/appProfileGetApiV1AppprofileId.js"; +import { tool$appProfileGetApiV1AppprofileSchema } from "./tools/appProfileGetApiV1AppprofileSchema.js"; +import { tool$appProfilePostApiV1Appprofile } from "./tools/appProfilePostApiV1Appprofile.js"; +import { tool$appProfilePutApiV1AppprofileId } from "./tools/appProfilePutApiV1AppprofileId.js"; +import { tool$authenticationGetLogout } from "./tools/authenticationGetLogout.js"; +import { tool$backupDeleteApiV1SystemBackupId } from "./tools/backupDeleteApiV1SystemBackupId.js"; +import { tool$backupGetApiV1SystemBackup } from "./tools/backupGetApiV1SystemBackup.js"; +import { tool$backupPostApiV1SystemBackupRestoreId } from "./tools/backupPostApiV1SystemBackupRestoreId.js"; +import { tool$backupPostApiV1SystemBackupRestoreUpload } from "./tools/backupPostApiV1SystemBackupRestoreUpload.js"; +import { tool$commandDeleteApiV1CommandId } from "./tools/commandDeleteApiV1CommandId.js"; +import { tool$commandGetApiV1Command } from "./tools/commandGetApiV1Command.js"; +import { tool$commandGetApiV1CommandId } from "./tools/commandGetApiV1CommandId.js"; +import { tool$commandPostApiV1Command } from "./tools/commandPostApiV1Command.js"; +import { tool$customFilterDeleteApiV1CustomfilterId } from "./tools/customFilterDeleteApiV1CustomfilterId.js"; +import { tool$customFilterGetApiV1Customfilter } from "./tools/customFilterGetApiV1Customfilter.js"; +import { tool$customFilterGetApiV1CustomfilterId } from "./tools/customFilterGetApiV1CustomfilterId.js"; +import { tool$customFilterPostApiV1Customfilter } from "./tools/customFilterPostApiV1Customfilter.js"; +import { tool$customFilterPutApiV1CustomfilterId } from "./tools/customFilterPutApiV1CustomfilterId.js"; +import { tool$developmentConfigGetApiV1ConfigDevelopment } from "./tools/developmentConfigGetApiV1ConfigDevelopment.js"; +import { tool$developmentConfigGetApiV1ConfigDevelopmentId } from "./tools/developmentConfigGetApiV1ConfigDevelopmentId.js"; +import { tool$developmentConfigPutApiV1ConfigDevelopmentId } from "./tools/developmentConfigPutApiV1ConfigDevelopmentId.js"; +import { tool$downloadClientConfigGetApiV1ConfigDownloadclient } from "./tools/downloadClientConfigGetApiV1ConfigDownloadclient.js"; +import { tool$downloadClientConfigGetApiV1ConfigDownloadclientId } from "./tools/downloadClientConfigGetApiV1ConfigDownloadclientId.js"; +import { tool$downloadClientConfigPutApiV1ConfigDownloadclientId } from "./tools/downloadClientConfigPutApiV1ConfigDownloadclientId.js"; +import { tool$downloadClientDeleteApiV1DownloadclientBulk } from "./tools/downloadClientDeleteApiV1DownloadclientBulk.js"; +import { tool$downloadClientDeleteApiV1DownloadclientId } from "./tools/downloadClientDeleteApiV1DownloadclientId.js"; +import { tool$downloadClientGetApiV1Downloadclient } from "./tools/downloadClientGetApiV1Downloadclient.js"; +import { tool$downloadClientGetApiV1DownloadclientId } from "./tools/downloadClientGetApiV1DownloadclientId.js"; +import { tool$downloadClientGetApiV1DownloadclientSchema } from "./tools/downloadClientGetApiV1DownloadclientSchema.js"; +import { tool$downloadClientPostApiV1Downloadclient } from "./tools/downloadClientPostApiV1Downloadclient.js"; +import { tool$downloadClientPostApiV1DownloadclientActionName } from "./tools/downloadClientPostApiV1DownloadclientActionName.js"; +import { tool$downloadClientPostApiV1DownloadclientTest } from "./tools/downloadClientPostApiV1DownloadclientTest.js"; +import { tool$downloadClientPostApiV1DownloadclientTestall } from "./tools/downloadClientPostApiV1DownloadclientTestall.js"; +import { tool$downloadClientPutApiV1DownloadclientBulk } from "./tools/downloadClientPutApiV1DownloadclientBulk.js"; +import { tool$downloadClientPutApiV1DownloadclientId } from "./tools/downloadClientPutApiV1DownloadclientId.js"; +import { tool$fileSystemGetApiV1Filesystem } from "./tools/fileSystemGetApiV1Filesystem.js"; +import { tool$fileSystemGetApiV1FilesystemType } from "./tools/fileSystemGetApiV1FilesystemType.js"; +import { tool$healthGetApiV1Health } from "./tools/healthGetApiV1Health.js"; +import { tool$historyGetApiV1History } from "./tools/historyGetApiV1History.js"; +import { tool$historyGetApiV1HistoryIndexer } from "./tools/historyGetApiV1HistoryIndexer.js"; +import { tool$historyGetApiV1HistorySince } from "./tools/historyGetApiV1HistorySince.js"; +import { tool$hostConfigGetApiV1ConfigHost } from "./tools/hostConfigGetApiV1ConfigHost.js"; +import { tool$hostConfigGetApiV1ConfigHostId } from "./tools/hostConfigGetApiV1ConfigHostId.js"; +import { tool$hostConfigPutApiV1ConfigHostId } from "./tools/hostConfigPutApiV1ConfigHostId.js"; +import { tool$indexerDefaultCategoriesGetApiV1IndexerCategories } from "./tools/indexerDefaultCategoriesGetApiV1IndexerCategories.js"; +import { tool$indexerDeleteApiV1IndexerBulk } from "./tools/indexerDeleteApiV1IndexerBulk.js"; +import { tool$indexerDeleteApiV1IndexerId } from "./tools/indexerDeleteApiV1IndexerId.js"; +import { tool$indexerGetApiV1Indexer } from "./tools/indexerGetApiV1Indexer.js"; +import { tool$indexerGetApiV1IndexerId } from "./tools/indexerGetApiV1IndexerId.js"; +import { tool$indexerGetApiV1IndexerSchema } from "./tools/indexerGetApiV1IndexerSchema.js"; +import { tool$indexerPostApiV1Indexer } from "./tools/indexerPostApiV1Indexer.js"; +import { tool$indexerPostApiV1IndexerActionName } from "./tools/indexerPostApiV1IndexerActionName.js"; +import { tool$indexerPostApiV1IndexerTest } from "./tools/indexerPostApiV1IndexerTest.js"; +import { tool$indexerPostApiV1IndexerTestall } from "./tools/indexerPostApiV1IndexerTestall.js"; +import { tool$indexerProxyDeleteApiV1IndexerproxyId } from "./tools/indexerProxyDeleteApiV1IndexerproxyId.js"; +import { tool$indexerProxyGetApiV1Indexerproxy } from "./tools/indexerProxyGetApiV1Indexerproxy.js"; +import { tool$indexerProxyGetApiV1IndexerproxyId } from "./tools/indexerProxyGetApiV1IndexerproxyId.js"; +import { tool$indexerProxyGetApiV1IndexerproxySchema } from "./tools/indexerProxyGetApiV1IndexerproxySchema.js"; +import { tool$indexerProxyPostApiV1Indexerproxy } from "./tools/indexerProxyPostApiV1Indexerproxy.js"; +import { tool$indexerProxyPostApiV1IndexerproxyActionName } from "./tools/indexerProxyPostApiV1IndexerproxyActionName.js"; +import { tool$indexerProxyPostApiV1IndexerproxyTest } from "./tools/indexerProxyPostApiV1IndexerproxyTest.js"; +import { tool$indexerProxyPostApiV1IndexerproxyTestall } from "./tools/indexerProxyPostApiV1IndexerproxyTestall.js"; +import { tool$indexerProxyPutApiV1IndexerproxyId } from "./tools/indexerProxyPutApiV1IndexerproxyId.js"; +import { tool$indexerPutApiV1IndexerBulk } from "./tools/indexerPutApiV1IndexerBulk.js"; +import { tool$indexerPutApiV1IndexerId } from "./tools/indexerPutApiV1IndexerId.js"; +import { tool$indexerStatsGetApiV1Indexerstats } from "./tools/indexerStatsGetApiV1Indexerstats.js"; +import { tool$indexerStatusGetApiV1Indexerstatus } from "./tools/indexerStatusGetApiV1Indexerstatus.js"; +import { tool$localizationGetApiV1Localization } from "./tools/localizationGetApiV1Localization.js"; +import { tool$localizationGetApiV1LocalizationOptions } from "./tools/localizationGetApiV1LocalizationOptions.js"; +import { tool$logFileGetApiV1LogFile } from "./tools/logFileGetApiV1LogFile.js"; +import { tool$logFileGetApiV1LogFileFilename } from "./tools/logFileGetApiV1LogFileFilename.js"; +import { tool$logGetApiV1Log } from "./tools/logGetApiV1Log.js"; +import { tool$newznabGetApiV1IndexerIdDownload } from "./tools/newznabGetApiV1IndexerIdDownload.js"; +import { tool$newznabGetApiV1IndexerIdNewznab } from "./tools/newznabGetApiV1IndexerIdNewznab.js"; +import { tool$newznabGetIdApi } from "./tools/newznabGetIdApi.js"; +import { tool$newznabGetIdDownload } from "./tools/newznabGetIdDownload.js"; +import { tool$notificationDeleteApiV1NotificationId } from "./tools/notificationDeleteApiV1NotificationId.js"; +import { tool$notificationGetApiV1Notification } from "./tools/notificationGetApiV1Notification.js"; +import { tool$notificationGetApiV1NotificationId } from "./tools/notificationGetApiV1NotificationId.js"; +import { tool$notificationGetApiV1NotificationSchema } from "./tools/notificationGetApiV1NotificationSchema.js"; +import { tool$notificationPostApiV1Notification } from "./tools/notificationPostApiV1Notification.js"; +import { tool$notificationPostApiV1NotificationActionName } from "./tools/notificationPostApiV1NotificationActionName.js"; +import { tool$notificationPostApiV1NotificationTest } from "./tools/notificationPostApiV1NotificationTest.js"; +import { tool$notificationPostApiV1NotificationTestall } from "./tools/notificationPostApiV1NotificationTestall.js"; +import { tool$notificationPutApiV1NotificationId } from "./tools/notificationPutApiV1NotificationId.js"; +import { tool$pingGetPing } from "./tools/pingGetPing.js"; +import { tool$pingHeadPing } from "./tools/pingHeadPing.js"; +import { tool$searchGetApiV1Search } from "./tools/searchGetApiV1Search.js"; +import { tool$searchPostApiV1Search } from "./tools/searchPostApiV1Search.js"; +import { tool$searchPostApiV1SearchBulk } from "./tools/searchPostApiV1SearchBulk.js"; +import { tool$staticResourceGet } from "./tools/staticResourceGet.js"; +import { tool$staticResourceGetContentPath } from "./tools/staticResourceGetContentPath.js"; +import { tool$staticResourceGetLogin } from "./tools/staticResourceGetLogin.js"; +import { tool$staticResourceGetPath } from "./tools/staticResourceGetPath.js"; +import { tool$systemGetApiV1SystemRoutes } from "./tools/systemGetApiV1SystemRoutes.js"; +import { tool$systemGetApiV1SystemRoutesDuplicate } from "./tools/systemGetApiV1SystemRoutesDuplicate.js"; +import { tool$systemGetApiV1SystemStatus } from "./tools/systemGetApiV1SystemStatus.js"; +import { tool$systemPostApiV1SystemRestart } from "./tools/systemPostApiV1SystemRestart.js"; +import { tool$systemPostApiV1SystemShutdown } from "./tools/systemPostApiV1SystemShutdown.js"; +import { tool$tagDeleteApiV1TagId } from "./tools/tagDeleteApiV1TagId.js"; +import { tool$tagDetailsGetApiV1TagDetail } from "./tools/tagDetailsGetApiV1TagDetail.js"; +import { tool$tagDetailsGetApiV1TagDetailId } from "./tools/tagDetailsGetApiV1TagDetailId.js"; +import { tool$tagGetApiV1Tag } from "./tools/tagGetApiV1Tag.js"; +import { tool$tagGetApiV1TagId } from "./tools/tagGetApiV1TagId.js"; +import { tool$tagPostApiV1Tag } from "./tools/tagPostApiV1Tag.js"; +import { tool$tagPutApiV1TagId } from "./tools/tagPutApiV1TagId.js"; +import { tool$taskGetApiV1SystemTask } from "./tools/taskGetApiV1SystemTask.js"; +import { tool$taskGetApiV1SystemTaskId } from "./tools/taskGetApiV1SystemTaskId.js"; +import { tool$uiConfigGetApiV1ConfigUi } from "./tools/uiConfigGetApiV1ConfigUi.js"; +import { tool$uiConfigGetApiV1ConfigUiId } from "./tools/uiConfigGetApiV1ConfigUiId.js"; +import { tool$uiConfigPutApiV1ConfigUiId } from "./tools/uiConfigPutApiV1ConfigUiId.js"; +import { tool$updateGetApiV1Update } from "./tools/updateGetApiV1Update.js"; +import { tool$updateLogFileGetApiV1LogFileUpdate } from "./tools/updateLogFileGetApiV1LogFileUpdate.js"; +import { tool$updateLogFileGetApiV1LogFileUpdateFilename } from "./tools/updateLogFileGetApiV1LogFileUpdateFilename.js"; + +export function createMCPServer(deps: { + logger: ConsoleLogger; + allowedTools?: string[] | undefined; + scopes?: MCPScope[] | undefined; + serverURL?: string | undefined; + security?: SDKOptions["security"] | undefined; + serverIdx?: SDKOptions["serverIdx"] | undefined; + protocol?: SDKOptions["protocol"] | undefined; + hostpath?: SDKOptions["hostpath"] | undefined; +}) { + const server = new McpServer({ + name: "Prowlarr", + version: "0.0.1", + }); + + const client = new ProwlarrCore({ + security: deps.security, + serverURL: deps.serverURL, + serverIdx: deps.serverIdx, + protocol: deps.protocol, + hostpath: deps.hostpath, + }); + + const scopes = new Set(deps.scopes); + + const allowedTools = deps.allowedTools && new Set(deps.allowedTools); + const tool = createRegisterTool( + deps.logger, + server, + client, + scopes, + allowedTools, + ); + const resource = createRegisterResource(deps.logger, server, client, scopes); + const resourceTemplate = createRegisterResourceTemplate( + deps.logger, + server, + client, + scopes, + ); + const prompt = createRegisterPrompt(deps.logger, server, client, scopes); + const register = { tool, resource, resourceTemplate, prompt }; + void register; // suppress unused warnings + + tool(tool$apiInfoGetApi); + tool(tool$applicationGetApiV1ApplicationsId); + tool(tool$applicationPutApiV1ApplicationsId); + tool(tool$applicationDeleteApiV1ApplicationsId); + tool(tool$applicationGetApiV1Applications); + tool(tool$applicationPostApiV1Applications); + tool(tool$applicationPutApiV1ApplicationsBulk); + tool(tool$applicationDeleteApiV1ApplicationsBulk); + tool(tool$applicationGetApiV1ApplicationsSchema); + tool(tool$applicationPostApiV1ApplicationsTest); + tool(tool$applicationPostApiV1ApplicationsTestall); + tool(tool$applicationPostApiV1ApplicationsActionName); + tool(tool$appProfilePostApiV1Appprofile); + tool(tool$appProfileGetApiV1Appprofile); + tool(tool$appProfileDeleteApiV1AppprofileId); + tool(tool$appProfilePutApiV1AppprofileId); + tool(tool$appProfileGetApiV1AppprofileId); + tool(tool$appProfileGetApiV1AppprofileSchema); + tool(tool$staticResourceGetLogin); + tool(tool$staticResourceGetContentPath); + tool(tool$staticResourceGet); + tool(tool$staticResourceGetPath); + tool(tool$authenticationGetLogout); + tool(tool$backupGetApiV1SystemBackup); + tool(tool$backupDeleteApiV1SystemBackupId); + tool(tool$backupPostApiV1SystemBackupRestoreId); + tool(tool$backupPostApiV1SystemBackupRestoreUpload); + tool(tool$commandGetApiV1CommandId); + tool(tool$commandDeleteApiV1CommandId); + tool(tool$commandPostApiV1Command); + tool(tool$commandGetApiV1Command); + tool(tool$customFilterGetApiV1CustomfilterId); + tool(tool$customFilterPutApiV1CustomfilterId); + tool(tool$customFilterDeleteApiV1CustomfilterId); + tool(tool$customFilterGetApiV1Customfilter); + tool(tool$customFilterPostApiV1Customfilter); + tool(tool$developmentConfigPutApiV1ConfigDevelopmentId); + tool(tool$developmentConfigGetApiV1ConfigDevelopmentId); + tool(tool$developmentConfigGetApiV1ConfigDevelopment); + tool(tool$downloadClientGetApiV1DownloadclientId); + tool(tool$downloadClientPutApiV1DownloadclientId); + tool(tool$downloadClientDeleteApiV1DownloadclientId); + tool(tool$downloadClientGetApiV1Downloadclient); + tool(tool$downloadClientPostApiV1Downloadclient); + tool(tool$downloadClientPutApiV1DownloadclientBulk); + tool(tool$downloadClientDeleteApiV1DownloadclientBulk); + tool(tool$downloadClientGetApiV1DownloadclientSchema); + tool(tool$downloadClientPostApiV1DownloadclientTest); + tool(tool$downloadClientPostApiV1DownloadclientTestall); + tool(tool$downloadClientPostApiV1DownloadclientActionName); + tool(tool$downloadClientConfigGetApiV1ConfigDownloadclientId); + tool(tool$downloadClientConfigPutApiV1ConfigDownloadclientId); + tool(tool$downloadClientConfigGetApiV1ConfigDownloadclient); + tool(tool$fileSystemGetApiV1Filesystem); + tool(tool$fileSystemGetApiV1FilesystemType); + tool(tool$healthGetApiV1Health); + tool(tool$historyGetApiV1History); + tool(tool$historyGetApiV1HistorySince); + tool(tool$historyGetApiV1HistoryIndexer); + tool(tool$hostConfigGetApiV1ConfigHostId); + tool(tool$hostConfigPutApiV1ConfigHostId); + tool(tool$hostConfigGetApiV1ConfigHost); + tool(tool$indexerGetApiV1IndexerId); + tool(tool$indexerPutApiV1IndexerId); + tool(tool$indexerDeleteApiV1IndexerId); + tool(tool$indexerGetApiV1Indexer); + tool(tool$indexerPostApiV1Indexer); + tool(tool$indexerPutApiV1IndexerBulk); + tool(tool$indexerDeleteApiV1IndexerBulk); + tool(tool$indexerGetApiV1IndexerSchema); + tool(tool$indexerPostApiV1IndexerTest); + tool(tool$indexerPostApiV1IndexerTestall); + tool(tool$indexerPostApiV1IndexerActionName); + tool(tool$indexerDefaultCategoriesGetApiV1IndexerCategories); + tool(tool$indexerProxyGetApiV1IndexerproxyId); + tool(tool$indexerProxyPutApiV1IndexerproxyId); + tool(tool$indexerProxyDeleteApiV1IndexerproxyId); + tool(tool$indexerProxyGetApiV1Indexerproxy); + tool(tool$indexerProxyPostApiV1Indexerproxy); + tool(tool$indexerProxyGetApiV1IndexerproxySchema); + tool(tool$indexerProxyPostApiV1IndexerproxyTest); + tool(tool$indexerProxyPostApiV1IndexerproxyTestall); + tool(tool$indexerProxyPostApiV1IndexerproxyActionName); + tool(tool$indexerStatsGetApiV1Indexerstats); + tool(tool$indexerStatusGetApiV1Indexerstatus); + tool(tool$localizationGetApiV1Localization); + tool(tool$localizationGetApiV1LocalizationOptions); + tool(tool$logGetApiV1Log); + tool(tool$logFileGetApiV1LogFile); + tool(tool$logFileGetApiV1LogFileFilename); + tool(tool$newznabGetApiV1IndexerIdNewznab); + tool(tool$newznabGetIdApi); + tool(tool$newznabGetApiV1IndexerIdDownload); + tool(tool$newznabGetIdDownload); + tool(tool$notificationGetApiV1NotificationId); + tool(tool$notificationPutApiV1NotificationId); + tool(tool$notificationDeleteApiV1NotificationId); + tool(tool$notificationGetApiV1Notification); + tool(tool$notificationPostApiV1Notification); + tool(tool$notificationGetApiV1NotificationSchema); + tool(tool$notificationPostApiV1NotificationTest); + tool(tool$notificationPostApiV1NotificationTestall); + tool(tool$notificationPostApiV1NotificationActionName); + tool(tool$pingGetPing); + tool(tool$pingHeadPing); + tool(tool$searchPostApiV1Search); + tool(tool$searchGetApiV1Search); + tool(tool$searchPostApiV1SearchBulk); + tool(tool$systemGetApiV1SystemStatus); + tool(tool$systemGetApiV1SystemRoutes); + tool(tool$systemGetApiV1SystemRoutesDuplicate); + tool(tool$systemPostApiV1SystemShutdown); + tool(tool$systemPostApiV1SystemRestart); + tool(tool$tagGetApiV1TagId); + tool(tool$tagPutApiV1TagId); + tool(tool$tagDeleteApiV1TagId); + tool(tool$tagGetApiV1Tag); + tool(tool$tagPostApiV1Tag); + tool(tool$tagDetailsGetApiV1TagDetailId); + tool(tool$tagDetailsGetApiV1TagDetail); + tool(tool$taskGetApiV1SystemTask); + tool(tool$taskGetApiV1SystemTaskId); + tool(tool$uiConfigPutApiV1ConfigUiId); + tool(tool$uiConfigGetApiV1ConfigUiId); + tool(tool$uiConfigGetApiV1ConfigUi); + tool(tool$updateGetApiV1Update); + tool(tool$updateLogFileGetApiV1LogFileUpdate); + tool(tool$updateLogFileGetApiV1LogFileUpdateFilename); + + return server; +} diff --git a/src/mcp-server/shared.ts b/src/mcp-server/shared.ts new file mode 100644 index 0000000..9dc6d2f --- /dev/null +++ b/src/mcp-server/shared.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { bytesToBase64 } from "../lib/base64.js"; + +type BinaryData = + | Uint8Array + | ArrayBuffer + | Blob + | ReadableStream + | Response + | string; + +export async function consumeStream( + stream: ReadableStream, +): Promise { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + try { + while (true) { + const { done, value } = await reader.read(); + if (value != null) chunks.push(value); + if (done) break; + } + } finally { + reader.releaseLock(); + } + + return new Uint8Array(await new Blob(chunks).arrayBuffer()); +} + +export function isAsyncIterable( + value: unknown, +): value is AsyncIterable { + return ( + typeof value === "object" && value != null && Symbol.asyncIterator in value + ); +} + +export function isBinaryData(value: unknown): value is BinaryData { + return ( + value instanceof Uint8Array + || value instanceof ArrayBuffer + || value instanceof Blob + || value instanceof ReadableStream + || value instanceof Response + || typeof value === "string" + ); +} + +const base64Schema = z.string().base64(); + +export async function valueToBase64( + value: BinaryData | null | undefined, +): Promise { + if (value == null) { + return null; + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (value instanceof ArrayBuffer) { + return bytesToBase64(new Uint8Array(value)); + } else if (value instanceof Response || value instanceof Blob) { + return bytesToBase64(new Uint8Array(await value.arrayBuffer())); + } else if (value instanceof ReadableStream) { + return bytesToBase64(await consumeStream(value)); + } else if (typeof value === "string") { + return base64Schema.parse(value); + } else { + value satisfies never; + throw new Error(`Unsupported image value type: ${typeof value}`); + } +} diff --git a/src/mcp-server/tools.ts b/src/mcp-server/tools.ts new file mode 100644 index 0000000..64f5202 --- /dev/null +++ b/src/mcp-server/tools.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; +import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod"; +import { ProwlarrCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; +import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js"; + +export type ToolDefinition = + Args extends ZodRawShape ? { + name: string; + description: string; + scopes?: MCPScope[]; + args: Args; + tool: ( + client: ProwlarrCore, + args: objectOutputType, + extra: RequestHandlerExtra, + ) => CallToolResult | Promise; + } + : { + name: string; + description: string; + scopes?: MCPScope[]; + args?: undefined; + tool: ( + client: ProwlarrCore, + extra: RequestHandlerExtra, + ) => CallToolResult | Promise; + }; + +// Optional function to assist with formatting tool results +export async function formatResult( + value: unknown, + init: { response?: Response | undefined }, +): Promise { + if (typeof value === "undefined") { + return { content: [] }; + } + + const { response } = init; + const contentType = response?.headers.get("content-type") ?? ""; + let content: CallToolResult["content"] = []; + + if (contentType.search(/\bjson\b/g)) { + content = [{ type: "text", text: JSON.stringify(value) }]; + } else if ( + contentType.startsWith("text/event-stream") + && isAsyncIterable(value) + ) { + content = await consumeSSE(value); + } else if (contentType.startsWith("text/") && typeof value === "string") { + content = [{ type: "text", text: value }]; + } else if (isBinaryData(value) && contentType.startsWith("image/")) { + const data = await valueToBase64(value); + content = data == null + ? [] + : [{ type: "image", data, mimeType: contentType }]; + } else { + return { + content: [{ + type: "text", + text: `Unsupported content type: "${contentType}"`, + }], + isError: true, + }; + } + + return { content }; +} + +async function consumeSSE( + value: AsyncIterable, +): Promise { + const content: CallToolResult["content"] = []; + + for await (const chunk of value) { + if (typeof chunk === "string") { + content.push({ type: "text", text: chunk }); + } else { + content.push({ type: "text", text: JSON.stringify(chunk) }); + } + } + + return content; +} + +export function createRegisterTool( + logger: ConsoleLogger, + server: McpServer, + sdk: ProwlarrCore, + allowedScopes: Set, + allowedTools?: Set, +): (tool: ToolDefinition) => void { + return (tool: ToolDefinition): void => { + if (allowedTools && !allowedTools.has(tool.name)) { + return; + } + + const scopes = tool.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + if (tool.args) { + server.tool(tool.name, tool.description, tool.args, async (args, ctx) => { + return tool.tool(sdk, args, ctx); + }); + } else { + server.tool(tool.name, tool.description, async (ctx) => { + return tool.tool(sdk, ctx); + }); + } + + logger.debug("Registered tool", { name: tool.name }); + }; +} diff --git a/src/mcp-server/tools/apiInfoGetApi.ts b/src/mcp-server/tools/apiInfoGetApi.ts new file mode 100644 index 0000000..4b67459 --- /dev/null +++ b/src/mcp-server/tools/apiInfoGetApi.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { apiInfoGetApi } from "../../funcs/apiInfoGetApi.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$apiInfoGetApi: ToolDefinition = { + name: "api-info-get-api", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await apiInfoGetApi( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appProfileDeleteApiV1AppprofileId.ts b/src/mcp-server/tools/appProfileDeleteApiV1AppprofileId.ts new file mode 100644 index 0000000..cba7e81 --- /dev/null +++ b/src/mcp-server/tools/appProfileDeleteApiV1AppprofileId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfileDeleteApiV1AppprofileId } from "../../funcs/appProfileDeleteApiV1AppprofileId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1AppprofileIdRequest$inboundSchema, +}; + +export const tool$appProfileDeleteApiV1AppprofileId: ToolDefinition< + typeof args +> = { + name: "app-profile-delete-api-v1-appprofile-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await appProfileDeleteApiV1AppprofileId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appProfileGetApiV1Appprofile.ts b/src/mcp-server/tools/appProfileGetApiV1Appprofile.ts new file mode 100644 index 0000000..5e8211c --- /dev/null +++ b/src/mcp-server/tools/appProfileGetApiV1Appprofile.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfileGetApiV1Appprofile } from "../../funcs/appProfileGetApiV1Appprofile.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$appProfileGetApiV1Appprofile: ToolDefinition = { + name: "app-profile-get-api-v1-appprofile", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await appProfileGetApiV1Appprofile( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appProfileGetApiV1AppprofileId.ts b/src/mcp-server/tools/appProfileGetApiV1AppprofileId.ts new file mode 100644 index 0000000..3fe1b66 --- /dev/null +++ b/src/mcp-server/tools/appProfileGetApiV1AppprofileId.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfileGetApiV1AppprofileId } from "../../funcs/appProfileGetApiV1AppprofileId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1AppprofileIdRequest$inboundSchema, +}; + +export const tool$appProfileGetApiV1AppprofileId: ToolDefinition = + { + name: "app-profile-get-api-v1-appprofile-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await appProfileGetApiV1AppprofileId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/appProfileGetApiV1AppprofileSchema.ts b/src/mcp-server/tools/appProfileGetApiV1AppprofileSchema.ts new file mode 100644 index 0000000..f8104a1 --- /dev/null +++ b/src/mcp-server/tools/appProfileGetApiV1AppprofileSchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfileGetApiV1AppprofileSchema } from "../../funcs/appProfileGetApiV1AppprofileSchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$appProfileGetApiV1AppprofileSchema: ToolDefinition = { + name: "app-profile-get-api-v1-appprofile-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await appProfileGetApiV1AppprofileSchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appProfilePostApiV1Appprofile.ts b/src/mcp-server/tools/appProfilePostApiV1Appprofile.ts new file mode 100644 index 0000000..2f521cc --- /dev/null +++ b/src/mcp-server/tools/appProfilePostApiV1Appprofile.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfilePostApiV1Appprofile } from "../../funcs/appProfilePostApiV1Appprofile.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.AppProfileResource$inboundSchema.optional(), +}; + +export const tool$appProfilePostApiV1Appprofile: ToolDefinition = { + name: "app-profile-post-api-v1-appprofile", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await appProfilePostApiV1Appprofile( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appProfilePutApiV1AppprofileId.ts b/src/mcp-server/tools/appProfilePutApiV1AppprofileId.ts new file mode 100644 index 0000000..032c1b4 --- /dev/null +++ b/src/mcp-server/tools/appProfilePutApiV1AppprofileId.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfilePutApiV1AppprofileId } from "../../funcs/appProfilePutApiV1AppprofileId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1AppprofileIdRequest$inboundSchema, +}; + +export const tool$appProfilePutApiV1AppprofileId: ToolDefinition = + { + name: "app-profile-put-api-v1-appprofile-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await appProfilePutApiV1AppprofileId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/applicationDeleteApiV1ApplicationsBulk.ts b/src/mcp-server/tools/applicationDeleteApiV1ApplicationsBulk.ts new file mode 100644 index 0000000..302bd3f --- /dev/null +++ b/src/mcp-server/tools/applicationDeleteApiV1ApplicationsBulk.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationDeleteApiV1ApplicationsBulk } from "../../funcs/applicationDeleteApiV1ApplicationsBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.ApplicationBulkResource$inboundSchema.optional(), +}; + +export const tool$applicationDeleteApiV1ApplicationsBulk: ToolDefinition< + typeof args +> = { + name: "application-delete-api-v1-applications-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationDeleteApiV1ApplicationsBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationDeleteApiV1ApplicationsId.ts b/src/mcp-server/tools/applicationDeleteApiV1ApplicationsId.ts new file mode 100644 index 0000000..cabe29c --- /dev/null +++ b/src/mcp-server/tools/applicationDeleteApiV1ApplicationsId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationDeleteApiV1ApplicationsId } from "../../funcs/applicationDeleteApiV1ApplicationsId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1ApplicationsIdRequest$inboundSchema, +}; + +export const tool$applicationDeleteApiV1ApplicationsId: ToolDefinition< + typeof args +> = { + name: "application-delete-api-v1-applications-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationDeleteApiV1ApplicationsId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationGetApiV1Applications.ts b/src/mcp-server/tools/applicationGetApiV1Applications.ts new file mode 100644 index 0000000..f154287 --- /dev/null +++ b/src/mcp-server/tools/applicationGetApiV1Applications.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationGetApiV1Applications } from "../../funcs/applicationGetApiV1Applications.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$applicationGetApiV1Applications: ToolDefinition = { + name: "application-get-api-v1-applications", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await applicationGetApiV1Applications( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationGetApiV1ApplicationsId.ts b/src/mcp-server/tools/applicationGetApiV1ApplicationsId.ts new file mode 100644 index 0000000..cc83b87 --- /dev/null +++ b/src/mcp-server/tools/applicationGetApiV1ApplicationsId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationGetApiV1ApplicationsId } from "../../funcs/applicationGetApiV1ApplicationsId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1ApplicationsIdRequest$inboundSchema, +}; + +export const tool$applicationGetApiV1ApplicationsId: ToolDefinition< + typeof args +> = { + name: "application-get-api-v1-applications-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationGetApiV1ApplicationsId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationGetApiV1ApplicationsSchema.ts b/src/mcp-server/tools/applicationGetApiV1ApplicationsSchema.ts new file mode 100644 index 0000000..030503e --- /dev/null +++ b/src/mcp-server/tools/applicationGetApiV1ApplicationsSchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationGetApiV1ApplicationsSchema } from "../../funcs/applicationGetApiV1ApplicationsSchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$applicationGetApiV1ApplicationsSchema: ToolDefinition = { + name: "application-get-api-v1-applications-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await applicationGetApiV1ApplicationsSchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPostApiV1Applications.ts b/src/mcp-server/tools/applicationPostApiV1Applications.ts new file mode 100644 index 0000000..079a0f3 --- /dev/null +++ b/src/mcp-server/tools/applicationPostApiV1Applications.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPostApiV1Applications } from "../../funcs/applicationPostApiV1Applications.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1ApplicationsRequest$inboundSchema, +}; + +export const tool$applicationPostApiV1Applications: ToolDefinition< + typeof args +> = { + name: "application-post-api-v1-applications", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationPostApiV1Applications( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPostApiV1ApplicationsActionName.ts b/src/mcp-server/tools/applicationPostApiV1ApplicationsActionName.ts new file mode 100644 index 0000000..ba54e00 --- /dev/null +++ b/src/mcp-server/tools/applicationPostApiV1ApplicationsActionName.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPostApiV1ApplicationsActionName } from "../../funcs/applicationPostApiV1ApplicationsActionName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1ApplicationsActionNameRequest$inboundSchema, +}; + +export const tool$applicationPostApiV1ApplicationsActionName: ToolDefinition< + typeof args +> = { + name: "application-post-api-v1-applications-action-name", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationPostApiV1ApplicationsActionName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPostApiV1ApplicationsTest.ts b/src/mcp-server/tools/applicationPostApiV1ApplicationsTest.ts new file mode 100644 index 0000000..9a563b4 --- /dev/null +++ b/src/mcp-server/tools/applicationPostApiV1ApplicationsTest.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPostApiV1ApplicationsTest } from "../../funcs/applicationPostApiV1ApplicationsTest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1ApplicationsTestRequest$inboundSchema, +}; + +export const tool$applicationPostApiV1ApplicationsTest: ToolDefinition< + typeof args +> = { + name: "application-post-api-v1-applications-test", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationPostApiV1ApplicationsTest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPostApiV1ApplicationsTestall.ts b/src/mcp-server/tools/applicationPostApiV1ApplicationsTestall.ts new file mode 100644 index 0000000..a920596 --- /dev/null +++ b/src/mcp-server/tools/applicationPostApiV1ApplicationsTestall.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPostApiV1ApplicationsTestall } from "../../funcs/applicationPostApiV1ApplicationsTestall.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$applicationPostApiV1ApplicationsTestall: ToolDefinition = { + name: "application-post-api-v1-applications-testall", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await applicationPostApiV1ApplicationsTestall( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPutApiV1ApplicationsBulk.ts b/src/mcp-server/tools/applicationPutApiV1ApplicationsBulk.ts new file mode 100644 index 0000000..1c6845a --- /dev/null +++ b/src/mcp-server/tools/applicationPutApiV1ApplicationsBulk.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPutApiV1ApplicationsBulk } from "../../funcs/applicationPutApiV1ApplicationsBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.ApplicationBulkResource$inboundSchema.optional(), +}; + +export const tool$applicationPutApiV1ApplicationsBulk: ToolDefinition< + typeof args +> = { + name: "application-put-api-v1-applications-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationPutApiV1ApplicationsBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/applicationPutApiV1ApplicationsId.ts b/src/mcp-server/tools/applicationPutApiV1ApplicationsId.ts new file mode 100644 index 0000000..cc13c51 --- /dev/null +++ b/src/mcp-server/tools/applicationPutApiV1ApplicationsId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationPutApiV1ApplicationsId } from "../../funcs/applicationPutApiV1ApplicationsId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1ApplicationsIdRequest$inboundSchema, +}; + +export const tool$applicationPutApiV1ApplicationsId: ToolDefinition< + typeof args +> = { + name: "application-put-api-v1-applications-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await applicationPutApiV1ApplicationsId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/authenticationGetLogout.ts b/src/mcp-server/tools/authenticationGetLogout.ts new file mode 100644 index 0000000..35c9350 --- /dev/null +++ b/src/mcp-server/tools/authenticationGetLogout.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { authenticationGetLogout } from "../../funcs/authenticationGetLogout.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$authenticationGetLogout: ToolDefinition = { + name: "authentication-get-logout", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await authenticationGetLogout( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/backupDeleteApiV1SystemBackupId.ts b/src/mcp-server/tools/backupDeleteApiV1SystemBackupId.ts new file mode 100644 index 0000000..cf769e5 --- /dev/null +++ b/src/mcp-server/tools/backupDeleteApiV1SystemBackupId.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupDeleteApiV1SystemBackupId } from "../../funcs/backupDeleteApiV1SystemBackupId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1SystemBackupIdRequest$inboundSchema, +}; + +export const tool$backupDeleteApiV1SystemBackupId: ToolDefinition = + { + name: "backup-delete-api-v1-system-backup-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await backupDeleteApiV1SystemBackupId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/backupGetApiV1SystemBackup.ts b/src/mcp-server/tools/backupGetApiV1SystemBackup.ts new file mode 100644 index 0000000..3f47d8d --- /dev/null +++ b/src/mcp-server/tools/backupGetApiV1SystemBackup.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupGetApiV1SystemBackup } from "../../funcs/backupGetApiV1SystemBackup.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$backupGetApiV1SystemBackup: ToolDefinition = { + name: "backup-get-api-v1-system-backup", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await backupGetApiV1SystemBackup( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreId.ts b/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreId.ts new file mode 100644 index 0000000..019063a --- /dev/null +++ b/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupPostApiV1SystemBackupRestoreId } from "../../funcs/backupPostApiV1SystemBackupRestoreId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1SystemBackupRestoreIdRequest$inboundSchema, +}; + +export const tool$backupPostApiV1SystemBackupRestoreId: ToolDefinition< + typeof args +> = { + name: "backup-post-api-v1-system-backup-restore-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await backupPostApiV1SystemBackupRestoreId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreUpload.ts b/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreUpload.ts new file mode 100644 index 0000000..91373c1 --- /dev/null +++ b/src/mcp-server/tools/backupPostApiV1SystemBackupRestoreUpload.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupPostApiV1SystemBackupRestoreUpload } from "../../funcs/backupPostApiV1SystemBackupRestoreUpload.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$backupPostApiV1SystemBackupRestoreUpload: ToolDefinition = { + name: "backup-post-api-v1-system-backup-restore-upload", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await backupPostApiV1SystemBackupRestoreUpload( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/commandDeleteApiV1CommandId.ts b/src/mcp-server/tools/commandDeleteApiV1CommandId.ts new file mode 100644 index 0000000..77b8c96 --- /dev/null +++ b/src/mcp-server/tools/commandDeleteApiV1CommandId.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { commandDeleteApiV1CommandId } from "../../funcs/commandDeleteApiV1CommandId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1CommandIdRequest$inboundSchema, +}; + +export const tool$commandDeleteApiV1CommandId: ToolDefinition = { + name: "command-delete-api-v1-command-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await commandDeleteApiV1CommandId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/commandGetApiV1Command.ts b/src/mcp-server/tools/commandGetApiV1Command.ts new file mode 100644 index 0000000..797d63c --- /dev/null +++ b/src/mcp-server/tools/commandGetApiV1Command.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { commandGetApiV1Command } from "../../funcs/commandGetApiV1Command.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$commandGetApiV1Command: ToolDefinition = { + name: "command-get-api-v1-command", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await commandGetApiV1Command( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/commandGetApiV1CommandId.ts b/src/mcp-server/tools/commandGetApiV1CommandId.ts new file mode 100644 index 0000000..eba7e70 --- /dev/null +++ b/src/mcp-server/tools/commandGetApiV1CommandId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { commandGetApiV1CommandId } from "../../funcs/commandGetApiV1CommandId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1CommandIdRequest$inboundSchema, +}; + +export const tool$commandGetApiV1CommandId: ToolDefinition = { + name: "command-get-api-v1-command-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await commandGetApiV1CommandId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/commandPostApiV1Command.ts b/src/mcp-server/tools/commandPostApiV1Command.ts new file mode 100644 index 0000000..107e8bf --- /dev/null +++ b/src/mcp-server/tools/commandPostApiV1Command.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { commandPostApiV1Command } from "../../funcs/commandPostApiV1Command.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.CommandResourceInput$inboundSchema.optional(), +}; + +export const tool$commandPostApiV1Command: ToolDefinition = { + name: "command-post-api-v1-command", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await commandPostApiV1Command( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/customFilterDeleteApiV1CustomfilterId.ts b/src/mcp-server/tools/customFilterDeleteApiV1CustomfilterId.ts new file mode 100644 index 0000000..5f2618a --- /dev/null +++ b/src/mcp-server/tools/customFilterDeleteApiV1CustomfilterId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterDeleteApiV1CustomfilterId } from "../../funcs/customFilterDeleteApiV1CustomfilterId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1CustomfilterIdRequest$inboundSchema, +}; + +export const tool$customFilterDeleteApiV1CustomfilterId: ToolDefinition< + typeof args +> = { + name: "custom-filter-delete-api-v1-customfilter-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await customFilterDeleteApiV1CustomfilterId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/customFilterGetApiV1Customfilter.ts b/src/mcp-server/tools/customFilterGetApiV1Customfilter.ts new file mode 100644 index 0000000..da8e05c --- /dev/null +++ b/src/mcp-server/tools/customFilterGetApiV1Customfilter.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterGetApiV1Customfilter } from "../../funcs/customFilterGetApiV1Customfilter.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$customFilterGetApiV1Customfilter: ToolDefinition = { + name: "custom-filter-get-api-v1-customfilter", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await customFilterGetApiV1Customfilter( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/customFilterGetApiV1CustomfilterId.ts b/src/mcp-server/tools/customFilterGetApiV1CustomfilterId.ts new file mode 100644 index 0000000..dc447c7 --- /dev/null +++ b/src/mcp-server/tools/customFilterGetApiV1CustomfilterId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterGetApiV1CustomfilterId } from "../../funcs/customFilterGetApiV1CustomfilterId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1CustomfilterIdRequest$inboundSchema, +}; + +export const tool$customFilterGetApiV1CustomfilterId: ToolDefinition< + typeof args +> = { + name: "custom-filter-get-api-v1-customfilter-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await customFilterGetApiV1CustomfilterId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/customFilterPostApiV1Customfilter.ts b/src/mcp-server/tools/customFilterPostApiV1Customfilter.ts new file mode 100644 index 0000000..70c3ca3 --- /dev/null +++ b/src/mcp-server/tools/customFilterPostApiV1Customfilter.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterPostApiV1Customfilter } from "../../funcs/customFilterPostApiV1Customfilter.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.CustomFilterResource$inboundSchema.optional(), +}; + +export const tool$customFilterPostApiV1Customfilter: ToolDefinition< + typeof args +> = { + name: "custom-filter-post-api-v1-customfilter", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await customFilterPostApiV1Customfilter( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/customFilterPutApiV1CustomfilterId.ts b/src/mcp-server/tools/customFilterPutApiV1CustomfilterId.ts new file mode 100644 index 0000000..9c4c36c --- /dev/null +++ b/src/mcp-server/tools/customFilterPutApiV1CustomfilterId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterPutApiV1CustomfilterId } from "../../funcs/customFilterPutApiV1CustomfilterId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1CustomfilterIdRequest$inboundSchema, +}; + +export const tool$customFilterPutApiV1CustomfilterId: ToolDefinition< + typeof args +> = { + name: "custom-filter-put-api-v1-customfilter-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await customFilterPutApiV1CustomfilterId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopment.ts b/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopment.ts new file mode 100644 index 0000000..aef47cc --- /dev/null +++ b/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopment.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { developmentConfigGetApiV1ConfigDevelopment } from "../../funcs/developmentConfigGetApiV1ConfigDevelopment.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$developmentConfigGetApiV1ConfigDevelopment: ToolDefinition = { + name: "development-config-get-api-v1-config-development", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await developmentConfigGetApiV1ConfigDevelopment( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopmentId.ts b/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopmentId.ts new file mode 100644 index 0000000..6d28627 --- /dev/null +++ b/src/mcp-server/tools/developmentConfigGetApiV1ConfigDevelopmentId.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { developmentConfigGetApiV1ConfigDevelopmentId } from "../../funcs/developmentConfigGetApiV1ConfigDevelopmentId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1ConfigDevelopmentIdRequest$inboundSchema, +}; + +export const tool$developmentConfigGetApiV1ConfigDevelopmentId: ToolDefinition< + typeof args +> = { + name: "development-config-get-api-v1-config-development-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await developmentConfigGetApiV1ConfigDevelopmentId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/developmentConfigPutApiV1ConfigDevelopmentId.ts b/src/mcp-server/tools/developmentConfigPutApiV1ConfigDevelopmentId.ts new file mode 100644 index 0000000..9c66276 --- /dev/null +++ b/src/mcp-server/tools/developmentConfigPutApiV1ConfigDevelopmentId.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { developmentConfigPutApiV1ConfigDevelopmentId } from "../../funcs/developmentConfigPutApiV1ConfigDevelopmentId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1ConfigDevelopmentIdRequest$inboundSchema, +}; + +export const tool$developmentConfigPutApiV1ConfigDevelopmentId: ToolDefinition< + typeof args +> = { + name: "development-config-put-api-v1-config-development-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await developmentConfigPutApiV1ConfigDevelopmentId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclient.ts b/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclient.ts new file mode 100644 index 0000000..2b222a8 --- /dev/null +++ b/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclient.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientConfigGetApiV1ConfigDownloadclient } from "../../funcs/downloadClientConfigGetApiV1ConfigDownloadclient.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$downloadClientConfigGetApiV1ConfigDownloadclient: + ToolDefinition = { + name: "download-client-config-get-api-v1-config-downloadclient", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = + await downloadClientConfigGetApiV1ConfigDownloadclient( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclientId.ts b/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclientId.ts new file mode 100644 index 0000000..f7c7ecd --- /dev/null +++ b/src/mcp-server/tools/downloadClientConfigGetApiV1ConfigDownloadclientId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientConfigGetApiV1ConfigDownloadclientId } from "../../funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1ConfigDownloadclientIdRequest$inboundSchema, +}; + +export const tool$downloadClientConfigGetApiV1ConfigDownloadclientId: + ToolDefinition = { + name: "download-client-config-get-api-v1-config-downloadclient-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await downloadClientConfigGetApiV1ConfigDownloadclientId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/downloadClientConfigPutApiV1ConfigDownloadclientId.ts b/src/mcp-server/tools/downloadClientConfigPutApiV1ConfigDownloadclientId.ts new file mode 100644 index 0000000..80d2aca --- /dev/null +++ b/src/mcp-server/tools/downloadClientConfigPutApiV1ConfigDownloadclientId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientConfigPutApiV1ConfigDownloadclientId } from "../../funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1ConfigDownloadclientIdRequest$inboundSchema, +}; + +export const tool$downloadClientConfigPutApiV1ConfigDownloadclientId: + ToolDefinition = { + name: "download-client-config-put-api-v1-config-downloadclient-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await downloadClientConfigPutApiV1ConfigDownloadclientId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientBulk.ts b/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientBulk.ts new file mode 100644 index 0000000..1fe01b0 --- /dev/null +++ b/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientBulk.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientDeleteApiV1DownloadclientBulk } from "../../funcs/downloadClientDeleteApiV1DownloadclientBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.DownloadClientBulkResource$inboundSchema.optional(), +}; + +export const tool$downloadClientDeleteApiV1DownloadclientBulk: ToolDefinition< + typeof args +> = { + name: "download-client-delete-api-v1-downloadclient-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientDeleteApiV1DownloadclientBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientId.ts b/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientId.ts new file mode 100644 index 0000000..49f39a3 --- /dev/null +++ b/src/mcp-server/tools/downloadClientDeleteApiV1DownloadclientId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientDeleteApiV1DownloadclientId } from "../../funcs/downloadClientDeleteApiV1DownloadclientId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1DownloadclientIdRequest$inboundSchema, +}; + +export const tool$downloadClientDeleteApiV1DownloadclientId: ToolDefinition< + typeof args +> = { + name: "download-client-delete-api-v1-downloadclient-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientDeleteApiV1DownloadclientId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientGetApiV1Downloadclient.ts b/src/mcp-server/tools/downloadClientGetApiV1Downloadclient.ts new file mode 100644 index 0000000..ab6936c --- /dev/null +++ b/src/mcp-server/tools/downloadClientGetApiV1Downloadclient.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientGetApiV1Downloadclient } from "../../funcs/downloadClientGetApiV1Downloadclient.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$downloadClientGetApiV1Downloadclient: ToolDefinition = { + name: "download-client-get-api-v1-downloadclient", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await downloadClientGetApiV1Downloadclient( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientGetApiV1DownloadclientId.ts b/src/mcp-server/tools/downloadClientGetApiV1DownloadclientId.ts new file mode 100644 index 0000000..8163b94 --- /dev/null +++ b/src/mcp-server/tools/downloadClientGetApiV1DownloadclientId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientGetApiV1DownloadclientId } from "../../funcs/downloadClientGetApiV1DownloadclientId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1DownloadclientIdRequest$inboundSchema, +}; + +export const tool$downloadClientGetApiV1DownloadclientId: ToolDefinition< + typeof args +> = { + name: "download-client-get-api-v1-downloadclient-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientGetApiV1DownloadclientId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientGetApiV1DownloadclientSchema.ts b/src/mcp-server/tools/downloadClientGetApiV1DownloadclientSchema.ts new file mode 100644 index 0000000..64ae07f --- /dev/null +++ b/src/mcp-server/tools/downloadClientGetApiV1DownloadclientSchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientGetApiV1DownloadclientSchema } from "../../funcs/downloadClientGetApiV1DownloadclientSchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$downloadClientGetApiV1DownloadclientSchema: ToolDefinition = { + name: "download-client-get-api-v1-downloadclient-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await downloadClientGetApiV1DownloadclientSchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientPostApiV1Downloadclient.ts b/src/mcp-server/tools/downloadClientPostApiV1Downloadclient.ts new file mode 100644 index 0000000..fea3e68 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPostApiV1Downloadclient.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPostApiV1Downloadclient } from "../../funcs/downloadClientPostApiV1Downloadclient.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1DownloadclientRequest$inboundSchema, +}; + +export const tool$downloadClientPostApiV1Downloadclient: ToolDefinition< + typeof args +> = { + name: "download-client-post-api-v1-downloadclient", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientPostApiV1Downloadclient( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientPostApiV1DownloadclientActionName.ts b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientActionName.ts new file mode 100644 index 0000000..1b97718 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientActionName.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPostApiV1DownloadclientActionName } from "../../funcs/downloadClientPostApiV1DownloadclientActionName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1DownloadclientActionNameRequest$inboundSchema, +}; + +export const tool$downloadClientPostApiV1DownloadclientActionName: + ToolDefinition = { + name: "download-client-post-api-v1-downloadclient-action-name", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await downloadClientPostApiV1DownloadclientActionName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTest.ts b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTest.ts new file mode 100644 index 0000000..20eb160 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTest.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPostApiV1DownloadclientTest } from "../../funcs/downloadClientPostApiV1DownloadclientTest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1DownloadclientTestRequest$inboundSchema, +}; + +export const tool$downloadClientPostApiV1DownloadclientTest: ToolDefinition< + typeof args +> = { + name: "download-client-post-api-v1-downloadclient-test", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientPostApiV1DownloadclientTest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTestall.ts b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTestall.ts new file mode 100644 index 0000000..fe180d7 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPostApiV1DownloadclientTestall.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPostApiV1DownloadclientTestall } from "../../funcs/downloadClientPostApiV1DownloadclientTestall.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$downloadClientPostApiV1DownloadclientTestall: ToolDefinition = + { + name: "download-client-post-api-v1-downloadclient-testall", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = + await downloadClientPostApiV1DownloadclientTestall( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/downloadClientPutApiV1DownloadclientBulk.ts b/src/mcp-server/tools/downloadClientPutApiV1DownloadclientBulk.ts new file mode 100644 index 0000000..5d32de0 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPutApiV1DownloadclientBulk.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPutApiV1DownloadclientBulk } from "../../funcs/downloadClientPutApiV1DownloadclientBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.DownloadClientBulkResource$inboundSchema.optional(), +}; + +export const tool$downloadClientPutApiV1DownloadclientBulk: ToolDefinition< + typeof args +> = { + name: "download-client-put-api-v1-downloadclient-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientPutApiV1DownloadclientBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/downloadClientPutApiV1DownloadclientId.ts b/src/mcp-server/tools/downloadClientPutApiV1DownloadclientId.ts new file mode 100644 index 0000000..3a0dba9 --- /dev/null +++ b/src/mcp-server/tools/downloadClientPutApiV1DownloadclientId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientPutApiV1DownloadclientId } from "../../funcs/downloadClientPutApiV1DownloadclientId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1DownloadclientIdRequest$inboundSchema, +}; + +export const tool$downloadClientPutApiV1DownloadclientId: ToolDefinition< + typeof args +> = { + name: "download-client-put-api-v1-downloadclient-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await downloadClientPutApiV1DownloadclientId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/fileSystemGetApiV1Filesystem.ts b/src/mcp-server/tools/fileSystemGetApiV1Filesystem.ts new file mode 100644 index 0000000..0ab80b7 --- /dev/null +++ b/src/mcp-server/tools/fileSystemGetApiV1Filesystem.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { fileSystemGetApiV1Filesystem } from "../../funcs/fileSystemGetApiV1Filesystem.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1FilesystemRequest$inboundSchema, +}; + +export const tool$fileSystemGetApiV1Filesystem: ToolDefinition = { + name: "file-system-get-api-v1-filesystem", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await fileSystemGetApiV1Filesystem( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/fileSystemGetApiV1FilesystemType.ts b/src/mcp-server/tools/fileSystemGetApiV1FilesystemType.ts new file mode 100644 index 0000000..541f288 --- /dev/null +++ b/src/mcp-server/tools/fileSystemGetApiV1FilesystemType.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { fileSystemGetApiV1FilesystemType } from "../../funcs/fileSystemGetApiV1FilesystemType.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1FilesystemTypeRequest$inboundSchema, +}; + +export const tool$fileSystemGetApiV1FilesystemType: ToolDefinition< + typeof args +> = { + name: "file-system-get-api-v1-filesystem-type", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await fileSystemGetApiV1FilesystemType( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/healthGetApiV1Health.ts b/src/mcp-server/tools/healthGetApiV1Health.ts new file mode 100644 index 0000000..b7e2eac --- /dev/null +++ b/src/mcp-server/tools/healthGetApiV1Health.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { healthGetApiV1Health } from "../../funcs/healthGetApiV1Health.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$healthGetApiV1Health: ToolDefinition = { + name: "health-get-api-v1-health", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await healthGetApiV1Health( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/historyGetApiV1History.ts b/src/mcp-server/tools/historyGetApiV1History.ts new file mode 100644 index 0000000..42bb0ba --- /dev/null +++ b/src/mcp-server/tools/historyGetApiV1History.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { historyGetApiV1History } from "../../funcs/historyGetApiV1History.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1HistoryRequest$inboundSchema, +}; + +export const tool$historyGetApiV1History: ToolDefinition = { + name: "history-get-api-v1-history", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await historyGetApiV1History( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/historyGetApiV1HistoryIndexer.ts b/src/mcp-server/tools/historyGetApiV1HistoryIndexer.ts new file mode 100644 index 0000000..8c65fee --- /dev/null +++ b/src/mcp-server/tools/historyGetApiV1HistoryIndexer.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { historyGetApiV1HistoryIndexer } from "../../funcs/historyGetApiV1HistoryIndexer.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1HistoryIndexerRequest$inboundSchema, +}; + +export const tool$historyGetApiV1HistoryIndexer: ToolDefinition = { + name: "history-get-api-v1-history-indexer", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await historyGetApiV1HistoryIndexer( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/historyGetApiV1HistorySince.ts b/src/mcp-server/tools/historyGetApiV1HistorySince.ts new file mode 100644 index 0000000..4a104d3 --- /dev/null +++ b/src/mcp-server/tools/historyGetApiV1HistorySince.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { historyGetApiV1HistorySince } from "../../funcs/historyGetApiV1HistorySince.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1HistorySinceRequest$inboundSchema, +}; + +export const tool$historyGetApiV1HistorySince: ToolDefinition = { + name: "history-get-api-v1-history-since", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await historyGetApiV1HistorySince( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/hostConfigGetApiV1ConfigHost.ts b/src/mcp-server/tools/hostConfigGetApiV1ConfigHost.ts new file mode 100644 index 0000000..1bf25ba --- /dev/null +++ b/src/mcp-server/tools/hostConfigGetApiV1ConfigHost.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { hostConfigGetApiV1ConfigHost } from "../../funcs/hostConfigGetApiV1ConfigHost.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$hostConfigGetApiV1ConfigHost: ToolDefinition = { + name: "host-config-get-api-v1-config-host", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await hostConfigGetApiV1ConfigHost( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/hostConfigGetApiV1ConfigHostId.ts b/src/mcp-server/tools/hostConfigGetApiV1ConfigHostId.ts new file mode 100644 index 0000000..ee8363d --- /dev/null +++ b/src/mcp-server/tools/hostConfigGetApiV1ConfigHostId.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { hostConfigGetApiV1ConfigHostId } from "../../funcs/hostConfigGetApiV1ConfigHostId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1ConfigHostIdRequest$inboundSchema, +}; + +export const tool$hostConfigGetApiV1ConfigHostId: ToolDefinition = + { + name: "host-config-get-api-v1-config-host-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await hostConfigGetApiV1ConfigHostId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/hostConfigPutApiV1ConfigHostId.ts b/src/mcp-server/tools/hostConfigPutApiV1ConfigHostId.ts new file mode 100644 index 0000000..caabef3 --- /dev/null +++ b/src/mcp-server/tools/hostConfigPutApiV1ConfigHostId.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { hostConfigPutApiV1ConfigHostId } from "../../funcs/hostConfigPutApiV1ConfigHostId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1ConfigHostIdRequest$inboundSchema, +}; + +export const tool$hostConfigPutApiV1ConfigHostId: ToolDefinition = + { + name: "host-config-put-api-v1-config-host-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await hostConfigPutApiV1ConfigHostId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/indexerDefaultCategoriesGetApiV1IndexerCategories.ts b/src/mcp-server/tools/indexerDefaultCategoriesGetApiV1IndexerCategories.ts new file mode 100644 index 0000000..479bb5b --- /dev/null +++ b/src/mcp-server/tools/indexerDefaultCategoriesGetApiV1IndexerCategories.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerDefaultCategoriesGetApiV1IndexerCategories } from "../../funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerDefaultCategoriesGetApiV1IndexerCategories: + ToolDefinition = { + name: "indexer-default-categories-get-api-v1-indexer-categories", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = + await indexerDefaultCategoriesGetApiV1IndexerCategories( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/indexerDeleteApiV1IndexerBulk.ts b/src/mcp-server/tools/indexerDeleteApiV1IndexerBulk.ts new file mode 100644 index 0000000..2115f50 --- /dev/null +++ b/src/mcp-server/tools/indexerDeleteApiV1IndexerBulk.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerDeleteApiV1IndexerBulk } from "../../funcs/indexerDeleteApiV1IndexerBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.IndexerBulkResource$inboundSchema.optional(), +}; + +export const tool$indexerDeleteApiV1IndexerBulk: ToolDefinition = { + name: "indexer-delete-api-v1-indexer-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerDeleteApiV1IndexerBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerDeleteApiV1IndexerId.ts b/src/mcp-server/tools/indexerDeleteApiV1IndexerId.ts new file mode 100644 index 0000000..756819c --- /dev/null +++ b/src/mcp-server/tools/indexerDeleteApiV1IndexerId.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerDeleteApiV1IndexerId } from "../../funcs/indexerDeleteApiV1IndexerId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1IndexerIdRequest$inboundSchema, +}; + +export const tool$indexerDeleteApiV1IndexerId: ToolDefinition = { + name: "indexer-delete-api-v1-indexer-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerDeleteApiV1IndexerId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerGetApiV1Indexer.ts b/src/mcp-server/tools/indexerGetApiV1Indexer.ts new file mode 100644 index 0000000..b10b044 --- /dev/null +++ b/src/mcp-server/tools/indexerGetApiV1Indexer.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerGetApiV1Indexer } from "../../funcs/indexerGetApiV1Indexer.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerGetApiV1Indexer: ToolDefinition = { + name: "indexer-get-api-v1-indexer", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerGetApiV1Indexer( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerGetApiV1IndexerId.ts b/src/mcp-server/tools/indexerGetApiV1IndexerId.ts new file mode 100644 index 0000000..d3fb165 --- /dev/null +++ b/src/mcp-server/tools/indexerGetApiV1IndexerId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerGetApiV1IndexerId } from "../../funcs/indexerGetApiV1IndexerId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1IndexerIdRequest$inboundSchema, +}; + +export const tool$indexerGetApiV1IndexerId: ToolDefinition = { + name: "indexer-get-api-v1-indexer-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerGetApiV1IndexerId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerGetApiV1IndexerSchema.ts b/src/mcp-server/tools/indexerGetApiV1IndexerSchema.ts new file mode 100644 index 0000000..e3bbd48 --- /dev/null +++ b/src/mcp-server/tools/indexerGetApiV1IndexerSchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerGetApiV1IndexerSchema } from "../../funcs/indexerGetApiV1IndexerSchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerGetApiV1IndexerSchema: ToolDefinition = { + name: "indexer-get-api-v1-indexer-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerGetApiV1IndexerSchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPostApiV1Indexer.ts b/src/mcp-server/tools/indexerPostApiV1Indexer.ts new file mode 100644 index 0000000..03fe219 --- /dev/null +++ b/src/mcp-server/tools/indexerPostApiV1Indexer.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPostApiV1Indexer } from "../../funcs/indexerPostApiV1Indexer.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerRequest$inboundSchema, +}; + +export const tool$indexerPostApiV1Indexer: ToolDefinition = { + name: "indexer-post-api-v1-indexer", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerPostApiV1Indexer( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPostApiV1IndexerActionName.ts b/src/mcp-server/tools/indexerPostApiV1IndexerActionName.ts new file mode 100644 index 0000000..ab35f55 --- /dev/null +++ b/src/mcp-server/tools/indexerPostApiV1IndexerActionName.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPostApiV1IndexerActionName } from "../../funcs/indexerPostApiV1IndexerActionName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerActionNameRequest$inboundSchema, +}; + +export const tool$indexerPostApiV1IndexerActionName: ToolDefinition< + typeof args +> = { + name: "indexer-post-api-v1-indexer-action-name", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerPostApiV1IndexerActionName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPostApiV1IndexerTest.ts b/src/mcp-server/tools/indexerPostApiV1IndexerTest.ts new file mode 100644 index 0000000..009f32f --- /dev/null +++ b/src/mcp-server/tools/indexerPostApiV1IndexerTest.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPostApiV1IndexerTest } from "../../funcs/indexerPostApiV1IndexerTest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerTestRequest$inboundSchema, +}; + +export const tool$indexerPostApiV1IndexerTest: ToolDefinition = { + name: "indexer-post-api-v1-indexer-test", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerPostApiV1IndexerTest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPostApiV1IndexerTestall.ts b/src/mcp-server/tools/indexerPostApiV1IndexerTestall.ts new file mode 100644 index 0000000..593f585 --- /dev/null +++ b/src/mcp-server/tools/indexerPostApiV1IndexerTestall.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPostApiV1IndexerTestall } from "../../funcs/indexerPostApiV1IndexerTestall.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerPostApiV1IndexerTestall: ToolDefinition = { + name: "indexer-post-api-v1-indexer-testall", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerPostApiV1IndexerTestall( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyDeleteApiV1IndexerproxyId.ts b/src/mcp-server/tools/indexerProxyDeleteApiV1IndexerproxyId.ts new file mode 100644 index 0000000..1fd7a8e --- /dev/null +++ b/src/mcp-server/tools/indexerProxyDeleteApiV1IndexerproxyId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyDeleteApiV1IndexerproxyId } from "../../funcs/indexerProxyDeleteApiV1IndexerproxyId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1IndexerproxyIdRequest$inboundSchema, +}; + +export const tool$indexerProxyDeleteApiV1IndexerproxyId: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-delete-api-v1-indexerproxy-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyDeleteApiV1IndexerproxyId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyGetApiV1Indexerproxy.ts b/src/mcp-server/tools/indexerProxyGetApiV1Indexerproxy.ts new file mode 100644 index 0000000..d9a8633 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyGetApiV1Indexerproxy.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyGetApiV1Indexerproxy } from "../../funcs/indexerProxyGetApiV1Indexerproxy.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerProxyGetApiV1Indexerproxy: ToolDefinition = { + name: "indexer-proxy-get-api-v1-indexerproxy", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerProxyGetApiV1Indexerproxy( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxyId.ts b/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxyId.ts new file mode 100644 index 0000000..3b849c6 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxyId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyGetApiV1IndexerproxyId } from "../../funcs/indexerProxyGetApiV1IndexerproxyId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1IndexerproxyIdRequest$inboundSchema, +}; + +export const tool$indexerProxyGetApiV1IndexerproxyId: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-get-api-v1-indexerproxy-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyGetApiV1IndexerproxyId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxySchema.ts b/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxySchema.ts new file mode 100644 index 0000000..3ac0d03 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyGetApiV1IndexerproxySchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyGetApiV1IndexerproxySchema } from "../../funcs/indexerProxyGetApiV1IndexerproxySchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerProxyGetApiV1IndexerproxySchema: ToolDefinition = { + name: "indexer-proxy-get-api-v1-indexerproxy-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerProxyGetApiV1IndexerproxySchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyPostApiV1Indexerproxy.ts b/src/mcp-server/tools/indexerProxyPostApiV1Indexerproxy.ts new file mode 100644 index 0000000..7d2fda7 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyPostApiV1Indexerproxy.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyPostApiV1Indexerproxy } from "../../funcs/indexerProxyPostApiV1Indexerproxy.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerproxyRequest$inboundSchema, +}; + +export const tool$indexerProxyPostApiV1Indexerproxy: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-post-api-v1-indexerproxy", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyPostApiV1Indexerproxy( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyActionName.ts b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyActionName.ts new file mode 100644 index 0000000..68c14db --- /dev/null +++ b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyActionName.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyPostApiV1IndexerproxyActionName } from "../../funcs/indexerProxyPostApiV1IndexerproxyActionName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerproxyActionNameRequest$inboundSchema, +}; + +export const tool$indexerProxyPostApiV1IndexerproxyActionName: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-post-api-v1-indexerproxy-action-name", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyPostApiV1IndexerproxyActionName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTest.ts b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTest.ts new file mode 100644 index 0000000..af3eb32 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTest.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyPostApiV1IndexerproxyTest } from "../../funcs/indexerProxyPostApiV1IndexerproxyTest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1IndexerproxyTestRequest$inboundSchema, +}; + +export const tool$indexerProxyPostApiV1IndexerproxyTest: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-post-api-v1-indexerproxy-test", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyPostApiV1IndexerproxyTest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTestall.ts b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTestall.ts new file mode 100644 index 0000000..a988c5d --- /dev/null +++ b/src/mcp-server/tools/indexerProxyPostApiV1IndexerproxyTestall.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyPostApiV1IndexerproxyTestall } from "../../funcs/indexerProxyPostApiV1IndexerproxyTestall.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerProxyPostApiV1IndexerproxyTestall: ToolDefinition = { + name: "indexer-proxy-post-api-v1-indexerproxy-testall", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerProxyPostApiV1IndexerproxyTestall( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerProxyPutApiV1IndexerproxyId.ts b/src/mcp-server/tools/indexerProxyPutApiV1IndexerproxyId.ts new file mode 100644 index 0000000..1fdc9c0 --- /dev/null +++ b/src/mcp-server/tools/indexerProxyPutApiV1IndexerproxyId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyPutApiV1IndexerproxyId } from "../../funcs/indexerProxyPutApiV1IndexerproxyId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1IndexerproxyIdRequest$inboundSchema, +}; + +export const tool$indexerProxyPutApiV1IndexerproxyId: ToolDefinition< + typeof args +> = { + name: "indexer-proxy-put-api-v1-indexerproxy-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerProxyPutApiV1IndexerproxyId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPutApiV1IndexerBulk.ts b/src/mcp-server/tools/indexerPutApiV1IndexerBulk.ts new file mode 100644 index 0000000..c33da2e --- /dev/null +++ b/src/mcp-server/tools/indexerPutApiV1IndexerBulk.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPutApiV1IndexerBulk } from "../../funcs/indexerPutApiV1IndexerBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.IndexerBulkResource$inboundSchema.optional(), +}; + +export const tool$indexerPutApiV1IndexerBulk: ToolDefinition = { + name: "indexer-put-api-v1-indexer-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerPutApiV1IndexerBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerPutApiV1IndexerId.ts b/src/mcp-server/tools/indexerPutApiV1IndexerId.ts new file mode 100644 index 0000000..d35375c --- /dev/null +++ b/src/mcp-server/tools/indexerPutApiV1IndexerId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerPutApiV1IndexerId } from "../../funcs/indexerPutApiV1IndexerId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1IndexerIdRequest$inboundSchema, +}; + +export const tool$indexerPutApiV1IndexerId: ToolDefinition = { + name: "indexer-put-api-v1-indexer-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerPutApiV1IndexerId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerStatsGetApiV1Indexerstats.ts b/src/mcp-server/tools/indexerStatsGetApiV1Indexerstats.ts new file mode 100644 index 0000000..b03d4ce --- /dev/null +++ b/src/mcp-server/tools/indexerStatsGetApiV1Indexerstats.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerStatsGetApiV1Indexerstats } from "../../funcs/indexerStatsGetApiV1Indexerstats.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1IndexerstatsRequest$inboundSchema, +}; + +export const tool$indexerStatsGetApiV1Indexerstats: ToolDefinition< + typeof args +> = { + name: "indexer-stats-get-api-v1-indexerstats", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await indexerStatsGetApiV1Indexerstats( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/indexerStatusGetApiV1Indexerstatus.ts b/src/mcp-server/tools/indexerStatusGetApiV1Indexerstatus.ts new file mode 100644 index 0000000..f40ec21 --- /dev/null +++ b/src/mcp-server/tools/indexerStatusGetApiV1Indexerstatus.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerStatusGetApiV1Indexerstatus } from "../../funcs/indexerStatusGetApiV1Indexerstatus.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$indexerStatusGetApiV1Indexerstatus: ToolDefinition = { + name: "indexer-status-get-api-v1-indexerstatus", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await indexerStatusGetApiV1Indexerstatus( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/localizationGetApiV1Localization.ts b/src/mcp-server/tools/localizationGetApiV1Localization.ts new file mode 100644 index 0000000..99096c1 --- /dev/null +++ b/src/mcp-server/tools/localizationGetApiV1Localization.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { localizationGetApiV1Localization } from "../../funcs/localizationGetApiV1Localization.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$localizationGetApiV1Localization: ToolDefinition = { + name: "localization-get-api-v1-localization", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await localizationGetApiV1Localization( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/localizationGetApiV1LocalizationOptions.ts b/src/mcp-server/tools/localizationGetApiV1LocalizationOptions.ts new file mode 100644 index 0000000..4ddce82 --- /dev/null +++ b/src/mcp-server/tools/localizationGetApiV1LocalizationOptions.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { localizationGetApiV1LocalizationOptions } from "../../funcs/localizationGetApiV1LocalizationOptions.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$localizationGetApiV1LocalizationOptions: ToolDefinition = { + name: "localization-get-api-v1-localization-options", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await localizationGetApiV1LocalizationOptions( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/logFileGetApiV1LogFile.ts b/src/mcp-server/tools/logFileGetApiV1LogFile.ts new file mode 100644 index 0000000..fe3f2b1 --- /dev/null +++ b/src/mcp-server/tools/logFileGetApiV1LogFile.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { logFileGetApiV1LogFile } from "../../funcs/logFileGetApiV1LogFile.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$logFileGetApiV1LogFile: ToolDefinition = { + name: "log-file-get-api-v1-log-file", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await logFileGetApiV1LogFile( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/logFileGetApiV1LogFileFilename.ts b/src/mcp-server/tools/logFileGetApiV1LogFileFilename.ts new file mode 100644 index 0000000..8c082e3 --- /dev/null +++ b/src/mcp-server/tools/logFileGetApiV1LogFileFilename.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { logFileGetApiV1LogFileFilename } from "../../funcs/logFileGetApiV1LogFileFilename.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1LogFileFilenameRequest$inboundSchema, +}; + +export const tool$logFileGetApiV1LogFileFilename: ToolDefinition = + { + name: "log-file-get-api-v1-log-file-filename", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await logFileGetApiV1LogFileFilename( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/logGetApiV1Log.ts b/src/mcp-server/tools/logGetApiV1Log.ts new file mode 100644 index 0000000..f14f718 --- /dev/null +++ b/src/mcp-server/tools/logGetApiV1Log.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { logGetApiV1Log } from "../../funcs/logGetApiV1Log.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1LogRequest$inboundSchema, +}; + +export const tool$logGetApiV1Log: ToolDefinition = { + name: "log-get-api-v1-log", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await logGetApiV1Log( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/newznabGetApiV1IndexerIdDownload.ts b/src/mcp-server/tools/newznabGetApiV1IndexerIdDownload.ts new file mode 100644 index 0000000..c4b12fc --- /dev/null +++ b/src/mcp-server/tools/newznabGetApiV1IndexerIdDownload.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { newznabGetApiV1IndexerIdDownload } from "../../funcs/newznabGetApiV1IndexerIdDownload.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1IndexerIdDownloadRequest$inboundSchema, +}; + +export const tool$newznabGetApiV1IndexerIdDownload: ToolDefinition< + typeof args +> = { + name: "newznab-get-api-v1-indexer-id-download", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await newznabGetApiV1IndexerIdDownload( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/newznabGetApiV1IndexerIdNewznab.ts b/src/mcp-server/tools/newznabGetApiV1IndexerIdNewznab.ts new file mode 100644 index 0000000..29d6360 --- /dev/null +++ b/src/mcp-server/tools/newznabGetApiV1IndexerIdNewznab.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { newznabGetApiV1IndexerIdNewznab } from "../../funcs/newznabGetApiV1IndexerIdNewznab.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1IndexerIdNewznabRequest$inboundSchema, +}; + +export const tool$newznabGetApiV1IndexerIdNewznab: ToolDefinition = + { + name: "newznab-get-api-v1-indexer-id-newznab", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await newznabGetApiV1IndexerIdNewznab( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/newznabGetIdApi.ts b/src/mcp-server/tools/newznabGetIdApi.ts new file mode 100644 index 0000000..57a0baf --- /dev/null +++ b/src/mcp-server/tools/newznabGetIdApi.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { newznabGetIdApi } from "../../funcs/newznabGetIdApi.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIdApiRequest$inboundSchema, +}; + +export const tool$newznabGetIdApi: ToolDefinition = { + name: "newznab-get-id-api", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await newznabGetIdApi( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/newznabGetIdDownload.ts b/src/mcp-server/tools/newznabGetIdDownload.ts new file mode 100644 index 0000000..6b5a5b9 --- /dev/null +++ b/src/mcp-server/tools/newznabGetIdDownload.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { newznabGetIdDownload } from "../../funcs/newznabGetIdDownload.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIdDownloadRequest$inboundSchema, +}; + +export const tool$newznabGetIdDownload: ToolDefinition = { + name: "newznab-get-id-download", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await newznabGetIdDownload( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationDeleteApiV1NotificationId.ts b/src/mcp-server/tools/notificationDeleteApiV1NotificationId.ts new file mode 100644 index 0000000..e0314dd --- /dev/null +++ b/src/mcp-server/tools/notificationDeleteApiV1NotificationId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationDeleteApiV1NotificationId } from "../../funcs/notificationDeleteApiV1NotificationId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1NotificationIdRequest$inboundSchema, +}; + +export const tool$notificationDeleteApiV1NotificationId: ToolDefinition< + typeof args +> = { + name: "notification-delete-api-v1-notification-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationDeleteApiV1NotificationId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationGetApiV1Notification.ts b/src/mcp-server/tools/notificationGetApiV1Notification.ts new file mode 100644 index 0000000..c904aa5 --- /dev/null +++ b/src/mcp-server/tools/notificationGetApiV1Notification.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationGetApiV1Notification } from "../../funcs/notificationGetApiV1Notification.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$notificationGetApiV1Notification: ToolDefinition = { + name: "notification-get-api-v1-notification", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await notificationGetApiV1Notification( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationGetApiV1NotificationId.ts b/src/mcp-server/tools/notificationGetApiV1NotificationId.ts new file mode 100644 index 0000000..f583c93 --- /dev/null +++ b/src/mcp-server/tools/notificationGetApiV1NotificationId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationGetApiV1NotificationId } from "../../funcs/notificationGetApiV1NotificationId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1NotificationIdRequest$inboundSchema, +}; + +export const tool$notificationGetApiV1NotificationId: ToolDefinition< + typeof args +> = { + name: "notification-get-api-v1-notification-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationGetApiV1NotificationId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationGetApiV1NotificationSchema.ts b/src/mcp-server/tools/notificationGetApiV1NotificationSchema.ts new file mode 100644 index 0000000..fdd95b0 --- /dev/null +++ b/src/mcp-server/tools/notificationGetApiV1NotificationSchema.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationGetApiV1NotificationSchema } from "../../funcs/notificationGetApiV1NotificationSchema.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$notificationGetApiV1NotificationSchema: ToolDefinition = { + name: "notification-get-api-v1-notification-schema", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await notificationGetApiV1NotificationSchema( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationPostApiV1Notification.ts b/src/mcp-server/tools/notificationPostApiV1Notification.ts new file mode 100644 index 0000000..2e33c32 --- /dev/null +++ b/src/mcp-server/tools/notificationPostApiV1Notification.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationPostApiV1Notification } from "../../funcs/notificationPostApiV1Notification.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1NotificationRequest$inboundSchema, +}; + +export const tool$notificationPostApiV1Notification: ToolDefinition< + typeof args +> = { + name: "notification-post-api-v1-notification", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationPostApiV1Notification( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationPostApiV1NotificationActionName.ts b/src/mcp-server/tools/notificationPostApiV1NotificationActionName.ts new file mode 100644 index 0000000..af23fd3 --- /dev/null +++ b/src/mcp-server/tools/notificationPostApiV1NotificationActionName.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationPostApiV1NotificationActionName } from "../../funcs/notificationPostApiV1NotificationActionName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1NotificationActionNameRequest$inboundSchema, +}; + +export const tool$notificationPostApiV1NotificationActionName: ToolDefinition< + typeof args +> = { + name: "notification-post-api-v1-notification-action-name", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationPostApiV1NotificationActionName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationPostApiV1NotificationTest.ts b/src/mcp-server/tools/notificationPostApiV1NotificationTest.ts new file mode 100644 index 0000000..0865663 --- /dev/null +++ b/src/mcp-server/tools/notificationPostApiV1NotificationTest.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationPostApiV1NotificationTest } from "../../funcs/notificationPostApiV1NotificationTest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PostApiV1NotificationTestRequest$inboundSchema, +}; + +export const tool$notificationPostApiV1NotificationTest: ToolDefinition< + typeof args +> = { + name: "notification-post-api-v1-notification-test", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationPostApiV1NotificationTest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationPostApiV1NotificationTestall.ts b/src/mcp-server/tools/notificationPostApiV1NotificationTestall.ts new file mode 100644 index 0000000..f81e655 --- /dev/null +++ b/src/mcp-server/tools/notificationPostApiV1NotificationTestall.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationPostApiV1NotificationTestall } from "../../funcs/notificationPostApiV1NotificationTestall.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$notificationPostApiV1NotificationTestall: ToolDefinition = { + name: "notification-post-api-v1-notification-testall", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await notificationPostApiV1NotificationTestall( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/notificationPutApiV1NotificationId.ts b/src/mcp-server/tools/notificationPutApiV1NotificationId.ts new file mode 100644 index 0000000..2d60b61 --- /dev/null +++ b/src/mcp-server/tools/notificationPutApiV1NotificationId.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationPutApiV1NotificationId } from "../../funcs/notificationPutApiV1NotificationId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1NotificationIdRequest$inboundSchema, +}; + +export const tool$notificationPutApiV1NotificationId: ToolDefinition< + typeof args +> = { + name: "notification-put-api-v1-notification-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await notificationPutApiV1NotificationId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/pingGetPing.ts b/src/mcp-server/tools/pingGetPing.ts new file mode 100644 index 0000000..8e9e786 --- /dev/null +++ b/src/mcp-server/tools/pingGetPing.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { pingGetPing } from "../../funcs/pingGetPing.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$pingGetPing: ToolDefinition = { + name: "ping-get-ping", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await pingGetPing( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/pingHeadPing.ts b/src/mcp-server/tools/pingHeadPing.ts new file mode 100644 index 0000000..94339d4 --- /dev/null +++ b/src/mcp-server/tools/pingHeadPing.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { pingHeadPing } from "../../funcs/pingHeadPing.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$pingHeadPing: ToolDefinition = { + name: "ping-head-ping", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await pingHeadPing( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/searchGetApiV1Search.ts b/src/mcp-server/tools/searchGetApiV1Search.ts new file mode 100644 index 0000000..b26e0a3 --- /dev/null +++ b/src/mcp-server/tools/searchGetApiV1Search.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { searchGetApiV1Search } from "../../funcs/searchGetApiV1Search.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1SearchRequest$inboundSchema, +}; + +export const tool$searchGetApiV1Search: ToolDefinition = { + name: "search-get-api-v1-search", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await searchGetApiV1Search( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/searchPostApiV1Search.ts b/src/mcp-server/tools/searchPostApiV1Search.ts new file mode 100644 index 0000000..9fd6d5f --- /dev/null +++ b/src/mcp-server/tools/searchPostApiV1Search.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { searchPostApiV1Search } from "../../funcs/searchPostApiV1Search.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.ReleaseResourceInput$inboundSchema.optional(), +}; + +export const tool$searchPostApiV1Search: ToolDefinition = { + name: "search-post-api-v1-search", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await searchPostApiV1Search( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/searchPostApiV1SearchBulk.ts b/src/mcp-server/tools/searchPostApiV1SearchBulk.ts new file mode 100644 index 0000000..0fa90e5 --- /dev/null +++ b/src/mcp-server/tools/searchPostApiV1SearchBulk.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { searchPostApiV1SearchBulk } from "../../funcs/searchPostApiV1SearchBulk.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: z.array(models.ReleaseResourceInput$inboundSchema).optional(), +}; + +export const tool$searchPostApiV1SearchBulk: ToolDefinition = { + name: "search-post-api-v1-search-bulk", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await searchPostApiV1SearchBulk( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/staticResourceGet.ts b/src/mcp-server/tools/staticResourceGet.ts new file mode 100644 index 0000000..e15a120 --- /dev/null +++ b/src/mcp-server/tools/staticResourceGet.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { staticResourceGet } from "../../funcs/staticResourceGet.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$staticResourceGet: ToolDefinition = { + name: "static-resource-get", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await staticResourceGet( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/staticResourceGetContentPath.ts b/src/mcp-server/tools/staticResourceGetContentPath.ts new file mode 100644 index 0000000..b19a06f --- /dev/null +++ b/src/mcp-server/tools/staticResourceGetContentPath.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { staticResourceGetContentPath } from "../../funcs/staticResourceGetContentPath.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetContentPathRequest$inboundSchema, +}; + +export const tool$staticResourceGetContentPath: ToolDefinition = { + name: "static-resource-get-content-path", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await staticResourceGetContentPath( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/staticResourceGetLogin.ts b/src/mcp-server/tools/staticResourceGetLogin.ts new file mode 100644 index 0000000..53d1e71 --- /dev/null +++ b/src/mcp-server/tools/staticResourceGetLogin.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { staticResourceGetLogin } from "../../funcs/staticResourceGetLogin.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$staticResourceGetLogin: ToolDefinition = { + name: "static-resource-get-login", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await staticResourceGetLogin( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/staticResourceGetPath.ts b/src/mcp-server/tools/staticResourceGetPath.ts new file mode 100644 index 0000000..acb4b97 --- /dev/null +++ b/src/mcp-server/tools/staticResourceGetPath.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { staticResourceGetPath } from "../../funcs/staticResourceGetPath.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPathRequest$inboundSchema, +}; + +export const tool$staticResourceGetPath: ToolDefinition = { + name: "static-resource-get-path", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await staticResourceGetPath( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/systemGetApiV1SystemRoutes.ts b/src/mcp-server/tools/systemGetApiV1SystemRoutes.ts new file mode 100644 index 0000000..201759e --- /dev/null +++ b/src/mcp-server/tools/systemGetApiV1SystemRoutes.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemGetApiV1SystemRoutes } from "../../funcs/systemGetApiV1SystemRoutes.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$systemGetApiV1SystemRoutes: ToolDefinition = { + name: "system-get-api-v1-system-routes", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await systemGetApiV1SystemRoutes( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/systemGetApiV1SystemRoutesDuplicate.ts b/src/mcp-server/tools/systemGetApiV1SystemRoutesDuplicate.ts new file mode 100644 index 0000000..fc4913a --- /dev/null +++ b/src/mcp-server/tools/systemGetApiV1SystemRoutesDuplicate.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemGetApiV1SystemRoutesDuplicate } from "../../funcs/systemGetApiV1SystemRoutesDuplicate.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$systemGetApiV1SystemRoutesDuplicate: ToolDefinition = { + name: "system-get-api-v1-system-routes-duplicate", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await systemGetApiV1SystemRoutesDuplicate( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/systemGetApiV1SystemStatus.ts b/src/mcp-server/tools/systemGetApiV1SystemStatus.ts new file mode 100644 index 0000000..7ef1127 --- /dev/null +++ b/src/mcp-server/tools/systemGetApiV1SystemStatus.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemGetApiV1SystemStatus } from "../../funcs/systemGetApiV1SystemStatus.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$systemGetApiV1SystemStatus: ToolDefinition = { + name: "system-get-api-v1-system-status", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await systemGetApiV1SystemStatus( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/systemPostApiV1SystemRestart.ts b/src/mcp-server/tools/systemPostApiV1SystemRestart.ts new file mode 100644 index 0000000..849f41c --- /dev/null +++ b/src/mcp-server/tools/systemPostApiV1SystemRestart.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemPostApiV1SystemRestart } from "../../funcs/systemPostApiV1SystemRestart.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$systemPostApiV1SystemRestart: ToolDefinition = { + name: "system-post-api-v1-system-restart", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await systemPostApiV1SystemRestart( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/systemPostApiV1SystemShutdown.ts b/src/mcp-server/tools/systemPostApiV1SystemShutdown.ts new file mode 100644 index 0000000..dcb02b4 --- /dev/null +++ b/src/mcp-server/tools/systemPostApiV1SystemShutdown.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemPostApiV1SystemShutdown } from "../../funcs/systemPostApiV1SystemShutdown.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$systemPostApiV1SystemShutdown: ToolDefinition = { + name: "system-post-api-v1-system-shutdown", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await systemPostApiV1SystemShutdown( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagDeleteApiV1TagId.ts b/src/mcp-server/tools/tagDeleteApiV1TagId.ts new file mode 100644 index 0000000..9733f33 --- /dev/null +++ b/src/mcp-server/tools/tagDeleteApiV1TagId.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagDeleteApiV1TagId } from "../../funcs/tagDeleteApiV1TagId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteApiV1TagIdRequest$inboundSchema, +}; + +export const tool$tagDeleteApiV1TagId: ToolDefinition = { + name: "tag-delete-api-v1-tag-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tagDeleteApiV1TagId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagDetailsGetApiV1TagDetail.ts b/src/mcp-server/tools/tagDetailsGetApiV1TagDetail.ts new file mode 100644 index 0000000..a4a6b88 --- /dev/null +++ b/src/mcp-server/tools/tagDetailsGetApiV1TagDetail.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagDetailsGetApiV1TagDetail } from "../../funcs/tagDetailsGetApiV1TagDetail.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$tagDetailsGetApiV1TagDetail: ToolDefinition = { + name: "tag-details-get-api-v1-tag-detail", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await tagDetailsGetApiV1TagDetail( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagDetailsGetApiV1TagDetailId.ts b/src/mcp-server/tools/tagDetailsGetApiV1TagDetailId.ts new file mode 100644 index 0000000..701d090 --- /dev/null +++ b/src/mcp-server/tools/tagDetailsGetApiV1TagDetailId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagDetailsGetApiV1TagDetailId } from "../../funcs/tagDetailsGetApiV1TagDetailId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1TagDetailIdRequest$inboundSchema, +}; + +export const tool$tagDetailsGetApiV1TagDetailId: ToolDefinition = { + name: "tag-details-get-api-v1-tag-detail-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tagDetailsGetApiV1TagDetailId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagGetApiV1Tag.ts b/src/mcp-server/tools/tagGetApiV1Tag.ts new file mode 100644 index 0000000..11bca70 --- /dev/null +++ b/src/mcp-server/tools/tagGetApiV1Tag.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagGetApiV1Tag } from "../../funcs/tagGetApiV1Tag.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$tagGetApiV1Tag: ToolDefinition = { + name: "tag-get-api-v1-tag", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await tagGetApiV1Tag( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagGetApiV1TagId.ts b/src/mcp-server/tools/tagGetApiV1TagId.ts new file mode 100644 index 0000000..727bc38 --- /dev/null +++ b/src/mcp-server/tools/tagGetApiV1TagId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagGetApiV1TagId } from "../../funcs/tagGetApiV1TagId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1TagIdRequest$inboundSchema, +}; + +export const tool$tagGetApiV1TagId: ToolDefinition = { + name: "tag-get-api-v1-tag-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tagGetApiV1TagId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagPostApiV1Tag.ts b/src/mcp-server/tools/tagPostApiV1Tag.ts new file mode 100644 index 0000000..13291ed --- /dev/null +++ b/src/mcp-server/tools/tagPostApiV1Tag.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagPostApiV1Tag } from "../../funcs/tagPostApiV1Tag.js"; +import * as models from "../../models/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: models.TagResource$inboundSchema.optional(), +}; + +export const tool$tagPostApiV1Tag: ToolDefinition = { + name: "tag-post-api-v1-tag", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tagPostApiV1Tag( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagPutApiV1TagId.ts b/src/mcp-server/tools/tagPutApiV1TagId.ts new file mode 100644 index 0000000..d833288 --- /dev/null +++ b/src/mcp-server/tools/tagPutApiV1TagId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagPutApiV1TagId } from "../../funcs/tagPutApiV1TagId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1TagIdRequest$inboundSchema, +}; + +export const tool$tagPutApiV1TagId: ToolDefinition = { + name: "tag-put-api-v1-tag-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tagPutApiV1TagId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/taskGetApiV1SystemTask.ts b/src/mcp-server/tools/taskGetApiV1SystemTask.ts new file mode 100644 index 0000000..defc5c7 --- /dev/null +++ b/src/mcp-server/tools/taskGetApiV1SystemTask.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { taskGetApiV1SystemTask } from "../../funcs/taskGetApiV1SystemTask.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$taskGetApiV1SystemTask: ToolDefinition = { + name: "task-get-api-v1-system-task", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await taskGetApiV1SystemTask( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/taskGetApiV1SystemTaskId.ts b/src/mcp-server/tools/taskGetApiV1SystemTaskId.ts new file mode 100644 index 0000000..4c7d6a6 --- /dev/null +++ b/src/mcp-server/tools/taskGetApiV1SystemTaskId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { taskGetApiV1SystemTaskId } from "../../funcs/taskGetApiV1SystemTaskId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1SystemTaskIdRequest$inboundSchema, +}; + +export const tool$taskGetApiV1SystemTaskId: ToolDefinition = { + name: "task-get-api-v1-system-task-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await taskGetApiV1SystemTaskId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/uiConfigGetApiV1ConfigUi.ts b/src/mcp-server/tools/uiConfigGetApiV1ConfigUi.ts new file mode 100644 index 0000000..42e1950 --- /dev/null +++ b/src/mcp-server/tools/uiConfigGetApiV1ConfigUi.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { uiConfigGetApiV1ConfigUi } from "../../funcs/uiConfigGetApiV1ConfigUi.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$uiConfigGetApiV1ConfigUi: ToolDefinition = { + name: "ui-config-get-api-v1-config-ui", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await uiConfigGetApiV1ConfigUi( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/uiConfigGetApiV1ConfigUiId.ts b/src/mcp-server/tools/uiConfigGetApiV1ConfigUiId.ts new file mode 100644 index 0000000..71625f2 --- /dev/null +++ b/src/mcp-server/tools/uiConfigGetApiV1ConfigUiId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { uiConfigGetApiV1ConfigUiId } from "../../funcs/uiConfigGetApiV1ConfigUiId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1ConfigUiIdRequest$inboundSchema, +}; + +export const tool$uiConfigGetApiV1ConfigUiId: ToolDefinition = { + name: "ui-config-get-api-v1-config-ui-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await uiConfigGetApiV1ConfigUiId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/uiConfigPutApiV1ConfigUiId.ts b/src/mcp-server/tools/uiConfigPutApiV1ConfigUiId.ts new file mode 100644 index 0000000..bf8174e --- /dev/null +++ b/src/mcp-server/tools/uiConfigPutApiV1ConfigUiId.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { uiConfigPutApiV1ConfigUiId } from "../../funcs/uiConfigPutApiV1ConfigUiId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PutApiV1ConfigUiIdRequest$inboundSchema, +}; + +export const tool$uiConfigPutApiV1ConfigUiId: ToolDefinition = { + name: "ui-config-put-api-v1-config-ui-id", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await uiConfigPutApiV1ConfigUiId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/updateGetApiV1Update.ts b/src/mcp-server/tools/updateGetApiV1Update.ts new file mode 100644 index 0000000..eb9f6b6 --- /dev/null +++ b/src/mcp-server/tools/updateGetApiV1Update.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { updateGetApiV1Update } from "../../funcs/updateGetApiV1Update.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$updateGetApiV1Update: ToolDefinition = { + name: "update-get-api-v1-update", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await updateGetApiV1Update( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdate.ts b/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdate.ts new file mode 100644 index 0000000..3bb23fa --- /dev/null +++ b/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdate.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { updateLogFileGetApiV1LogFileUpdate } from "../../funcs/updateLogFileGetApiV1LogFileUpdate.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$updateLogFileGetApiV1LogFileUpdate: ToolDefinition = { + name: "update-log-file-get-api-v1-log-file-update", + description: ``, + tool: async (client, ctx) => { + const [result, apiCall] = await updateLogFileGetApiV1LogFileUpdate( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdateFilename.ts b/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdateFilename.ts new file mode 100644 index 0000000..949d76c --- /dev/null +++ b/src/mcp-server/tools/updateLogFileGetApiV1LogFileUpdateFilename.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { updateLogFileGetApiV1LogFileUpdateFilename } from "../../funcs/updateLogFileGetApiV1LogFileUpdateFilename.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetApiV1LogFileUpdateFilenameRequest$inboundSchema, +}; + +export const tool$updateLogFileGetApiV1LogFileUpdateFilename: ToolDefinition< + typeof args +> = { + name: "update-log-file-get-api-v1-log-file-update-filename", + description: ``, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await updateLogFileGetApiV1LogFileUpdateFilename( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/models/apiinforesource.ts b/src/models/apiinforesource.ts new file mode 100644 index 0000000..106d44f --- /dev/null +++ b/src/models/apiinforesource.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type ApiInfoResource = { + current?: string | null | undefined; + deprecated?: Array | null | undefined; +}; + +/** @internal */ +export const ApiInfoResource$inboundSchema: z.ZodType< + ApiInfoResource, + z.ZodTypeDef, + unknown +> = z.object({ + current: z.nullable(z.string()).optional(), + deprecated: z.nullable(z.array(z.string())).optional(), +}); + +/** @internal */ +export type ApiInfoResource$Outbound = { + current?: string | null | undefined; + deprecated?: Array | null | undefined; +}; + +/** @internal */ +export const ApiInfoResource$outboundSchema: z.ZodType< + ApiInfoResource$Outbound, + z.ZodTypeDef, + ApiInfoResource +> = z.object({ + current: z.nullable(z.string()).optional(), + deprecated: z.nullable(z.array(z.string())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApiInfoResource$ { + /** @deprecated use `ApiInfoResource$inboundSchema` instead. */ + export const inboundSchema = ApiInfoResource$inboundSchema; + /** @deprecated use `ApiInfoResource$outboundSchema` instead. */ + export const outboundSchema = ApiInfoResource$outboundSchema; + /** @deprecated use `ApiInfoResource$Outbound` instead. */ + export type Outbound = ApiInfoResource$Outbound; +} + +export function apiInfoResourceToJSON( + apiInfoResource: ApiInfoResource, +): string { + return JSON.stringify(ApiInfoResource$outboundSchema.parse(apiInfoResource)); +} + +export function apiInfoResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApiInfoResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApiInfoResource' from JSON`, + ); +} diff --git a/src/models/applicationbulkresource.ts b/src/models/applicationbulkresource.ts new file mode 100644 index 0000000..a7dc25f --- /dev/null +++ b/src/models/applicationbulkresource.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + ApplicationSyncLevel, + ApplicationSyncLevel$inboundSchema, + ApplicationSyncLevel$outboundSchema, +} from "./applicationsynclevel.js"; +import { + ApplyTags, + ApplyTags$inboundSchema, + ApplyTags$outboundSchema, +} from "./applytags.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type ApplicationBulkResource = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: ApplyTags | undefined; + syncLevel?: ApplicationSyncLevel | undefined; +}; + +/** @internal */ +export const ApplicationBulkResource$inboundSchema: z.ZodType< + ApplicationBulkResource, + z.ZodTypeDef, + unknown +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$inboundSchema.optional(), + syncLevel: ApplicationSyncLevel$inboundSchema.optional(), +}); + +/** @internal */ +export type ApplicationBulkResource$Outbound = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: string | undefined; + syncLevel?: string | undefined; +}; + +/** @internal */ +export const ApplicationBulkResource$outboundSchema: z.ZodType< + ApplicationBulkResource$Outbound, + z.ZodTypeDef, + ApplicationBulkResource +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$outboundSchema.optional(), + syncLevel: ApplicationSyncLevel$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationBulkResource$ { + /** @deprecated use `ApplicationBulkResource$inboundSchema` instead. */ + export const inboundSchema = ApplicationBulkResource$inboundSchema; + /** @deprecated use `ApplicationBulkResource$outboundSchema` instead. */ + export const outboundSchema = ApplicationBulkResource$outboundSchema; + /** @deprecated use `ApplicationBulkResource$Outbound` instead. */ + export type Outbound = ApplicationBulkResource$Outbound; +} + +export function applicationBulkResourceToJSON( + applicationBulkResource: ApplicationBulkResource, +): string { + return JSON.stringify( + ApplicationBulkResource$outboundSchema.parse(applicationBulkResource), + ); +} + +export function applicationBulkResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationBulkResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationBulkResource' from JSON`, + ); +} diff --git a/src/models/applicationresource.ts b/src/models/applicationresource.ts new file mode 100644 index 0000000..0a5a03f --- /dev/null +++ b/src/models/applicationresource.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + ApplicationSyncLevel, + ApplicationSyncLevel$inboundSchema, + ApplicationSyncLevel$outboundSchema, +} from "./applicationsynclevel.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type ApplicationResource = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + syncLevel?: ApplicationSyncLevel | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationResource$inboundSchema: z.ZodType< + ApplicationResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => ApplicationResource$inboundSchema))) + .optional(), + syncLevel: ApplicationSyncLevel$inboundSchema.optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ApplicationResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + syncLevel?: string | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const ApplicationResource$outboundSchema: z.ZodType< + ApplicationResource$Outbound, + z.ZodTypeDef, + ApplicationResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => ApplicationResource$outboundSchema))) + .optional(), + syncLevel: ApplicationSyncLevel$outboundSchema.optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationResource$ { + /** @deprecated use `ApplicationResource$inboundSchema` instead. */ + export const inboundSchema = ApplicationResource$inboundSchema; + /** @deprecated use `ApplicationResource$outboundSchema` instead. */ + export const outboundSchema = ApplicationResource$outboundSchema; + /** @deprecated use `ApplicationResource$Outbound` instead. */ + export type Outbound = ApplicationResource$Outbound; +} + +export function applicationResourceToJSON( + applicationResource: ApplicationResource, +): string { + return JSON.stringify( + ApplicationResource$outboundSchema.parse(applicationResource), + ); +} + +export function applicationResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ApplicationResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ApplicationResource' from JSON`, + ); +} diff --git a/src/models/applicationsynclevel.ts b/src/models/applicationsynclevel.ts new file mode 100644 index 0000000..9627f00 --- /dev/null +++ b/src/models/applicationsynclevel.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const ApplicationSyncLevel = { + Disabled: "disabled", + AddOnly: "addOnly", + FullSync: "fullSync", +} as const; +export type ApplicationSyncLevel = ClosedEnum; + +/** @internal */ +export const ApplicationSyncLevel$inboundSchema: z.ZodNativeEnum< + typeof ApplicationSyncLevel +> = z.nativeEnum(ApplicationSyncLevel); + +/** @internal */ +export const ApplicationSyncLevel$outboundSchema: z.ZodNativeEnum< + typeof ApplicationSyncLevel +> = ApplicationSyncLevel$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplicationSyncLevel$ { + /** @deprecated use `ApplicationSyncLevel$inboundSchema` instead. */ + export const inboundSchema = ApplicationSyncLevel$inboundSchema; + /** @deprecated use `ApplicationSyncLevel$outboundSchema` instead. */ + export const outboundSchema = ApplicationSyncLevel$outboundSchema; +} diff --git a/src/models/applytags.ts b/src/models/applytags.ts new file mode 100644 index 0000000..fef3b79 --- /dev/null +++ b/src/models/applytags.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const ApplyTags = { + Add: "add", + Remove: "remove", + Replace: "replace", +} as const; +export type ApplyTags = ClosedEnum; + +/** @internal */ +export const ApplyTags$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ApplyTags); + +/** @internal */ +export const ApplyTags$outboundSchema: z.ZodNativeEnum = + ApplyTags$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ApplyTags$ { + /** @deprecated use `ApplyTags$inboundSchema` instead. */ + export const inboundSchema = ApplyTags$inboundSchema; + /** @deprecated use `ApplyTags$outboundSchema` instead. */ + export const outboundSchema = ApplyTags$outboundSchema; +} diff --git a/src/models/appprofileresource.ts b/src/models/appprofileresource.ts new file mode 100644 index 0000000..7af3fee --- /dev/null +++ b/src/models/appprofileresource.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type AppProfileResource = { + id?: number | undefined; + name?: string | null | undefined; + enableRss?: boolean | undefined; + enableAutomaticSearch?: boolean | undefined; + enableInteractiveSearch?: boolean | undefined; + minimumSeeders?: number | undefined; +}; + +/** @internal */ +export const AppProfileResource$inboundSchema: z.ZodType< + AppProfileResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + enableRss: z.boolean().optional(), + enableAutomaticSearch: z.boolean().optional(), + enableInteractiveSearch: z.boolean().optional(), + minimumSeeders: z.number().int().optional(), +}); + +/** @internal */ +export type AppProfileResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + enableRss?: boolean | undefined; + enableAutomaticSearch?: boolean | undefined; + enableInteractiveSearch?: boolean | undefined; + minimumSeeders?: number | undefined; +}; + +/** @internal */ +export const AppProfileResource$outboundSchema: z.ZodType< + AppProfileResource$Outbound, + z.ZodTypeDef, + AppProfileResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + enableRss: z.boolean().optional(), + enableAutomaticSearch: z.boolean().optional(), + enableInteractiveSearch: z.boolean().optional(), + minimumSeeders: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AppProfileResource$ { + /** @deprecated use `AppProfileResource$inboundSchema` instead. */ + export const inboundSchema = AppProfileResource$inboundSchema; + /** @deprecated use `AppProfileResource$outboundSchema` instead. */ + export const outboundSchema = AppProfileResource$outboundSchema; + /** @deprecated use `AppProfileResource$Outbound` instead. */ + export type Outbound = AppProfileResource$Outbound; +} + +export function appProfileResourceToJSON( + appProfileResource: AppProfileResource, +): string { + return JSON.stringify( + AppProfileResource$outboundSchema.parse(appProfileResource), + ); +} + +export function appProfileResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AppProfileResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AppProfileResource' from JSON`, + ); +} diff --git a/src/models/authenticationrequiredtype.ts b/src/models/authenticationrequiredtype.ts new file mode 100644 index 0000000..fb168f9 --- /dev/null +++ b/src/models/authenticationrequiredtype.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const AuthenticationRequiredType = { + Enabled: "enabled", + DisabledForLocalAddresses: "disabledForLocalAddresses", +} as const; +export type AuthenticationRequiredType = ClosedEnum< + typeof AuthenticationRequiredType +>; + +/** @internal */ +export const AuthenticationRequiredType$inboundSchema: z.ZodNativeEnum< + typeof AuthenticationRequiredType +> = z.nativeEnum(AuthenticationRequiredType); + +/** @internal */ +export const AuthenticationRequiredType$outboundSchema: z.ZodNativeEnum< + typeof AuthenticationRequiredType +> = AuthenticationRequiredType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthenticationRequiredType$ { + /** @deprecated use `AuthenticationRequiredType$inboundSchema` instead. */ + export const inboundSchema = AuthenticationRequiredType$inboundSchema; + /** @deprecated use `AuthenticationRequiredType$outboundSchema` instead. */ + export const outboundSchema = AuthenticationRequiredType$outboundSchema; +} diff --git a/src/models/authenticationtype.ts b/src/models/authenticationtype.ts new file mode 100644 index 0000000..07d97ce --- /dev/null +++ b/src/models/authenticationtype.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const AuthenticationType = { + None: "none", + Basic: "basic", + Forms: "forms", + External: "external", +} as const; +export type AuthenticationType = ClosedEnum; + +/** @internal */ +export const AuthenticationType$inboundSchema: z.ZodNativeEnum< + typeof AuthenticationType +> = z.nativeEnum(AuthenticationType); + +/** @internal */ +export const AuthenticationType$outboundSchema: z.ZodNativeEnum< + typeof AuthenticationType +> = AuthenticationType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AuthenticationType$ { + /** @deprecated use `AuthenticationType$inboundSchema` instead. */ + export const inboundSchema = AuthenticationType$inboundSchema; + /** @deprecated use `AuthenticationType$outboundSchema` instead. */ + export const outboundSchema = AuthenticationType$outboundSchema; +} diff --git a/src/models/backupresource.ts b/src/models/backupresource.ts new file mode 100644 index 0000000..cd4a265 --- /dev/null +++ b/src/models/backupresource.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + BackupType, + BackupType$inboundSchema, + BackupType$outboundSchema, +} from "./backuptype.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type BackupResource = { + id?: number | undefined; + name?: string | null | undefined; + path?: string | null | undefined; + type?: BackupType | undefined; + size?: number | undefined; + time?: Date | undefined; +}; + +/** @internal */ +export const BackupResource$inboundSchema: z.ZodType< + BackupResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + path: z.nullable(z.string()).optional(), + type: BackupType$inboundSchema.optional(), + size: z.number().int().optional(), + time: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), +}); + +/** @internal */ +export type BackupResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + path?: string | null | undefined; + type?: string | undefined; + size?: number | undefined; + time?: string | undefined; +}; + +/** @internal */ +export const BackupResource$outboundSchema: z.ZodType< + BackupResource$Outbound, + z.ZodTypeDef, + BackupResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + path: z.nullable(z.string()).optional(), + type: BackupType$outboundSchema.optional(), + size: z.number().int().optional(), + time: z.date().transform(v => v.toISOString()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupResource$ { + /** @deprecated use `BackupResource$inboundSchema` instead. */ + export const inboundSchema = BackupResource$inboundSchema; + /** @deprecated use `BackupResource$outboundSchema` instead. */ + export const outboundSchema = BackupResource$outboundSchema; + /** @deprecated use `BackupResource$Outbound` instead. */ + export type Outbound = BackupResource$Outbound; +} + +export function backupResourceToJSON(backupResource: BackupResource): string { + return JSON.stringify(BackupResource$outboundSchema.parse(backupResource)); +} + +export function backupResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BackupResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BackupResource' from JSON`, + ); +} diff --git a/src/models/backuptype.ts b/src/models/backuptype.ts new file mode 100644 index 0000000..cf06239 --- /dev/null +++ b/src/models/backuptype.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const BackupType = { + Scheduled: "scheduled", + Manual: "manual", + Update: "update", +} as const; +export type BackupType = ClosedEnum; + +/** @internal */ +export const BackupType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BackupType); + +/** @internal */ +export const BackupType$outboundSchema: z.ZodNativeEnum = + BackupType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BackupType$ { + /** @deprecated use `BackupType$inboundSchema` instead. */ + export const inboundSchema = BackupType$inboundSchema; + /** @deprecated use `BackupType$outboundSchema` instead. */ + export const outboundSchema = BackupType$outboundSchema; +} diff --git a/src/models/booksearchparam.ts b/src/models/booksearchparam.ts new file mode 100644 index 0000000..1fdfa4e --- /dev/null +++ b/src/models/booksearchparam.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const BookSearchParam = { + Q: "q", + Title: "title", + Author: "author", + Publisher: "publisher", + Genre: "genre", + Year: "year", +} as const; +export type BookSearchParam = ClosedEnum; + +/** @internal */ +export const BookSearchParam$inboundSchema: z.ZodNativeEnum< + typeof BookSearchParam +> = z.nativeEnum(BookSearchParam); + +/** @internal */ +export const BookSearchParam$outboundSchema: z.ZodNativeEnum< + typeof BookSearchParam +> = BookSearchParam$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BookSearchParam$ { + /** @deprecated use `BookSearchParam$inboundSchema` instead. */ + export const inboundSchema = BookSearchParam$inboundSchema; + /** @deprecated use `BookSearchParam$outboundSchema` instead. */ + export const outboundSchema = BookSearchParam$outboundSchema; +} diff --git a/src/models/certificatevalidationtype.ts b/src/models/certificatevalidationtype.ts new file mode 100644 index 0000000..090f5bf --- /dev/null +++ b/src/models/certificatevalidationtype.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const CertificateValidationType = { + Enabled: "enabled", + DisabledForLocalAddresses: "disabledForLocalAddresses", + Disabled: "disabled", +} as const; +export type CertificateValidationType = ClosedEnum< + typeof CertificateValidationType +>; + +/** @internal */ +export const CertificateValidationType$inboundSchema: z.ZodNativeEnum< + typeof CertificateValidationType +> = z.nativeEnum(CertificateValidationType); + +/** @internal */ +export const CertificateValidationType$outboundSchema: z.ZodNativeEnum< + typeof CertificateValidationType +> = CertificateValidationType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CertificateValidationType$ { + /** @deprecated use `CertificateValidationType$inboundSchema` instead. */ + export const inboundSchema = CertificateValidationType$inboundSchema; + /** @deprecated use `CertificateValidationType$outboundSchema` instead. */ + export const outboundSchema = CertificateValidationType$outboundSchema; +} diff --git a/src/models/command.ts b/src/models/command.ts new file mode 100644 index 0000000..a4e5184 --- /dev/null +++ b/src/models/command.ts @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + CommandTrigger, + CommandTrigger$inboundSchema, + CommandTrigger$outboundSchema, +} from "./commandtrigger.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type Command = { + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + completionMessage?: string | null | undefined; + requiresDiskAccess?: boolean | undefined; + isExclusive?: boolean | undefined; + isTypeExclusive?: boolean | undefined; + name?: string | null | undefined; + lastExecutionTime?: Date | null | undefined; + lastStartTime?: Date | null | undefined; + trigger?: CommandTrigger | undefined; + suppressMessages?: boolean | undefined; + clientUserAgent?: string | null | undefined; +}; + +/** @internal */ +export const Command$inboundSchema: z.ZodType = + z.object({ + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + completionMessage: z.nullable(z.string()).optional(), + requiresDiskAccess: z.boolean().optional(), + isExclusive: z.boolean().optional(), + isTypeExclusive: z.boolean().optional(), + name: z.nullable(z.string()).optional(), + lastExecutionTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastStartTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + trigger: CommandTrigger$inboundSchema.optional(), + suppressMessages: z.boolean().optional(), + clientUserAgent: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type Command$Outbound = { + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + completionMessage?: string | null | undefined; + requiresDiskAccess?: boolean | undefined; + isExclusive?: boolean | undefined; + isTypeExclusive?: boolean | undefined; + name?: string | null | undefined; + lastExecutionTime?: string | null | undefined; + lastStartTime?: string | null | undefined; + trigger?: string | undefined; + suppressMessages?: boolean | undefined; + clientUserAgent?: string | null | undefined; +}; + +/** @internal */ +export const Command$outboundSchema: z.ZodType< + Command$Outbound, + z.ZodTypeDef, + Command +> = z.object({ + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + completionMessage: z.nullable(z.string()).optional(), + requiresDiskAccess: z.boolean().optional(), + isExclusive: z.boolean().optional(), + isTypeExclusive: z.boolean().optional(), + name: z.nullable(z.string()).optional(), + lastExecutionTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastStartTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + trigger: CommandTrigger$outboundSchema.optional(), + suppressMessages: z.boolean().optional(), + clientUserAgent: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Command$ { + /** @deprecated use `Command$inboundSchema` instead. */ + export const inboundSchema = Command$inboundSchema; + /** @deprecated use `Command$outboundSchema` instead. */ + export const outboundSchema = Command$outboundSchema; + /** @deprecated use `Command$Outbound` instead. */ + export type Outbound = Command$Outbound; +} + +export function commandToJSON(command: Command): string { + return JSON.stringify(Command$outboundSchema.parse(command)); +} + +export function commandFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Command$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Command' from JSON`, + ); +} diff --git a/src/models/commandinput.ts b/src/models/commandinput.ts new file mode 100644 index 0000000..1f5b935 --- /dev/null +++ b/src/models/commandinput.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + CommandTrigger, + CommandTrigger$inboundSchema, + CommandTrigger$outboundSchema, +} from "./commandtrigger.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type CommandInput = { + sendUpdatesToClient?: boolean | undefined; + lastExecutionTime?: Date | null | undefined; + lastStartTime?: Date | null | undefined; + trigger?: CommandTrigger | undefined; + suppressMessages?: boolean | undefined; + clientUserAgent?: string | null | undefined; +}; + +/** @internal */ +export const CommandInput$inboundSchema: z.ZodType< + CommandInput, + z.ZodTypeDef, + unknown +> = z.object({ + sendUpdatesToClient: z.boolean().optional(), + lastExecutionTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastStartTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + trigger: CommandTrigger$inboundSchema.optional(), + suppressMessages: z.boolean().optional(), + clientUserAgent: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CommandInput$Outbound = { + sendUpdatesToClient?: boolean | undefined; + lastExecutionTime?: string | null | undefined; + lastStartTime?: string | null | undefined; + trigger?: string | undefined; + suppressMessages?: boolean | undefined; + clientUserAgent?: string | null | undefined; +}; + +/** @internal */ +export const CommandInput$outboundSchema: z.ZodType< + CommandInput$Outbound, + z.ZodTypeDef, + CommandInput +> = z.object({ + sendUpdatesToClient: z.boolean().optional(), + lastExecutionTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastStartTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + trigger: CommandTrigger$outboundSchema.optional(), + suppressMessages: z.boolean().optional(), + clientUserAgent: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandInput$ { + /** @deprecated use `CommandInput$inboundSchema` instead. */ + export const inboundSchema = CommandInput$inboundSchema; + /** @deprecated use `CommandInput$outboundSchema` instead. */ + export const outboundSchema = CommandInput$outboundSchema; + /** @deprecated use `CommandInput$Outbound` instead. */ + export type Outbound = CommandInput$Outbound; +} + +export function commandInputToJSON(commandInput: CommandInput): string { + return JSON.stringify(CommandInput$outboundSchema.parse(commandInput)); +} + +export function commandInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CommandInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CommandInput' from JSON`, + ); +} diff --git a/src/models/commandpriority.ts b/src/models/commandpriority.ts new file mode 100644 index 0000000..c4086b3 --- /dev/null +++ b/src/models/commandpriority.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const CommandPriority = { + Normal: "normal", + High: "high", + Low: "low", +} as const; +export type CommandPriority = ClosedEnum; + +/** @internal */ +export const CommandPriority$inboundSchema: z.ZodNativeEnum< + typeof CommandPriority +> = z.nativeEnum(CommandPriority); + +/** @internal */ +export const CommandPriority$outboundSchema: z.ZodNativeEnum< + typeof CommandPriority +> = CommandPriority$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandPriority$ { + /** @deprecated use `CommandPriority$inboundSchema` instead. */ + export const inboundSchema = CommandPriority$inboundSchema; + /** @deprecated use `CommandPriority$outboundSchema` instead. */ + export const outboundSchema = CommandPriority$outboundSchema; +} diff --git a/src/models/commandresource.ts b/src/models/commandresource.ts new file mode 100644 index 0000000..1a306b0 --- /dev/null +++ b/src/models/commandresource.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + Command, + Command$inboundSchema, + Command$Outbound, + Command$outboundSchema, +} from "./command.js"; +import { + CommandPriority, + CommandPriority$inboundSchema, + CommandPriority$outboundSchema, +} from "./commandpriority.js"; +import { + CommandStatus, + CommandStatus$inboundSchema, + CommandStatus$outboundSchema, +} from "./commandstatus.js"; +import { + CommandTrigger, + CommandTrigger$inboundSchema, + CommandTrigger$outboundSchema, +} from "./commandtrigger.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type CommandResource = { + id?: number | undefined; + name?: string | null | undefined; + commandName?: string | null | undefined; + message?: string | null | undefined; + body?: Command | undefined; + priority?: CommandPriority | undefined; + status?: CommandStatus | undefined; + queued?: Date | undefined; + started?: Date | null | undefined; + ended?: Date | null | undefined; + duration?: string | null | undefined; + exception?: string | null | undefined; + trigger?: CommandTrigger | undefined; + clientUserAgent?: string | null | undefined; + stateChangeTime?: Date | null | undefined; + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + lastExecutionTime?: Date | null | undefined; +}; + +/** @internal */ +export const CommandResource$inboundSchema: z.ZodType< + CommandResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + commandName: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + body: Command$inboundSchema.optional(), + priority: CommandPriority$inboundSchema.optional(), + status: CommandStatus$inboundSchema.optional(), + queued: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + started: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ended: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + duration: z.nullable(z.string()).optional(), + exception: z.nullable(z.string()).optional(), + trigger: CommandTrigger$inboundSchema.optional(), + clientUserAgent: z.nullable(z.string()).optional(), + stateChangeTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + lastExecutionTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}); + +/** @internal */ +export type CommandResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + commandName?: string | null | undefined; + message?: string | null | undefined; + body?: Command$Outbound | undefined; + priority?: string | undefined; + status?: string | undefined; + queued?: string | undefined; + started?: string | null | undefined; + ended?: string | null | undefined; + duration?: string | null | undefined; + exception?: string | null | undefined; + trigger?: string | undefined; + clientUserAgent?: string | null | undefined; + stateChangeTime?: string | null | undefined; + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + lastExecutionTime?: string | null | undefined; +}; + +/** @internal */ +export const CommandResource$outboundSchema: z.ZodType< + CommandResource$Outbound, + z.ZodTypeDef, + CommandResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + commandName: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + body: Command$outboundSchema.optional(), + priority: CommandPriority$outboundSchema.optional(), + status: CommandStatus$outboundSchema.optional(), + queued: z.date().transform(v => v.toISOString()).optional(), + started: z.nullable(z.date().transform(v => v.toISOString())).optional(), + ended: z.nullable(z.date().transform(v => v.toISOString())).optional(), + duration: z.nullable(z.string()).optional(), + exception: z.nullable(z.string()).optional(), + trigger: CommandTrigger$outboundSchema.optional(), + clientUserAgent: z.nullable(z.string()).optional(), + stateChangeTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + lastExecutionTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandResource$ { + /** @deprecated use `CommandResource$inboundSchema` instead. */ + export const inboundSchema = CommandResource$inboundSchema; + /** @deprecated use `CommandResource$outboundSchema` instead. */ + export const outboundSchema = CommandResource$outboundSchema; + /** @deprecated use `CommandResource$Outbound` instead. */ + export type Outbound = CommandResource$Outbound; +} + +export function commandResourceToJSON( + commandResource: CommandResource, +): string { + return JSON.stringify(CommandResource$outboundSchema.parse(commandResource)); +} + +export function commandResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CommandResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CommandResource' from JSON`, + ); +} diff --git a/src/models/commandresourceinput.ts b/src/models/commandresourceinput.ts new file mode 100644 index 0000000..1b84551 --- /dev/null +++ b/src/models/commandresourceinput.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + CommandInput, + CommandInput$inboundSchema, + CommandInput$Outbound, + CommandInput$outboundSchema, +} from "./commandinput.js"; +import { + CommandPriority, + CommandPriority$inboundSchema, + CommandPriority$outboundSchema, +} from "./commandpriority.js"; +import { + CommandStatus, + CommandStatus$inboundSchema, + CommandStatus$outboundSchema, +} from "./commandstatus.js"; +import { + CommandTrigger, + CommandTrigger$inboundSchema, + CommandTrigger$outboundSchema, +} from "./commandtrigger.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type CommandResourceInput = { + id?: number | undefined; + name?: string | null | undefined; + commandName?: string | null | undefined; + message?: string | null | undefined; + body?: CommandInput | undefined; + priority?: CommandPriority | undefined; + status?: CommandStatus | undefined; + queued?: Date | undefined; + started?: Date | null | undefined; + ended?: Date | null | undefined; + duration?: string | null | undefined; + exception?: string | null | undefined; + trigger?: CommandTrigger | undefined; + clientUserAgent?: string | null | undefined; + stateChangeTime?: Date | null | undefined; + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + lastExecutionTime?: Date | null | undefined; +}; + +/** @internal */ +export const CommandResourceInput$inboundSchema: z.ZodType< + CommandResourceInput, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + commandName: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + body: CommandInput$inboundSchema.optional(), + priority: CommandPriority$inboundSchema.optional(), + status: CommandStatus$inboundSchema.optional(), + queued: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + started: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ended: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + duration: z.nullable(z.string()).optional(), + exception: z.nullable(z.string()).optional(), + trigger: CommandTrigger$inboundSchema.optional(), + clientUserAgent: z.nullable(z.string()).optional(), + stateChangeTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + lastExecutionTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}); + +/** @internal */ +export type CommandResourceInput$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + commandName?: string | null | undefined; + message?: string | null | undefined; + body?: CommandInput$Outbound | undefined; + priority?: string | undefined; + status?: string | undefined; + queued?: string | undefined; + started?: string | null | undefined; + ended?: string | null | undefined; + duration?: string | null | undefined; + exception?: string | null | undefined; + trigger?: string | undefined; + clientUserAgent?: string | null | undefined; + stateChangeTime?: string | null | undefined; + sendUpdatesToClient?: boolean | undefined; + updateScheduledTask?: boolean | undefined; + lastExecutionTime?: string | null | undefined; +}; + +/** @internal */ +export const CommandResourceInput$outboundSchema: z.ZodType< + CommandResourceInput$Outbound, + z.ZodTypeDef, + CommandResourceInput +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + commandName: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + body: CommandInput$outboundSchema.optional(), + priority: CommandPriority$outboundSchema.optional(), + status: CommandStatus$outboundSchema.optional(), + queued: z.date().transform(v => v.toISOString()).optional(), + started: z.nullable(z.date().transform(v => v.toISOString())).optional(), + ended: z.nullable(z.date().transform(v => v.toISOString())).optional(), + duration: z.nullable(z.string()).optional(), + exception: z.nullable(z.string()).optional(), + trigger: CommandTrigger$outboundSchema.optional(), + clientUserAgent: z.nullable(z.string()).optional(), + stateChangeTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + sendUpdatesToClient: z.boolean().optional(), + updateScheduledTask: z.boolean().optional(), + lastExecutionTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandResourceInput$ { + /** @deprecated use `CommandResourceInput$inboundSchema` instead. */ + export const inboundSchema = CommandResourceInput$inboundSchema; + /** @deprecated use `CommandResourceInput$outboundSchema` instead. */ + export const outboundSchema = CommandResourceInput$outboundSchema; + /** @deprecated use `CommandResourceInput$Outbound` instead. */ + export type Outbound = CommandResourceInput$Outbound; +} + +export function commandResourceInputToJSON( + commandResourceInput: CommandResourceInput, +): string { + return JSON.stringify( + CommandResourceInput$outboundSchema.parse(commandResourceInput), + ); +} + +export function commandResourceInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CommandResourceInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CommandResourceInput' from JSON`, + ); +} diff --git a/src/models/commandstatus.ts b/src/models/commandstatus.ts new file mode 100644 index 0000000..e22c00b --- /dev/null +++ b/src/models/commandstatus.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const CommandStatus = { + Queued: "queued", + Started: "started", + Completed: "completed", + Failed: "failed", + Aborted: "aborted", + Cancelled: "cancelled", + Orphaned: "orphaned", +} as const; +export type CommandStatus = ClosedEnum; + +/** @internal */ +export const CommandStatus$inboundSchema: z.ZodNativeEnum< + typeof CommandStatus +> = z.nativeEnum(CommandStatus); + +/** @internal */ +export const CommandStatus$outboundSchema: z.ZodNativeEnum< + typeof CommandStatus +> = CommandStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandStatus$ { + /** @deprecated use `CommandStatus$inboundSchema` instead. */ + export const inboundSchema = CommandStatus$inboundSchema; + /** @deprecated use `CommandStatus$outboundSchema` instead. */ + export const outboundSchema = CommandStatus$outboundSchema; +} diff --git a/src/models/commandtrigger.ts b/src/models/commandtrigger.ts new file mode 100644 index 0000000..4202952 --- /dev/null +++ b/src/models/commandtrigger.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const CommandTrigger = { + Unspecified: "unspecified", + Manual: "manual", + Scheduled: "scheduled", +} as const; +export type CommandTrigger = ClosedEnum; + +/** @internal */ +export const CommandTrigger$inboundSchema: z.ZodNativeEnum< + typeof CommandTrigger +> = z.nativeEnum(CommandTrigger); + +/** @internal */ +export const CommandTrigger$outboundSchema: z.ZodNativeEnum< + typeof CommandTrigger +> = CommandTrigger$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CommandTrigger$ { + /** @deprecated use `CommandTrigger$inboundSchema` instead. */ + export const inboundSchema = CommandTrigger$inboundSchema; + /** @deprecated use `CommandTrigger$outboundSchema` instead. */ + export const outboundSchema = CommandTrigger$outboundSchema; +} diff --git a/src/models/customfilterresource.ts b/src/models/customfilterresource.ts new file mode 100644 index 0000000..38bbf71 --- /dev/null +++ b/src/models/customfilterresource.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type CustomFilterResource = { + id?: number | undefined; + type?: string | null | undefined; + label?: string | null | undefined; + filters?: Array<{ [k: string]: any }> | null | undefined; +}; + +/** @internal */ +export const CustomFilterResource$inboundSchema: z.ZodType< + CustomFilterResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + type: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + filters: z.nullable(z.array(z.record(z.any()))).optional(), +}); + +/** @internal */ +export type CustomFilterResource$Outbound = { + id?: number | undefined; + type?: string | null | undefined; + label?: string | null | undefined; + filters?: Array<{ [k: string]: any }> | null | undefined; +}; + +/** @internal */ +export const CustomFilterResource$outboundSchema: z.ZodType< + CustomFilterResource$Outbound, + z.ZodTypeDef, + CustomFilterResource +> = z.object({ + id: z.number().int().optional(), + type: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + filters: z.nullable(z.array(z.record(z.any()))).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomFilterResource$ { + /** @deprecated use `CustomFilterResource$inboundSchema` instead. */ + export const inboundSchema = CustomFilterResource$inboundSchema; + /** @deprecated use `CustomFilterResource$outboundSchema` instead. */ + export const outboundSchema = CustomFilterResource$outboundSchema; + /** @deprecated use `CustomFilterResource$Outbound` instead. */ + export type Outbound = CustomFilterResource$Outbound; +} + +export function customFilterResourceToJSON( + customFilterResource: CustomFilterResource, +): string { + return JSON.stringify( + CustomFilterResource$outboundSchema.parse(customFilterResource), + ); +} + +export function customFilterResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CustomFilterResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CustomFilterResource' from JSON`, + ); +} diff --git a/src/models/databasetype.ts b/src/models/databasetype.ts new file mode 100644 index 0000000..4def4f1 --- /dev/null +++ b/src/models/databasetype.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const DatabaseType = { + SqLite: "sqLite", + PostgreSQL: "postgreSQL", +} as const; +export type DatabaseType = ClosedEnum; + +/** @internal */ +export const DatabaseType$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(DatabaseType); + +/** @internal */ +export const DatabaseType$outboundSchema: z.ZodNativeEnum = + DatabaseType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseType$ { + /** @deprecated use `DatabaseType$inboundSchema` instead. */ + export const inboundSchema = DatabaseType$inboundSchema; + /** @deprecated use `DatabaseType$outboundSchema` instead. */ + export const outboundSchema = DatabaseType$outboundSchema; +} diff --git a/src/models/developmentconfigresource.ts b/src/models/developmentconfigresource.ts new file mode 100644 index 0000000..19ed6ea --- /dev/null +++ b/src/models/developmentconfigresource.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DevelopmentConfigResource = { + id?: number | undefined; + consoleLogLevel?: string | null | undefined; + logSql?: boolean | undefined; + logIndexerResponse?: boolean | undefined; + logRotate?: number | undefined; + filterSentryEvents?: boolean | undefined; +}; + +/** @internal */ +export const DevelopmentConfigResource$inboundSchema: z.ZodType< + DevelopmentConfigResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + consoleLogLevel: z.nullable(z.string()).optional(), + logSql: z.boolean().optional(), + logIndexerResponse: z.boolean().optional(), + logRotate: z.number().int().optional(), + filterSentryEvents: z.boolean().optional(), +}); + +/** @internal */ +export type DevelopmentConfigResource$Outbound = { + id?: number | undefined; + consoleLogLevel?: string | null | undefined; + logSql?: boolean | undefined; + logIndexerResponse?: boolean | undefined; + logRotate?: number | undefined; + filterSentryEvents?: boolean | undefined; +}; + +/** @internal */ +export const DevelopmentConfigResource$outboundSchema: z.ZodType< + DevelopmentConfigResource$Outbound, + z.ZodTypeDef, + DevelopmentConfigResource +> = z.object({ + id: z.number().int().optional(), + consoleLogLevel: z.nullable(z.string()).optional(), + logSql: z.boolean().optional(), + logIndexerResponse: z.boolean().optional(), + logRotate: z.number().int().optional(), + filterSentryEvents: z.boolean().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DevelopmentConfigResource$ { + /** @deprecated use `DevelopmentConfigResource$inboundSchema` instead. */ + export const inboundSchema = DevelopmentConfigResource$inboundSchema; + /** @deprecated use `DevelopmentConfigResource$outboundSchema` instead. */ + export const outboundSchema = DevelopmentConfigResource$outboundSchema; + /** @deprecated use `DevelopmentConfigResource$Outbound` instead. */ + export type Outbound = DevelopmentConfigResource$Outbound; +} + +export function developmentConfigResourceToJSON( + developmentConfigResource: DevelopmentConfigResource, +): string { + return JSON.stringify( + DevelopmentConfigResource$outboundSchema.parse(developmentConfigResource), + ); +} + +export function developmentConfigResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DevelopmentConfigResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DevelopmentConfigResource' from JSON`, + ); +} diff --git a/src/models/downloadclientbulkresource.ts b/src/models/downloadclientbulkresource.ts new file mode 100644 index 0000000..13b6ff9 --- /dev/null +++ b/src/models/downloadclientbulkresource.ts @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + ApplyTags, + ApplyTags$inboundSchema, + ApplyTags$outboundSchema, +} from "./applytags.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DownloadClientBulkResource = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: ApplyTags | undefined; + enable?: boolean | null | undefined; + priority?: number | null | undefined; +}; + +/** @internal */ +export const DownloadClientBulkResource$inboundSchema: z.ZodType< + DownloadClientBulkResource, + z.ZodTypeDef, + unknown +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$inboundSchema.optional(), + enable: z.nullable(z.boolean()).optional(), + priority: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type DownloadClientBulkResource$Outbound = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: string | undefined; + enable?: boolean | null | undefined; + priority?: number | null | undefined; +}; + +/** @internal */ +export const DownloadClientBulkResource$outboundSchema: z.ZodType< + DownloadClientBulkResource$Outbound, + z.ZodTypeDef, + DownloadClientBulkResource +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$outboundSchema.optional(), + enable: z.nullable(z.boolean()).optional(), + priority: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DownloadClientBulkResource$ { + /** @deprecated use `DownloadClientBulkResource$inboundSchema` instead. */ + export const inboundSchema = DownloadClientBulkResource$inboundSchema; + /** @deprecated use `DownloadClientBulkResource$outboundSchema` instead. */ + export const outboundSchema = DownloadClientBulkResource$outboundSchema; + /** @deprecated use `DownloadClientBulkResource$Outbound` instead. */ + export type Outbound = DownloadClientBulkResource$Outbound; +} + +export function downloadClientBulkResourceToJSON( + downloadClientBulkResource: DownloadClientBulkResource, +): string { + return JSON.stringify( + DownloadClientBulkResource$outboundSchema.parse(downloadClientBulkResource), + ); +} + +export function downloadClientBulkResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DownloadClientBulkResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DownloadClientBulkResource' from JSON`, + ); +} diff --git a/src/models/downloadclientcategory.ts b/src/models/downloadclientcategory.ts new file mode 100644 index 0000000..b1a678d --- /dev/null +++ b/src/models/downloadclientcategory.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DownloadClientCategory = { + clientCategory?: string | null | undefined; + categories?: Array | null | undefined; +}; + +/** @internal */ +export const DownloadClientCategory$inboundSchema: z.ZodType< + DownloadClientCategory, + z.ZodTypeDef, + unknown +> = z.object({ + clientCategory: z.nullable(z.string()).optional(), + categories: z.nullable(z.array(z.number().int())).optional(), +}); + +/** @internal */ +export type DownloadClientCategory$Outbound = { + clientCategory?: string | null | undefined; + categories?: Array | null | undefined; +}; + +/** @internal */ +export const DownloadClientCategory$outboundSchema: z.ZodType< + DownloadClientCategory$Outbound, + z.ZodTypeDef, + DownloadClientCategory +> = z.object({ + clientCategory: z.nullable(z.string()).optional(), + categories: z.nullable(z.array(z.number().int())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DownloadClientCategory$ { + /** @deprecated use `DownloadClientCategory$inboundSchema` instead. */ + export const inboundSchema = DownloadClientCategory$inboundSchema; + /** @deprecated use `DownloadClientCategory$outboundSchema` instead. */ + export const outboundSchema = DownloadClientCategory$outboundSchema; + /** @deprecated use `DownloadClientCategory$Outbound` instead. */ + export type Outbound = DownloadClientCategory$Outbound; +} + +export function downloadClientCategoryToJSON( + downloadClientCategory: DownloadClientCategory, +): string { + return JSON.stringify( + DownloadClientCategory$outboundSchema.parse(downloadClientCategory), + ); +} + +export function downloadClientCategoryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DownloadClientCategory$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DownloadClientCategory' from JSON`, + ); +} diff --git a/src/models/downloadclientconfigresource.ts b/src/models/downloadclientconfigresource.ts new file mode 100644 index 0000000..4103178 --- /dev/null +++ b/src/models/downloadclientconfigresource.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DownloadClientConfigResource = { + id?: number | undefined; +}; + +/** @internal */ +export const DownloadClientConfigResource$inboundSchema: z.ZodType< + DownloadClientConfigResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), +}); + +/** @internal */ +export type DownloadClientConfigResource$Outbound = { + id?: number | undefined; +}; + +/** @internal */ +export const DownloadClientConfigResource$outboundSchema: z.ZodType< + DownloadClientConfigResource$Outbound, + z.ZodTypeDef, + DownloadClientConfigResource +> = z.object({ + id: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DownloadClientConfigResource$ { + /** @deprecated use `DownloadClientConfigResource$inboundSchema` instead. */ + export const inboundSchema = DownloadClientConfigResource$inboundSchema; + /** @deprecated use `DownloadClientConfigResource$outboundSchema` instead. */ + export const outboundSchema = DownloadClientConfigResource$outboundSchema; + /** @deprecated use `DownloadClientConfigResource$Outbound` instead. */ + export type Outbound = DownloadClientConfigResource$Outbound; +} + +export function downloadClientConfigResourceToJSON( + downloadClientConfigResource: DownloadClientConfigResource, +): string { + return JSON.stringify( + DownloadClientConfigResource$outboundSchema.parse( + downloadClientConfigResource, + ), + ); +} + +export function downloadClientConfigResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DownloadClientConfigResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DownloadClientConfigResource' from JSON`, + ); +} diff --git a/src/models/downloadclientresource.ts b/src/models/downloadclientresource.ts new file mode 100644 index 0000000..35be7d3 --- /dev/null +++ b/src/models/downloadclientresource.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + DownloadClientCategory, + DownloadClientCategory$inboundSchema, + DownloadClientCategory$Outbound, + DownloadClientCategory$outboundSchema, +} from "./downloadclientcategory.js"; +import { + DownloadProtocol, + DownloadProtocol$inboundSchema, + DownloadProtocol$outboundSchema, +} from "./downloadprotocol.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type DownloadClientResource = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + enable?: boolean | undefined; + protocol?: DownloadProtocol | undefined; + priority?: number | undefined; + categories?: Array | null | undefined; + supportsCategories?: boolean | undefined; +}; + +/** @internal */ +export const DownloadClientResource$inboundSchema: z.ZodType< + DownloadClientResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable( + z.array(z.lazy(() => DownloadClientResource$inboundSchema)), + ).optional(), + enable: z.boolean().optional(), + protocol: DownloadProtocol$inboundSchema.optional(), + priority: z.number().int().optional(), + categories: z.nullable(z.array(DownloadClientCategory$inboundSchema)) + .optional(), + supportsCategories: z.boolean().optional(), +}); + +/** @internal */ +export type DownloadClientResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + enable?: boolean | undefined; + protocol?: string | undefined; + priority?: number | undefined; + categories?: Array | null | undefined; + supportsCategories?: boolean | undefined; +}; + +/** @internal */ +export const DownloadClientResource$outboundSchema: z.ZodType< + DownloadClientResource$Outbound, + z.ZodTypeDef, + DownloadClientResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable( + z.array(z.lazy(() => DownloadClientResource$outboundSchema)), + ).optional(), + enable: z.boolean().optional(), + protocol: DownloadProtocol$outboundSchema.optional(), + priority: z.number().int().optional(), + categories: z.nullable(z.array(DownloadClientCategory$outboundSchema)) + .optional(), + supportsCategories: z.boolean().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DownloadClientResource$ { + /** @deprecated use `DownloadClientResource$inboundSchema` instead. */ + export const inboundSchema = DownloadClientResource$inboundSchema; + /** @deprecated use `DownloadClientResource$outboundSchema` instead. */ + export const outboundSchema = DownloadClientResource$outboundSchema; + /** @deprecated use `DownloadClientResource$Outbound` instead. */ + export type Outbound = DownloadClientResource$Outbound; +} + +export function downloadClientResourceToJSON( + downloadClientResource: DownloadClientResource, +): string { + return JSON.stringify( + DownloadClientResource$outboundSchema.parse(downloadClientResource), + ); +} + +export function downloadClientResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DownloadClientResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DownloadClientResource' from JSON`, + ); +} diff --git a/src/models/downloadprotocol.ts b/src/models/downloadprotocol.ts new file mode 100644 index 0000000..9fcebc2 --- /dev/null +++ b/src/models/downloadprotocol.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const DownloadProtocol = { + Unknown: "unknown", + Usenet: "usenet", + Torrent: "torrent", +} as const; +export type DownloadProtocol = ClosedEnum; + +/** @internal */ +export const DownloadProtocol$inboundSchema: z.ZodNativeEnum< + typeof DownloadProtocol +> = z.nativeEnum(DownloadProtocol); + +/** @internal */ +export const DownloadProtocol$outboundSchema: z.ZodNativeEnum< + typeof DownloadProtocol +> = DownloadProtocol$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DownloadProtocol$ { + /** @deprecated use `DownloadProtocol$inboundSchema` instead. */ + export const inboundSchema = DownloadProtocol$inboundSchema; + /** @deprecated use `DownloadProtocol$outboundSchema` instead. */ + export const outboundSchema = DownloadProtocol$outboundSchema; +} diff --git a/src/models/errors/apierror.ts b/src/models/errors/apierror.ts new file mode 100644 index 0000000..3a04a1c --- /dev/null +++ b/src/models/errors/apierror.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export class APIError extends Error { + 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}` : ""; + + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); + + this.statusCode = statusCode; + this.contentType = contentType; + + this.name = "APIError"; + } +} diff --git a/src/models/errors/httpclienterrors.ts b/src/models/errors/httpclienterrors.ts new file mode 100644 index 0000000..b34f612 --- /dev/null +++ b/src/models/errors/httpclienterrors.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * 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; + } + } +} + +/** + * An error to capture unrecognised or unexpected errors when making HTTP calls. + */ +export class UnexpectedClientError extends HTTPClientError { + 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"; +} + +/** + * An error that is raised when a HTTP request was aborted by the client error. + */ +export class RequestAbortedError extends HTTPClientError { + override readonly name = "RequestAbortedError"; +} + +/** + * An error that is raised when a HTTP request timed out due to an AbortSignal + * signal timeout. + */ +export class RequestTimeoutError extends HTTPClientError { + override readonly name = "RequestTimeoutError"; +} + +/** + * An error that is raised when a HTTP client is unable to make a request to + * a server. + */ +export class ConnectionError extends HTTPClientError { + override readonly name = "ConnectionError"; +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts new file mode 100644 index 0000000..7b2a3be --- /dev/null +++ b/src/models/errors/index.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./apierror.js"; +export * from "./httpclienterrors.js"; +export * from "./sdkvalidationerror.js"; diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts new file mode 100644 index 0000000..16929b9 --- /dev/null +++ b/src/models/errors/sdkvalidationerror.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export class SDKValidationError extends Error { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(`${message}: ${cause}`); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + this.rawMessage = message; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} + +export function formatZodError(err: z.ZodError, level = 0): string { + let pre = " ".repeat(level); + pre = level > 0 ? `│${pre}` : pre; + pre += " ".repeat(level); + + let message = ""; + const append = (str: string) => (message += `\n${pre}${str}`); + + const len = err.issues.length; + const headline = len === 1 ? `${len} issue found` : `${len} issues found`; + + if (len) { + append(`┌ ${headline}:`); + } + + for (const issue of err.issues) { + let path = issue.path.join("."); + path = path ? `.${path}` : ""; + append(`│ • [${path}]: ${issue.message} (${issue.code})`); + switch (issue.code) { + case "invalid_literal": + case "invalid_type": { + append(`│ Want: ${issue.expected}`); + append(`│ Got: ${issue.received}`); + break; + } + case "unrecognized_keys": { + append(`│ Keys: ${issue.keys.join(", ")}`); + break; + } + case "invalid_enum_value": { + append(`│ Allowed: ${issue.options.join(", ")}`); + append(`│ Got: ${issue.received}`); + break; + } + case "invalid_union_discriminator": { + append(`│ Allowed: ${issue.options.join(", ")}`); + break; + } + case "invalid_union": { + const len = issue.unionErrors.length; + append( + `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, + ); + issue.unionErrors.forEach((err, i) => { + append(`│ ✖︎ Member ${i + 1} of ${len}`); + append(`${formatZodError(err, level + 1)}`); + }); + } + } + } + + if (err.issues.length) { + append(`└─*`); + } + + return message.slice(1); +} diff --git a/src/models/field.ts b/src/models/field.ts new file mode 100644 index 0000000..e747dda --- /dev/null +++ b/src/models/field.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivacyLevel, + PrivacyLevel$inboundSchema, + PrivacyLevel$outboundSchema, +} from "./privacylevel.js"; +import { + SelectOption, + SelectOption$inboundSchema, + SelectOption$Outbound, + SelectOption$outboundSchema, +} from "./selectoption.js"; + +export type Field = { + order?: number | undefined; + name?: string | null | undefined; + label?: string | null | undefined; + unit?: string | null | undefined; + helpText?: string | null | undefined; + helpTextWarning?: string | null | undefined; + helpLink?: string | null | undefined; + value?: any | null | undefined; + type?: string | null | undefined; + advanced?: boolean | undefined; + selectOptions?: Array | null | undefined; + selectOptionsProviderAction?: string | null | undefined; + section?: string | null | undefined; + hidden?: string | null | undefined; + privacy?: PrivacyLevel | undefined; + placeholder?: string | null | undefined; + isFloat?: boolean | undefined; +}; + +/** @internal */ +export const Field$inboundSchema: z.ZodType = z + .object({ + order: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + unit: z.nullable(z.string()).optional(), + helpText: z.nullable(z.string()).optional(), + helpTextWarning: z.nullable(z.string()).optional(), + helpLink: z.nullable(z.string()).optional(), + value: z.nullable(z.any()).optional(), + type: z.nullable(z.string()).optional(), + advanced: z.boolean().optional(), + selectOptions: z.nullable(z.array(SelectOption$inboundSchema)).optional(), + selectOptionsProviderAction: z.nullable(z.string()).optional(), + section: z.nullable(z.string()).optional(), + hidden: z.nullable(z.string()).optional(), + privacy: PrivacyLevel$inboundSchema.optional(), + placeholder: z.nullable(z.string()).optional(), + isFloat: z.boolean().optional(), + }); + +/** @internal */ +export type Field$Outbound = { + order?: number | undefined; + name?: string | null | undefined; + label?: string | null | undefined; + unit?: string | null | undefined; + helpText?: string | null | undefined; + helpTextWarning?: string | null | undefined; + helpLink?: string | null | undefined; + value?: any | null | undefined; + type?: string | null | undefined; + advanced?: boolean | undefined; + selectOptions?: Array | null | undefined; + selectOptionsProviderAction?: string | null | undefined; + section?: string | null | undefined; + hidden?: string | null | undefined; + privacy?: string | undefined; + placeholder?: string | null | undefined; + isFloat?: boolean | undefined; +}; + +/** @internal */ +export const Field$outboundSchema: z.ZodType< + Field$Outbound, + z.ZodTypeDef, + Field +> = z.object({ + order: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + unit: z.nullable(z.string()).optional(), + helpText: z.nullable(z.string()).optional(), + helpTextWarning: z.nullable(z.string()).optional(), + helpLink: z.nullable(z.string()).optional(), + value: z.nullable(z.any()).optional(), + type: z.nullable(z.string()).optional(), + advanced: z.boolean().optional(), + selectOptions: z.nullable(z.array(SelectOption$outboundSchema)).optional(), + selectOptionsProviderAction: z.nullable(z.string()).optional(), + section: z.nullable(z.string()).optional(), + hidden: z.nullable(z.string()).optional(), + privacy: PrivacyLevel$outboundSchema.optional(), + placeholder: z.nullable(z.string()).optional(), + isFloat: z.boolean().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Field$ { + /** @deprecated use `Field$inboundSchema` instead. */ + export const inboundSchema = Field$inboundSchema; + /** @deprecated use `Field$outboundSchema` instead. */ + export const outboundSchema = Field$outboundSchema; + /** @deprecated use `Field$Outbound` instead. */ + export type Outbound = Field$Outbound; +} + +export function fieldToJSON(field: Field): string { + return JSON.stringify(Field$outboundSchema.parse(field)); +} + +export function fieldFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Field$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Field' from JSON`, + ); +} diff --git a/src/models/healthcheckresult.ts b/src/models/healthcheckresult.ts new file mode 100644 index 0000000..c9b4785 --- /dev/null +++ b/src/models/healthcheckresult.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const HealthCheckResult = { + Ok: "ok", + Notice: "notice", + Warning: "warning", + Error: "error", +} as const; +export type HealthCheckResult = ClosedEnum; + +/** @internal */ +export const HealthCheckResult$inboundSchema: z.ZodNativeEnum< + typeof HealthCheckResult +> = z.nativeEnum(HealthCheckResult); + +/** @internal */ +export const HealthCheckResult$outboundSchema: z.ZodNativeEnum< + typeof HealthCheckResult +> = HealthCheckResult$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthCheckResult$ { + /** @deprecated use `HealthCheckResult$inboundSchema` instead. */ + export const inboundSchema = HealthCheckResult$inboundSchema; + /** @deprecated use `HealthCheckResult$outboundSchema` instead. */ + export const outboundSchema = HealthCheckResult$outboundSchema; +} diff --git a/src/models/healthresource.ts b/src/models/healthresource.ts new file mode 100644 index 0000000..f2d1387 --- /dev/null +++ b/src/models/healthresource.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + HealthCheckResult, + HealthCheckResult$inboundSchema, + HealthCheckResult$outboundSchema, +} from "./healthcheckresult.js"; + +export type HealthResource = { + id?: number | undefined; + source?: string | null | undefined; + type?: HealthCheckResult | undefined; + message?: string | null | undefined; + wikiUrl?: string | null | undefined; +}; + +/** @internal */ +export const HealthResource$inboundSchema: z.ZodType< + HealthResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + source: z.nullable(z.string()).optional(), + type: HealthCheckResult$inboundSchema.optional(), + message: z.nullable(z.string()).optional(), + wikiUrl: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type HealthResource$Outbound = { + id?: number | undefined; + source?: string | null | undefined; + type?: string | undefined; + message?: string | null | undefined; + wikiUrl?: string | null | undefined; +}; + +/** @internal */ +export const HealthResource$outboundSchema: z.ZodType< + HealthResource$Outbound, + z.ZodTypeDef, + HealthResource +> = z.object({ + id: z.number().int().optional(), + source: z.nullable(z.string()).optional(), + type: HealthCheckResult$outboundSchema.optional(), + message: z.nullable(z.string()).optional(), + wikiUrl: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HealthResource$ { + /** @deprecated use `HealthResource$inboundSchema` instead. */ + export const inboundSchema = HealthResource$inboundSchema; + /** @deprecated use `HealthResource$outboundSchema` instead. */ + export const outboundSchema = HealthResource$outboundSchema; + /** @deprecated use `HealthResource$Outbound` instead. */ + export type Outbound = HealthResource$Outbound; +} + +export function healthResourceToJSON(healthResource: HealthResource): string { + return JSON.stringify(HealthResource$outboundSchema.parse(healthResource)); +} + +export function healthResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HealthResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HealthResource' from JSON`, + ); +} diff --git a/src/models/historyeventtype.ts b/src/models/historyeventtype.ts new file mode 100644 index 0000000..8ec5f1f --- /dev/null +++ b/src/models/historyeventtype.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const HistoryEventType = { + Unknown: "unknown", + ReleaseGrabbed: "releaseGrabbed", + IndexerQuery: "indexerQuery", + IndexerRss: "indexerRss", + IndexerAuth: "indexerAuth", + IndexerInfo: "indexerInfo", +} as const; +export type HistoryEventType = ClosedEnum; + +/** @internal */ +export const HistoryEventType$inboundSchema: z.ZodNativeEnum< + typeof HistoryEventType +> = z.nativeEnum(HistoryEventType); + +/** @internal */ +export const HistoryEventType$outboundSchema: z.ZodNativeEnum< + typeof HistoryEventType +> = HistoryEventType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HistoryEventType$ { + /** @deprecated use `HistoryEventType$inboundSchema` instead. */ + export const inboundSchema = HistoryEventType$inboundSchema; + /** @deprecated use `HistoryEventType$outboundSchema` instead. */ + export const outboundSchema = HistoryEventType$outboundSchema; +} diff --git a/src/models/historyresource.ts b/src/models/historyresource.ts new file mode 100644 index 0000000..efc822b --- /dev/null +++ b/src/models/historyresource.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + HistoryEventType, + HistoryEventType$inboundSchema, + HistoryEventType$outboundSchema, +} from "./historyeventtype.js"; + +export type HistoryResource = { + id?: number | undefined; + indexerId?: number | undefined; + date?: Date | undefined; + downloadId?: string | null | undefined; + successful?: boolean | undefined; + eventType?: HistoryEventType | undefined; + data?: { [k: string]: string | null } | null | undefined; +}; + +/** @internal */ +export const HistoryResource$inboundSchema: z.ZodType< + HistoryResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + indexerId: z.number().int().optional(), + date: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + downloadId: z.nullable(z.string()).optional(), + successful: z.boolean().optional(), + eventType: HistoryEventType$inboundSchema.optional(), + data: z.nullable(z.record(z.nullable(z.string()))).optional(), +}); + +/** @internal */ +export type HistoryResource$Outbound = { + id?: number | undefined; + indexerId?: number | undefined; + date?: string | undefined; + downloadId?: string | null | undefined; + successful?: boolean | undefined; + eventType?: string | undefined; + data?: { [k: string]: string | null } | null | undefined; +}; + +/** @internal */ +export const HistoryResource$outboundSchema: z.ZodType< + HistoryResource$Outbound, + z.ZodTypeDef, + HistoryResource +> = z.object({ + id: z.number().int().optional(), + indexerId: z.number().int().optional(), + date: z.date().transform(v => v.toISOString()).optional(), + downloadId: z.nullable(z.string()).optional(), + successful: z.boolean().optional(), + eventType: HistoryEventType$outboundSchema.optional(), + data: z.nullable(z.record(z.nullable(z.string()))).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HistoryResource$ { + /** @deprecated use `HistoryResource$inboundSchema` instead. */ + export const inboundSchema = HistoryResource$inboundSchema; + /** @deprecated use `HistoryResource$outboundSchema` instead. */ + export const outboundSchema = HistoryResource$outboundSchema; + /** @deprecated use `HistoryResource$Outbound` instead. */ + export type Outbound = HistoryResource$Outbound; +} + +export function historyResourceToJSON( + historyResource: HistoryResource, +): string { + return JSON.stringify(HistoryResource$outboundSchema.parse(historyResource)); +} + +export function historyResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HistoryResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HistoryResource' from JSON`, + ); +} diff --git a/src/models/historyresourcepagingresource.ts b/src/models/historyresourcepagingresource.ts new file mode 100644 index 0000000..93510b8 --- /dev/null +++ b/src/models/historyresourcepagingresource.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + HistoryResource, + HistoryResource$inboundSchema, + HistoryResource$Outbound, + HistoryResource$outboundSchema, +} from "./historyresource.js"; +import { + SortDirection, + SortDirection$inboundSchema, + SortDirection$outboundSchema, +} from "./sortdirection.js"; + +export type HistoryResourcePagingResource = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | null | undefined; + sortDirection?: SortDirection | undefined; + totalRecords?: number | undefined; + records?: Array | null | undefined; +}; + +/** @internal */ +export const HistoryResourcePagingResource$inboundSchema: z.ZodType< + HistoryResourcePagingResource, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.number().int().optional(), + pageSize: z.number().int().optional(), + sortKey: z.nullable(z.string()).optional(), + sortDirection: SortDirection$inboundSchema.optional(), + totalRecords: z.number().int().optional(), + records: z.nullable(z.array(HistoryResource$inboundSchema)).optional(), +}); + +/** @internal */ +export type HistoryResourcePagingResource$Outbound = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | null | undefined; + sortDirection?: string | undefined; + totalRecords?: number | undefined; + records?: Array | null | undefined; +}; + +/** @internal */ +export const HistoryResourcePagingResource$outboundSchema: z.ZodType< + HistoryResourcePagingResource$Outbound, + z.ZodTypeDef, + HistoryResourcePagingResource +> = z.object({ + page: z.number().int().optional(), + pageSize: z.number().int().optional(), + sortKey: z.nullable(z.string()).optional(), + sortDirection: SortDirection$outboundSchema.optional(), + totalRecords: z.number().int().optional(), + records: z.nullable(z.array(HistoryResource$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HistoryResourcePagingResource$ { + /** @deprecated use `HistoryResourcePagingResource$inboundSchema` instead. */ + export const inboundSchema = HistoryResourcePagingResource$inboundSchema; + /** @deprecated use `HistoryResourcePagingResource$outboundSchema` instead. */ + export const outboundSchema = HistoryResourcePagingResource$outboundSchema; + /** @deprecated use `HistoryResourcePagingResource$Outbound` instead. */ + export type Outbound = HistoryResourcePagingResource$Outbound; +} + +export function historyResourcePagingResourceToJSON( + historyResourcePagingResource: HistoryResourcePagingResource, +): string { + return JSON.stringify( + HistoryResourcePagingResource$outboundSchema.parse( + historyResourcePagingResource, + ), + ); +} + +export function historyResourcePagingResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HistoryResourcePagingResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HistoryResourcePagingResource' from JSON`, + ); +} diff --git a/src/models/hostconfigresource.ts b/src/models/hostconfigresource.ts new file mode 100644 index 0000000..04cd9fe --- /dev/null +++ b/src/models/hostconfigresource.ts @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + AuthenticationRequiredType, + AuthenticationRequiredType$inboundSchema, + AuthenticationRequiredType$outboundSchema, +} from "./authenticationrequiredtype.js"; +import { + AuthenticationType, + AuthenticationType$inboundSchema, + AuthenticationType$outboundSchema, +} from "./authenticationtype.js"; +import { + CertificateValidationType, + CertificateValidationType$inboundSchema, + CertificateValidationType$outboundSchema, +} from "./certificatevalidationtype.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ProxyType, + ProxyType$inboundSchema, + ProxyType$outboundSchema, +} from "./proxytype.js"; +import { + UpdateMechanism, + UpdateMechanism$inboundSchema, + UpdateMechanism$outboundSchema, +} from "./updatemechanism.js"; + +export type HostConfigResource = { + id?: number | undefined; + bindAddress?: string | null | undefined; + port?: number | undefined; + sslPort?: number | undefined; + enableSsl?: boolean | undefined; + launchBrowser?: boolean | undefined; + authenticationMethod?: AuthenticationType | undefined; + authenticationRequired?: AuthenticationRequiredType | undefined; + analyticsEnabled?: boolean | undefined; + username?: string | null | undefined; + password?: string | null | undefined; + passwordConfirmation?: string | null | undefined; + logLevel?: string | null | undefined; + logSizeLimit?: number | undefined; + consoleLogLevel?: string | null | undefined; + branch?: string | null | undefined; + apiKey?: string | null | undefined; + sslCertPath?: string | null | undefined; + sslCertPassword?: string | null | undefined; + urlBase?: string | null | undefined; + instanceName?: string | null | undefined; + applicationUrl?: string | null | undefined; + updateAutomatically?: boolean | undefined; + updateMechanism?: UpdateMechanism | undefined; + updateScriptPath?: string | null | undefined; + proxyEnabled?: boolean | undefined; + proxyType?: ProxyType | undefined; + proxyHostname?: string | null | undefined; + proxyPort?: number | undefined; + proxyUsername?: string | null | undefined; + proxyPassword?: string | null | undefined; + proxyBypassFilter?: string | null | undefined; + proxyBypassLocalAddresses?: boolean | undefined; + certificateValidation?: CertificateValidationType | undefined; + backupFolder?: string | null | undefined; + backupInterval?: number | undefined; + backupRetention?: number | undefined; + historyCleanupDays?: number | undefined; + trustCgnatIpAddresses?: boolean | undefined; +}; + +/** @internal */ +export const HostConfigResource$inboundSchema: z.ZodType< + HostConfigResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + bindAddress: z.nullable(z.string()).optional(), + port: z.number().int().optional(), + sslPort: z.number().int().optional(), + enableSsl: z.boolean().optional(), + launchBrowser: z.boolean().optional(), + authenticationMethod: AuthenticationType$inboundSchema.optional(), + authenticationRequired: AuthenticationRequiredType$inboundSchema.optional(), + analyticsEnabled: z.boolean().optional(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + passwordConfirmation: z.nullable(z.string()).optional(), + logLevel: z.nullable(z.string()).optional(), + logSizeLimit: z.number().int().optional(), + consoleLogLevel: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + apiKey: z.nullable(z.string()).optional(), + sslCertPath: z.nullable(z.string()).optional(), + sslCertPassword: z.nullable(z.string()).optional(), + urlBase: z.nullable(z.string()).optional(), + instanceName: z.nullable(z.string()).optional(), + applicationUrl: z.nullable(z.string()).optional(), + updateAutomatically: z.boolean().optional(), + updateMechanism: UpdateMechanism$inboundSchema.optional(), + updateScriptPath: z.nullable(z.string()).optional(), + proxyEnabled: z.boolean().optional(), + proxyType: ProxyType$inboundSchema.optional(), + proxyHostname: z.nullable(z.string()).optional(), + proxyPort: z.number().int().optional(), + proxyUsername: z.nullable(z.string()).optional(), + proxyPassword: z.nullable(z.string()).optional(), + proxyBypassFilter: z.nullable(z.string()).optional(), + proxyBypassLocalAddresses: z.boolean().optional(), + certificateValidation: CertificateValidationType$inboundSchema.optional(), + backupFolder: z.nullable(z.string()).optional(), + backupInterval: z.number().int().optional(), + backupRetention: z.number().int().optional(), + historyCleanupDays: z.number().int().optional(), + trustCgnatIpAddresses: z.boolean().optional(), +}); + +/** @internal */ +export type HostConfigResource$Outbound = { + id?: number | undefined; + bindAddress?: string | null | undefined; + port?: number | undefined; + sslPort?: number | undefined; + enableSsl?: boolean | undefined; + launchBrowser?: boolean | undefined; + authenticationMethod?: string | undefined; + authenticationRequired?: string | undefined; + analyticsEnabled?: boolean | undefined; + username?: string | null | undefined; + password?: string | null | undefined; + passwordConfirmation?: string | null | undefined; + logLevel?: string | null | undefined; + logSizeLimit?: number | undefined; + consoleLogLevel?: string | null | undefined; + branch?: string | null | undefined; + apiKey?: string | null | undefined; + sslCertPath?: string | null | undefined; + sslCertPassword?: string | null | undefined; + urlBase?: string | null | undefined; + instanceName?: string | null | undefined; + applicationUrl?: string | null | undefined; + updateAutomatically?: boolean | undefined; + updateMechanism?: string | undefined; + updateScriptPath?: string | null | undefined; + proxyEnabled?: boolean | undefined; + proxyType?: string | undefined; + proxyHostname?: string | null | undefined; + proxyPort?: number | undefined; + proxyUsername?: string | null | undefined; + proxyPassword?: string | null | undefined; + proxyBypassFilter?: string | null | undefined; + proxyBypassLocalAddresses?: boolean | undefined; + certificateValidation?: string | undefined; + backupFolder?: string | null | undefined; + backupInterval?: number | undefined; + backupRetention?: number | undefined; + historyCleanupDays?: number | undefined; + trustCgnatIpAddresses?: boolean | undefined; +}; + +/** @internal */ +export const HostConfigResource$outboundSchema: z.ZodType< + HostConfigResource$Outbound, + z.ZodTypeDef, + HostConfigResource +> = z.object({ + id: z.number().int().optional(), + bindAddress: z.nullable(z.string()).optional(), + port: z.number().int().optional(), + sslPort: z.number().int().optional(), + enableSsl: z.boolean().optional(), + launchBrowser: z.boolean().optional(), + authenticationMethod: AuthenticationType$outboundSchema.optional(), + authenticationRequired: AuthenticationRequiredType$outboundSchema.optional(), + analyticsEnabled: z.boolean().optional(), + username: z.nullable(z.string()).optional(), + password: z.nullable(z.string()).optional(), + passwordConfirmation: z.nullable(z.string()).optional(), + logLevel: z.nullable(z.string()).optional(), + logSizeLimit: z.number().int().optional(), + consoleLogLevel: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + apiKey: z.nullable(z.string()).optional(), + sslCertPath: z.nullable(z.string()).optional(), + sslCertPassword: z.nullable(z.string()).optional(), + urlBase: z.nullable(z.string()).optional(), + instanceName: z.nullable(z.string()).optional(), + applicationUrl: z.nullable(z.string()).optional(), + updateAutomatically: z.boolean().optional(), + updateMechanism: UpdateMechanism$outboundSchema.optional(), + updateScriptPath: z.nullable(z.string()).optional(), + proxyEnabled: z.boolean().optional(), + proxyType: ProxyType$outboundSchema.optional(), + proxyHostname: z.nullable(z.string()).optional(), + proxyPort: z.number().int().optional(), + proxyUsername: z.nullable(z.string()).optional(), + proxyPassword: z.nullable(z.string()).optional(), + proxyBypassFilter: z.nullable(z.string()).optional(), + proxyBypassLocalAddresses: z.boolean().optional(), + certificateValidation: CertificateValidationType$outboundSchema.optional(), + backupFolder: z.nullable(z.string()).optional(), + backupInterval: z.number().int().optional(), + backupRetention: z.number().int().optional(), + historyCleanupDays: z.number().int().optional(), + trustCgnatIpAddresses: z.boolean().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HostConfigResource$ { + /** @deprecated use `HostConfigResource$inboundSchema` instead. */ + export const inboundSchema = HostConfigResource$inboundSchema; + /** @deprecated use `HostConfigResource$outboundSchema` instead. */ + export const outboundSchema = HostConfigResource$outboundSchema; + /** @deprecated use `HostConfigResource$Outbound` instead. */ + export type Outbound = HostConfigResource$Outbound; +} + +export function hostConfigResourceToJSON( + hostConfigResource: HostConfigResource, +): string { + return JSON.stringify( + HostConfigResource$outboundSchema.parse(hostConfigResource), + ); +} + +export function hostConfigResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HostConfigResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HostConfigResource' from JSON`, + ); +} diff --git a/src/models/hoststatistics.ts b/src/models/hoststatistics.ts new file mode 100644 index 0000000..fb3fefb --- /dev/null +++ b/src/models/hoststatistics.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type HostStatistics = { + host?: string | null | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; +}; + +/** @internal */ +export const HostStatistics$inboundSchema: z.ZodType< + HostStatistics, + z.ZodTypeDef, + unknown +> = z.object({ + host: z.nullable(z.string()).optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), +}); + +/** @internal */ +export type HostStatistics$Outbound = { + host?: string | null | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; +}; + +/** @internal */ +export const HostStatistics$outboundSchema: z.ZodType< + HostStatistics$Outbound, + z.ZodTypeDef, + HostStatistics +> = z.object({ + host: z.nullable(z.string()).optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace HostStatistics$ { + /** @deprecated use `HostStatistics$inboundSchema` instead. */ + export const inboundSchema = HostStatistics$inboundSchema; + /** @deprecated use `HostStatistics$outboundSchema` instead. */ + export const outboundSchema = HostStatistics$outboundSchema; + /** @deprecated use `HostStatistics$Outbound` instead. */ + export type Outbound = HostStatistics$Outbound; +} + +export function hostStatisticsToJSON(hostStatistics: HostStatistics): string { + return JSON.stringify(HostStatistics$outboundSchema.parse(hostStatistics)); +} + +export function hostStatisticsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => HostStatistics$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HostStatistics' from JSON`, + ); +} diff --git a/src/models/index.ts b/src/models/index.ts new file mode 100644 index 0000000..5b922bd --- /dev/null +++ b/src/models/index.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./apiinforesource.js"; +export * from "./applicationbulkresource.js"; +export * from "./applicationresource.js"; +export * from "./applicationsynclevel.js"; +export * from "./applytags.js"; +export * from "./appprofileresource.js"; +export * from "./authenticationrequiredtype.js"; +export * from "./authenticationtype.js"; +export * from "./backupresource.js"; +export * from "./backuptype.js"; +export * from "./booksearchparam.js"; +export * from "./certificatevalidationtype.js"; +export * from "./command.js"; +export * from "./commandinput.js"; +export * from "./commandpriority.js"; +export * from "./commandresource.js"; +export * from "./commandresourceinput.js"; +export * from "./commandstatus.js"; +export * from "./commandtrigger.js"; +export * from "./customfilterresource.js"; +export * from "./databasetype.js"; +export * from "./developmentconfigresource.js"; +export * from "./downloadclientbulkresource.js"; +export * from "./downloadclientcategory.js"; +export * from "./downloadclientconfigresource.js"; +export * from "./downloadclientresource.js"; +export * from "./downloadprotocol.js"; +export * from "./field.js"; +export * from "./healthcheckresult.js"; +export * from "./healthresource.js"; +export * from "./historyeventtype.js"; +export * from "./historyresource.js"; +export * from "./historyresourcepagingresource.js"; +export * from "./hostconfigresource.js"; +export * from "./hoststatistics.js"; +export * from "./indexerbulkresource.js"; +export * from "./indexercapabilityresource.js"; +export * from "./indexercapabilityresourceinput.js"; +export * from "./indexercategory.js"; +export * from "./indexercategoryinput.js"; +export * from "./indexerprivacy.js"; +export * from "./indexerproxyresource.js"; +export * from "./indexerresource.js"; +export * from "./indexerresourceinput.js"; +export * from "./indexerstatistics.js"; +export * from "./indexerstatsresource.js"; +export * from "./indexerstatusresource.js"; +export * from "./localizationoption.js"; +export * from "./logfileresource.js"; +export * from "./logresource.js"; +export * from "./logresourcepagingresource.js"; +export * from "./moviesearchparam.js"; +export * from "./musicsearchparam.js"; +export * from "./notificationresource.js"; +export * from "./pingresource.js"; +export * from "./privacylevel.js"; +export * from "./providermessage.js"; +export * from "./providermessagetype.js"; +export * from "./proxytype.js"; +export * from "./releaseresource.js"; +export * from "./releaseresourceinput.js"; +export * from "./runtimemode.js"; +export * from "./searchparam.js"; +export * from "./security.js"; +export * from "./selectoption.js"; +export * from "./sortdirection.js"; +export * from "./systemresource.js"; +export * from "./tagdetailsresource.js"; +export * from "./tagresource.js"; +export * from "./taskresource.js"; +export * from "./tvsearchparam.js"; +export * from "./uiconfigresource.js"; +export * from "./updatechanges.js"; +export * from "./updatemechanism.js"; +export * from "./updateresource.js"; +export * from "./useragentstatistics.js"; diff --git a/src/models/indexerbulkresource.ts b/src/models/indexerbulkresource.ts new file mode 100644 index 0000000..835e0a3 --- /dev/null +++ b/src/models/indexerbulkresource.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + ApplyTags, + ApplyTags$inboundSchema, + ApplyTags$outboundSchema, +} from "./applytags.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type IndexerBulkResource = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: ApplyTags | undefined; + enable?: boolean | null | undefined; + appProfileId?: number | null | undefined; + priority?: number | null | undefined; + minimumSeeders?: number | null | undefined; + seedRatio?: number | null | undefined; + seedTime?: number | null | undefined; + packSeedTime?: number | null | undefined; + preferMagnetUrl?: boolean | null | undefined; +}; + +/** @internal */ +export const IndexerBulkResource$inboundSchema: z.ZodType< + IndexerBulkResource, + z.ZodTypeDef, + unknown +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$inboundSchema.optional(), + enable: z.nullable(z.boolean()).optional(), + appProfileId: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.number().int()).optional(), + minimumSeeders: z.nullable(z.number().int()).optional(), + seedRatio: z.nullable(z.number()).optional(), + seedTime: z.nullable(z.number().int()).optional(), + packSeedTime: z.nullable(z.number().int()).optional(), + preferMagnetUrl: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type IndexerBulkResource$Outbound = { + ids?: Array | null | undefined; + tags?: Array | null | undefined; + applyTags?: string | undefined; + enable?: boolean | null | undefined; + appProfileId?: number | null | undefined; + priority?: number | null | undefined; + minimumSeeders?: number | null | undefined; + seedRatio?: number | null | undefined; + seedTime?: number | null | undefined; + packSeedTime?: number | null | undefined; + preferMagnetUrl?: boolean | null | undefined; +}; + +/** @internal */ +export const IndexerBulkResource$outboundSchema: z.ZodType< + IndexerBulkResource$Outbound, + z.ZodTypeDef, + IndexerBulkResource +> = z.object({ + ids: z.nullable(z.array(z.number().int())).optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + applyTags: ApplyTags$outboundSchema.optional(), + enable: z.nullable(z.boolean()).optional(), + appProfileId: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.number().int()).optional(), + minimumSeeders: z.nullable(z.number().int()).optional(), + seedRatio: z.nullable(z.number()).optional(), + seedTime: z.nullable(z.number().int()).optional(), + packSeedTime: z.nullable(z.number().int()).optional(), + preferMagnetUrl: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerBulkResource$ { + /** @deprecated use `IndexerBulkResource$inboundSchema` instead. */ + export const inboundSchema = IndexerBulkResource$inboundSchema; + /** @deprecated use `IndexerBulkResource$outboundSchema` instead. */ + export const outboundSchema = IndexerBulkResource$outboundSchema; + /** @deprecated use `IndexerBulkResource$Outbound` instead. */ + export type Outbound = IndexerBulkResource$Outbound; +} + +export function indexerBulkResourceToJSON( + indexerBulkResource: IndexerBulkResource, +): string { + return JSON.stringify( + IndexerBulkResource$outboundSchema.parse(indexerBulkResource), + ); +} + +export function indexerBulkResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerBulkResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerBulkResource' from JSON`, + ); +} diff --git a/src/models/indexercapabilityresource.ts b/src/models/indexercapabilityresource.ts new file mode 100644 index 0000000..41b8417 --- /dev/null +++ b/src/models/indexercapabilityresource.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + BookSearchParam, + BookSearchParam$inboundSchema, + BookSearchParam$outboundSchema, +} from "./booksearchparam.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + IndexerCategory, + IndexerCategory$inboundSchema, + IndexerCategory$Outbound, + IndexerCategory$outboundSchema, +} from "./indexercategory.js"; +import { + MovieSearchParam, + MovieSearchParam$inboundSchema, + MovieSearchParam$outboundSchema, +} from "./moviesearchparam.js"; +import { + MusicSearchParam, + MusicSearchParam$inboundSchema, + MusicSearchParam$outboundSchema, +} from "./musicsearchparam.js"; +import { + SearchParam, + SearchParam$inboundSchema, + SearchParam$outboundSchema, +} from "./searchparam.js"; +import { + TvSearchParam, + TvSearchParam$inboundSchema, + TvSearchParam$outboundSchema, +} from "./tvsearchparam.js"; + +export type IndexerCapabilityResource = { + id?: number | undefined; + limitsMax?: number | null | undefined; + limitsDefault?: number | null | undefined; + categories?: Array | null | undefined; + supportsRawSearch?: boolean | undefined; + searchParams?: Array | null | undefined; + tvSearchParams?: Array | null | undefined; + movieSearchParams?: Array | null | undefined; + musicSearchParams?: Array | null | undefined; + bookSearchParams?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCapabilityResource$inboundSchema: z.ZodType< + IndexerCapabilityResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + limitsMax: z.nullable(z.number().int()).optional(), + limitsDefault: z.nullable(z.number().int()).optional(), + categories: z.nullable(z.array(IndexerCategory$inboundSchema)).optional(), + supportsRawSearch: z.boolean().optional(), + searchParams: z.nullable(z.array(SearchParam$inboundSchema)).optional(), + tvSearchParams: z.nullable(z.array(TvSearchParam$inboundSchema)).optional(), + movieSearchParams: z.nullable(z.array(MovieSearchParam$inboundSchema)) + .optional(), + musicSearchParams: z.nullable(z.array(MusicSearchParam$inboundSchema)) + .optional(), + bookSearchParams: z.nullable(z.array(BookSearchParam$inboundSchema)) + .optional(), +}); + +/** @internal */ +export type IndexerCapabilityResource$Outbound = { + id?: number | undefined; + limitsMax?: number | null | undefined; + limitsDefault?: number | null | undefined; + categories?: Array | null | undefined; + supportsRawSearch?: boolean | undefined; + searchParams?: Array | null | undefined; + tvSearchParams?: Array | null | undefined; + movieSearchParams?: Array | null | undefined; + musicSearchParams?: Array | null | undefined; + bookSearchParams?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCapabilityResource$outboundSchema: z.ZodType< + IndexerCapabilityResource$Outbound, + z.ZodTypeDef, + IndexerCapabilityResource +> = z.object({ + id: z.number().int().optional(), + limitsMax: z.nullable(z.number().int()).optional(), + limitsDefault: z.nullable(z.number().int()).optional(), + categories: z.nullable(z.array(IndexerCategory$outboundSchema)).optional(), + supportsRawSearch: z.boolean().optional(), + searchParams: z.nullable(z.array(SearchParam$outboundSchema)).optional(), + tvSearchParams: z.nullable(z.array(TvSearchParam$outboundSchema)).optional(), + movieSearchParams: z.nullable(z.array(MovieSearchParam$outboundSchema)) + .optional(), + musicSearchParams: z.nullable(z.array(MusicSearchParam$outboundSchema)) + .optional(), + bookSearchParams: z.nullable(z.array(BookSearchParam$outboundSchema)) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerCapabilityResource$ { + /** @deprecated use `IndexerCapabilityResource$inboundSchema` instead. */ + export const inboundSchema = IndexerCapabilityResource$inboundSchema; + /** @deprecated use `IndexerCapabilityResource$outboundSchema` instead. */ + export const outboundSchema = IndexerCapabilityResource$outboundSchema; + /** @deprecated use `IndexerCapabilityResource$Outbound` instead. */ + export type Outbound = IndexerCapabilityResource$Outbound; +} + +export function indexerCapabilityResourceToJSON( + indexerCapabilityResource: IndexerCapabilityResource, +): string { + return JSON.stringify( + IndexerCapabilityResource$outboundSchema.parse(indexerCapabilityResource), + ); +} + +export function indexerCapabilityResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerCapabilityResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerCapabilityResource' from JSON`, + ); +} diff --git a/src/models/indexercapabilityresourceinput.ts b/src/models/indexercapabilityresourceinput.ts new file mode 100644 index 0000000..3195e04 --- /dev/null +++ b/src/models/indexercapabilityresourceinput.ts @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + BookSearchParam, + BookSearchParam$inboundSchema, + BookSearchParam$outboundSchema, +} from "./booksearchparam.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + IndexerCategoryInput, + IndexerCategoryInput$inboundSchema, + IndexerCategoryInput$Outbound, + IndexerCategoryInput$outboundSchema, +} from "./indexercategoryinput.js"; +import { + MovieSearchParam, + MovieSearchParam$inboundSchema, + MovieSearchParam$outboundSchema, +} from "./moviesearchparam.js"; +import { + MusicSearchParam, + MusicSearchParam$inboundSchema, + MusicSearchParam$outboundSchema, +} from "./musicsearchparam.js"; +import { + SearchParam, + SearchParam$inboundSchema, + SearchParam$outboundSchema, +} from "./searchparam.js"; +import { + TvSearchParam, + TvSearchParam$inboundSchema, + TvSearchParam$outboundSchema, +} from "./tvsearchparam.js"; + +export type IndexerCapabilityResourceInput = { + id?: number | undefined; + limitsMax?: number | null | undefined; + limitsDefault?: number | null | undefined; + categories?: Array | null | undefined; + supportsRawSearch?: boolean | undefined; + searchParams?: Array | null | undefined; + tvSearchParams?: Array | null | undefined; + movieSearchParams?: Array | null | undefined; + musicSearchParams?: Array | null | undefined; + bookSearchParams?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCapabilityResourceInput$inboundSchema: z.ZodType< + IndexerCapabilityResourceInput, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + limitsMax: z.nullable(z.number().int()).optional(), + limitsDefault: z.nullable(z.number().int()).optional(), + categories: z.nullable(z.array(IndexerCategoryInput$inboundSchema)) + .optional(), + supportsRawSearch: z.boolean().optional(), + searchParams: z.nullable(z.array(SearchParam$inboundSchema)).optional(), + tvSearchParams: z.nullable(z.array(TvSearchParam$inboundSchema)).optional(), + movieSearchParams: z.nullable(z.array(MovieSearchParam$inboundSchema)) + .optional(), + musicSearchParams: z.nullable(z.array(MusicSearchParam$inboundSchema)) + .optional(), + bookSearchParams: z.nullable(z.array(BookSearchParam$inboundSchema)) + .optional(), +}); + +/** @internal */ +export type IndexerCapabilityResourceInput$Outbound = { + id?: number | undefined; + limitsMax?: number | null | undefined; + limitsDefault?: number | null | undefined; + categories?: Array | null | undefined; + supportsRawSearch?: boolean | undefined; + searchParams?: Array | null | undefined; + tvSearchParams?: Array | null | undefined; + movieSearchParams?: Array | null | undefined; + musicSearchParams?: Array | null | undefined; + bookSearchParams?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCapabilityResourceInput$outboundSchema: z.ZodType< + IndexerCapabilityResourceInput$Outbound, + z.ZodTypeDef, + IndexerCapabilityResourceInput +> = z.object({ + id: z.number().int().optional(), + limitsMax: z.nullable(z.number().int()).optional(), + limitsDefault: z.nullable(z.number().int()).optional(), + categories: z.nullable(z.array(IndexerCategoryInput$outboundSchema)) + .optional(), + supportsRawSearch: z.boolean().optional(), + searchParams: z.nullable(z.array(SearchParam$outboundSchema)).optional(), + tvSearchParams: z.nullable(z.array(TvSearchParam$outboundSchema)).optional(), + movieSearchParams: z.nullable(z.array(MovieSearchParam$outboundSchema)) + .optional(), + musicSearchParams: z.nullable(z.array(MusicSearchParam$outboundSchema)) + .optional(), + bookSearchParams: z.nullable(z.array(BookSearchParam$outboundSchema)) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerCapabilityResourceInput$ { + /** @deprecated use `IndexerCapabilityResourceInput$inboundSchema` instead. */ + export const inboundSchema = IndexerCapabilityResourceInput$inboundSchema; + /** @deprecated use `IndexerCapabilityResourceInput$outboundSchema` instead. */ + export const outboundSchema = IndexerCapabilityResourceInput$outboundSchema; + /** @deprecated use `IndexerCapabilityResourceInput$Outbound` instead. */ + export type Outbound = IndexerCapabilityResourceInput$Outbound; +} + +export function indexerCapabilityResourceInputToJSON( + indexerCapabilityResourceInput: IndexerCapabilityResourceInput, +): string { + return JSON.stringify( + IndexerCapabilityResourceInput$outboundSchema.parse( + indexerCapabilityResourceInput, + ), + ); +} + +export function indexerCapabilityResourceInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerCapabilityResourceInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerCapabilityResourceInput' from JSON`, + ); +} diff --git a/src/models/indexercategory.ts b/src/models/indexercategory.ts new file mode 100644 index 0000000..2c6b77d --- /dev/null +++ b/src/models/indexercategory.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type IndexerCategory = { + id?: number | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + subCategories?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCategory$inboundSchema: z.ZodType< + IndexerCategory, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + subCategories: z.nullable( + z.array(z.lazy(() => IndexerCategory$inboundSchema)), + ).optional(), +}); + +/** @internal */ +export type IndexerCategory$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + subCategories?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerCategory$outboundSchema: z.ZodType< + IndexerCategory$Outbound, + z.ZodTypeDef, + IndexerCategory +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + subCategories: z.nullable( + z.array(z.lazy(() => IndexerCategory$outboundSchema)), + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerCategory$ { + /** @deprecated use `IndexerCategory$inboundSchema` instead. */ + export const inboundSchema = IndexerCategory$inboundSchema; + /** @deprecated use `IndexerCategory$outboundSchema` instead. */ + export const outboundSchema = IndexerCategory$outboundSchema; + /** @deprecated use `IndexerCategory$Outbound` instead. */ + export type Outbound = IndexerCategory$Outbound; +} + +export function indexerCategoryToJSON( + indexerCategory: IndexerCategory, +): string { + return JSON.stringify(IndexerCategory$outboundSchema.parse(indexerCategory)); +} + +export function indexerCategoryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerCategory$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerCategory' from JSON`, + ); +} diff --git a/src/models/indexercategoryinput.ts b/src/models/indexercategoryinput.ts new file mode 100644 index 0000000..e90ec49 --- /dev/null +++ b/src/models/indexercategoryinput.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type IndexerCategoryInput = { + id?: number | undefined; + name?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const IndexerCategoryInput$inboundSchema: z.ZodType< + IndexerCategoryInput, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type IndexerCategoryInput$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const IndexerCategoryInput$outboundSchema: z.ZodType< + IndexerCategoryInput$Outbound, + z.ZodTypeDef, + IndexerCategoryInput +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerCategoryInput$ { + /** @deprecated use `IndexerCategoryInput$inboundSchema` instead. */ + export const inboundSchema = IndexerCategoryInput$inboundSchema; + /** @deprecated use `IndexerCategoryInput$outboundSchema` instead. */ + export const outboundSchema = IndexerCategoryInput$outboundSchema; + /** @deprecated use `IndexerCategoryInput$Outbound` instead. */ + export type Outbound = IndexerCategoryInput$Outbound; +} + +export function indexerCategoryInputToJSON( + indexerCategoryInput: IndexerCategoryInput, +): string { + return JSON.stringify( + IndexerCategoryInput$outboundSchema.parse(indexerCategoryInput), + ); +} + +export function indexerCategoryInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerCategoryInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerCategoryInput' from JSON`, + ); +} diff --git a/src/models/indexerprivacy.ts b/src/models/indexerprivacy.ts new file mode 100644 index 0000000..56d38fb --- /dev/null +++ b/src/models/indexerprivacy.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const IndexerPrivacy = { + Public: "public", + SemiPrivate: "semiPrivate", + Private: "private", +} as const; +export type IndexerPrivacy = ClosedEnum; + +/** @internal */ +export const IndexerPrivacy$inboundSchema: z.ZodNativeEnum< + typeof IndexerPrivacy +> = z.nativeEnum(IndexerPrivacy); + +/** @internal */ +export const IndexerPrivacy$outboundSchema: z.ZodNativeEnum< + typeof IndexerPrivacy +> = IndexerPrivacy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerPrivacy$ { + /** @deprecated use `IndexerPrivacy$inboundSchema` instead. */ + export const inboundSchema = IndexerPrivacy$inboundSchema; + /** @deprecated use `IndexerPrivacy$outboundSchema` instead. */ + export const outboundSchema = IndexerPrivacy$outboundSchema; +} diff --git a/src/models/indexerproxyresource.ts b/src/models/indexerproxyresource.ts new file mode 100644 index 0000000..499f533 --- /dev/null +++ b/src/models/indexerproxyresource.ts @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type IndexerProxyResource = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + link?: string | null | undefined; + onHealthIssue?: boolean | undefined; + supportsOnHealthIssue?: boolean | undefined; + includeHealthWarnings?: boolean | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const IndexerProxyResource$inboundSchema: z.ZodType< + IndexerProxyResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => IndexerProxyResource$inboundSchema))) + .optional(), + link: z.nullable(z.string()).optional(), + onHealthIssue: z.boolean().optional(), + supportsOnHealthIssue: z.boolean().optional(), + includeHealthWarnings: z.boolean().optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type IndexerProxyResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + link?: string | null | undefined; + onHealthIssue?: boolean | undefined; + supportsOnHealthIssue?: boolean | undefined; + includeHealthWarnings?: boolean | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const IndexerProxyResource$outboundSchema: z.ZodType< + IndexerProxyResource$Outbound, + z.ZodTypeDef, + IndexerProxyResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable( + z.array(z.lazy(() => IndexerProxyResource$outboundSchema)), + ).optional(), + link: z.nullable(z.string()).optional(), + onHealthIssue: z.boolean().optional(), + supportsOnHealthIssue: z.boolean().optional(), + includeHealthWarnings: z.boolean().optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerProxyResource$ { + /** @deprecated use `IndexerProxyResource$inboundSchema` instead. */ + export const inboundSchema = IndexerProxyResource$inboundSchema; + /** @deprecated use `IndexerProxyResource$outboundSchema` instead. */ + export const outboundSchema = IndexerProxyResource$outboundSchema; + /** @deprecated use `IndexerProxyResource$Outbound` instead. */ + export type Outbound = IndexerProxyResource$Outbound; +} + +export function indexerProxyResourceToJSON( + indexerProxyResource: IndexerProxyResource, +): string { + return JSON.stringify( + IndexerProxyResource$outboundSchema.parse(indexerProxyResource), + ); +} + +export function indexerProxyResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerProxyResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerProxyResource' from JSON`, + ); +} diff --git a/src/models/indexerresource.ts b/src/models/indexerresource.ts new file mode 100644 index 0000000..8120650 --- /dev/null +++ b/src/models/indexerresource.ts @@ -0,0 +1,221 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + DownloadProtocol, + DownloadProtocol$inboundSchema, + DownloadProtocol$outboundSchema, +} from "./downloadprotocol.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + IndexerCapabilityResource, + IndexerCapabilityResource$inboundSchema, + IndexerCapabilityResource$Outbound, + IndexerCapabilityResource$outboundSchema, +} from "./indexercapabilityresource.js"; +import { + IndexerPrivacy, + IndexerPrivacy$inboundSchema, + IndexerPrivacy$outboundSchema, +} from "./indexerprivacy.js"; +import { + IndexerStatusResource, + IndexerStatusResource$inboundSchema, + IndexerStatusResource$Outbound, + IndexerStatusResource$outboundSchema, +} from "./indexerstatusresource.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type IndexerResource = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + indexerUrls?: Array | null | undefined; + legacyUrls?: Array | null | undefined; + definitionName?: string | null | undefined; + description?: string | null | undefined; + language?: string | null | undefined; + encoding?: string | null | undefined; + enable?: boolean | undefined; + redirect?: boolean | undefined; + supportsRss?: boolean | undefined; + supportsSearch?: boolean | undefined; + supportsRedirect?: boolean | undefined; + supportsPagination?: boolean | undefined; + appProfileId?: number | undefined; + protocol?: DownloadProtocol | undefined; + privacy?: IndexerPrivacy | undefined; + capabilities?: IndexerCapabilityResource | undefined; + priority?: number | undefined; + downloadClientId?: number | undefined; + added?: Date | undefined; + status?: IndexerStatusResource | undefined; + sortName?: string | null | undefined; +}; + +/** @internal */ +export const IndexerResource$inboundSchema: z.ZodType< + IndexerResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => IndexerResource$inboundSchema))) + .optional(), + indexerUrls: z.nullable(z.array(z.string())).optional(), + legacyUrls: z.nullable(z.array(z.string())).optional(), + definitionName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + language: z.nullable(z.string()).optional(), + encoding: z.nullable(z.string()).optional(), + enable: z.boolean().optional(), + redirect: z.boolean().optional(), + supportsRss: z.boolean().optional(), + supportsSearch: z.boolean().optional(), + supportsRedirect: z.boolean().optional(), + supportsPagination: z.boolean().optional(), + appProfileId: z.number().int().optional(), + protocol: DownloadProtocol$inboundSchema.optional(), + privacy: IndexerPrivacy$inboundSchema.optional(), + capabilities: IndexerCapabilityResource$inboundSchema.optional(), + priority: z.number().int().optional(), + downloadClientId: z.number().int().optional(), + added: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + status: IndexerStatusResource$inboundSchema.optional(), + sortName: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type IndexerResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + indexerUrls?: Array | null | undefined; + legacyUrls?: Array | null | undefined; + definitionName?: string | null | undefined; + description?: string | null | undefined; + language?: string | null | undefined; + encoding?: string | null | undefined; + enable?: boolean | undefined; + redirect?: boolean | undefined; + supportsRss?: boolean | undefined; + supportsSearch?: boolean | undefined; + supportsRedirect?: boolean | undefined; + supportsPagination?: boolean | undefined; + appProfileId?: number | undefined; + protocol?: string | undefined; + privacy?: string | undefined; + capabilities?: IndexerCapabilityResource$Outbound | undefined; + priority?: number | undefined; + downloadClientId?: number | undefined; + added?: string | undefined; + status?: IndexerStatusResource$Outbound | undefined; + sortName?: string | null | undefined; +}; + +/** @internal */ +export const IndexerResource$outboundSchema: z.ZodType< + IndexerResource$Outbound, + z.ZodTypeDef, + IndexerResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => IndexerResource$outboundSchema))) + .optional(), + indexerUrls: z.nullable(z.array(z.string())).optional(), + legacyUrls: z.nullable(z.array(z.string())).optional(), + definitionName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + language: z.nullable(z.string()).optional(), + encoding: z.nullable(z.string()).optional(), + enable: z.boolean().optional(), + redirect: z.boolean().optional(), + supportsRss: z.boolean().optional(), + supportsSearch: z.boolean().optional(), + supportsRedirect: z.boolean().optional(), + supportsPagination: z.boolean().optional(), + appProfileId: z.number().int().optional(), + protocol: DownloadProtocol$outboundSchema.optional(), + privacy: IndexerPrivacy$outboundSchema.optional(), + capabilities: IndexerCapabilityResource$outboundSchema.optional(), + priority: z.number().int().optional(), + downloadClientId: z.number().int().optional(), + added: z.date().transform(v => v.toISOString()).optional(), + status: IndexerStatusResource$outboundSchema.optional(), + sortName: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerResource$ { + /** @deprecated use `IndexerResource$inboundSchema` instead. */ + export const inboundSchema = IndexerResource$inboundSchema; + /** @deprecated use `IndexerResource$outboundSchema` instead. */ + export const outboundSchema = IndexerResource$outboundSchema; + /** @deprecated use `IndexerResource$Outbound` instead. */ + export type Outbound = IndexerResource$Outbound; +} + +export function indexerResourceToJSON( + indexerResource: IndexerResource, +): string { + return JSON.stringify(IndexerResource$outboundSchema.parse(indexerResource)); +} + +export function indexerResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerResource' from JSON`, + ); +} diff --git a/src/models/indexerresourceinput.ts b/src/models/indexerresourceinput.ts new file mode 100644 index 0000000..faaf30f --- /dev/null +++ b/src/models/indexerresourceinput.ts @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + DownloadProtocol, + DownloadProtocol$inboundSchema, + DownloadProtocol$outboundSchema, +} from "./downloadprotocol.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + IndexerCapabilityResourceInput, + IndexerCapabilityResourceInput$inboundSchema, + IndexerCapabilityResourceInput$Outbound, + IndexerCapabilityResourceInput$outboundSchema, +} from "./indexercapabilityresourceinput.js"; +import { + IndexerPrivacy, + IndexerPrivacy$inboundSchema, + IndexerPrivacy$outboundSchema, +} from "./indexerprivacy.js"; +import { + IndexerStatusResource, + IndexerStatusResource$inboundSchema, + IndexerStatusResource$Outbound, + IndexerStatusResource$outboundSchema, +} from "./indexerstatusresource.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type IndexerResourceInput = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + indexerUrls?: Array | null | undefined; + legacyUrls?: Array | null | undefined; + definitionName?: string | null | undefined; + description?: string | null | undefined; + language?: string | null | undefined; + encoding?: string | null | undefined; + enable?: boolean | undefined; + redirect?: boolean | undefined; + supportsRss?: boolean | undefined; + supportsSearch?: boolean | undefined; + supportsRedirect?: boolean | undefined; + supportsPagination?: boolean | undefined; + appProfileId?: number | undefined; + protocol?: DownloadProtocol | undefined; + privacy?: IndexerPrivacy | undefined; + capabilities?: IndexerCapabilityResourceInput | undefined; + priority?: number | undefined; + downloadClientId?: number | undefined; + added?: Date | undefined; + status?: IndexerStatusResource | undefined; + sortName?: string | null | undefined; +}; + +/** @internal */ +export const IndexerResourceInput$inboundSchema: z.ZodType< + IndexerResourceInput, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => IndexerResourceInput$inboundSchema))) + .optional(), + indexerUrls: z.nullable(z.array(z.string())).optional(), + legacyUrls: z.nullable(z.array(z.string())).optional(), + definitionName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + language: z.nullable(z.string()).optional(), + encoding: z.nullable(z.string()).optional(), + enable: z.boolean().optional(), + redirect: z.boolean().optional(), + supportsRss: z.boolean().optional(), + supportsSearch: z.boolean().optional(), + supportsRedirect: z.boolean().optional(), + supportsPagination: z.boolean().optional(), + appProfileId: z.number().int().optional(), + protocol: DownloadProtocol$inboundSchema.optional(), + privacy: IndexerPrivacy$inboundSchema.optional(), + capabilities: IndexerCapabilityResourceInput$inboundSchema.optional(), + priority: z.number().int().optional(), + downloadClientId: z.number().int().optional(), + added: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + status: IndexerStatusResource$inboundSchema.optional(), + sortName: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type IndexerResourceInput$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + indexerUrls?: Array | null | undefined; + legacyUrls?: Array | null | undefined; + definitionName?: string | null | undefined; + description?: string | null | undefined; + language?: string | null | undefined; + encoding?: string | null | undefined; + enable?: boolean | undefined; + redirect?: boolean | undefined; + supportsRss?: boolean | undefined; + supportsSearch?: boolean | undefined; + supportsRedirect?: boolean | undefined; + supportsPagination?: boolean | undefined; + appProfileId?: number | undefined; + protocol?: string | undefined; + privacy?: string | undefined; + capabilities?: IndexerCapabilityResourceInput$Outbound | undefined; + priority?: number | undefined; + downloadClientId?: number | undefined; + added?: string | undefined; + status?: IndexerStatusResource$Outbound | undefined; + sortName?: string | null | undefined; +}; + +/** @internal */ +export const IndexerResourceInput$outboundSchema: z.ZodType< + IndexerResourceInput$Outbound, + z.ZodTypeDef, + IndexerResourceInput +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable( + z.array(z.lazy(() => IndexerResourceInput$outboundSchema)), + ).optional(), + indexerUrls: z.nullable(z.array(z.string())).optional(), + legacyUrls: z.nullable(z.array(z.string())).optional(), + definitionName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + language: z.nullable(z.string()).optional(), + encoding: z.nullable(z.string()).optional(), + enable: z.boolean().optional(), + redirect: z.boolean().optional(), + supportsRss: z.boolean().optional(), + supportsSearch: z.boolean().optional(), + supportsRedirect: z.boolean().optional(), + supportsPagination: z.boolean().optional(), + appProfileId: z.number().int().optional(), + protocol: DownloadProtocol$outboundSchema.optional(), + privacy: IndexerPrivacy$outboundSchema.optional(), + capabilities: IndexerCapabilityResourceInput$outboundSchema.optional(), + priority: z.number().int().optional(), + downloadClientId: z.number().int().optional(), + added: z.date().transform(v => v.toISOString()).optional(), + status: IndexerStatusResource$outboundSchema.optional(), + sortName: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerResourceInput$ { + /** @deprecated use `IndexerResourceInput$inboundSchema` instead. */ + export const inboundSchema = IndexerResourceInput$inboundSchema; + /** @deprecated use `IndexerResourceInput$outboundSchema` instead. */ + export const outboundSchema = IndexerResourceInput$outboundSchema; + /** @deprecated use `IndexerResourceInput$Outbound` instead. */ + export type Outbound = IndexerResourceInput$Outbound; +} + +export function indexerResourceInputToJSON( + indexerResourceInput: IndexerResourceInput, +): string { + return JSON.stringify( + IndexerResourceInput$outboundSchema.parse(indexerResourceInput), + ); +} + +export function indexerResourceInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerResourceInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerResourceInput' from JSON`, + ); +} diff --git a/src/models/indexerstatistics.ts b/src/models/indexerstatistics.ts new file mode 100644 index 0000000..5474a23 --- /dev/null +++ b/src/models/indexerstatistics.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type IndexerStatistics = { + indexerId?: number | undefined; + indexerName?: string | null | undefined; + averageResponseTime?: number | undefined; + averageGrabResponseTime?: number | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; + numberOfRssQueries?: number | undefined; + numberOfAuthQueries?: number | undefined; + numberOfFailedQueries?: number | undefined; + numberOfFailedGrabs?: number | undefined; + numberOfFailedRssQueries?: number | undefined; + numberOfFailedAuthQueries?: number | undefined; +}; + +/** @internal */ +export const IndexerStatistics$inboundSchema: z.ZodType< + IndexerStatistics, + z.ZodTypeDef, + unknown +> = z.object({ + indexerId: z.number().int().optional(), + indexerName: z.nullable(z.string()).optional(), + averageResponseTime: z.number().int().optional(), + averageGrabResponseTime: z.number().int().optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), + numberOfRssQueries: z.number().int().optional(), + numberOfAuthQueries: z.number().int().optional(), + numberOfFailedQueries: z.number().int().optional(), + numberOfFailedGrabs: z.number().int().optional(), + numberOfFailedRssQueries: z.number().int().optional(), + numberOfFailedAuthQueries: z.number().int().optional(), +}); + +/** @internal */ +export type IndexerStatistics$Outbound = { + indexerId?: number | undefined; + indexerName?: string | null | undefined; + averageResponseTime?: number | undefined; + averageGrabResponseTime?: number | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; + numberOfRssQueries?: number | undefined; + numberOfAuthQueries?: number | undefined; + numberOfFailedQueries?: number | undefined; + numberOfFailedGrabs?: number | undefined; + numberOfFailedRssQueries?: number | undefined; + numberOfFailedAuthQueries?: number | undefined; +}; + +/** @internal */ +export const IndexerStatistics$outboundSchema: z.ZodType< + IndexerStatistics$Outbound, + z.ZodTypeDef, + IndexerStatistics +> = z.object({ + indexerId: z.number().int().optional(), + indexerName: z.nullable(z.string()).optional(), + averageResponseTime: z.number().int().optional(), + averageGrabResponseTime: z.number().int().optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), + numberOfRssQueries: z.number().int().optional(), + numberOfAuthQueries: z.number().int().optional(), + numberOfFailedQueries: z.number().int().optional(), + numberOfFailedGrabs: z.number().int().optional(), + numberOfFailedRssQueries: z.number().int().optional(), + numberOfFailedAuthQueries: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerStatistics$ { + /** @deprecated use `IndexerStatistics$inboundSchema` instead. */ + export const inboundSchema = IndexerStatistics$inboundSchema; + /** @deprecated use `IndexerStatistics$outboundSchema` instead. */ + export const outboundSchema = IndexerStatistics$outboundSchema; + /** @deprecated use `IndexerStatistics$Outbound` instead. */ + export type Outbound = IndexerStatistics$Outbound; +} + +export function indexerStatisticsToJSON( + indexerStatistics: IndexerStatistics, +): string { + return JSON.stringify( + IndexerStatistics$outboundSchema.parse(indexerStatistics), + ); +} + +export function indexerStatisticsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerStatistics$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerStatistics' from JSON`, + ); +} diff --git a/src/models/indexerstatsresource.ts b/src/models/indexerstatsresource.ts new file mode 100644 index 0000000..86604f3 --- /dev/null +++ b/src/models/indexerstatsresource.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + HostStatistics, + HostStatistics$inboundSchema, + HostStatistics$Outbound, + HostStatistics$outboundSchema, +} from "./hoststatistics.js"; +import { + IndexerStatistics, + IndexerStatistics$inboundSchema, + IndexerStatistics$Outbound, + IndexerStatistics$outboundSchema, +} from "./indexerstatistics.js"; +import { + UserAgentStatistics, + UserAgentStatistics$inboundSchema, + UserAgentStatistics$Outbound, + UserAgentStatistics$outboundSchema, +} from "./useragentstatistics.js"; + +export type IndexerStatsResource = { + id?: number | undefined; + indexers?: Array | null | undefined; + userAgents?: Array | null | undefined; + hosts?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerStatsResource$inboundSchema: z.ZodType< + IndexerStatsResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + indexers: z.nullable(z.array(IndexerStatistics$inboundSchema)).optional(), + userAgents: z.nullable(z.array(UserAgentStatistics$inboundSchema)).optional(), + hosts: z.nullable(z.array(HostStatistics$inboundSchema)).optional(), +}); + +/** @internal */ +export type IndexerStatsResource$Outbound = { + id?: number | undefined; + indexers?: Array | null | undefined; + userAgents?: Array | null | undefined; + hosts?: Array | null | undefined; +}; + +/** @internal */ +export const IndexerStatsResource$outboundSchema: z.ZodType< + IndexerStatsResource$Outbound, + z.ZodTypeDef, + IndexerStatsResource +> = z.object({ + id: z.number().int().optional(), + indexers: z.nullable(z.array(IndexerStatistics$outboundSchema)).optional(), + userAgents: z.nullable(z.array(UserAgentStatistics$outboundSchema)) + .optional(), + hosts: z.nullable(z.array(HostStatistics$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerStatsResource$ { + /** @deprecated use `IndexerStatsResource$inboundSchema` instead. */ + export const inboundSchema = IndexerStatsResource$inboundSchema; + /** @deprecated use `IndexerStatsResource$outboundSchema` instead. */ + export const outboundSchema = IndexerStatsResource$outboundSchema; + /** @deprecated use `IndexerStatsResource$Outbound` instead. */ + export type Outbound = IndexerStatsResource$Outbound; +} + +export function indexerStatsResourceToJSON( + indexerStatsResource: IndexerStatsResource, +): string { + return JSON.stringify( + IndexerStatsResource$outboundSchema.parse(indexerStatsResource), + ); +} + +export function indexerStatsResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerStatsResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerStatsResource' from JSON`, + ); +} diff --git a/src/models/indexerstatusresource.ts b/src/models/indexerstatusresource.ts new file mode 100644 index 0000000..3a81136 --- /dev/null +++ b/src/models/indexerstatusresource.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type IndexerStatusResource = { + id?: number | undefined; + indexerId?: number | undefined; + disabledTill?: Date | null | undefined; + mostRecentFailure?: Date | null | undefined; + initialFailure?: Date | null | undefined; +}; + +/** @internal */ +export const IndexerStatusResource$inboundSchema: z.ZodType< + IndexerStatusResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + indexerId: z.number().int().optional(), + disabledTill: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + mostRecentFailure: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + initialFailure: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}); + +/** @internal */ +export type IndexerStatusResource$Outbound = { + id?: number | undefined; + indexerId?: number | undefined; + disabledTill?: string | null | undefined; + mostRecentFailure?: string | null | undefined; + initialFailure?: string | null | undefined; +}; + +/** @internal */ +export const IndexerStatusResource$outboundSchema: z.ZodType< + IndexerStatusResource$Outbound, + z.ZodTypeDef, + IndexerStatusResource +> = z.object({ + id: z.number().int().optional(), + indexerId: z.number().int().optional(), + disabledTill: z.nullable(z.date().transform(v => v.toISOString())).optional(), + mostRecentFailure: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + initialFailure: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IndexerStatusResource$ { + /** @deprecated use `IndexerStatusResource$inboundSchema` instead. */ + export const inboundSchema = IndexerStatusResource$inboundSchema; + /** @deprecated use `IndexerStatusResource$outboundSchema` instead. */ + export const outboundSchema = IndexerStatusResource$outboundSchema; + /** @deprecated use `IndexerStatusResource$Outbound` instead. */ + export type Outbound = IndexerStatusResource$Outbound; +} + +export function indexerStatusResourceToJSON( + indexerStatusResource: IndexerStatusResource, +): string { + return JSON.stringify( + IndexerStatusResource$outboundSchema.parse(indexerStatusResource), + ); +} + +export function indexerStatusResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IndexerStatusResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IndexerStatusResource' from JSON`, + ); +} diff --git a/src/models/localizationoption.ts b/src/models/localizationoption.ts new file mode 100644 index 0000000..eccf7e0 --- /dev/null +++ b/src/models/localizationoption.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type LocalizationOption = { + name?: string | null | undefined; + value?: string | null | undefined; +}; + +/** @internal */ +export const LocalizationOption$inboundSchema: z.ZodType< + LocalizationOption, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type LocalizationOption$Outbound = { + name?: string | null | undefined; + value?: string | null | undefined; +}; + +/** @internal */ +export const LocalizationOption$outboundSchema: z.ZodType< + LocalizationOption$Outbound, + z.ZodTypeDef, + LocalizationOption +> = z.object({ + name: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace LocalizationOption$ { + /** @deprecated use `LocalizationOption$inboundSchema` instead. */ + export const inboundSchema = LocalizationOption$inboundSchema; + /** @deprecated use `LocalizationOption$outboundSchema` instead. */ + export const outboundSchema = LocalizationOption$outboundSchema; + /** @deprecated use `LocalizationOption$Outbound` instead. */ + export type Outbound = LocalizationOption$Outbound; +} + +export function localizationOptionToJSON( + localizationOption: LocalizationOption, +): string { + return JSON.stringify( + LocalizationOption$outboundSchema.parse(localizationOption), + ); +} + +export function localizationOptionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => LocalizationOption$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'LocalizationOption' from JSON`, + ); +} diff --git a/src/models/logfileresource.ts b/src/models/logfileresource.ts new file mode 100644 index 0000000..04f603f --- /dev/null +++ b/src/models/logfileresource.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type LogFileResource = { + id?: number | undefined; + filename?: string | null | undefined; + lastWriteTime?: Date | undefined; + contentsUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; +}; + +/** @internal */ +export const LogFileResource$inboundSchema: z.ZodType< + LogFileResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + filename: z.nullable(z.string()).optional(), + lastWriteTime: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + contentsUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type LogFileResource$Outbound = { + id?: number | undefined; + filename?: string | null | undefined; + lastWriteTime?: string | undefined; + contentsUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; +}; + +/** @internal */ +export const LogFileResource$outboundSchema: z.ZodType< + LogFileResource$Outbound, + z.ZodTypeDef, + LogFileResource +> = z.object({ + id: z.number().int().optional(), + filename: z.nullable(z.string()).optional(), + lastWriteTime: z.date().transform(v => v.toISOString()).optional(), + contentsUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace LogFileResource$ { + /** @deprecated use `LogFileResource$inboundSchema` instead. */ + export const inboundSchema = LogFileResource$inboundSchema; + /** @deprecated use `LogFileResource$outboundSchema` instead. */ + export const outboundSchema = LogFileResource$outboundSchema; + /** @deprecated use `LogFileResource$Outbound` instead. */ + export type Outbound = LogFileResource$Outbound; +} + +export function logFileResourceToJSON( + logFileResource: LogFileResource, +): string { + return JSON.stringify(LogFileResource$outboundSchema.parse(logFileResource)); +} + +export function logFileResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => LogFileResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'LogFileResource' from JSON`, + ); +} diff --git a/src/models/logresource.ts b/src/models/logresource.ts new file mode 100644 index 0000000..01021d6 --- /dev/null +++ b/src/models/logresource.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type LogResource = { + id?: number | undefined; + time?: Date | undefined; + exception?: string | null | undefined; + exceptionType?: string | null | undefined; + level?: string | null | undefined; + logger?: string | null | undefined; + message?: string | null | undefined; + method?: string | null | undefined; +}; + +/** @internal */ +export const LogResource$inboundSchema: z.ZodType< + LogResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + time: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + exception: z.nullable(z.string()).optional(), + exceptionType: z.nullable(z.string()).optional(), + level: z.nullable(z.string()).optional(), + logger: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + method: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type LogResource$Outbound = { + id?: number | undefined; + time?: string | undefined; + exception?: string | null | undefined; + exceptionType?: string | null | undefined; + level?: string | null | undefined; + logger?: string | null | undefined; + message?: string | null | undefined; + method?: string | null | undefined; +}; + +/** @internal */ +export const LogResource$outboundSchema: z.ZodType< + LogResource$Outbound, + z.ZodTypeDef, + LogResource +> = z.object({ + id: z.number().int().optional(), + time: z.date().transform(v => v.toISOString()).optional(), + exception: z.nullable(z.string()).optional(), + exceptionType: z.nullable(z.string()).optional(), + level: z.nullable(z.string()).optional(), + logger: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + method: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace LogResource$ { + /** @deprecated use `LogResource$inboundSchema` instead. */ + export const inboundSchema = LogResource$inboundSchema; + /** @deprecated use `LogResource$outboundSchema` instead. */ + export const outboundSchema = LogResource$outboundSchema; + /** @deprecated use `LogResource$Outbound` instead. */ + export type Outbound = LogResource$Outbound; +} + +export function logResourceToJSON(logResource: LogResource): string { + return JSON.stringify(LogResource$outboundSchema.parse(logResource)); +} + +export function logResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => LogResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'LogResource' from JSON`, + ); +} diff --git a/src/models/logresourcepagingresource.ts b/src/models/logresourcepagingresource.ts new file mode 100644 index 0000000..53918cf --- /dev/null +++ b/src/models/logresourcepagingresource.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + LogResource, + LogResource$inboundSchema, + LogResource$Outbound, + LogResource$outboundSchema, +} from "./logresource.js"; +import { + SortDirection, + SortDirection$inboundSchema, + SortDirection$outboundSchema, +} from "./sortdirection.js"; + +export type LogResourcePagingResource = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | null | undefined; + sortDirection?: SortDirection | undefined; + totalRecords?: number | undefined; + records?: Array | null | undefined; +}; + +/** @internal */ +export const LogResourcePagingResource$inboundSchema: z.ZodType< + LogResourcePagingResource, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.number().int().optional(), + pageSize: z.number().int().optional(), + sortKey: z.nullable(z.string()).optional(), + sortDirection: SortDirection$inboundSchema.optional(), + totalRecords: z.number().int().optional(), + records: z.nullable(z.array(LogResource$inboundSchema)).optional(), +}); + +/** @internal */ +export type LogResourcePagingResource$Outbound = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | null | undefined; + sortDirection?: string | undefined; + totalRecords?: number | undefined; + records?: Array | null | undefined; +}; + +/** @internal */ +export const LogResourcePagingResource$outboundSchema: z.ZodType< + LogResourcePagingResource$Outbound, + z.ZodTypeDef, + LogResourcePagingResource +> = z.object({ + page: z.number().int().optional(), + pageSize: z.number().int().optional(), + sortKey: z.nullable(z.string()).optional(), + sortDirection: SortDirection$outboundSchema.optional(), + totalRecords: z.number().int().optional(), + records: z.nullable(z.array(LogResource$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace LogResourcePagingResource$ { + /** @deprecated use `LogResourcePagingResource$inboundSchema` instead. */ + export const inboundSchema = LogResourcePagingResource$inboundSchema; + /** @deprecated use `LogResourcePagingResource$outboundSchema` instead. */ + export const outboundSchema = LogResourcePagingResource$outboundSchema; + /** @deprecated use `LogResourcePagingResource$Outbound` instead. */ + export type Outbound = LogResourcePagingResource$Outbound; +} + +export function logResourcePagingResourceToJSON( + logResourcePagingResource: LogResourcePagingResource, +): string { + return JSON.stringify( + LogResourcePagingResource$outboundSchema.parse(logResourcePagingResource), + ); +} + +export function logResourcePagingResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => LogResourcePagingResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'LogResourcePagingResource' from JSON`, + ); +} diff --git a/src/models/moviesearchparam.ts b/src/models/moviesearchparam.ts new file mode 100644 index 0000000..0b2c232 --- /dev/null +++ b/src/models/moviesearchparam.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const MovieSearchParam = { + Q: "q", + ImdbId: "imdbId", + TmdbId: "tmdbId", + ImdbTitle: "imdbTitle", + ImdbYear: "imdbYear", + TraktId: "traktId", + Genre: "genre", + DoubanId: "doubanId", + Year: "year", +} as const; +export type MovieSearchParam = ClosedEnum; + +/** @internal */ +export const MovieSearchParam$inboundSchema: z.ZodNativeEnum< + typeof MovieSearchParam +> = z.nativeEnum(MovieSearchParam); + +/** @internal */ +export const MovieSearchParam$outboundSchema: z.ZodNativeEnum< + typeof MovieSearchParam +> = MovieSearchParam$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MovieSearchParam$ { + /** @deprecated use `MovieSearchParam$inboundSchema` instead. */ + export const inboundSchema = MovieSearchParam$inboundSchema; + /** @deprecated use `MovieSearchParam$outboundSchema` instead. */ + export const outboundSchema = MovieSearchParam$outboundSchema; +} diff --git a/src/models/musicsearchparam.ts b/src/models/musicsearchparam.ts new file mode 100644 index 0000000..ecc19c0 --- /dev/null +++ b/src/models/musicsearchparam.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const MusicSearchParam = { + Q: "q", + Album: "album", + Artist: "artist", + Label: "label", + Year: "year", + Genre: "genre", + Track: "track", +} as const; +export type MusicSearchParam = ClosedEnum; + +/** @internal */ +export const MusicSearchParam$inboundSchema: z.ZodNativeEnum< + typeof MusicSearchParam +> = z.nativeEnum(MusicSearchParam); + +/** @internal */ +export const MusicSearchParam$outboundSchema: z.ZodNativeEnum< + typeof MusicSearchParam +> = MusicSearchParam$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MusicSearchParam$ { + /** @deprecated use `MusicSearchParam$inboundSchema` instead. */ + export const inboundSchema = MusicSearchParam$inboundSchema; + /** @deprecated use `MusicSearchParam$outboundSchema` instead. */ + export const outboundSchema = MusicSearchParam$outboundSchema; +} diff --git a/src/models/notificationresource.ts b/src/models/notificationresource.ts new file mode 100644 index 0000000..e98c49d --- /dev/null +++ b/src/models/notificationresource.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + Field, + Field$inboundSchema, + Field$Outbound, + Field$outboundSchema, +} from "./field.js"; +import { + ProviderMessage, + ProviderMessage$inboundSchema, + ProviderMessage$Outbound, + ProviderMessage$outboundSchema, +} from "./providermessage.js"; + +export type NotificationResource = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + link?: string | null | undefined; + onGrab?: boolean | undefined; + onHealthIssue?: boolean | undefined; + onHealthRestored?: boolean | undefined; + onApplicationUpdate?: boolean | undefined; + supportsOnGrab?: boolean | undefined; + includeManualGrabs?: boolean | undefined; + supportsOnHealthIssue?: boolean | undefined; + supportsOnHealthRestored?: boolean | undefined; + includeHealthWarnings?: boolean | undefined; + supportsOnApplicationUpdate?: boolean | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const NotificationResource$inboundSchema: z.ZodType< + NotificationResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$inboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$inboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable(z.array(z.lazy(() => NotificationResource$inboundSchema))) + .optional(), + link: z.nullable(z.string()).optional(), + onGrab: z.boolean().optional(), + onHealthIssue: z.boolean().optional(), + onHealthRestored: z.boolean().optional(), + onApplicationUpdate: z.boolean().optional(), + supportsOnGrab: z.boolean().optional(), + includeManualGrabs: z.boolean().optional(), + supportsOnHealthIssue: z.boolean().optional(), + supportsOnHealthRestored: z.boolean().optional(), + includeHealthWarnings: z.boolean().optional(), + supportsOnApplicationUpdate: z.boolean().optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NotificationResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + fields?: Array | null | undefined; + implementationName?: string | null | undefined; + implementation?: string | null | undefined; + configContract?: string | null | undefined; + infoLink?: string | null | undefined; + message?: ProviderMessage$Outbound | undefined; + tags?: Array | null | undefined; + presets?: Array | null | undefined; + link?: string | null | undefined; + onGrab?: boolean | undefined; + onHealthIssue?: boolean | undefined; + onHealthRestored?: boolean | undefined; + onApplicationUpdate?: boolean | undefined; + supportsOnGrab?: boolean | undefined; + includeManualGrabs?: boolean | undefined; + supportsOnHealthIssue?: boolean | undefined; + supportsOnHealthRestored?: boolean | undefined; + includeHealthWarnings?: boolean | undefined; + supportsOnApplicationUpdate?: boolean | undefined; + testCommand?: string | null | undefined; +}; + +/** @internal */ +export const NotificationResource$outboundSchema: z.ZodType< + NotificationResource$Outbound, + z.ZodTypeDef, + NotificationResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + fields: z.nullable(z.array(Field$outboundSchema)).optional(), + implementationName: z.nullable(z.string()).optional(), + implementation: z.nullable(z.string()).optional(), + configContract: z.nullable(z.string()).optional(), + infoLink: z.nullable(z.string()).optional(), + message: ProviderMessage$outboundSchema.optional(), + tags: z.nullable(z.array(z.number().int())).optional(), + presets: z.nullable( + z.array(z.lazy(() => NotificationResource$outboundSchema)), + ).optional(), + link: z.nullable(z.string()).optional(), + onGrab: z.boolean().optional(), + onHealthIssue: z.boolean().optional(), + onHealthRestored: z.boolean().optional(), + onApplicationUpdate: z.boolean().optional(), + supportsOnGrab: z.boolean().optional(), + includeManualGrabs: z.boolean().optional(), + supportsOnHealthIssue: z.boolean().optional(), + supportsOnHealthRestored: z.boolean().optional(), + includeHealthWarnings: z.boolean().optional(), + supportsOnApplicationUpdate: z.boolean().optional(), + testCommand: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NotificationResource$ { + /** @deprecated use `NotificationResource$inboundSchema` instead. */ + export const inboundSchema = NotificationResource$inboundSchema; + /** @deprecated use `NotificationResource$outboundSchema` instead. */ + export const outboundSchema = NotificationResource$outboundSchema; + /** @deprecated use `NotificationResource$Outbound` instead. */ + export type Outbound = NotificationResource$Outbound; +} + +export function notificationResourceToJSON( + notificationResource: NotificationResource, +): string { + return JSON.stringify( + NotificationResource$outboundSchema.parse(notificationResource), + ); +} + +export function notificationResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotificationResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotificationResource' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1applicationsid.ts b/src/models/operations/deleteapiv1applicationsid.ts new file mode 100644 index 0000000..670936f --- /dev/null +++ b/src/models/operations/deleteapiv1applicationsid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1ApplicationsIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1ApplicationsIdRequest$inboundSchema: z.ZodType< + DeleteApiV1ApplicationsIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1ApplicationsIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1ApplicationsIdRequest$outboundSchema: z.ZodType< + DeleteApiV1ApplicationsIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1ApplicationsIdRequest +> = z.object({ + id: 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 DeleteApiV1ApplicationsIdRequest$ { + /** @deprecated use `DeleteApiV1ApplicationsIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1ApplicationsIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1ApplicationsIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1ApplicationsIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1ApplicationsIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1ApplicationsIdRequest$Outbound; +} + +export function deleteApiV1ApplicationsIdRequestToJSON( + deleteApiV1ApplicationsIdRequest: DeleteApiV1ApplicationsIdRequest, +): string { + return JSON.stringify( + DeleteApiV1ApplicationsIdRequest$outboundSchema.parse( + deleteApiV1ApplicationsIdRequest, + ), + ); +} + +export function deleteApiV1ApplicationsIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1ApplicationsIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1ApplicationsIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1appprofileid.ts b/src/models/operations/deleteapiv1appprofileid.ts new file mode 100644 index 0000000..7872a35 --- /dev/null +++ b/src/models/operations/deleteapiv1appprofileid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1AppprofileIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1AppprofileIdRequest$inboundSchema: z.ZodType< + DeleteApiV1AppprofileIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1AppprofileIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1AppprofileIdRequest$outboundSchema: z.ZodType< + DeleteApiV1AppprofileIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1AppprofileIdRequest +> = z.object({ + id: 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 DeleteApiV1AppprofileIdRequest$ { + /** @deprecated use `DeleteApiV1AppprofileIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1AppprofileIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1AppprofileIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1AppprofileIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1AppprofileIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1AppprofileIdRequest$Outbound; +} + +export function deleteApiV1AppprofileIdRequestToJSON( + deleteApiV1AppprofileIdRequest: DeleteApiV1AppprofileIdRequest, +): string { + return JSON.stringify( + DeleteApiV1AppprofileIdRequest$outboundSchema.parse( + deleteApiV1AppprofileIdRequest, + ), + ); +} + +export function deleteApiV1AppprofileIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1AppprofileIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1AppprofileIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1commandid.ts b/src/models/operations/deleteapiv1commandid.ts new file mode 100644 index 0000000..922d1a2 --- /dev/null +++ b/src/models/operations/deleteapiv1commandid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1CommandIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1CommandIdRequest$inboundSchema: z.ZodType< + DeleteApiV1CommandIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1CommandIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1CommandIdRequest$outboundSchema: z.ZodType< + DeleteApiV1CommandIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1CommandIdRequest +> = z.object({ + id: 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 DeleteApiV1CommandIdRequest$ { + /** @deprecated use `DeleteApiV1CommandIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1CommandIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1CommandIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1CommandIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1CommandIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1CommandIdRequest$Outbound; +} + +export function deleteApiV1CommandIdRequestToJSON( + deleteApiV1CommandIdRequest: DeleteApiV1CommandIdRequest, +): string { + return JSON.stringify( + DeleteApiV1CommandIdRequest$outboundSchema.parse( + deleteApiV1CommandIdRequest, + ), + ); +} + +export function deleteApiV1CommandIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1CommandIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1CommandIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1customfilterid.ts b/src/models/operations/deleteapiv1customfilterid.ts new file mode 100644 index 0000000..634f5e0 --- /dev/null +++ b/src/models/operations/deleteapiv1customfilterid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1CustomfilterIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1CustomfilterIdRequest$inboundSchema: z.ZodType< + DeleteApiV1CustomfilterIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1CustomfilterIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1CustomfilterIdRequest$outboundSchema: z.ZodType< + DeleteApiV1CustomfilterIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1CustomfilterIdRequest +> = z.object({ + id: 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 DeleteApiV1CustomfilterIdRequest$ { + /** @deprecated use `DeleteApiV1CustomfilterIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1CustomfilterIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1CustomfilterIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1CustomfilterIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1CustomfilterIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1CustomfilterIdRequest$Outbound; +} + +export function deleteApiV1CustomfilterIdRequestToJSON( + deleteApiV1CustomfilterIdRequest: DeleteApiV1CustomfilterIdRequest, +): string { + return JSON.stringify( + DeleteApiV1CustomfilterIdRequest$outboundSchema.parse( + deleteApiV1CustomfilterIdRequest, + ), + ); +} + +export function deleteApiV1CustomfilterIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1CustomfilterIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1CustomfilterIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1downloadclientid.ts b/src/models/operations/deleteapiv1downloadclientid.ts new file mode 100644 index 0000000..0d10915 --- /dev/null +++ b/src/models/operations/deleteapiv1downloadclientid.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1DownloadclientIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1DownloadclientIdRequest$inboundSchema: z.ZodType< + DeleteApiV1DownloadclientIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1DownloadclientIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1DownloadclientIdRequest$outboundSchema: z.ZodType< + DeleteApiV1DownloadclientIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1DownloadclientIdRequest +> = z.object({ + id: 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 DeleteApiV1DownloadclientIdRequest$ { + /** @deprecated use `DeleteApiV1DownloadclientIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1DownloadclientIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1DownloadclientIdRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteApiV1DownloadclientIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1DownloadclientIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1DownloadclientIdRequest$Outbound; +} + +export function deleteApiV1DownloadclientIdRequestToJSON( + deleteApiV1DownloadclientIdRequest: DeleteApiV1DownloadclientIdRequest, +): string { + return JSON.stringify( + DeleteApiV1DownloadclientIdRequest$outboundSchema.parse( + deleteApiV1DownloadclientIdRequest, + ), + ); +} + +export function deleteApiV1DownloadclientIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteApiV1DownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1DownloadclientIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1indexerid.ts b/src/models/operations/deleteapiv1indexerid.ts new file mode 100644 index 0000000..3974ed5 --- /dev/null +++ b/src/models/operations/deleteapiv1indexerid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1IndexerIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1IndexerIdRequest$inboundSchema: z.ZodType< + DeleteApiV1IndexerIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1IndexerIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1IndexerIdRequest$outboundSchema: z.ZodType< + DeleteApiV1IndexerIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1IndexerIdRequest +> = z.object({ + id: 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 DeleteApiV1IndexerIdRequest$ { + /** @deprecated use `DeleteApiV1IndexerIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1IndexerIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1IndexerIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1IndexerIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1IndexerIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1IndexerIdRequest$Outbound; +} + +export function deleteApiV1IndexerIdRequestToJSON( + deleteApiV1IndexerIdRequest: DeleteApiV1IndexerIdRequest, +): string { + return JSON.stringify( + DeleteApiV1IndexerIdRequest$outboundSchema.parse( + deleteApiV1IndexerIdRequest, + ), + ); +} + +export function deleteApiV1IndexerIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1IndexerIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1IndexerIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1indexerproxyid.ts b/src/models/operations/deleteapiv1indexerproxyid.ts new file mode 100644 index 0000000..67ddc95 --- /dev/null +++ b/src/models/operations/deleteapiv1indexerproxyid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1IndexerproxyIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1IndexerproxyIdRequest$inboundSchema: z.ZodType< + DeleteApiV1IndexerproxyIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1IndexerproxyIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1IndexerproxyIdRequest$outboundSchema: z.ZodType< + DeleteApiV1IndexerproxyIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1IndexerproxyIdRequest +> = z.object({ + id: 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 DeleteApiV1IndexerproxyIdRequest$ { + /** @deprecated use `DeleteApiV1IndexerproxyIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1IndexerproxyIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1IndexerproxyIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1IndexerproxyIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1IndexerproxyIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1IndexerproxyIdRequest$Outbound; +} + +export function deleteApiV1IndexerproxyIdRequestToJSON( + deleteApiV1IndexerproxyIdRequest: DeleteApiV1IndexerproxyIdRequest, +): string { + return JSON.stringify( + DeleteApiV1IndexerproxyIdRequest$outboundSchema.parse( + deleteApiV1IndexerproxyIdRequest, + ), + ); +} + +export function deleteApiV1IndexerproxyIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1IndexerproxyIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1IndexerproxyIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1notificationid.ts b/src/models/operations/deleteapiv1notificationid.ts new file mode 100644 index 0000000..fbccb51 --- /dev/null +++ b/src/models/operations/deleteapiv1notificationid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1NotificationIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1NotificationIdRequest$inboundSchema: z.ZodType< + DeleteApiV1NotificationIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1NotificationIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1NotificationIdRequest$outboundSchema: z.ZodType< + DeleteApiV1NotificationIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1NotificationIdRequest +> = z.object({ + id: 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 DeleteApiV1NotificationIdRequest$ { + /** @deprecated use `DeleteApiV1NotificationIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1NotificationIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1NotificationIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1NotificationIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1NotificationIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1NotificationIdRequest$Outbound; +} + +export function deleteApiV1NotificationIdRequestToJSON( + deleteApiV1NotificationIdRequest: DeleteApiV1NotificationIdRequest, +): string { + return JSON.stringify( + DeleteApiV1NotificationIdRequest$outboundSchema.parse( + deleteApiV1NotificationIdRequest, + ), + ); +} + +export function deleteApiV1NotificationIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1NotificationIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1NotificationIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1systembackupid.ts b/src/models/operations/deleteapiv1systembackupid.ts new file mode 100644 index 0000000..a409fc8 --- /dev/null +++ b/src/models/operations/deleteapiv1systembackupid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1SystemBackupIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1SystemBackupIdRequest$inboundSchema: z.ZodType< + DeleteApiV1SystemBackupIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1SystemBackupIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1SystemBackupIdRequest$outboundSchema: z.ZodType< + DeleteApiV1SystemBackupIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1SystemBackupIdRequest +> = z.object({ + id: 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 DeleteApiV1SystemBackupIdRequest$ { + /** @deprecated use `DeleteApiV1SystemBackupIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1SystemBackupIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1SystemBackupIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1SystemBackupIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1SystemBackupIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1SystemBackupIdRequest$Outbound; +} + +export function deleteApiV1SystemBackupIdRequestToJSON( + deleteApiV1SystemBackupIdRequest: DeleteApiV1SystemBackupIdRequest, +): string { + return JSON.stringify( + DeleteApiV1SystemBackupIdRequest$outboundSchema.parse( + deleteApiV1SystemBackupIdRequest, + ), + ); +} + +export function deleteApiV1SystemBackupIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1SystemBackupIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1SystemBackupIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteapiv1tagid.ts b/src/models/operations/deleteapiv1tagid.ts new file mode 100644 index 0000000..5ad2f30 --- /dev/null +++ b/src/models/operations/deleteapiv1tagid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteApiV1TagIdRequest = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1TagIdRequest$inboundSchema: z.ZodType< + DeleteApiV1TagIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type DeleteApiV1TagIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const DeleteApiV1TagIdRequest$outboundSchema: z.ZodType< + DeleteApiV1TagIdRequest$Outbound, + z.ZodTypeDef, + DeleteApiV1TagIdRequest +> = z.object({ + id: 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 DeleteApiV1TagIdRequest$ { + /** @deprecated use `DeleteApiV1TagIdRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteApiV1TagIdRequest$inboundSchema; + /** @deprecated use `DeleteApiV1TagIdRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteApiV1TagIdRequest$outboundSchema; + /** @deprecated use `DeleteApiV1TagIdRequest$Outbound` instead. */ + export type Outbound = DeleteApiV1TagIdRequest$Outbound; +} + +export function deleteApiV1TagIdRequestToJSON( + deleteApiV1TagIdRequest: DeleteApiV1TagIdRequest, +): string { + return JSON.stringify( + DeleteApiV1TagIdRequest$outboundSchema.parse(deleteApiV1TagIdRequest), + ); +} + +export function deleteApiV1TagIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteApiV1TagIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteApiV1TagIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1applicationsid.ts b/src/models/operations/getapiv1applicationsid.ts new file mode 100644 index 0000000..dfd76ff --- /dev/null +++ b/src/models/operations/getapiv1applicationsid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1ApplicationsIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1ApplicationsIdRequest$inboundSchema: z.ZodType< + GetApiV1ApplicationsIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1ApplicationsIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1ApplicationsIdRequest$outboundSchema: z.ZodType< + GetApiV1ApplicationsIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1ApplicationsIdRequest +> = z.object({ + id: 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 GetApiV1ApplicationsIdRequest$ { + /** @deprecated use `GetApiV1ApplicationsIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1ApplicationsIdRequest$inboundSchema; + /** @deprecated use `GetApiV1ApplicationsIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1ApplicationsIdRequest$outboundSchema; + /** @deprecated use `GetApiV1ApplicationsIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1ApplicationsIdRequest$Outbound; +} + +export function getApiV1ApplicationsIdRequestToJSON( + getApiV1ApplicationsIdRequest: GetApiV1ApplicationsIdRequest, +): string { + return JSON.stringify( + GetApiV1ApplicationsIdRequest$outboundSchema.parse( + getApiV1ApplicationsIdRequest, + ), + ); +} + +export function getApiV1ApplicationsIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1ApplicationsIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1ApplicationsIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1appprofileid.ts b/src/models/operations/getapiv1appprofileid.ts new file mode 100644 index 0000000..8ca9658 --- /dev/null +++ b/src/models/operations/getapiv1appprofileid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1AppprofileIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1AppprofileIdRequest$inboundSchema: z.ZodType< + GetApiV1AppprofileIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1AppprofileIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1AppprofileIdRequest$outboundSchema: z.ZodType< + GetApiV1AppprofileIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1AppprofileIdRequest +> = z.object({ + id: 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 GetApiV1AppprofileIdRequest$ { + /** @deprecated use `GetApiV1AppprofileIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1AppprofileIdRequest$inboundSchema; + /** @deprecated use `GetApiV1AppprofileIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1AppprofileIdRequest$outboundSchema; + /** @deprecated use `GetApiV1AppprofileIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1AppprofileIdRequest$Outbound; +} + +export function getApiV1AppprofileIdRequestToJSON( + getApiV1AppprofileIdRequest: GetApiV1AppprofileIdRequest, +): string { + return JSON.stringify( + GetApiV1AppprofileIdRequest$outboundSchema.parse( + getApiV1AppprofileIdRequest, + ), + ); +} + +export function getApiV1AppprofileIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1AppprofileIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1AppprofileIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1commandid.ts b/src/models/operations/getapiv1commandid.ts new file mode 100644 index 0000000..81e9486 --- /dev/null +++ b/src/models/operations/getapiv1commandid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1CommandIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1CommandIdRequest$inboundSchema: z.ZodType< + GetApiV1CommandIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1CommandIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1CommandIdRequest$outboundSchema: z.ZodType< + GetApiV1CommandIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1CommandIdRequest +> = z.object({ + id: 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 GetApiV1CommandIdRequest$ { + /** @deprecated use `GetApiV1CommandIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1CommandIdRequest$inboundSchema; + /** @deprecated use `GetApiV1CommandIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1CommandIdRequest$outboundSchema; + /** @deprecated use `GetApiV1CommandIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1CommandIdRequest$Outbound; +} + +export function getApiV1CommandIdRequestToJSON( + getApiV1CommandIdRequest: GetApiV1CommandIdRequest, +): string { + return JSON.stringify( + GetApiV1CommandIdRequest$outboundSchema.parse(getApiV1CommandIdRequest), + ); +} + +export function getApiV1CommandIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1CommandIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1CommandIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1configdevelopmentid.ts b/src/models/operations/getapiv1configdevelopmentid.ts new file mode 100644 index 0000000..264055d --- /dev/null +++ b/src/models/operations/getapiv1configdevelopmentid.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1ConfigDevelopmentIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigDevelopmentIdRequest$inboundSchema: z.ZodType< + GetApiV1ConfigDevelopmentIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1ConfigDevelopmentIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigDevelopmentIdRequest$outboundSchema: z.ZodType< + GetApiV1ConfigDevelopmentIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1ConfigDevelopmentIdRequest +> = z.object({ + id: 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 GetApiV1ConfigDevelopmentIdRequest$ { + /** @deprecated use `GetApiV1ConfigDevelopmentIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1ConfigDevelopmentIdRequest$inboundSchema; + /** @deprecated use `GetApiV1ConfigDevelopmentIdRequest$outboundSchema` instead. */ + export const outboundSchema = + GetApiV1ConfigDevelopmentIdRequest$outboundSchema; + /** @deprecated use `GetApiV1ConfigDevelopmentIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1ConfigDevelopmentIdRequest$Outbound; +} + +export function getApiV1ConfigDevelopmentIdRequestToJSON( + getApiV1ConfigDevelopmentIdRequest: GetApiV1ConfigDevelopmentIdRequest, +): string { + return JSON.stringify( + GetApiV1ConfigDevelopmentIdRequest$outboundSchema.parse( + getApiV1ConfigDevelopmentIdRequest, + ), + ); +} + +export function getApiV1ConfigDevelopmentIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetApiV1ConfigDevelopmentIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1ConfigDevelopmentIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1configdownloadclientid.ts b/src/models/operations/getapiv1configdownloadclientid.ts new file mode 100644 index 0000000..a6386df --- /dev/null +++ b/src/models/operations/getapiv1configdownloadclientid.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1ConfigDownloadclientIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigDownloadclientIdRequest$inboundSchema: z.ZodType< + GetApiV1ConfigDownloadclientIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1ConfigDownloadclientIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigDownloadclientIdRequest$outboundSchema: z.ZodType< + GetApiV1ConfigDownloadclientIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1ConfigDownloadclientIdRequest +> = z.object({ + id: 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 GetApiV1ConfigDownloadclientIdRequest$ { + /** @deprecated use `GetApiV1ConfigDownloadclientIdRequest$inboundSchema` instead. */ + export const inboundSchema = + GetApiV1ConfigDownloadclientIdRequest$inboundSchema; + /** @deprecated use `GetApiV1ConfigDownloadclientIdRequest$outboundSchema` instead. */ + export const outboundSchema = + GetApiV1ConfigDownloadclientIdRequest$outboundSchema; + /** @deprecated use `GetApiV1ConfigDownloadclientIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1ConfigDownloadclientIdRequest$Outbound; +} + +export function getApiV1ConfigDownloadclientIdRequestToJSON( + getApiV1ConfigDownloadclientIdRequest: GetApiV1ConfigDownloadclientIdRequest, +): string { + return JSON.stringify( + GetApiV1ConfigDownloadclientIdRequest$outboundSchema.parse( + getApiV1ConfigDownloadclientIdRequest, + ), + ); +} + +export function getApiV1ConfigDownloadclientIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetApiV1ConfigDownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1ConfigDownloadclientIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1confighostid.ts b/src/models/operations/getapiv1confighostid.ts new file mode 100644 index 0000000..3735ff2 --- /dev/null +++ b/src/models/operations/getapiv1confighostid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1ConfigHostIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigHostIdRequest$inboundSchema: z.ZodType< + GetApiV1ConfigHostIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1ConfigHostIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigHostIdRequest$outboundSchema: z.ZodType< + GetApiV1ConfigHostIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1ConfigHostIdRequest +> = z.object({ + id: 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 GetApiV1ConfigHostIdRequest$ { + /** @deprecated use `GetApiV1ConfigHostIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1ConfigHostIdRequest$inboundSchema; + /** @deprecated use `GetApiV1ConfigHostIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1ConfigHostIdRequest$outboundSchema; + /** @deprecated use `GetApiV1ConfigHostIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1ConfigHostIdRequest$Outbound; +} + +export function getApiV1ConfigHostIdRequestToJSON( + getApiV1ConfigHostIdRequest: GetApiV1ConfigHostIdRequest, +): string { + return JSON.stringify( + GetApiV1ConfigHostIdRequest$outboundSchema.parse( + getApiV1ConfigHostIdRequest, + ), + ); +} + +export function getApiV1ConfigHostIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1ConfigHostIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1ConfigHostIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1configuiid.ts b/src/models/operations/getapiv1configuiid.ts new file mode 100644 index 0000000..7f41ec4 --- /dev/null +++ b/src/models/operations/getapiv1configuiid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1ConfigUiIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigUiIdRequest$inboundSchema: z.ZodType< + GetApiV1ConfigUiIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1ConfigUiIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1ConfigUiIdRequest$outboundSchema: z.ZodType< + GetApiV1ConfigUiIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1ConfigUiIdRequest +> = z.object({ + id: 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 GetApiV1ConfigUiIdRequest$ { + /** @deprecated use `GetApiV1ConfigUiIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1ConfigUiIdRequest$inboundSchema; + /** @deprecated use `GetApiV1ConfigUiIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1ConfigUiIdRequest$outboundSchema; + /** @deprecated use `GetApiV1ConfigUiIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1ConfigUiIdRequest$Outbound; +} + +export function getApiV1ConfigUiIdRequestToJSON( + getApiV1ConfigUiIdRequest: GetApiV1ConfigUiIdRequest, +): string { + return JSON.stringify( + GetApiV1ConfigUiIdRequest$outboundSchema.parse(getApiV1ConfigUiIdRequest), + ); +} + +export function getApiV1ConfigUiIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1ConfigUiIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1ConfigUiIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1customfilterid.ts b/src/models/operations/getapiv1customfilterid.ts new file mode 100644 index 0000000..a69f836 --- /dev/null +++ b/src/models/operations/getapiv1customfilterid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1CustomfilterIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1CustomfilterIdRequest$inboundSchema: z.ZodType< + GetApiV1CustomfilterIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1CustomfilterIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1CustomfilterIdRequest$outboundSchema: z.ZodType< + GetApiV1CustomfilterIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1CustomfilterIdRequest +> = z.object({ + id: 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 GetApiV1CustomfilterIdRequest$ { + /** @deprecated use `GetApiV1CustomfilterIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1CustomfilterIdRequest$inboundSchema; + /** @deprecated use `GetApiV1CustomfilterIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1CustomfilterIdRequest$outboundSchema; + /** @deprecated use `GetApiV1CustomfilterIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1CustomfilterIdRequest$Outbound; +} + +export function getApiV1CustomfilterIdRequestToJSON( + getApiV1CustomfilterIdRequest: GetApiV1CustomfilterIdRequest, +): string { + return JSON.stringify( + GetApiV1CustomfilterIdRequest$outboundSchema.parse( + getApiV1CustomfilterIdRequest, + ), + ); +} + +export function getApiV1CustomfilterIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1CustomfilterIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1CustomfilterIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1downloadclientid.ts b/src/models/operations/getapiv1downloadclientid.ts new file mode 100644 index 0000000..dfc1aff --- /dev/null +++ b/src/models/operations/getapiv1downloadclientid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1DownloadclientIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1DownloadclientIdRequest$inboundSchema: z.ZodType< + GetApiV1DownloadclientIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1DownloadclientIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1DownloadclientIdRequest$outboundSchema: z.ZodType< + GetApiV1DownloadclientIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1DownloadclientIdRequest +> = z.object({ + id: 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 GetApiV1DownloadclientIdRequest$ { + /** @deprecated use `GetApiV1DownloadclientIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1DownloadclientIdRequest$inboundSchema; + /** @deprecated use `GetApiV1DownloadclientIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1DownloadclientIdRequest$outboundSchema; + /** @deprecated use `GetApiV1DownloadclientIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1DownloadclientIdRequest$Outbound; +} + +export function getApiV1DownloadclientIdRequestToJSON( + getApiV1DownloadclientIdRequest: GetApiV1DownloadclientIdRequest, +): string { + return JSON.stringify( + GetApiV1DownloadclientIdRequest$outboundSchema.parse( + getApiV1DownloadclientIdRequest, + ), + ); +} + +export function getApiV1DownloadclientIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1DownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1DownloadclientIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1filesystem.ts b/src/models/operations/getapiv1filesystem.ts new file mode 100644 index 0000000..d3ca839 --- /dev/null +++ b/src/models/operations/getapiv1filesystem.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1FilesystemRequest = { + path?: string | undefined; + includeFiles?: boolean | undefined; + allowFoldersWithoutTrailingSlashes?: boolean | undefined; +}; + +/** @internal */ +export const GetApiV1FilesystemRequest$inboundSchema: z.ZodType< + GetApiV1FilesystemRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string().optional(), + includeFiles: z.boolean().default(false), + allowFoldersWithoutTrailingSlashes: z.boolean().default(false), +}); + +/** @internal */ +export type GetApiV1FilesystemRequest$Outbound = { + path?: string | undefined; + includeFiles: boolean; + allowFoldersWithoutTrailingSlashes: boolean; +}; + +/** @internal */ +export const GetApiV1FilesystemRequest$outboundSchema: z.ZodType< + GetApiV1FilesystemRequest$Outbound, + z.ZodTypeDef, + GetApiV1FilesystemRequest +> = z.object({ + path: z.string().optional(), + includeFiles: z.boolean().default(false), + allowFoldersWithoutTrailingSlashes: z.boolean().default(false), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1FilesystemRequest$ { + /** @deprecated use `GetApiV1FilesystemRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1FilesystemRequest$inboundSchema; + /** @deprecated use `GetApiV1FilesystemRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1FilesystemRequest$outboundSchema; + /** @deprecated use `GetApiV1FilesystemRequest$Outbound` instead. */ + export type Outbound = GetApiV1FilesystemRequest$Outbound; +} + +export function getApiV1FilesystemRequestToJSON( + getApiV1FilesystemRequest: GetApiV1FilesystemRequest, +): string { + return JSON.stringify( + GetApiV1FilesystemRequest$outboundSchema.parse(getApiV1FilesystemRequest), + ); +} + +export function getApiV1FilesystemRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1FilesystemRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1FilesystemRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1filesystemtype.ts b/src/models/operations/getapiv1filesystemtype.ts new file mode 100644 index 0000000..aee7d1d --- /dev/null +++ b/src/models/operations/getapiv1filesystemtype.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1FilesystemTypeRequest = { + path?: string | undefined; +}; + +/** @internal */ +export const GetApiV1FilesystemTypeRequest$inboundSchema: z.ZodType< + GetApiV1FilesystemTypeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string().optional(), +}); + +/** @internal */ +export type GetApiV1FilesystemTypeRequest$Outbound = { + path?: string | undefined; +}; + +/** @internal */ +export const GetApiV1FilesystemTypeRequest$outboundSchema: z.ZodType< + GetApiV1FilesystemTypeRequest$Outbound, + z.ZodTypeDef, + GetApiV1FilesystemTypeRequest +> = z.object({ + path: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1FilesystemTypeRequest$ { + /** @deprecated use `GetApiV1FilesystemTypeRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1FilesystemTypeRequest$inboundSchema; + /** @deprecated use `GetApiV1FilesystemTypeRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1FilesystemTypeRequest$outboundSchema; + /** @deprecated use `GetApiV1FilesystemTypeRequest$Outbound` instead. */ + export type Outbound = GetApiV1FilesystemTypeRequest$Outbound; +} + +export function getApiV1FilesystemTypeRequestToJSON( + getApiV1FilesystemTypeRequest: GetApiV1FilesystemTypeRequest, +): string { + return JSON.stringify( + GetApiV1FilesystemTypeRequest$outboundSchema.parse( + getApiV1FilesystemTypeRequest, + ), + ); +} + +export function getApiV1FilesystemTypeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1FilesystemTypeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1FilesystemTypeRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1history.ts b/src/models/operations/getapiv1history.ts new file mode 100644 index 0000000..6f6b551 --- /dev/null +++ b/src/models/operations/getapiv1history.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type GetApiV1HistoryRequest = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | undefined; + sortDirection?: models.SortDirection | undefined; + eventType?: Array | undefined; + successful?: boolean | undefined; + downloadId?: string | undefined; + indexerIds?: Array | undefined; +}; + +/** @internal */ +export const GetApiV1HistoryRequest$inboundSchema: z.ZodType< + GetApiV1HistoryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.number().int().default(1), + pageSize: z.number().int().default(10), + sortKey: z.string().optional(), + sortDirection: models.SortDirection$inboundSchema.optional(), + eventType: z.array(z.number().int()).optional(), + successful: z.boolean().optional(), + downloadId: z.string().optional(), + indexerIds: z.array(z.number().int()).optional(), +}); + +/** @internal */ +export type GetApiV1HistoryRequest$Outbound = { + page: number; + pageSize: number; + sortKey?: string | undefined; + sortDirection?: string | undefined; + eventType?: Array | undefined; + successful?: boolean | undefined; + downloadId?: string | undefined; + indexerIds?: Array | undefined; +}; + +/** @internal */ +export const GetApiV1HistoryRequest$outboundSchema: z.ZodType< + GetApiV1HistoryRequest$Outbound, + z.ZodTypeDef, + GetApiV1HistoryRequest +> = z.object({ + page: z.number().int().default(1), + pageSize: z.number().int().default(10), + sortKey: z.string().optional(), + sortDirection: models.SortDirection$outboundSchema.optional(), + eventType: z.array(z.number().int()).optional(), + successful: z.boolean().optional(), + downloadId: z.string().optional(), + indexerIds: z.array(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1HistoryRequest$ { + /** @deprecated use `GetApiV1HistoryRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1HistoryRequest$inboundSchema; + /** @deprecated use `GetApiV1HistoryRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1HistoryRequest$outboundSchema; + /** @deprecated use `GetApiV1HistoryRequest$Outbound` instead. */ + export type Outbound = GetApiV1HistoryRequest$Outbound; +} + +export function getApiV1HistoryRequestToJSON( + getApiV1HistoryRequest: GetApiV1HistoryRequest, +): string { + return JSON.stringify( + GetApiV1HistoryRequest$outboundSchema.parse(getApiV1HistoryRequest), + ); +} + +export function getApiV1HistoryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1HistoryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1HistoryRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1historyindexer.ts b/src/models/operations/getapiv1historyindexer.ts new file mode 100644 index 0000000..671ae8e --- /dev/null +++ b/src/models/operations/getapiv1historyindexer.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type GetApiV1HistoryIndexerRequest = { + indexerId?: number | undefined; + eventType?: models.HistoryEventType | undefined; + limit?: number | undefined; +}; + +/** @internal */ +export const GetApiV1HistoryIndexerRequest$inboundSchema: z.ZodType< + GetApiV1HistoryIndexerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + indexerId: z.number().int().optional(), + eventType: models.HistoryEventType$inboundSchema.optional(), + limit: z.number().int().optional(), +}); + +/** @internal */ +export type GetApiV1HistoryIndexerRequest$Outbound = { + indexerId?: number | undefined; + eventType?: string | undefined; + limit?: number | undefined; +}; + +/** @internal */ +export const GetApiV1HistoryIndexerRequest$outboundSchema: z.ZodType< + GetApiV1HistoryIndexerRequest$Outbound, + z.ZodTypeDef, + GetApiV1HistoryIndexerRequest +> = z.object({ + indexerId: z.number().int().optional(), + eventType: models.HistoryEventType$outboundSchema.optional(), + limit: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1HistoryIndexerRequest$ { + /** @deprecated use `GetApiV1HistoryIndexerRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1HistoryIndexerRequest$inboundSchema; + /** @deprecated use `GetApiV1HistoryIndexerRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1HistoryIndexerRequest$outboundSchema; + /** @deprecated use `GetApiV1HistoryIndexerRequest$Outbound` instead. */ + export type Outbound = GetApiV1HistoryIndexerRequest$Outbound; +} + +export function getApiV1HistoryIndexerRequestToJSON( + getApiV1HistoryIndexerRequest: GetApiV1HistoryIndexerRequest, +): string { + return JSON.stringify( + GetApiV1HistoryIndexerRequest$outboundSchema.parse( + getApiV1HistoryIndexerRequest, + ), + ); +} + +export function getApiV1HistoryIndexerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1HistoryIndexerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1HistoryIndexerRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1historysince.ts b/src/models/operations/getapiv1historysince.ts new file mode 100644 index 0000000..56b76ca --- /dev/null +++ b/src/models/operations/getapiv1historysince.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type GetApiV1HistorySinceRequest = { + date?: Date | undefined; + eventType?: models.HistoryEventType | undefined; +}; + +/** @internal */ +export const GetApiV1HistorySinceRequest$inboundSchema: z.ZodType< + GetApiV1HistorySinceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + date: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + eventType: models.HistoryEventType$inboundSchema.optional(), +}); + +/** @internal */ +export type GetApiV1HistorySinceRequest$Outbound = { + date?: string | undefined; + eventType?: string | undefined; +}; + +/** @internal */ +export const GetApiV1HistorySinceRequest$outboundSchema: z.ZodType< + GetApiV1HistorySinceRequest$Outbound, + z.ZodTypeDef, + GetApiV1HistorySinceRequest +> = z.object({ + date: z.date().transform(v => v.toISOString()).optional(), + eventType: models.HistoryEventType$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1HistorySinceRequest$ { + /** @deprecated use `GetApiV1HistorySinceRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1HistorySinceRequest$inboundSchema; + /** @deprecated use `GetApiV1HistorySinceRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1HistorySinceRequest$outboundSchema; + /** @deprecated use `GetApiV1HistorySinceRequest$Outbound` instead. */ + export type Outbound = GetApiV1HistorySinceRequest$Outbound; +} + +export function getApiV1HistorySinceRequestToJSON( + getApiV1HistorySinceRequest: GetApiV1HistorySinceRequest, +): string { + return JSON.stringify( + GetApiV1HistorySinceRequest$outboundSchema.parse( + getApiV1HistorySinceRequest, + ), + ); +} + +export function getApiV1HistorySinceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1HistorySinceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1HistorySinceRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1indexerid.ts b/src/models/operations/getapiv1indexerid.ts new file mode 100644 index 0000000..6657992 --- /dev/null +++ b/src/models/operations/getapiv1indexerid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1IndexerIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1IndexerIdRequest$inboundSchema: z.ZodType< + GetApiV1IndexerIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1IndexerIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1IndexerIdRequest$outboundSchema: z.ZodType< + GetApiV1IndexerIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1IndexerIdRequest +> = z.object({ + id: 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 GetApiV1IndexerIdRequest$ { + /** @deprecated use `GetApiV1IndexerIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1IndexerIdRequest$inboundSchema; + /** @deprecated use `GetApiV1IndexerIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1IndexerIdRequest$outboundSchema; + /** @deprecated use `GetApiV1IndexerIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1IndexerIdRequest$Outbound; +} + +export function getApiV1IndexerIdRequestToJSON( + getApiV1IndexerIdRequest: GetApiV1IndexerIdRequest, +): string { + return JSON.stringify( + GetApiV1IndexerIdRequest$outboundSchema.parse(getApiV1IndexerIdRequest), + ); +} + +export function getApiV1IndexerIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1IndexerIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1IndexerIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1indexeriddownload.ts b/src/models/operations/getapiv1indexeriddownload.ts new file mode 100644 index 0000000..c35a78a --- /dev/null +++ b/src/models/operations/getapiv1indexeriddownload.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1IndexerIdDownloadRequest = { + id: number; + link?: string | undefined; + file?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerIdDownloadRequest$inboundSchema: z.ZodType< + GetApiV1IndexerIdDownloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + link: z.string().optional(), + file: z.string().optional(), +}); + +/** @internal */ +export type GetApiV1IndexerIdDownloadRequest$Outbound = { + id: number; + link?: string | undefined; + file?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerIdDownloadRequest$outboundSchema: z.ZodType< + GetApiV1IndexerIdDownloadRequest$Outbound, + z.ZodTypeDef, + GetApiV1IndexerIdDownloadRequest +> = z.object({ + id: z.number().int(), + link: z.string().optional(), + file: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1IndexerIdDownloadRequest$ { + /** @deprecated use `GetApiV1IndexerIdDownloadRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1IndexerIdDownloadRequest$inboundSchema; + /** @deprecated use `GetApiV1IndexerIdDownloadRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1IndexerIdDownloadRequest$outboundSchema; + /** @deprecated use `GetApiV1IndexerIdDownloadRequest$Outbound` instead. */ + export type Outbound = GetApiV1IndexerIdDownloadRequest$Outbound; +} + +export function getApiV1IndexerIdDownloadRequestToJSON( + getApiV1IndexerIdDownloadRequest: GetApiV1IndexerIdDownloadRequest, +): string { + return JSON.stringify( + GetApiV1IndexerIdDownloadRequest$outboundSchema.parse( + getApiV1IndexerIdDownloadRequest, + ), + ); +} + +export function getApiV1IndexerIdDownloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1IndexerIdDownloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1IndexerIdDownloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1indexeridnewznab.ts b/src/models/operations/getapiv1indexeridnewznab.ts new file mode 100644 index 0000000..e43129a --- /dev/null +++ b/src/models/operations/getapiv1indexeridnewznab.ts @@ -0,0 +1,196 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1IndexerIdNewznabRequest = { + id: number; + t?: string | undefined; + q?: string | undefined; + cat?: string | undefined; + imdbid?: string | undefined; + tmdbid?: number | undefined; + extended?: string | undefined; + limit?: number | undefined; + offset?: number | undefined; + minage?: number | undefined; + maxage?: number | undefined; + minsize?: number | undefined; + maxsize?: number | undefined; + rid?: number | undefined; + tvmazeid?: number | undefined; + traktid?: number | undefined; + tvdbid?: number | undefined; + doubanid?: number | undefined; + season?: number | undefined; + ep?: string | undefined; + album?: string | undefined; + artist?: string | undefined; + label?: string | undefined; + track?: string | undefined; + year?: number | undefined; + genre?: string | undefined; + author?: string | undefined; + title?: string | undefined; + publisher?: string | undefined; + configured?: string | undefined; + source?: string | undefined; + host?: string | undefined; + server?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerIdNewznabRequest$inboundSchema: z.ZodType< + GetApiV1IndexerIdNewznabRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + t: z.string().optional(), + q: z.string().optional(), + cat: z.string().optional(), + imdbid: z.string().optional(), + tmdbid: z.number().int().optional(), + extended: z.string().optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), + minage: z.number().int().optional(), + maxage: z.number().int().optional(), + minsize: z.number().int().optional(), + maxsize: z.number().int().optional(), + rid: z.number().int().optional(), + tvmazeid: z.number().int().optional(), + traktid: z.number().int().optional(), + tvdbid: z.number().int().optional(), + doubanid: z.number().int().optional(), + season: z.number().int().optional(), + ep: z.string().optional(), + album: z.string().optional(), + artist: z.string().optional(), + label: z.string().optional(), + track: z.string().optional(), + year: z.number().int().optional(), + genre: z.string().optional(), + author: z.string().optional(), + title: z.string().optional(), + publisher: z.string().optional(), + configured: z.string().optional(), + source: z.string().optional(), + host: z.string().optional(), + server: z.string().optional(), +}); + +/** @internal */ +export type GetApiV1IndexerIdNewznabRequest$Outbound = { + id: number; + t?: string | undefined; + q?: string | undefined; + cat?: string | undefined; + imdbid?: string | undefined; + tmdbid?: number | undefined; + extended?: string | undefined; + limit?: number | undefined; + offset?: number | undefined; + minage?: number | undefined; + maxage?: number | undefined; + minsize?: number | undefined; + maxsize?: number | undefined; + rid?: number | undefined; + tvmazeid?: number | undefined; + traktid?: number | undefined; + tvdbid?: number | undefined; + doubanid?: number | undefined; + season?: number | undefined; + ep?: string | undefined; + album?: string | undefined; + artist?: string | undefined; + label?: string | undefined; + track?: string | undefined; + year?: number | undefined; + genre?: string | undefined; + author?: string | undefined; + title?: string | undefined; + publisher?: string | undefined; + configured?: string | undefined; + source?: string | undefined; + host?: string | undefined; + server?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerIdNewznabRequest$outboundSchema: z.ZodType< + GetApiV1IndexerIdNewznabRequest$Outbound, + z.ZodTypeDef, + GetApiV1IndexerIdNewznabRequest +> = z.object({ + id: z.number().int(), + t: z.string().optional(), + q: z.string().optional(), + cat: z.string().optional(), + imdbid: z.string().optional(), + tmdbid: z.number().int().optional(), + extended: z.string().optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), + minage: z.number().int().optional(), + maxage: z.number().int().optional(), + minsize: z.number().int().optional(), + maxsize: z.number().int().optional(), + rid: z.number().int().optional(), + tvmazeid: z.number().int().optional(), + traktid: z.number().int().optional(), + tvdbid: z.number().int().optional(), + doubanid: z.number().int().optional(), + season: z.number().int().optional(), + ep: z.string().optional(), + album: z.string().optional(), + artist: z.string().optional(), + label: z.string().optional(), + track: z.string().optional(), + year: z.number().int().optional(), + genre: z.string().optional(), + author: z.string().optional(), + title: z.string().optional(), + publisher: z.string().optional(), + configured: z.string().optional(), + source: z.string().optional(), + host: z.string().optional(), + server: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1IndexerIdNewznabRequest$ { + /** @deprecated use `GetApiV1IndexerIdNewznabRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1IndexerIdNewznabRequest$inboundSchema; + /** @deprecated use `GetApiV1IndexerIdNewznabRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1IndexerIdNewznabRequest$outboundSchema; + /** @deprecated use `GetApiV1IndexerIdNewznabRequest$Outbound` instead. */ + export type Outbound = GetApiV1IndexerIdNewznabRequest$Outbound; +} + +export function getApiV1IndexerIdNewznabRequestToJSON( + getApiV1IndexerIdNewznabRequest: GetApiV1IndexerIdNewznabRequest, +): string { + return JSON.stringify( + GetApiV1IndexerIdNewznabRequest$outboundSchema.parse( + getApiV1IndexerIdNewznabRequest, + ), + ); +} + +export function getApiV1IndexerIdNewznabRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1IndexerIdNewznabRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1IndexerIdNewznabRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1indexerproxyid.ts b/src/models/operations/getapiv1indexerproxyid.ts new file mode 100644 index 0000000..50a6528 --- /dev/null +++ b/src/models/operations/getapiv1indexerproxyid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1IndexerproxyIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1IndexerproxyIdRequest$inboundSchema: z.ZodType< + GetApiV1IndexerproxyIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1IndexerproxyIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1IndexerproxyIdRequest$outboundSchema: z.ZodType< + GetApiV1IndexerproxyIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1IndexerproxyIdRequest +> = z.object({ + id: 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 GetApiV1IndexerproxyIdRequest$ { + /** @deprecated use `GetApiV1IndexerproxyIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1IndexerproxyIdRequest$inboundSchema; + /** @deprecated use `GetApiV1IndexerproxyIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1IndexerproxyIdRequest$outboundSchema; + /** @deprecated use `GetApiV1IndexerproxyIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1IndexerproxyIdRequest$Outbound; +} + +export function getApiV1IndexerproxyIdRequestToJSON( + getApiV1IndexerproxyIdRequest: GetApiV1IndexerproxyIdRequest, +): string { + return JSON.stringify( + GetApiV1IndexerproxyIdRequest$outboundSchema.parse( + getApiV1IndexerproxyIdRequest, + ), + ); +} + +export function getApiV1IndexerproxyIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1IndexerproxyIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1IndexerproxyIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1indexerstats.ts b/src/models/operations/getapiv1indexerstats.ts new file mode 100644 index 0000000..a7a5b0c --- /dev/null +++ b/src/models/operations/getapiv1indexerstats.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1IndexerstatsRequest = { + startDate?: Date | undefined; + endDate?: Date | undefined; + indexers?: string | undefined; + protocols?: string | undefined; + tags?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerstatsRequest$inboundSchema: z.ZodType< + GetApiV1IndexerstatsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + startDate: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + endDate: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + indexers: z.string().optional(), + protocols: z.string().optional(), + tags: z.string().optional(), +}); + +/** @internal */ +export type GetApiV1IndexerstatsRequest$Outbound = { + startDate?: string | undefined; + endDate?: string | undefined; + indexers?: string | undefined; + protocols?: string | undefined; + tags?: string | undefined; +}; + +/** @internal */ +export const GetApiV1IndexerstatsRequest$outboundSchema: z.ZodType< + GetApiV1IndexerstatsRequest$Outbound, + z.ZodTypeDef, + GetApiV1IndexerstatsRequest +> = z.object({ + startDate: z.date().transform(v => v.toISOString()).optional(), + endDate: z.date().transform(v => v.toISOString()).optional(), + indexers: z.string().optional(), + protocols: z.string().optional(), + tags: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1IndexerstatsRequest$ { + /** @deprecated use `GetApiV1IndexerstatsRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1IndexerstatsRequest$inboundSchema; + /** @deprecated use `GetApiV1IndexerstatsRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1IndexerstatsRequest$outboundSchema; + /** @deprecated use `GetApiV1IndexerstatsRequest$Outbound` instead. */ + export type Outbound = GetApiV1IndexerstatsRequest$Outbound; +} + +export function getApiV1IndexerstatsRequestToJSON( + getApiV1IndexerstatsRequest: GetApiV1IndexerstatsRequest, +): string { + return JSON.stringify( + GetApiV1IndexerstatsRequest$outboundSchema.parse( + getApiV1IndexerstatsRequest, + ), + ); +} + +export function getApiV1IndexerstatsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1IndexerstatsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1IndexerstatsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1log.ts b/src/models/operations/getapiv1log.ts new file mode 100644 index 0000000..ad30def --- /dev/null +++ b/src/models/operations/getapiv1log.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type GetApiV1LogRequest = { + page?: number | undefined; + pageSize?: number | undefined; + sortKey?: string | undefined; + sortDirection?: models.SortDirection | undefined; + level?: string | undefined; +}; + +/** @internal */ +export const GetApiV1LogRequest$inboundSchema: z.ZodType< + GetApiV1LogRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.number().int().default(1), + pageSize: z.number().int().default(10), + sortKey: z.string().optional(), + sortDirection: models.SortDirection$inboundSchema.optional(), + level: z.string().optional(), +}); + +/** @internal */ +export type GetApiV1LogRequest$Outbound = { + page: number; + pageSize: number; + sortKey?: string | undefined; + sortDirection?: string | undefined; + level?: string | undefined; +}; + +/** @internal */ +export const GetApiV1LogRequest$outboundSchema: z.ZodType< + GetApiV1LogRequest$Outbound, + z.ZodTypeDef, + GetApiV1LogRequest +> = z.object({ + page: z.number().int().default(1), + pageSize: z.number().int().default(10), + sortKey: z.string().optional(), + sortDirection: models.SortDirection$outboundSchema.optional(), + level: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1LogRequest$ { + /** @deprecated use `GetApiV1LogRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1LogRequest$inboundSchema; + /** @deprecated use `GetApiV1LogRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1LogRequest$outboundSchema; + /** @deprecated use `GetApiV1LogRequest$Outbound` instead. */ + export type Outbound = GetApiV1LogRequest$Outbound; +} + +export function getApiV1LogRequestToJSON( + getApiV1LogRequest: GetApiV1LogRequest, +): string { + return JSON.stringify( + GetApiV1LogRequest$outboundSchema.parse(getApiV1LogRequest), + ); +} + +export function getApiV1LogRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1LogRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1LogRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1logfilefilename.ts b/src/models/operations/getapiv1logfilefilename.ts new file mode 100644 index 0000000..ad6d454 --- /dev/null +++ b/src/models/operations/getapiv1logfilefilename.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1LogFileFilenameRequest = { + filename: string; +}; + +/** @internal */ +export const GetApiV1LogFileFilenameRequest$inboundSchema: z.ZodType< + GetApiV1LogFileFilenameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + filename: z.string(), +}); + +/** @internal */ +export type GetApiV1LogFileFilenameRequest$Outbound = { + filename: string; +}; + +/** @internal */ +export const GetApiV1LogFileFilenameRequest$outboundSchema: z.ZodType< + GetApiV1LogFileFilenameRequest$Outbound, + z.ZodTypeDef, + GetApiV1LogFileFilenameRequest +> = z.object({ + filename: 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 GetApiV1LogFileFilenameRequest$ { + /** @deprecated use `GetApiV1LogFileFilenameRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1LogFileFilenameRequest$inboundSchema; + /** @deprecated use `GetApiV1LogFileFilenameRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1LogFileFilenameRequest$outboundSchema; + /** @deprecated use `GetApiV1LogFileFilenameRequest$Outbound` instead. */ + export type Outbound = GetApiV1LogFileFilenameRequest$Outbound; +} + +export function getApiV1LogFileFilenameRequestToJSON( + getApiV1LogFileFilenameRequest: GetApiV1LogFileFilenameRequest, +): string { + return JSON.stringify( + GetApiV1LogFileFilenameRequest$outboundSchema.parse( + getApiV1LogFileFilenameRequest, + ), + ); +} + +export function getApiV1LogFileFilenameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1LogFileFilenameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1LogFileFilenameRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1logfileupdatefilename.ts b/src/models/operations/getapiv1logfileupdatefilename.ts new file mode 100644 index 0000000..8d0b53e --- /dev/null +++ b/src/models/operations/getapiv1logfileupdatefilename.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1LogFileUpdateFilenameRequest = { + filename: string; +}; + +/** @internal */ +export const GetApiV1LogFileUpdateFilenameRequest$inboundSchema: z.ZodType< + GetApiV1LogFileUpdateFilenameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + filename: z.string(), +}); + +/** @internal */ +export type GetApiV1LogFileUpdateFilenameRequest$Outbound = { + filename: string; +}; + +/** @internal */ +export const GetApiV1LogFileUpdateFilenameRequest$outboundSchema: z.ZodType< + GetApiV1LogFileUpdateFilenameRequest$Outbound, + z.ZodTypeDef, + GetApiV1LogFileUpdateFilenameRequest +> = z.object({ + filename: 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 GetApiV1LogFileUpdateFilenameRequest$ { + /** @deprecated use `GetApiV1LogFileUpdateFilenameRequest$inboundSchema` instead. */ + export const inboundSchema = + GetApiV1LogFileUpdateFilenameRequest$inboundSchema; + /** @deprecated use `GetApiV1LogFileUpdateFilenameRequest$outboundSchema` instead. */ + export const outboundSchema = + GetApiV1LogFileUpdateFilenameRequest$outboundSchema; + /** @deprecated use `GetApiV1LogFileUpdateFilenameRequest$Outbound` instead. */ + export type Outbound = GetApiV1LogFileUpdateFilenameRequest$Outbound; +} + +export function getApiV1LogFileUpdateFilenameRequestToJSON( + getApiV1LogFileUpdateFilenameRequest: GetApiV1LogFileUpdateFilenameRequest, +): string { + return JSON.stringify( + GetApiV1LogFileUpdateFilenameRequest$outboundSchema.parse( + getApiV1LogFileUpdateFilenameRequest, + ), + ); +} + +export function getApiV1LogFileUpdateFilenameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetApiV1LogFileUpdateFilenameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1LogFileUpdateFilenameRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1notificationid.ts b/src/models/operations/getapiv1notificationid.ts new file mode 100644 index 0000000..2477001 --- /dev/null +++ b/src/models/operations/getapiv1notificationid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1NotificationIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1NotificationIdRequest$inboundSchema: z.ZodType< + GetApiV1NotificationIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1NotificationIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1NotificationIdRequest$outboundSchema: z.ZodType< + GetApiV1NotificationIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1NotificationIdRequest +> = z.object({ + id: 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 GetApiV1NotificationIdRequest$ { + /** @deprecated use `GetApiV1NotificationIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1NotificationIdRequest$inboundSchema; + /** @deprecated use `GetApiV1NotificationIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1NotificationIdRequest$outboundSchema; + /** @deprecated use `GetApiV1NotificationIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1NotificationIdRequest$Outbound; +} + +export function getApiV1NotificationIdRequestToJSON( + getApiV1NotificationIdRequest: GetApiV1NotificationIdRequest, +): string { + return JSON.stringify( + GetApiV1NotificationIdRequest$outboundSchema.parse( + getApiV1NotificationIdRequest, + ), + ); +} + +export function getApiV1NotificationIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1NotificationIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1NotificationIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1search.ts b/src/models/operations/getapiv1search.ts new file mode 100644 index 0000000..3640cf5 --- /dev/null +++ b/src/models/operations/getapiv1search.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1SearchRequest = { + query?: string | undefined; + type?: string | undefined; + indexerIds?: Array | undefined; + categories?: Array | undefined; + limit?: number | undefined; + offset?: number | undefined; +}; + +/** @internal */ +export const GetApiV1SearchRequest$inboundSchema: z.ZodType< + GetApiV1SearchRequest, + z.ZodTypeDef, + unknown +> = z.object({ + query: z.string().optional(), + type: z.string().optional(), + indexerIds: z.array(z.number().int()).optional(), + categories: z.array(z.number().int()).optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), +}); + +/** @internal */ +export type GetApiV1SearchRequest$Outbound = { + query?: string | undefined; + type?: string | undefined; + indexerIds?: Array | undefined; + categories?: Array | undefined; + limit?: number | undefined; + offset?: number | undefined; +}; + +/** @internal */ +export const GetApiV1SearchRequest$outboundSchema: z.ZodType< + GetApiV1SearchRequest$Outbound, + z.ZodTypeDef, + GetApiV1SearchRequest +> = z.object({ + query: z.string().optional(), + type: z.string().optional(), + indexerIds: z.array(z.number().int()).optional(), + categories: z.array(z.number().int()).optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetApiV1SearchRequest$ { + /** @deprecated use `GetApiV1SearchRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1SearchRequest$inboundSchema; + /** @deprecated use `GetApiV1SearchRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1SearchRequest$outboundSchema; + /** @deprecated use `GetApiV1SearchRequest$Outbound` instead. */ + export type Outbound = GetApiV1SearchRequest$Outbound; +} + +export function getApiV1SearchRequestToJSON( + getApiV1SearchRequest: GetApiV1SearchRequest, +): string { + return JSON.stringify( + GetApiV1SearchRequest$outboundSchema.parse(getApiV1SearchRequest), + ); +} + +export function getApiV1SearchRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1SearchRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1SearchRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1systemtaskid.ts b/src/models/operations/getapiv1systemtaskid.ts new file mode 100644 index 0000000..2c598c8 --- /dev/null +++ b/src/models/operations/getapiv1systemtaskid.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1SystemTaskIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1SystemTaskIdRequest$inboundSchema: z.ZodType< + GetApiV1SystemTaskIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1SystemTaskIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1SystemTaskIdRequest$outboundSchema: z.ZodType< + GetApiV1SystemTaskIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1SystemTaskIdRequest +> = z.object({ + id: 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 GetApiV1SystemTaskIdRequest$ { + /** @deprecated use `GetApiV1SystemTaskIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1SystemTaskIdRequest$inboundSchema; + /** @deprecated use `GetApiV1SystemTaskIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1SystemTaskIdRequest$outboundSchema; + /** @deprecated use `GetApiV1SystemTaskIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1SystemTaskIdRequest$Outbound; +} + +export function getApiV1SystemTaskIdRequestToJSON( + getApiV1SystemTaskIdRequest: GetApiV1SystemTaskIdRequest, +): string { + return JSON.stringify( + GetApiV1SystemTaskIdRequest$outboundSchema.parse( + getApiV1SystemTaskIdRequest, + ), + ); +} + +export function getApiV1SystemTaskIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1SystemTaskIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1SystemTaskIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1tagdetailid.ts b/src/models/operations/getapiv1tagdetailid.ts new file mode 100644 index 0000000..bde9646 --- /dev/null +++ b/src/models/operations/getapiv1tagdetailid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1TagDetailIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1TagDetailIdRequest$inboundSchema: z.ZodType< + GetApiV1TagDetailIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1TagDetailIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1TagDetailIdRequest$outboundSchema: z.ZodType< + GetApiV1TagDetailIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1TagDetailIdRequest +> = z.object({ + id: 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 GetApiV1TagDetailIdRequest$ { + /** @deprecated use `GetApiV1TagDetailIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1TagDetailIdRequest$inboundSchema; + /** @deprecated use `GetApiV1TagDetailIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1TagDetailIdRequest$outboundSchema; + /** @deprecated use `GetApiV1TagDetailIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1TagDetailIdRequest$Outbound; +} + +export function getApiV1TagDetailIdRequestToJSON( + getApiV1TagDetailIdRequest: GetApiV1TagDetailIdRequest, +): string { + return JSON.stringify( + GetApiV1TagDetailIdRequest$outboundSchema.parse(getApiV1TagDetailIdRequest), + ); +} + +export function getApiV1TagDetailIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1TagDetailIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1TagDetailIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapiv1tagid.ts b/src/models/operations/getapiv1tagid.ts new file mode 100644 index 0000000..9b60939 --- /dev/null +++ b/src/models/operations/getapiv1tagid.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetApiV1TagIdRequest = { + id: number; +}; + +/** @internal */ +export const GetApiV1TagIdRequest$inboundSchema: z.ZodType< + GetApiV1TagIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type GetApiV1TagIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const GetApiV1TagIdRequest$outboundSchema: z.ZodType< + GetApiV1TagIdRequest$Outbound, + z.ZodTypeDef, + GetApiV1TagIdRequest +> = z.object({ + id: 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 GetApiV1TagIdRequest$ { + /** @deprecated use `GetApiV1TagIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiV1TagIdRequest$inboundSchema; + /** @deprecated use `GetApiV1TagIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiV1TagIdRequest$outboundSchema; + /** @deprecated use `GetApiV1TagIdRequest$Outbound` instead. */ + export type Outbound = GetApiV1TagIdRequest$Outbound; +} + +export function getApiV1TagIdRequestToJSON( + getApiV1TagIdRequest: GetApiV1TagIdRequest, +): string { + return JSON.stringify( + GetApiV1TagIdRequest$outboundSchema.parse(getApiV1TagIdRequest), + ); +} + +export function getApiV1TagIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetApiV1TagIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetApiV1TagIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/getcontentpath.ts b/src/models/operations/getcontentpath.ts new file mode 100644 index 0000000..6b7eece --- /dev/null +++ b/src/models/operations/getcontentpath.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetContentPathRequest = { + path: string; +}; + +/** @internal */ +export const GetContentPathRequest$inboundSchema: z.ZodType< + GetContentPathRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string(), +}); + +/** @internal */ +export type GetContentPathRequest$Outbound = { + path: string; +}; + +/** @internal */ +export const GetContentPathRequest$outboundSchema: z.ZodType< + GetContentPathRequest$Outbound, + z.ZodTypeDef, + GetContentPathRequest +> = z.object({ + path: 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 GetContentPathRequest$ { + /** @deprecated use `GetContentPathRequest$inboundSchema` instead. */ + export const inboundSchema = GetContentPathRequest$inboundSchema; + /** @deprecated use `GetContentPathRequest$outboundSchema` instead. */ + export const outboundSchema = GetContentPathRequest$outboundSchema; + /** @deprecated use `GetContentPathRequest$Outbound` instead. */ + export type Outbound = GetContentPathRequest$Outbound; +} + +export function getContentPathRequestToJSON( + getContentPathRequest: GetContentPathRequest, +): string { + return JSON.stringify( + GetContentPathRequest$outboundSchema.parse(getContentPathRequest), + ); +} + +export function getContentPathRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetContentPathRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetContentPathRequest' from JSON`, + ); +} diff --git a/src/models/operations/getidapi.ts b/src/models/operations/getidapi.ts new file mode 100644 index 0000000..7991d8f --- /dev/null +++ b/src/models/operations/getidapi.ts @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetIdApiRequest = { + id: number; + t?: string | undefined; + q?: string | undefined; + cat?: string | undefined; + imdbid?: string | undefined; + tmdbid?: number | undefined; + extended?: string | undefined; + limit?: number | undefined; + offset?: number | undefined; + minage?: number | undefined; + maxage?: number | undefined; + minsize?: number | undefined; + maxsize?: number | undefined; + rid?: number | undefined; + tvmazeid?: number | undefined; + traktid?: number | undefined; + tvdbid?: number | undefined; + doubanid?: number | undefined; + season?: number | undefined; + ep?: string | undefined; + album?: string | undefined; + artist?: string | undefined; + label?: string | undefined; + track?: string | undefined; + year?: number | undefined; + genre?: string | undefined; + author?: string | undefined; + title?: string | undefined; + publisher?: string | undefined; + configured?: string | undefined; + source?: string | undefined; + host?: string | undefined; + server?: string | undefined; +}; + +/** @internal */ +export const GetIdApiRequest$inboundSchema: z.ZodType< + GetIdApiRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + t: z.string().optional(), + q: z.string().optional(), + cat: z.string().optional(), + imdbid: z.string().optional(), + tmdbid: z.number().int().optional(), + extended: z.string().optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), + minage: z.number().int().optional(), + maxage: z.number().int().optional(), + minsize: z.number().int().optional(), + maxsize: z.number().int().optional(), + rid: z.number().int().optional(), + tvmazeid: z.number().int().optional(), + traktid: z.number().int().optional(), + tvdbid: z.number().int().optional(), + doubanid: z.number().int().optional(), + season: z.number().int().optional(), + ep: z.string().optional(), + album: z.string().optional(), + artist: z.string().optional(), + label: z.string().optional(), + track: z.string().optional(), + year: z.number().int().optional(), + genre: z.string().optional(), + author: z.string().optional(), + title: z.string().optional(), + publisher: z.string().optional(), + configured: z.string().optional(), + source: z.string().optional(), + host: z.string().optional(), + server: z.string().optional(), +}); + +/** @internal */ +export type GetIdApiRequest$Outbound = { + id: number; + t?: string | undefined; + q?: string | undefined; + cat?: string | undefined; + imdbid?: string | undefined; + tmdbid?: number | undefined; + extended?: string | undefined; + limit?: number | undefined; + offset?: number | undefined; + minage?: number | undefined; + maxage?: number | undefined; + minsize?: number | undefined; + maxsize?: number | undefined; + rid?: number | undefined; + tvmazeid?: number | undefined; + traktid?: number | undefined; + tvdbid?: number | undefined; + doubanid?: number | undefined; + season?: number | undefined; + ep?: string | undefined; + album?: string | undefined; + artist?: string | undefined; + label?: string | undefined; + track?: string | undefined; + year?: number | undefined; + genre?: string | undefined; + author?: string | undefined; + title?: string | undefined; + publisher?: string | undefined; + configured?: string | undefined; + source?: string | undefined; + host?: string | undefined; + server?: string | undefined; +}; + +/** @internal */ +export const GetIdApiRequest$outboundSchema: z.ZodType< + GetIdApiRequest$Outbound, + z.ZodTypeDef, + GetIdApiRequest +> = z.object({ + id: z.number().int(), + t: z.string().optional(), + q: z.string().optional(), + cat: z.string().optional(), + imdbid: z.string().optional(), + tmdbid: z.number().int().optional(), + extended: z.string().optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), + minage: z.number().int().optional(), + maxage: z.number().int().optional(), + minsize: z.number().int().optional(), + maxsize: z.number().int().optional(), + rid: z.number().int().optional(), + tvmazeid: z.number().int().optional(), + traktid: z.number().int().optional(), + tvdbid: z.number().int().optional(), + doubanid: z.number().int().optional(), + season: z.number().int().optional(), + ep: z.string().optional(), + album: z.string().optional(), + artist: z.string().optional(), + label: z.string().optional(), + track: z.string().optional(), + year: z.number().int().optional(), + genre: z.string().optional(), + author: z.string().optional(), + title: z.string().optional(), + publisher: z.string().optional(), + configured: z.string().optional(), + source: z.string().optional(), + host: z.string().optional(), + server: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetIdApiRequest$ { + /** @deprecated use `GetIdApiRequest$inboundSchema` instead. */ + export const inboundSchema = GetIdApiRequest$inboundSchema; + /** @deprecated use `GetIdApiRequest$outboundSchema` instead. */ + export const outboundSchema = GetIdApiRequest$outboundSchema; + /** @deprecated use `GetIdApiRequest$Outbound` instead. */ + export type Outbound = GetIdApiRequest$Outbound; +} + +export function getIdApiRequestToJSON( + getIdApiRequest: GetIdApiRequest, +): string { + return JSON.stringify(GetIdApiRequest$outboundSchema.parse(getIdApiRequest)); +} + +export function getIdApiRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetIdApiRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetIdApiRequest' from JSON`, + ); +} diff --git a/src/models/operations/getiddownload.ts b/src/models/operations/getiddownload.ts new file mode 100644 index 0000000..889fd92 --- /dev/null +++ b/src/models/operations/getiddownload.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetIdDownloadRequest = { + id: number; + link?: string | undefined; + file?: string | undefined; +}; + +/** @internal */ +export const GetIdDownloadRequest$inboundSchema: z.ZodType< + GetIdDownloadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), + link: z.string().optional(), + file: z.string().optional(), +}); + +/** @internal */ +export type GetIdDownloadRequest$Outbound = { + id: number; + link?: string | undefined; + file?: string | undefined; +}; + +/** @internal */ +export const GetIdDownloadRequest$outboundSchema: z.ZodType< + GetIdDownloadRequest$Outbound, + z.ZodTypeDef, + GetIdDownloadRequest +> = z.object({ + id: z.number().int(), + link: z.string().optional(), + file: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetIdDownloadRequest$ { + /** @deprecated use `GetIdDownloadRequest$inboundSchema` instead. */ + export const inboundSchema = GetIdDownloadRequest$inboundSchema; + /** @deprecated use `GetIdDownloadRequest$outboundSchema` instead. */ + export const outboundSchema = GetIdDownloadRequest$outboundSchema; + /** @deprecated use `GetIdDownloadRequest$Outbound` instead. */ + export type Outbound = GetIdDownloadRequest$Outbound; +} + +export function getIdDownloadRequestToJSON( + getIdDownloadRequest: GetIdDownloadRequest, +): string { + return JSON.stringify( + GetIdDownloadRequest$outboundSchema.parse(getIdDownloadRequest), + ); +} + +export function getIdDownloadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetIdDownloadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetIdDownloadRequest' from JSON`, + ); +} diff --git a/src/models/operations/getpath.ts b/src/models/operations/getpath.ts new file mode 100644 index 0000000..e23cf1c --- /dev/null +++ b/src/models/operations/getpath.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetPathRequest = { + path: string; +}; + +/** @internal */ +export const GetPathRequest$inboundSchema: z.ZodType< + GetPathRequest, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string(), +}); + +/** @internal */ +export type GetPathRequest$Outbound = { + path: string; +}; + +/** @internal */ +export const GetPathRequest$outboundSchema: z.ZodType< + GetPathRequest$Outbound, + z.ZodTypeDef, + GetPathRequest +> = z.object({ + path: 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 GetPathRequest$ { + /** @deprecated use `GetPathRequest$inboundSchema` instead. */ + export const inboundSchema = GetPathRequest$inboundSchema; + /** @deprecated use `GetPathRequest$outboundSchema` instead. */ + export const outboundSchema = GetPathRequest$outboundSchema; + /** @deprecated use `GetPathRequest$Outbound` instead. */ + export type Outbound = GetPathRequest$Outbound; +} + +export function getPathRequestToJSON(getPathRequest: GetPathRequest): string { + return JSON.stringify(GetPathRequest$outboundSchema.parse(getPathRequest)); +} + +export function getPathRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetPathRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetPathRequest' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts new file mode 100644 index 0000000..f469c30 --- /dev/null +++ b/src/models/operations/index.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./deleteapiv1applicationsid.js"; +export * from "./deleteapiv1appprofileid.js"; +export * from "./deleteapiv1commandid.js"; +export * from "./deleteapiv1customfilterid.js"; +export * from "./deleteapiv1downloadclientid.js"; +export * from "./deleteapiv1indexerid.js"; +export * from "./deleteapiv1indexerproxyid.js"; +export * from "./deleteapiv1notificationid.js"; +export * from "./deleteapiv1systembackupid.js"; +export * from "./deleteapiv1tagid.js"; +export * from "./getapiv1applicationsid.js"; +export * from "./getapiv1appprofileid.js"; +export * from "./getapiv1commandid.js"; +export * from "./getapiv1configdevelopmentid.js"; +export * from "./getapiv1configdownloadclientid.js"; +export * from "./getapiv1confighostid.js"; +export * from "./getapiv1configuiid.js"; +export * from "./getapiv1customfilterid.js"; +export * from "./getapiv1downloadclientid.js"; +export * from "./getapiv1filesystem.js"; +export * from "./getapiv1filesystemtype.js"; +export * from "./getapiv1history.js"; +export * from "./getapiv1historyindexer.js"; +export * from "./getapiv1historysince.js"; +export * from "./getapiv1indexerid.js"; +export * from "./getapiv1indexeriddownload.js"; +export * from "./getapiv1indexeridnewznab.js"; +export * from "./getapiv1indexerproxyid.js"; +export * from "./getapiv1indexerstats.js"; +export * from "./getapiv1log.js"; +export * from "./getapiv1logfilefilename.js"; +export * from "./getapiv1logfileupdatefilename.js"; +export * from "./getapiv1notificationid.js"; +export * from "./getapiv1search.js"; +export * from "./getapiv1systemtaskid.js"; +export * from "./getapiv1tagdetailid.js"; +export * from "./getapiv1tagid.js"; +export * from "./getcontentpath.js"; +export * from "./getidapi.js"; +export * from "./getiddownload.js"; +export * from "./getpath.js"; +export * from "./postapiv1applications.js"; +export * from "./postapiv1applicationsactionname.js"; +export * from "./postapiv1applicationstest.js"; +export * from "./postapiv1downloadclient.js"; +export * from "./postapiv1downloadclientactionname.js"; +export * from "./postapiv1downloadclienttest.js"; +export * from "./postapiv1indexer.js"; +export * from "./postapiv1indexeractionname.js"; +export * from "./postapiv1indexerproxy.js"; +export * from "./postapiv1indexerproxyactionname.js"; +export * from "./postapiv1indexerproxytest.js"; +export * from "./postapiv1indexertest.js"; +export * from "./postapiv1notification.js"; +export * from "./postapiv1notificationactionname.js"; +export * from "./postapiv1notificationtest.js"; +export * from "./postapiv1systembackuprestoreid.js"; +export * from "./putapiv1applicationsid.js"; +export * from "./putapiv1appprofileid.js"; +export * from "./putapiv1configdevelopmentid.js"; +export * from "./putapiv1configdownloadclientid.js"; +export * from "./putapiv1confighostid.js"; +export * from "./putapiv1configuiid.js"; +export * from "./putapiv1customfilterid.js"; +export * from "./putapiv1downloadclientid.js"; +export * from "./putapiv1indexerid.js"; +export * from "./putapiv1indexerproxyid.js"; +export * from "./putapiv1notificationid.js"; +export * from "./putapiv1tagid.js"; diff --git a/src/models/operations/postapiv1applications.ts b/src/models/operations/postapiv1applications.ts new file mode 100644 index 0000000..95ebf1a --- /dev/null +++ b/src/models/operations/postapiv1applications.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1ApplicationsRequest = { + forceSave?: boolean | undefined; + applicationResource?: models.ApplicationResource | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsRequest$inboundSchema: z.ZodType< + PostApiV1ApplicationsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + ApplicationResource: models.ApplicationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ApplicationResource": "applicationResource", + }); +}); + +/** @internal */ +export type PostApiV1ApplicationsRequest$Outbound = { + forceSave: boolean; + ApplicationResource?: models.ApplicationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsRequest$outboundSchema: z.ZodType< + PostApiV1ApplicationsRequest$Outbound, + z.ZodTypeDef, + PostApiV1ApplicationsRequest +> = z.object({ + forceSave: z.boolean().default(false), + applicationResource: models.ApplicationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + applicationResource: "ApplicationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1ApplicationsRequest$ { + /** @deprecated use `PostApiV1ApplicationsRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1ApplicationsRequest$inboundSchema; + /** @deprecated use `PostApiV1ApplicationsRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1ApplicationsRequest$outboundSchema; + /** @deprecated use `PostApiV1ApplicationsRequest$Outbound` instead. */ + export type Outbound = PostApiV1ApplicationsRequest$Outbound; +} + +export function postApiV1ApplicationsRequestToJSON( + postApiV1ApplicationsRequest: PostApiV1ApplicationsRequest, +): string { + return JSON.stringify( + PostApiV1ApplicationsRequest$outboundSchema.parse( + postApiV1ApplicationsRequest, + ), + ); +} + +export function postApiV1ApplicationsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1ApplicationsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1ApplicationsRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1applicationsactionname.ts b/src/models/operations/postapiv1applicationsactionname.ts new file mode 100644 index 0000000..d1099fe --- /dev/null +++ b/src/models/operations/postapiv1applicationsactionname.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1ApplicationsActionNameRequest = { + name: string; + applicationResource?: models.ApplicationResource | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsActionNameRequest$inboundSchema: z.ZodType< + PostApiV1ApplicationsActionNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + ApplicationResource: models.ApplicationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ApplicationResource": "applicationResource", + }); +}); + +/** @internal */ +export type PostApiV1ApplicationsActionNameRequest$Outbound = { + name: string; + ApplicationResource?: models.ApplicationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsActionNameRequest$outboundSchema: z.ZodType< + PostApiV1ApplicationsActionNameRequest$Outbound, + z.ZodTypeDef, + PostApiV1ApplicationsActionNameRequest +> = z.object({ + name: z.string(), + applicationResource: models.ApplicationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + applicationResource: "ApplicationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1ApplicationsActionNameRequest$ { + /** @deprecated use `PostApiV1ApplicationsActionNameRequest$inboundSchema` instead. */ + export const inboundSchema = + PostApiV1ApplicationsActionNameRequest$inboundSchema; + /** @deprecated use `PostApiV1ApplicationsActionNameRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1ApplicationsActionNameRequest$outboundSchema; + /** @deprecated use `PostApiV1ApplicationsActionNameRequest$Outbound` instead. */ + export type Outbound = PostApiV1ApplicationsActionNameRequest$Outbound; +} + +export function postApiV1ApplicationsActionNameRequestToJSON( + postApiV1ApplicationsActionNameRequest: + PostApiV1ApplicationsActionNameRequest, +): string { + return JSON.stringify( + PostApiV1ApplicationsActionNameRequest$outboundSchema.parse( + postApiV1ApplicationsActionNameRequest, + ), + ); +} + +export function postApiV1ApplicationsActionNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PostApiV1ApplicationsActionNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1ApplicationsActionNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1applicationstest.ts b/src/models/operations/postapiv1applicationstest.ts new file mode 100644 index 0000000..93f79f3 --- /dev/null +++ b/src/models/operations/postapiv1applicationstest.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1ApplicationsTestRequest = { + forceTest?: boolean | undefined; + applicationResource?: models.ApplicationResource | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsTestRequest$inboundSchema: z.ZodType< + PostApiV1ApplicationsTestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceTest: z.boolean().default(false), + ApplicationResource: models.ApplicationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ApplicationResource": "applicationResource", + }); +}); + +/** @internal */ +export type PostApiV1ApplicationsTestRequest$Outbound = { + forceTest: boolean; + ApplicationResource?: models.ApplicationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1ApplicationsTestRequest$outboundSchema: z.ZodType< + PostApiV1ApplicationsTestRequest$Outbound, + z.ZodTypeDef, + PostApiV1ApplicationsTestRequest +> = z.object({ + forceTest: z.boolean().default(false), + applicationResource: models.ApplicationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + applicationResource: "ApplicationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1ApplicationsTestRequest$ { + /** @deprecated use `PostApiV1ApplicationsTestRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1ApplicationsTestRequest$inboundSchema; + /** @deprecated use `PostApiV1ApplicationsTestRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1ApplicationsTestRequest$outboundSchema; + /** @deprecated use `PostApiV1ApplicationsTestRequest$Outbound` instead. */ + export type Outbound = PostApiV1ApplicationsTestRequest$Outbound; +} + +export function postApiV1ApplicationsTestRequestToJSON( + postApiV1ApplicationsTestRequest: PostApiV1ApplicationsTestRequest, +): string { + return JSON.stringify( + PostApiV1ApplicationsTestRequest$outboundSchema.parse( + postApiV1ApplicationsTestRequest, + ), + ); +} + +export function postApiV1ApplicationsTestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1ApplicationsTestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1ApplicationsTestRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1downloadclient.ts b/src/models/operations/postapiv1downloadclient.ts new file mode 100644 index 0000000..330d0ec --- /dev/null +++ b/src/models/operations/postapiv1downloadclient.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1DownloadclientRequest = { + forceSave?: boolean | undefined; + downloadClientResource?: models.DownloadClientResource | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientRequest$inboundSchema: z.ZodType< + PostApiV1DownloadclientRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + DownloadClientResource: models.DownloadClientResource$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "DownloadClientResource": "downloadClientResource", + }); +}); + +/** @internal */ +export type PostApiV1DownloadclientRequest$Outbound = { + forceSave: boolean; + DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientRequest$outboundSchema: z.ZodType< + PostApiV1DownloadclientRequest$Outbound, + z.ZodTypeDef, + PostApiV1DownloadclientRequest +> = z.object({ + forceSave: z.boolean().default(false), + downloadClientResource: models.DownloadClientResource$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + downloadClientResource: "DownloadClientResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1DownloadclientRequest$ { + /** @deprecated use `PostApiV1DownloadclientRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1DownloadclientRequest$inboundSchema; + /** @deprecated use `PostApiV1DownloadclientRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1DownloadclientRequest$outboundSchema; + /** @deprecated use `PostApiV1DownloadclientRequest$Outbound` instead. */ + export type Outbound = PostApiV1DownloadclientRequest$Outbound; +} + +export function postApiV1DownloadclientRequestToJSON( + postApiV1DownloadclientRequest: PostApiV1DownloadclientRequest, +): string { + return JSON.stringify( + PostApiV1DownloadclientRequest$outboundSchema.parse( + postApiV1DownloadclientRequest, + ), + ); +} + +export function postApiV1DownloadclientRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1DownloadclientRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1DownloadclientRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1downloadclientactionname.ts b/src/models/operations/postapiv1downloadclientactionname.ts new file mode 100644 index 0000000..2125f66 --- /dev/null +++ b/src/models/operations/postapiv1downloadclientactionname.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1DownloadclientActionNameRequest = { + name: string; + downloadClientResource?: models.DownloadClientResource | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientActionNameRequest$inboundSchema: z.ZodType< + PostApiV1DownloadclientActionNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + DownloadClientResource: models.DownloadClientResource$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "DownloadClientResource": "downloadClientResource", + }); +}); + +/** @internal */ +export type PostApiV1DownloadclientActionNameRequest$Outbound = { + name: string; + DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientActionNameRequest$outboundSchema: z.ZodType< + PostApiV1DownloadclientActionNameRequest$Outbound, + z.ZodTypeDef, + PostApiV1DownloadclientActionNameRequest +> = z.object({ + name: z.string(), + downloadClientResource: models.DownloadClientResource$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + downloadClientResource: "DownloadClientResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1DownloadclientActionNameRequest$ { + /** @deprecated use `PostApiV1DownloadclientActionNameRequest$inboundSchema` instead. */ + export const inboundSchema = + PostApiV1DownloadclientActionNameRequest$inboundSchema; + /** @deprecated use `PostApiV1DownloadclientActionNameRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1DownloadclientActionNameRequest$outboundSchema; + /** @deprecated use `PostApiV1DownloadclientActionNameRequest$Outbound` instead. */ + export type Outbound = PostApiV1DownloadclientActionNameRequest$Outbound; +} + +export function postApiV1DownloadclientActionNameRequestToJSON( + postApiV1DownloadclientActionNameRequest: + PostApiV1DownloadclientActionNameRequest, +): string { + return JSON.stringify( + PostApiV1DownloadclientActionNameRequest$outboundSchema.parse( + postApiV1DownloadclientActionNameRequest, + ), + ); +} + +export function postApiV1DownloadclientActionNameRequestFromJSON( + jsonString: string, +): SafeParseResult< + PostApiV1DownloadclientActionNameRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PostApiV1DownloadclientActionNameRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PostApiV1DownloadclientActionNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1downloadclienttest.ts b/src/models/operations/postapiv1downloadclienttest.ts new file mode 100644 index 0000000..f0b1870 --- /dev/null +++ b/src/models/operations/postapiv1downloadclienttest.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1DownloadclientTestRequest = { + forceTest?: boolean | undefined; + downloadClientResource?: models.DownloadClientResource | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientTestRequest$inboundSchema: z.ZodType< + PostApiV1DownloadclientTestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceTest: z.boolean().default(false), + DownloadClientResource: models.DownloadClientResource$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "DownloadClientResource": "downloadClientResource", + }); +}); + +/** @internal */ +export type PostApiV1DownloadclientTestRequest$Outbound = { + forceTest: boolean; + DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1DownloadclientTestRequest$outboundSchema: z.ZodType< + PostApiV1DownloadclientTestRequest$Outbound, + z.ZodTypeDef, + PostApiV1DownloadclientTestRequest +> = z.object({ + forceTest: z.boolean().default(false), + downloadClientResource: models.DownloadClientResource$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + downloadClientResource: "DownloadClientResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1DownloadclientTestRequest$ { + /** @deprecated use `PostApiV1DownloadclientTestRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1DownloadclientTestRequest$inboundSchema; + /** @deprecated use `PostApiV1DownloadclientTestRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1DownloadclientTestRequest$outboundSchema; + /** @deprecated use `PostApiV1DownloadclientTestRequest$Outbound` instead. */ + export type Outbound = PostApiV1DownloadclientTestRequest$Outbound; +} + +export function postApiV1DownloadclientTestRequestToJSON( + postApiV1DownloadclientTestRequest: PostApiV1DownloadclientTestRequest, +): string { + return JSON.stringify( + PostApiV1DownloadclientTestRequest$outboundSchema.parse( + postApiV1DownloadclientTestRequest, + ), + ); +} + +export function postApiV1DownloadclientTestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PostApiV1DownloadclientTestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1DownloadclientTestRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexer.ts b/src/models/operations/postapiv1indexer.ts new file mode 100644 index 0000000..eae33ac --- /dev/null +++ b/src/models/operations/postapiv1indexer.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerRequest = { + forceSave?: boolean | undefined; + indexerResource?: models.IndexerResourceInput | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerRequest$inboundSchema: z.ZodType< + PostApiV1IndexerRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + IndexerResource: models.IndexerResourceInput$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerResource": "indexerResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerRequest$Outbound = { + forceSave: boolean; + IndexerResource?: models.IndexerResourceInput$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerRequest$outboundSchema: z.ZodType< + PostApiV1IndexerRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerRequest +> = z.object({ + forceSave: z.boolean().default(false), + indexerResource: models.IndexerResourceInput$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerResource: "IndexerResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerRequest$ { + /** @deprecated use `PostApiV1IndexerRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1IndexerRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1IndexerRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerRequest$Outbound; +} + +export function postApiV1IndexerRequestToJSON( + postApiV1IndexerRequest: PostApiV1IndexerRequest, +): string { + return JSON.stringify( + PostApiV1IndexerRequest$outboundSchema.parse(postApiV1IndexerRequest), + ); +} + +export function postApiV1IndexerRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1IndexerRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexeractionname.ts b/src/models/operations/postapiv1indexeractionname.ts new file mode 100644 index 0000000..23ff462 --- /dev/null +++ b/src/models/operations/postapiv1indexeractionname.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerActionNameRequest = { + name: string; + indexerResource?: models.IndexerResourceInput | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerActionNameRequest$inboundSchema: z.ZodType< + PostApiV1IndexerActionNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + IndexerResource: models.IndexerResourceInput$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerResource": "indexerResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerActionNameRequest$Outbound = { + name: string; + IndexerResource?: models.IndexerResourceInput$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerActionNameRequest$outboundSchema: z.ZodType< + PostApiV1IndexerActionNameRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerActionNameRequest +> = z.object({ + name: z.string(), + indexerResource: models.IndexerResourceInput$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerResource: "IndexerResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerActionNameRequest$ { + /** @deprecated use `PostApiV1IndexerActionNameRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1IndexerActionNameRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerActionNameRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1IndexerActionNameRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerActionNameRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerActionNameRequest$Outbound; +} + +export function postApiV1IndexerActionNameRequestToJSON( + postApiV1IndexerActionNameRequest: PostApiV1IndexerActionNameRequest, +): string { + return JSON.stringify( + PostApiV1IndexerActionNameRequest$outboundSchema.parse( + postApiV1IndexerActionNameRequest, + ), + ); +} + +export function postApiV1IndexerActionNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1IndexerActionNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerActionNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexerproxy.ts b/src/models/operations/postapiv1indexerproxy.ts new file mode 100644 index 0000000..909c7bd --- /dev/null +++ b/src/models/operations/postapiv1indexerproxy.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerproxyRequest = { + forceSave?: boolean | undefined; + indexerProxyResource?: models.IndexerProxyResource | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyRequest$inboundSchema: z.ZodType< + PostApiV1IndexerproxyRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerProxyResource": "indexerProxyResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerproxyRequest$Outbound = { + forceSave: boolean; + IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyRequest$outboundSchema: z.ZodType< + PostApiV1IndexerproxyRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerproxyRequest +> = z.object({ + forceSave: z.boolean().default(false), + indexerProxyResource: models.IndexerProxyResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerProxyResource: "IndexerProxyResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerproxyRequest$ { + /** @deprecated use `PostApiV1IndexerproxyRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1IndexerproxyRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerproxyRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1IndexerproxyRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerproxyRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerproxyRequest$Outbound; +} + +export function postApiV1IndexerproxyRequestToJSON( + postApiV1IndexerproxyRequest: PostApiV1IndexerproxyRequest, +): string { + return JSON.stringify( + PostApiV1IndexerproxyRequest$outboundSchema.parse( + postApiV1IndexerproxyRequest, + ), + ); +} + +export function postApiV1IndexerproxyRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1IndexerproxyRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerproxyRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexerproxyactionname.ts b/src/models/operations/postapiv1indexerproxyactionname.ts new file mode 100644 index 0000000..35b4cb8 --- /dev/null +++ b/src/models/operations/postapiv1indexerproxyactionname.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerproxyActionNameRequest = { + name: string; + indexerProxyResource?: models.IndexerProxyResource | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyActionNameRequest$inboundSchema: z.ZodType< + PostApiV1IndexerproxyActionNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerProxyResource": "indexerProxyResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerproxyActionNameRequest$Outbound = { + name: string; + IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyActionNameRequest$outboundSchema: z.ZodType< + PostApiV1IndexerproxyActionNameRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerproxyActionNameRequest +> = z.object({ + name: z.string(), + indexerProxyResource: models.IndexerProxyResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerProxyResource: "IndexerProxyResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerproxyActionNameRequest$ { + /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$inboundSchema` instead. */ + export const inboundSchema = + PostApiV1IndexerproxyActionNameRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1IndexerproxyActionNameRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerproxyActionNameRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerproxyActionNameRequest$Outbound; +} + +export function postApiV1IndexerproxyActionNameRequestToJSON( + postApiV1IndexerproxyActionNameRequest: + PostApiV1IndexerproxyActionNameRequest, +): string { + return JSON.stringify( + PostApiV1IndexerproxyActionNameRequest$outboundSchema.parse( + postApiV1IndexerproxyActionNameRequest, + ), + ); +} + +export function postApiV1IndexerproxyActionNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PostApiV1IndexerproxyActionNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerproxyActionNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexerproxytest.ts b/src/models/operations/postapiv1indexerproxytest.ts new file mode 100644 index 0000000..8ad3cde --- /dev/null +++ b/src/models/operations/postapiv1indexerproxytest.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerproxyTestRequest = { + forceTest?: boolean | undefined; + indexerProxyResource?: models.IndexerProxyResource | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyTestRequest$inboundSchema: z.ZodType< + PostApiV1IndexerproxyTestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceTest: z.boolean().default(false), + IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerProxyResource": "indexerProxyResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerproxyTestRequest$Outbound = { + forceTest: boolean; + IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerproxyTestRequest$outboundSchema: z.ZodType< + PostApiV1IndexerproxyTestRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerproxyTestRequest +> = z.object({ + forceTest: z.boolean().default(false), + indexerProxyResource: models.IndexerProxyResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerProxyResource: "IndexerProxyResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerproxyTestRequest$ { + /** @deprecated use `PostApiV1IndexerproxyTestRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1IndexerproxyTestRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerproxyTestRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1IndexerproxyTestRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerproxyTestRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerproxyTestRequest$Outbound; +} + +export function postApiV1IndexerproxyTestRequestToJSON( + postApiV1IndexerproxyTestRequest: PostApiV1IndexerproxyTestRequest, +): string { + return JSON.stringify( + PostApiV1IndexerproxyTestRequest$outboundSchema.parse( + postApiV1IndexerproxyTestRequest, + ), + ); +} + +export function postApiV1IndexerproxyTestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1IndexerproxyTestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerproxyTestRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1indexertest.ts b/src/models/operations/postapiv1indexertest.ts new file mode 100644 index 0000000..8a00b3f --- /dev/null +++ b/src/models/operations/postapiv1indexertest.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1IndexerTestRequest = { + forceTest?: boolean | undefined; + indexerResource?: models.IndexerResourceInput | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerTestRequest$inboundSchema: z.ZodType< + PostApiV1IndexerTestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceTest: z.boolean().default(false), + IndexerResource: models.IndexerResourceInput$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerResource": "indexerResource", + }); +}); + +/** @internal */ +export type PostApiV1IndexerTestRequest$Outbound = { + forceTest: boolean; + IndexerResource?: models.IndexerResourceInput$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1IndexerTestRequest$outboundSchema: z.ZodType< + PostApiV1IndexerTestRequest$Outbound, + z.ZodTypeDef, + PostApiV1IndexerTestRequest +> = z.object({ + forceTest: z.boolean().default(false), + indexerResource: models.IndexerResourceInput$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerResource: "IndexerResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1IndexerTestRequest$ { + /** @deprecated use `PostApiV1IndexerTestRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1IndexerTestRequest$inboundSchema; + /** @deprecated use `PostApiV1IndexerTestRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1IndexerTestRequest$outboundSchema; + /** @deprecated use `PostApiV1IndexerTestRequest$Outbound` instead. */ + export type Outbound = PostApiV1IndexerTestRequest$Outbound; +} + +export function postApiV1IndexerTestRequestToJSON( + postApiV1IndexerTestRequest: PostApiV1IndexerTestRequest, +): string { + return JSON.stringify( + PostApiV1IndexerTestRequest$outboundSchema.parse( + postApiV1IndexerTestRequest, + ), + ); +} + +export function postApiV1IndexerTestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1IndexerTestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1IndexerTestRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1notification.ts b/src/models/operations/postapiv1notification.ts new file mode 100644 index 0000000..f5c7823 --- /dev/null +++ b/src/models/operations/postapiv1notification.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1NotificationRequest = { + forceSave?: boolean | undefined; + notificationResource?: models.NotificationResource | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationRequest$inboundSchema: z.ZodType< + PostApiV1NotificationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + NotificationResource: models.NotificationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "NotificationResource": "notificationResource", + }); +}); + +/** @internal */ +export type PostApiV1NotificationRequest$Outbound = { + forceSave: boolean; + NotificationResource?: models.NotificationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationRequest$outboundSchema: z.ZodType< + PostApiV1NotificationRequest$Outbound, + z.ZodTypeDef, + PostApiV1NotificationRequest +> = z.object({ + forceSave: z.boolean().default(false), + notificationResource: models.NotificationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + notificationResource: "NotificationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1NotificationRequest$ { + /** @deprecated use `PostApiV1NotificationRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1NotificationRequest$inboundSchema; + /** @deprecated use `PostApiV1NotificationRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1NotificationRequest$outboundSchema; + /** @deprecated use `PostApiV1NotificationRequest$Outbound` instead. */ + export type Outbound = PostApiV1NotificationRequest$Outbound; +} + +export function postApiV1NotificationRequestToJSON( + postApiV1NotificationRequest: PostApiV1NotificationRequest, +): string { + return JSON.stringify( + PostApiV1NotificationRequest$outboundSchema.parse( + postApiV1NotificationRequest, + ), + ); +} + +export function postApiV1NotificationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1NotificationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1NotificationRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1notificationactionname.ts b/src/models/operations/postapiv1notificationactionname.ts new file mode 100644 index 0000000..68baad0 --- /dev/null +++ b/src/models/operations/postapiv1notificationactionname.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1NotificationActionNameRequest = { + name: string; + notificationResource?: models.NotificationResource | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationActionNameRequest$inboundSchema: z.ZodType< + PostApiV1NotificationActionNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + NotificationResource: models.NotificationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "NotificationResource": "notificationResource", + }); +}); + +/** @internal */ +export type PostApiV1NotificationActionNameRequest$Outbound = { + name: string; + NotificationResource?: models.NotificationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationActionNameRequest$outboundSchema: z.ZodType< + PostApiV1NotificationActionNameRequest$Outbound, + z.ZodTypeDef, + PostApiV1NotificationActionNameRequest +> = z.object({ + name: z.string(), + notificationResource: models.NotificationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + notificationResource: "NotificationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1NotificationActionNameRequest$ { + /** @deprecated use `PostApiV1NotificationActionNameRequest$inboundSchema` instead. */ + export const inboundSchema = + PostApiV1NotificationActionNameRequest$inboundSchema; + /** @deprecated use `PostApiV1NotificationActionNameRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1NotificationActionNameRequest$outboundSchema; + /** @deprecated use `PostApiV1NotificationActionNameRequest$Outbound` instead. */ + export type Outbound = PostApiV1NotificationActionNameRequest$Outbound; +} + +export function postApiV1NotificationActionNameRequestToJSON( + postApiV1NotificationActionNameRequest: + PostApiV1NotificationActionNameRequest, +): string { + return JSON.stringify( + PostApiV1NotificationActionNameRequest$outboundSchema.parse( + postApiV1NotificationActionNameRequest, + ), + ); +} + +export function postApiV1NotificationActionNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PostApiV1NotificationActionNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1NotificationActionNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1notificationtest.ts b/src/models/operations/postapiv1notificationtest.ts new file mode 100644 index 0000000..7441a9c --- /dev/null +++ b/src/models/operations/postapiv1notificationtest.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PostApiV1NotificationTestRequest = { + forceTest?: boolean | undefined; + notificationResource?: models.NotificationResource | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationTestRequest$inboundSchema: z.ZodType< + PostApiV1NotificationTestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceTest: z.boolean().default(false), + NotificationResource: models.NotificationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "NotificationResource": "notificationResource", + }); +}); + +/** @internal */ +export type PostApiV1NotificationTestRequest$Outbound = { + forceTest: boolean; + NotificationResource?: models.NotificationResource$Outbound | undefined; +}; + +/** @internal */ +export const PostApiV1NotificationTestRequest$outboundSchema: z.ZodType< + PostApiV1NotificationTestRequest$Outbound, + z.ZodTypeDef, + PostApiV1NotificationTestRequest +> = z.object({ + forceTest: z.boolean().default(false), + notificationResource: models.NotificationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + notificationResource: "NotificationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PostApiV1NotificationTestRequest$ { + /** @deprecated use `PostApiV1NotificationTestRequest$inboundSchema` instead. */ + export const inboundSchema = PostApiV1NotificationTestRequest$inboundSchema; + /** @deprecated use `PostApiV1NotificationTestRequest$outboundSchema` instead. */ + export const outboundSchema = PostApiV1NotificationTestRequest$outboundSchema; + /** @deprecated use `PostApiV1NotificationTestRequest$Outbound` instead. */ + export type Outbound = PostApiV1NotificationTestRequest$Outbound; +} + +export function postApiV1NotificationTestRequestToJSON( + postApiV1NotificationTestRequest: PostApiV1NotificationTestRequest, +): string { + return JSON.stringify( + PostApiV1NotificationTestRequest$outboundSchema.parse( + postApiV1NotificationTestRequest, + ), + ); +} + +export function postApiV1NotificationTestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PostApiV1NotificationTestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1NotificationTestRequest' from JSON`, + ); +} diff --git a/src/models/operations/postapiv1systembackuprestoreid.ts b/src/models/operations/postapiv1systembackuprestoreid.ts new file mode 100644 index 0000000..58c23c9 --- /dev/null +++ b/src/models/operations/postapiv1systembackuprestoreid.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PostApiV1SystemBackupRestoreIdRequest = { + id: number; +}; + +/** @internal */ +export const PostApiV1SystemBackupRestoreIdRequest$inboundSchema: z.ZodType< + PostApiV1SystemBackupRestoreIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int(), +}); + +/** @internal */ +export type PostApiV1SystemBackupRestoreIdRequest$Outbound = { + id: number; +}; + +/** @internal */ +export const PostApiV1SystemBackupRestoreIdRequest$outboundSchema: z.ZodType< + PostApiV1SystemBackupRestoreIdRequest$Outbound, + z.ZodTypeDef, + PostApiV1SystemBackupRestoreIdRequest +> = z.object({ + id: 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 PostApiV1SystemBackupRestoreIdRequest$ { + /** @deprecated use `PostApiV1SystemBackupRestoreIdRequest$inboundSchema` instead. */ + export const inboundSchema = + PostApiV1SystemBackupRestoreIdRequest$inboundSchema; + /** @deprecated use `PostApiV1SystemBackupRestoreIdRequest$outboundSchema` instead. */ + export const outboundSchema = + PostApiV1SystemBackupRestoreIdRequest$outboundSchema; + /** @deprecated use `PostApiV1SystemBackupRestoreIdRequest$Outbound` instead. */ + export type Outbound = PostApiV1SystemBackupRestoreIdRequest$Outbound; +} + +export function postApiV1SystemBackupRestoreIdRequestToJSON( + postApiV1SystemBackupRestoreIdRequest: PostApiV1SystemBackupRestoreIdRequest, +): string { + return JSON.stringify( + PostApiV1SystemBackupRestoreIdRequest$outboundSchema.parse( + postApiV1SystemBackupRestoreIdRequest, + ), + ); +} + +export function postApiV1SystemBackupRestoreIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PostApiV1SystemBackupRestoreIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PostApiV1SystemBackupRestoreIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1applicationsid.ts b/src/models/operations/putapiv1applicationsid.ts new file mode 100644 index 0000000..513356f --- /dev/null +++ b/src/models/operations/putapiv1applicationsid.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1ApplicationsIdRequest = { + forceSave?: boolean | undefined; + id: string; + applicationResource?: models.ApplicationResource | undefined; +}; + +/** @internal */ +export const PutApiV1ApplicationsIdRequest$inboundSchema: z.ZodType< + PutApiV1ApplicationsIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + ApplicationResource: models.ApplicationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "ApplicationResource": "applicationResource", + }); +}); + +/** @internal */ +export type PutApiV1ApplicationsIdRequest$Outbound = { + forceSave: boolean; + id: string; + ApplicationResource?: models.ApplicationResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1ApplicationsIdRequest$outboundSchema: z.ZodType< + PutApiV1ApplicationsIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1ApplicationsIdRequest +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + applicationResource: models.ApplicationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + applicationResource: "ApplicationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1ApplicationsIdRequest$ { + /** @deprecated use `PutApiV1ApplicationsIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1ApplicationsIdRequest$inboundSchema; + /** @deprecated use `PutApiV1ApplicationsIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1ApplicationsIdRequest$outboundSchema; + /** @deprecated use `PutApiV1ApplicationsIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1ApplicationsIdRequest$Outbound; +} + +export function putApiV1ApplicationsIdRequestToJSON( + putApiV1ApplicationsIdRequest: PutApiV1ApplicationsIdRequest, +): string { + return JSON.stringify( + PutApiV1ApplicationsIdRequest$outboundSchema.parse( + putApiV1ApplicationsIdRequest, + ), + ); +} + +export function putApiV1ApplicationsIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1ApplicationsIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1ApplicationsIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1appprofileid.ts b/src/models/operations/putapiv1appprofileid.ts new file mode 100644 index 0000000..7f4b65e --- /dev/null +++ b/src/models/operations/putapiv1appprofileid.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1AppprofileIdRequest = { + id: string; + appProfileResource?: models.AppProfileResource | undefined; +}; + +/** @internal */ +export const PutApiV1AppprofileIdRequest$inboundSchema: z.ZodType< + PutApiV1AppprofileIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + AppProfileResource: models.AppProfileResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "AppProfileResource": "appProfileResource", + }); +}); + +/** @internal */ +export type PutApiV1AppprofileIdRequest$Outbound = { + id: string; + AppProfileResource?: models.AppProfileResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1AppprofileIdRequest$outboundSchema: z.ZodType< + PutApiV1AppprofileIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1AppprofileIdRequest +> = z.object({ + id: z.string(), + appProfileResource: models.AppProfileResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + appProfileResource: "AppProfileResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1AppprofileIdRequest$ { + /** @deprecated use `PutApiV1AppprofileIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1AppprofileIdRequest$inboundSchema; + /** @deprecated use `PutApiV1AppprofileIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1AppprofileIdRequest$outboundSchema; + /** @deprecated use `PutApiV1AppprofileIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1AppprofileIdRequest$Outbound; +} + +export function putApiV1AppprofileIdRequestToJSON( + putApiV1AppprofileIdRequest: PutApiV1AppprofileIdRequest, +): string { + return JSON.stringify( + PutApiV1AppprofileIdRequest$outboundSchema.parse( + putApiV1AppprofileIdRequest, + ), + ); +} + +export function putApiV1AppprofileIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1AppprofileIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1AppprofileIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1configdevelopmentid.ts b/src/models/operations/putapiv1configdevelopmentid.ts new file mode 100644 index 0000000..835bc01 --- /dev/null +++ b/src/models/operations/putapiv1configdevelopmentid.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1ConfigDevelopmentIdRequest = { + id: string; + developmentConfigResource?: models.DevelopmentConfigResource | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigDevelopmentIdRequest$inboundSchema: z.ZodType< + PutApiV1ConfigDevelopmentIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + DevelopmentConfigResource: models.DevelopmentConfigResource$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "DevelopmentConfigResource": "developmentConfigResource", + }); +}); + +/** @internal */ +export type PutApiV1ConfigDevelopmentIdRequest$Outbound = { + id: string; + DevelopmentConfigResource?: + | models.DevelopmentConfigResource$Outbound + | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigDevelopmentIdRequest$outboundSchema: z.ZodType< + PutApiV1ConfigDevelopmentIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1ConfigDevelopmentIdRequest +> = z.object({ + id: z.string(), + developmentConfigResource: models.DevelopmentConfigResource$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + developmentConfigResource: "DevelopmentConfigResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1ConfigDevelopmentIdRequest$ { + /** @deprecated use `PutApiV1ConfigDevelopmentIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1ConfigDevelopmentIdRequest$inboundSchema; + /** @deprecated use `PutApiV1ConfigDevelopmentIdRequest$outboundSchema` instead. */ + export const outboundSchema = + PutApiV1ConfigDevelopmentIdRequest$outboundSchema; + /** @deprecated use `PutApiV1ConfigDevelopmentIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1ConfigDevelopmentIdRequest$Outbound; +} + +export function putApiV1ConfigDevelopmentIdRequestToJSON( + putApiV1ConfigDevelopmentIdRequest: PutApiV1ConfigDevelopmentIdRequest, +): string { + return JSON.stringify( + PutApiV1ConfigDevelopmentIdRequest$outboundSchema.parse( + putApiV1ConfigDevelopmentIdRequest, + ), + ); +} + +export function putApiV1ConfigDevelopmentIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PutApiV1ConfigDevelopmentIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1ConfigDevelopmentIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1configdownloadclientid.ts b/src/models/operations/putapiv1configdownloadclientid.ts new file mode 100644 index 0000000..465054d --- /dev/null +++ b/src/models/operations/putapiv1configdownloadclientid.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1ConfigDownloadclientIdRequest = { + id: string; + downloadClientConfigResource?: + | models.DownloadClientConfigResource + | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigDownloadclientIdRequest$inboundSchema: z.ZodType< + PutApiV1ConfigDownloadclientIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + DownloadClientConfigResource: models + .DownloadClientConfigResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "DownloadClientConfigResource": "downloadClientConfigResource", + }); +}); + +/** @internal */ +export type PutApiV1ConfigDownloadclientIdRequest$Outbound = { + id: string; + DownloadClientConfigResource?: + | models.DownloadClientConfigResource$Outbound + | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigDownloadclientIdRequest$outboundSchema: z.ZodType< + PutApiV1ConfigDownloadclientIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1ConfigDownloadclientIdRequest +> = z.object({ + id: z.string(), + downloadClientConfigResource: models + .DownloadClientConfigResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + downloadClientConfigResource: "DownloadClientConfigResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1ConfigDownloadclientIdRequest$ { + /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$inboundSchema` instead. */ + export const inboundSchema = + PutApiV1ConfigDownloadclientIdRequest$inboundSchema; + /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$outboundSchema` instead. */ + export const outboundSchema = + PutApiV1ConfigDownloadclientIdRequest$outboundSchema; + /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1ConfigDownloadclientIdRequest$Outbound; +} + +export function putApiV1ConfigDownloadclientIdRequestToJSON( + putApiV1ConfigDownloadclientIdRequest: PutApiV1ConfigDownloadclientIdRequest, +): string { + return JSON.stringify( + PutApiV1ConfigDownloadclientIdRequest$outboundSchema.parse( + putApiV1ConfigDownloadclientIdRequest, + ), + ); +} + +export function putApiV1ConfigDownloadclientIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PutApiV1ConfigDownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1ConfigDownloadclientIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1confighostid.ts b/src/models/operations/putapiv1confighostid.ts new file mode 100644 index 0000000..c59eba3 --- /dev/null +++ b/src/models/operations/putapiv1confighostid.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1ConfigHostIdRequest = { + id: string; + hostConfigResource?: models.HostConfigResource | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigHostIdRequest$inboundSchema: z.ZodType< + PutApiV1ConfigHostIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + HostConfigResource: models.HostConfigResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "HostConfigResource": "hostConfigResource", + }); +}); + +/** @internal */ +export type PutApiV1ConfigHostIdRequest$Outbound = { + id: string; + HostConfigResource?: models.HostConfigResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigHostIdRequest$outboundSchema: z.ZodType< + PutApiV1ConfigHostIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1ConfigHostIdRequest +> = z.object({ + id: z.string(), + hostConfigResource: models.HostConfigResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + hostConfigResource: "HostConfigResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1ConfigHostIdRequest$ { + /** @deprecated use `PutApiV1ConfigHostIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1ConfigHostIdRequest$inboundSchema; + /** @deprecated use `PutApiV1ConfigHostIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1ConfigHostIdRequest$outboundSchema; + /** @deprecated use `PutApiV1ConfigHostIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1ConfigHostIdRequest$Outbound; +} + +export function putApiV1ConfigHostIdRequestToJSON( + putApiV1ConfigHostIdRequest: PutApiV1ConfigHostIdRequest, +): string { + return JSON.stringify( + PutApiV1ConfigHostIdRequest$outboundSchema.parse( + putApiV1ConfigHostIdRequest, + ), + ); +} + +export function putApiV1ConfigHostIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1ConfigHostIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1ConfigHostIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1configuiid.ts b/src/models/operations/putapiv1configuiid.ts new file mode 100644 index 0000000..db2f03f --- /dev/null +++ b/src/models/operations/putapiv1configuiid.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1ConfigUiIdRequest = { + id: string; + uiConfigResource?: models.UiConfigResource | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigUiIdRequest$inboundSchema: z.ZodType< + PutApiV1ConfigUiIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + UiConfigResource: models.UiConfigResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "UiConfigResource": "uiConfigResource", + }); +}); + +/** @internal */ +export type PutApiV1ConfigUiIdRequest$Outbound = { + id: string; + UiConfigResource?: models.UiConfigResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1ConfigUiIdRequest$outboundSchema: z.ZodType< + PutApiV1ConfigUiIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1ConfigUiIdRequest +> = z.object({ + id: z.string(), + uiConfigResource: models.UiConfigResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + uiConfigResource: "UiConfigResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1ConfigUiIdRequest$ { + /** @deprecated use `PutApiV1ConfigUiIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1ConfigUiIdRequest$inboundSchema; + /** @deprecated use `PutApiV1ConfigUiIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1ConfigUiIdRequest$outboundSchema; + /** @deprecated use `PutApiV1ConfigUiIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1ConfigUiIdRequest$Outbound; +} + +export function putApiV1ConfigUiIdRequestToJSON( + putApiV1ConfigUiIdRequest: PutApiV1ConfigUiIdRequest, +): string { + return JSON.stringify( + PutApiV1ConfigUiIdRequest$outboundSchema.parse(putApiV1ConfigUiIdRequest), + ); +} + +export function putApiV1ConfigUiIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1ConfigUiIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1ConfigUiIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1customfilterid.ts b/src/models/operations/putapiv1customfilterid.ts new file mode 100644 index 0000000..8ca2f30 --- /dev/null +++ b/src/models/operations/putapiv1customfilterid.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1CustomfilterIdRequest = { + id: string; + customFilterResource?: models.CustomFilterResource | undefined; +}; + +/** @internal */ +export const PutApiV1CustomfilterIdRequest$inboundSchema: z.ZodType< + PutApiV1CustomfilterIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + CustomFilterResource: models.CustomFilterResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "CustomFilterResource": "customFilterResource", + }); +}); + +/** @internal */ +export type PutApiV1CustomfilterIdRequest$Outbound = { + id: string; + CustomFilterResource?: models.CustomFilterResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1CustomfilterIdRequest$outboundSchema: z.ZodType< + PutApiV1CustomfilterIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1CustomfilterIdRequest +> = z.object({ + id: z.string(), + customFilterResource: models.CustomFilterResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + customFilterResource: "CustomFilterResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1CustomfilterIdRequest$ { + /** @deprecated use `PutApiV1CustomfilterIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1CustomfilterIdRequest$inboundSchema; + /** @deprecated use `PutApiV1CustomfilterIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1CustomfilterIdRequest$outboundSchema; + /** @deprecated use `PutApiV1CustomfilterIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1CustomfilterIdRequest$Outbound; +} + +export function putApiV1CustomfilterIdRequestToJSON( + putApiV1CustomfilterIdRequest: PutApiV1CustomfilterIdRequest, +): string { + return JSON.stringify( + PutApiV1CustomfilterIdRequest$outboundSchema.parse( + putApiV1CustomfilterIdRequest, + ), + ); +} + +export function putApiV1CustomfilterIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1CustomfilterIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1CustomfilterIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1downloadclientid.ts b/src/models/operations/putapiv1downloadclientid.ts new file mode 100644 index 0000000..df31f2c --- /dev/null +++ b/src/models/operations/putapiv1downloadclientid.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1DownloadclientIdRequest = { + forceSave?: boolean | undefined; + id: string; + downloadClientResource?: models.DownloadClientResource | undefined; +}; + +/** @internal */ +export const PutApiV1DownloadclientIdRequest$inboundSchema: z.ZodType< + PutApiV1DownloadclientIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + DownloadClientResource: models.DownloadClientResource$inboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + "DownloadClientResource": "downloadClientResource", + }); +}); + +/** @internal */ +export type PutApiV1DownloadclientIdRequest$Outbound = { + forceSave: boolean; + id: string; + DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1DownloadclientIdRequest$outboundSchema: z.ZodType< + PutApiV1DownloadclientIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1DownloadclientIdRequest +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + downloadClientResource: models.DownloadClientResource$outboundSchema + .optional(), +}).transform((v) => { + return remap$(v, { + downloadClientResource: "DownloadClientResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1DownloadclientIdRequest$ { + /** @deprecated use `PutApiV1DownloadclientIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1DownloadclientIdRequest$inboundSchema; + /** @deprecated use `PutApiV1DownloadclientIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1DownloadclientIdRequest$outboundSchema; + /** @deprecated use `PutApiV1DownloadclientIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1DownloadclientIdRequest$Outbound; +} + +export function putApiV1DownloadclientIdRequestToJSON( + putApiV1DownloadclientIdRequest: PutApiV1DownloadclientIdRequest, +): string { + return JSON.stringify( + PutApiV1DownloadclientIdRequest$outboundSchema.parse( + putApiV1DownloadclientIdRequest, + ), + ); +} + +export function putApiV1DownloadclientIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1DownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1DownloadclientIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1indexerid.ts b/src/models/operations/putapiv1indexerid.ts new file mode 100644 index 0000000..8fcdae7 --- /dev/null +++ b/src/models/operations/putapiv1indexerid.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1IndexerIdRequest = { + forceSave?: boolean | undefined; + id: string; + indexerResource?: models.IndexerResourceInput | undefined; +}; + +/** @internal */ +export const PutApiV1IndexerIdRequest$inboundSchema: z.ZodType< + PutApiV1IndexerIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + IndexerResource: models.IndexerResourceInput$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerResource": "indexerResource", + }); +}); + +/** @internal */ +export type PutApiV1IndexerIdRequest$Outbound = { + forceSave: boolean; + id: string; + IndexerResource?: models.IndexerResourceInput$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1IndexerIdRequest$outboundSchema: z.ZodType< + PutApiV1IndexerIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1IndexerIdRequest +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + indexerResource: models.IndexerResourceInput$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerResource: "IndexerResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1IndexerIdRequest$ { + /** @deprecated use `PutApiV1IndexerIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1IndexerIdRequest$inboundSchema; + /** @deprecated use `PutApiV1IndexerIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1IndexerIdRequest$outboundSchema; + /** @deprecated use `PutApiV1IndexerIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1IndexerIdRequest$Outbound; +} + +export function putApiV1IndexerIdRequestToJSON( + putApiV1IndexerIdRequest: PutApiV1IndexerIdRequest, +): string { + return JSON.stringify( + PutApiV1IndexerIdRequest$outboundSchema.parse(putApiV1IndexerIdRequest), + ); +} + +export function putApiV1IndexerIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1IndexerIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1IndexerIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1indexerproxyid.ts b/src/models/operations/putapiv1indexerproxyid.ts new file mode 100644 index 0000000..d209d3a --- /dev/null +++ b/src/models/operations/putapiv1indexerproxyid.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1IndexerproxyIdRequest = { + forceSave?: boolean | undefined; + id: string; + indexerProxyResource?: models.IndexerProxyResource | undefined; +}; + +/** @internal */ +export const PutApiV1IndexerproxyIdRequest$inboundSchema: z.ZodType< + PutApiV1IndexerproxyIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + IndexerProxyResource: models.IndexerProxyResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "IndexerProxyResource": "indexerProxyResource", + }); +}); + +/** @internal */ +export type PutApiV1IndexerproxyIdRequest$Outbound = { + forceSave: boolean; + id: string; + IndexerProxyResource?: models.IndexerProxyResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1IndexerproxyIdRequest$outboundSchema: z.ZodType< + PutApiV1IndexerproxyIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1IndexerproxyIdRequest +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + indexerProxyResource: models.IndexerProxyResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + indexerProxyResource: "IndexerProxyResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1IndexerproxyIdRequest$ { + /** @deprecated use `PutApiV1IndexerproxyIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1IndexerproxyIdRequest$inboundSchema; + /** @deprecated use `PutApiV1IndexerproxyIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1IndexerproxyIdRequest$outboundSchema; + /** @deprecated use `PutApiV1IndexerproxyIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1IndexerproxyIdRequest$Outbound; +} + +export function putApiV1IndexerproxyIdRequestToJSON( + putApiV1IndexerproxyIdRequest: PutApiV1IndexerproxyIdRequest, +): string { + return JSON.stringify( + PutApiV1IndexerproxyIdRequest$outboundSchema.parse( + putApiV1IndexerproxyIdRequest, + ), + ); +} + +export function putApiV1IndexerproxyIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1IndexerproxyIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1IndexerproxyIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1notificationid.ts b/src/models/operations/putapiv1notificationid.ts new file mode 100644 index 0000000..870f4f2 --- /dev/null +++ b/src/models/operations/putapiv1notificationid.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1NotificationIdRequest = { + forceSave?: boolean | undefined; + id: string; + notificationResource?: models.NotificationResource | undefined; +}; + +/** @internal */ +export const PutApiV1NotificationIdRequest$inboundSchema: z.ZodType< + PutApiV1NotificationIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + NotificationResource: models.NotificationResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "NotificationResource": "notificationResource", + }); +}); + +/** @internal */ +export type PutApiV1NotificationIdRequest$Outbound = { + forceSave: boolean; + id: string; + NotificationResource?: models.NotificationResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1NotificationIdRequest$outboundSchema: z.ZodType< + PutApiV1NotificationIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1NotificationIdRequest +> = z.object({ + forceSave: z.boolean().default(false), + id: z.string(), + notificationResource: models.NotificationResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + notificationResource: "NotificationResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1NotificationIdRequest$ { + /** @deprecated use `PutApiV1NotificationIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1NotificationIdRequest$inboundSchema; + /** @deprecated use `PutApiV1NotificationIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1NotificationIdRequest$outboundSchema; + /** @deprecated use `PutApiV1NotificationIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1NotificationIdRequest$Outbound; +} + +export function putApiV1NotificationIdRequestToJSON( + putApiV1NotificationIdRequest: PutApiV1NotificationIdRequest, +): string { + return JSON.stringify( + PutApiV1NotificationIdRequest$outboundSchema.parse( + putApiV1NotificationIdRequest, + ), + ); +} + +export function putApiV1NotificationIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1NotificationIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1NotificationIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/putapiv1tagid.ts b/src/models/operations/putapiv1tagid.ts new file mode 100644 index 0000000..b93f2a6 --- /dev/null +++ b/src/models/operations/putapiv1tagid.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +export type PutApiV1TagIdRequest = { + id: string; + tagResource?: models.TagResource | undefined; +}; + +/** @internal */ +export const PutApiV1TagIdRequest$inboundSchema: z.ZodType< + PutApiV1TagIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + TagResource: models.TagResource$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "TagResource": "tagResource", + }); +}); + +/** @internal */ +export type PutApiV1TagIdRequest$Outbound = { + id: string; + TagResource?: models.TagResource$Outbound | undefined; +}; + +/** @internal */ +export const PutApiV1TagIdRequest$outboundSchema: z.ZodType< + PutApiV1TagIdRequest$Outbound, + z.ZodTypeDef, + PutApiV1TagIdRequest +> = z.object({ + id: z.string(), + tagResource: models.TagResource$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + tagResource: "TagResource", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PutApiV1TagIdRequest$ { + /** @deprecated use `PutApiV1TagIdRequest$inboundSchema` instead. */ + export const inboundSchema = PutApiV1TagIdRequest$inboundSchema; + /** @deprecated use `PutApiV1TagIdRequest$outboundSchema` instead. */ + export const outboundSchema = PutApiV1TagIdRequest$outboundSchema; + /** @deprecated use `PutApiV1TagIdRequest$Outbound` instead. */ + export type Outbound = PutApiV1TagIdRequest$Outbound; +} + +export function putApiV1TagIdRequestToJSON( + putApiV1TagIdRequest: PutApiV1TagIdRequest, +): string { + return JSON.stringify( + PutApiV1TagIdRequest$outboundSchema.parse(putApiV1TagIdRequest), + ); +} + +export function putApiV1TagIdRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PutApiV1TagIdRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PutApiV1TagIdRequest' from JSON`, + ); +} diff --git a/src/models/pingresource.ts b/src/models/pingresource.ts new file mode 100644 index 0000000..80ebfe0 --- /dev/null +++ b/src/models/pingresource.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type PingResource = { + status?: string | null | undefined; +}; + +/** @internal */ +export const PingResource$inboundSchema: z.ZodType< + PingResource, + z.ZodTypeDef, + unknown +> = z.object({ + status: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type PingResource$Outbound = { + status?: string | null | undefined; +}; + +/** @internal */ +export const PingResource$outboundSchema: z.ZodType< + PingResource$Outbound, + z.ZodTypeDef, + PingResource +> = z.object({ + status: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PingResource$ { + /** @deprecated use `PingResource$inboundSchema` instead. */ + export const inboundSchema = PingResource$inboundSchema; + /** @deprecated use `PingResource$outboundSchema` instead. */ + export const outboundSchema = PingResource$outboundSchema; + /** @deprecated use `PingResource$Outbound` instead. */ + export type Outbound = PingResource$Outbound; +} + +export function pingResourceToJSON(pingResource: PingResource): string { + return JSON.stringify(PingResource$outboundSchema.parse(pingResource)); +} + +export function pingResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PingResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PingResource' from JSON`, + ); +} diff --git a/src/models/privacylevel.ts b/src/models/privacylevel.ts new file mode 100644 index 0000000..47b9191 --- /dev/null +++ b/src/models/privacylevel.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const PrivacyLevel = { + Normal: "normal", + Password: "password", + ApiKey: "apiKey", + UserName: "userName", +} as const; +export type PrivacyLevel = ClosedEnum; + +/** @internal */ +export const PrivacyLevel$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(PrivacyLevel); + +/** @internal */ +export const PrivacyLevel$outboundSchema: z.ZodNativeEnum = + PrivacyLevel$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PrivacyLevel$ { + /** @deprecated use `PrivacyLevel$inboundSchema` instead. */ + export const inboundSchema = PrivacyLevel$inboundSchema; + /** @deprecated use `PrivacyLevel$outboundSchema` instead. */ + export const outboundSchema = PrivacyLevel$outboundSchema; +} diff --git a/src/models/providermessage.ts b/src/models/providermessage.ts new file mode 100644 index 0000000..82ac83a --- /dev/null +++ b/src/models/providermessage.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ProviderMessageType, + ProviderMessageType$inboundSchema, + ProviderMessageType$outboundSchema, +} from "./providermessagetype.js"; + +export type ProviderMessage = { + message?: string | null | undefined; + type?: ProviderMessageType | undefined; +}; + +/** @internal */ +export const ProviderMessage$inboundSchema: z.ZodType< + ProviderMessage, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.nullable(z.string()).optional(), + type: ProviderMessageType$inboundSchema.optional(), +}); + +/** @internal */ +export type ProviderMessage$Outbound = { + message?: string | null | undefined; + type?: string | undefined; +}; + +/** @internal */ +export const ProviderMessage$outboundSchema: z.ZodType< + ProviderMessage$Outbound, + z.ZodTypeDef, + ProviderMessage +> = z.object({ + message: z.nullable(z.string()).optional(), + type: ProviderMessageType$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProviderMessage$ { + /** @deprecated use `ProviderMessage$inboundSchema` instead. */ + export const inboundSchema = ProviderMessage$inboundSchema; + /** @deprecated use `ProviderMessage$outboundSchema` instead. */ + export const outboundSchema = ProviderMessage$outboundSchema; + /** @deprecated use `ProviderMessage$Outbound` instead. */ + export type Outbound = ProviderMessage$Outbound; +} + +export function providerMessageToJSON( + providerMessage: ProviderMessage, +): string { + return JSON.stringify(ProviderMessage$outboundSchema.parse(providerMessage)); +} + +export function providerMessageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ProviderMessage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ProviderMessage' from JSON`, + ); +} diff --git a/src/models/providermessagetype.ts b/src/models/providermessagetype.ts new file mode 100644 index 0000000..b8f69d0 --- /dev/null +++ b/src/models/providermessagetype.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const ProviderMessageType = { + Info: "info", + Warning: "warning", + Error: "error", +} as const; +export type ProviderMessageType = ClosedEnum; + +/** @internal */ +export const ProviderMessageType$inboundSchema: z.ZodNativeEnum< + typeof ProviderMessageType +> = z.nativeEnum(ProviderMessageType); + +/** @internal */ +export const ProviderMessageType$outboundSchema: z.ZodNativeEnum< + typeof ProviderMessageType +> = ProviderMessageType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProviderMessageType$ { + /** @deprecated use `ProviderMessageType$inboundSchema` instead. */ + export const inboundSchema = ProviderMessageType$inboundSchema; + /** @deprecated use `ProviderMessageType$outboundSchema` instead. */ + export const outboundSchema = ProviderMessageType$outboundSchema; +} diff --git a/src/models/proxytype.ts b/src/models/proxytype.ts new file mode 100644 index 0000000..19722d7 --- /dev/null +++ b/src/models/proxytype.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const ProxyType = { + Http: "http", + Socks4: "socks4", + Socks5: "socks5", +} as const; +export type ProxyType = ClosedEnum; + +/** @internal */ +export const ProxyType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ProxyType); + +/** @internal */ +export const ProxyType$outboundSchema: z.ZodNativeEnum = + ProxyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ProxyType$ { + /** @deprecated use `ProxyType$inboundSchema` instead. */ + export const inboundSchema = ProxyType$inboundSchema; + /** @deprecated use `ProxyType$outboundSchema` instead. */ + export const outboundSchema = ProxyType$outboundSchema; +} diff --git a/src/models/releaseresource.ts b/src/models/releaseresource.ts new file mode 100644 index 0000000..12a2dcf --- /dev/null +++ b/src/models/releaseresource.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + DownloadProtocol, + DownloadProtocol$inboundSchema, + DownloadProtocol$outboundSchema, +} from "./downloadprotocol.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + IndexerCategory, + IndexerCategory$inboundSchema, + IndexerCategory$Outbound, + IndexerCategory$outboundSchema, +} from "./indexercategory.js"; + +export type ReleaseResource = { + id?: number | undefined; + guid?: string | null | undefined; + age?: number | undefined; + ageHours?: number | undefined; + ageMinutes?: number | undefined; + size?: number | undefined; + files?: number | null | undefined; + grabs?: number | null | undefined; + indexerId?: number | undefined; + indexer?: string | null | undefined; + subGroup?: string | null | undefined; + releaseHash?: string | null | undefined; + title?: string | null | undefined; + sortTitle?: string | null | undefined; + imdbId?: number | undefined; + tmdbId?: number | undefined; + tvdbId?: number | undefined; + tvMazeId?: number | undefined; + publishDate?: Date | undefined; + commentUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; + infoUrl?: string | null | undefined; + posterUrl?: string | null | undefined; + indexerFlags?: Array | null | undefined; + categories?: Array | null | undefined; + magnetUrl?: string | null | undefined; + infoHash?: string | null | undefined; + seeders?: number | null | undefined; + leechers?: number | null | undefined; + protocol?: DownloadProtocol | undefined; + fileName?: string | null | undefined; + downloadClientId?: number | null | undefined; +}; + +/** @internal */ +export const ReleaseResource$inboundSchema: z.ZodType< + ReleaseResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + guid: z.nullable(z.string()).optional(), + age: z.number().int().optional(), + ageHours: z.number().optional(), + ageMinutes: z.number().optional(), + size: z.number().int().optional(), + files: z.nullable(z.number().int()).optional(), + grabs: z.nullable(z.number().int()).optional(), + indexerId: z.number().int().optional(), + indexer: z.nullable(z.string()).optional(), + subGroup: z.nullable(z.string()).optional(), + releaseHash: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + sortTitle: z.nullable(z.string()).optional(), + imdbId: z.number().int().optional(), + tmdbId: z.number().int().optional(), + tvdbId: z.number().int().optional(), + tvMazeId: z.number().int().optional(), + publishDate: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + commentUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), + infoUrl: z.nullable(z.string()).optional(), + posterUrl: z.nullable(z.string()).optional(), + indexerFlags: z.nullable(z.array(z.string())).optional(), + categories: z.nullable(z.array(IndexerCategory$inboundSchema)).optional(), + magnetUrl: z.nullable(z.string()).optional(), + infoHash: z.nullable(z.string()).optional(), + seeders: z.nullable(z.number().int()).optional(), + leechers: z.nullable(z.number().int()).optional(), + protocol: DownloadProtocol$inboundSchema.optional(), + fileName: z.nullable(z.string()).optional(), + downloadClientId: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type ReleaseResource$Outbound = { + id?: number | undefined; + guid?: string | null | undefined; + age?: number | undefined; + ageHours?: number | undefined; + ageMinutes?: number | undefined; + size?: number | undefined; + files?: number | null | undefined; + grabs?: number | null | undefined; + indexerId?: number | undefined; + indexer?: string | null | undefined; + subGroup?: string | null | undefined; + releaseHash?: string | null | undefined; + title?: string | null | undefined; + sortTitle?: string | null | undefined; + imdbId?: number | undefined; + tmdbId?: number | undefined; + tvdbId?: number | undefined; + tvMazeId?: number | undefined; + publishDate?: string | undefined; + commentUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; + infoUrl?: string | null | undefined; + posterUrl?: string | null | undefined; + indexerFlags?: Array | null | undefined; + categories?: Array | null | undefined; + magnetUrl?: string | null | undefined; + infoHash?: string | null | undefined; + seeders?: number | null | undefined; + leechers?: number | null | undefined; + protocol?: string | undefined; + fileName?: string | null | undefined; + downloadClientId?: number | null | undefined; +}; + +/** @internal */ +export const ReleaseResource$outboundSchema: z.ZodType< + ReleaseResource$Outbound, + z.ZodTypeDef, + ReleaseResource +> = z.object({ + id: z.number().int().optional(), + guid: z.nullable(z.string()).optional(), + age: z.number().int().optional(), + ageHours: z.number().optional(), + ageMinutes: z.number().optional(), + size: z.number().int().optional(), + files: z.nullable(z.number().int()).optional(), + grabs: z.nullable(z.number().int()).optional(), + indexerId: z.number().int().optional(), + indexer: z.nullable(z.string()).optional(), + subGroup: z.nullable(z.string()).optional(), + releaseHash: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + sortTitle: z.nullable(z.string()).optional(), + imdbId: z.number().int().optional(), + tmdbId: z.number().int().optional(), + tvdbId: z.number().int().optional(), + tvMazeId: z.number().int().optional(), + publishDate: z.date().transform(v => v.toISOString()).optional(), + commentUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), + infoUrl: z.nullable(z.string()).optional(), + posterUrl: z.nullable(z.string()).optional(), + indexerFlags: z.nullable(z.array(z.string())).optional(), + categories: z.nullable(z.array(IndexerCategory$outboundSchema)).optional(), + magnetUrl: z.nullable(z.string()).optional(), + infoHash: z.nullable(z.string()).optional(), + seeders: z.nullable(z.number().int()).optional(), + leechers: z.nullable(z.number().int()).optional(), + protocol: DownloadProtocol$outboundSchema.optional(), + fileName: z.nullable(z.string()).optional(), + downloadClientId: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReleaseResource$ { + /** @deprecated use `ReleaseResource$inboundSchema` instead. */ + export const inboundSchema = ReleaseResource$inboundSchema; + /** @deprecated use `ReleaseResource$outboundSchema` instead. */ + export const outboundSchema = ReleaseResource$outboundSchema; + /** @deprecated use `ReleaseResource$Outbound` instead. */ + export type Outbound = ReleaseResource$Outbound; +} + +export function releaseResourceToJSON( + releaseResource: ReleaseResource, +): string { + return JSON.stringify(ReleaseResource$outboundSchema.parse(releaseResource)); +} + +export function releaseResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReleaseResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReleaseResource' from JSON`, + ); +} diff --git a/src/models/releaseresourceinput.ts b/src/models/releaseresourceinput.ts new file mode 100644 index 0000000..58a0a31 --- /dev/null +++ b/src/models/releaseresourceinput.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + DownloadProtocol, + DownloadProtocol$inboundSchema, + DownloadProtocol$outboundSchema, +} from "./downloadprotocol.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + IndexerCategoryInput, + IndexerCategoryInput$inboundSchema, + IndexerCategoryInput$Outbound, + IndexerCategoryInput$outboundSchema, +} from "./indexercategoryinput.js"; + +export type ReleaseResourceInput = { + id?: number | undefined; + guid?: string | null | undefined; + age?: number | undefined; + ageHours?: number | undefined; + ageMinutes?: number | undefined; + size?: number | undefined; + files?: number | null | undefined; + grabs?: number | null | undefined; + indexerId?: number | undefined; + indexer?: string | null | undefined; + subGroup?: string | null | undefined; + releaseHash?: string | null | undefined; + title?: string | null | undefined; + sortTitle?: string | null | undefined; + imdbId?: number | undefined; + tmdbId?: number | undefined; + tvdbId?: number | undefined; + tvMazeId?: number | undefined; + publishDate?: Date | undefined; + commentUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; + infoUrl?: string | null | undefined; + posterUrl?: string | null | undefined; + indexerFlags?: Array | null | undefined; + categories?: Array | null | undefined; + magnetUrl?: string | null | undefined; + infoHash?: string | null | undefined; + seeders?: number | null | undefined; + leechers?: number | null | undefined; + protocol?: DownloadProtocol | undefined; + downloadClientId?: number | null | undefined; +}; + +/** @internal */ +export const ReleaseResourceInput$inboundSchema: z.ZodType< + ReleaseResourceInput, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + guid: z.nullable(z.string()).optional(), + age: z.number().int().optional(), + ageHours: z.number().optional(), + ageMinutes: z.number().optional(), + size: z.number().int().optional(), + files: z.nullable(z.number().int()).optional(), + grabs: z.nullable(z.number().int()).optional(), + indexerId: z.number().int().optional(), + indexer: z.nullable(z.string()).optional(), + subGroup: z.nullable(z.string()).optional(), + releaseHash: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + sortTitle: z.nullable(z.string()).optional(), + imdbId: z.number().int().optional(), + tmdbId: z.number().int().optional(), + tvdbId: z.number().int().optional(), + tvMazeId: z.number().int().optional(), + publishDate: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + commentUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), + infoUrl: z.nullable(z.string()).optional(), + posterUrl: z.nullable(z.string()).optional(), + indexerFlags: z.nullable(z.array(z.string())).optional(), + categories: z.nullable(z.array(IndexerCategoryInput$inboundSchema)) + .optional(), + magnetUrl: z.nullable(z.string()).optional(), + infoHash: z.nullable(z.string()).optional(), + seeders: z.nullable(z.number().int()).optional(), + leechers: z.nullable(z.number().int()).optional(), + protocol: DownloadProtocol$inboundSchema.optional(), + downloadClientId: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type ReleaseResourceInput$Outbound = { + id?: number | undefined; + guid?: string | null | undefined; + age?: number | undefined; + ageHours?: number | undefined; + ageMinutes?: number | undefined; + size?: number | undefined; + files?: number | null | undefined; + grabs?: number | null | undefined; + indexerId?: number | undefined; + indexer?: string | null | undefined; + subGroup?: string | null | undefined; + releaseHash?: string | null | undefined; + title?: string | null | undefined; + sortTitle?: string | null | undefined; + imdbId?: number | undefined; + tmdbId?: number | undefined; + tvdbId?: number | undefined; + tvMazeId?: number | undefined; + publishDate?: string | undefined; + commentUrl?: string | null | undefined; + downloadUrl?: string | null | undefined; + infoUrl?: string | null | undefined; + posterUrl?: string | null | undefined; + indexerFlags?: Array | null | undefined; + categories?: Array | null | undefined; + magnetUrl?: string | null | undefined; + infoHash?: string | null | undefined; + seeders?: number | null | undefined; + leechers?: number | null | undefined; + protocol?: string | undefined; + downloadClientId?: number | null | undefined; +}; + +/** @internal */ +export const ReleaseResourceInput$outboundSchema: z.ZodType< + ReleaseResourceInput$Outbound, + z.ZodTypeDef, + ReleaseResourceInput +> = z.object({ + id: z.number().int().optional(), + guid: z.nullable(z.string()).optional(), + age: z.number().int().optional(), + ageHours: z.number().optional(), + ageMinutes: z.number().optional(), + size: z.number().int().optional(), + files: z.nullable(z.number().int()).optional(), + grabs: z.nullable(z.number().int()).optional(), + indexerId: z.number().int().optional(), + indexer: z.nullable(z.string()).optional(), + subGroup: z.nullable(z.string()).optional(), + releaseHash: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + sortTitle: z.nullable(z.string()).optional(), + imdbId: z.number().int().optional(), + tmdbId: z.number().int().optional(), + tvdbId: z.number().int().optional(), + tvMazeId: z.number().int().optional(), + publishDate: z.date().transform(v => v.toISOString()).optional(), + commentUrl: z.nullable(z.string()).optional(), + downloadUrl: z.nullable(z.string()).optional(), + infoUrl: z.nullable(z.string()).optional(), + posterUrl: z.nullable(z.string()).optional(), + indexerFlags: z.nullable(z.array(z.string())).optional(), + categories: z.nullable(z.array(IndexerCategoryInput$outboundSchema)) + .optional(), + magnetUrl: z.nullable(z.string()).optional(), + infoHash: z.nullable(z.string()).optional(), + seeders: z.nullable(z.number().int()).optional(), + leechers: z.nullable(z.number().int()).optional(), + protocol: DownloadProtocol$outboundSchema.optional(), + downloadClientId: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReleaseResourceInput$ { + /** @deprecated use `ReleaseResourceInput$inboundSchema` instead. */ + export const inboundSchema = ReleaseResourceInput$inboundSchema; + /** @deprecated use `ReleaseResourceInput$outboundSchema` instead. */ + export const outboundSchema = ReleaseResourceInput$outboundSchema; + /** @deprecated use `ReleaseResourceInput$Outbound` instead. */ + export type Outbound = ReleaseResourceInput$Outbound; +} + +export function releaseResourceInputToJSON( + releaseResourceInput: ReleaseResourceInput, +): string { + return JSON.stringify( + ReleaseResourceInput$outboundSchema.parse(releaseResourceInput), + ); +} + +export function releaseResourceInputFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReleaseResourceInput$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReleaseResourceInput' from JSON`, + ); +} diff --git a/src/models/runtimemode.ts b/src/models/runtimemode.ts new file mode 100644 index 0000000..93dd84b --- /dev/null +++ b/src/models/runtimemode.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const RuntimeMode = { + Console: "console", + Service: "service", + Tray: "tray", +} as const; +export type RuntimeMode = ClosedEnum; + +/** @internal */ +export const RuntimeMode$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(RuntimeMode); + +/** @internal */ +export const RuntimeMode$outboundSchema: z.ZodNativeEnum = + RuntimeMode$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RuntimeMode$ { + /** @deprecated use `RuntimeMode$inboundSchema` instead. */ + export const inboundSchema = RuntimeMode$inboundSchema; + /** @deprecated use `RuntimeMode$outboundSchema` instead. */ + export const outboundSchema = RuntimeMode$outboundSchema; +} diff --git a/src/models/searchparam.ts b/src/models/searchparam.ts new file mode 100644 index 0000000..f67dcd8 --- /dev/null +++ b/src/models/searchparam.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const SearchParam = { + Q: "q", +} as const; +export type SearchParam = ClosedEnum; + +/** @internal */ +export const SearchParam$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(SearchParam); + +/** @internal */ +export const SearchParam$outboundSchema: z.ZodNativeEnum = + SearchParam$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SearchParam$ { + /** @deprecated use `SearchParam$inboundSchema` instead. */ + export const inboundSchema = SearchParam$inboundSchema; + /** @deprecated use `SearchParam$outboundSchema` instead. */ + export const outboundSchema = SearchParam$outboundSchema; +} diff --git a/src/models/security.ts b/src/models/security.ts new file mode 100644 index 0000000..8068347 --- /dev/null +++ b/src/models/security.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type Security = { + xApiKey?: string | undefined; + apikey?: string | undefined; +}; + +/** @internal */ +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Api-Key": z.string().optional(), + apikey: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Api-Key": "xApiKey", + }); +}); + +/** @internal */ +export type Security$Outbound = { + "X-Api-Key"?: string | undefined; + apikey?: string | undefined; +}; + +/** @internal */ +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + xApiKey: z.string().optional(), + apikey: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xApiKey: "X-Api-Key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Security$ { + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; +} + +export function securityToJSON(security: Security): string { + return JSON.stringify(Security$outboundSchema.parse(security)); +} + +export function securityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Security$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Security' from JSON`, + ); +} diff --git a/src/models/selectoption.ts b/src/models/selectoption.ts new file mode 100644 index 0000000..85fc136 --- /dev/null +++ b/src/models/selectoption.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type SelectOption = { + value?: number | undefined; + name?: string | null | undefined; + order?: number | undefined; + hint?: string | null | undefined; + parentValue?: number | null | undefined; +}; + +/** @internal */ +export const SelectOption$inboundSchema: z.ZodType< + SelectOption, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + order: z.number().int().optional(), + hint: z.nullable(z.string()).optional(), + parentValue: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type SelectOption$Outbound = { + value?: number | undefined; + name?: string | null | undefined; + order?: number | undefined; + hint?: string | null | undefined; + parentValue?: number | null | undefined; +}; + +/** @internal */ +export const SelectOption$outboundSchema: z.ZodType< + SelectOption$Outbound, + z.ZodTypeDef, + SelectOption +> = z.object({ + value: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + order: z.number().int().optional(), + hint: z.nullable(z.string()).optional(), + parentValue: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SelectOption$ { + /** @deprecated use `SelectOption$inboundSchema` instead. */ + export const inboundSchema = SelectOption$inboundSchema; + /** @deprecated use `SelectOption$outboundSchema` instead. */ + export const outboundSchema = SelectOption$outboundSchema; + /** @deprecated use `SelectOption$Outbound` instead. */ + export type Outbound = SelectOption$Outbound; +} + +export function selectOptionToJSON(selectOption: SelectOption): string { + return JSON.stringify(SelectOption$outboundSchema.parse(selectOption)); +} + +export function selectOptionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SelectOption$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SelectOption' from JSON`, + ); +} diff --git a/src/models/sortdirection.ts b/src/models/sortdirection.ts new file mode 100644 index 0000000..d5a8352 --- /dev/null +++ b/src/models/sortdirection.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const SortDirection = { + Default: "default", + Ascending: "ascending", + Descending: "descending", +} as const; +export type SortDirection = ClosedEnum; + +/** @internal */ +export const SortDirection$inboundSchema: z.ZodNativeEnum< + typeof SortDirection +> = z.nativeEnum(SortDirection); + +/** @internal */ +export const SortDirection$outboundSchema: z.ZodNativeEnum< + typeof SortDirection +> = SortDirection$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SortDirection$ { + /** @deprecated use `SortDirection$inboundSchema` instead. */ + export const inboundSchema = SortDirection$inboundSchema; + /** @deprecated use `SortDirection$outboundSchema` instead. */ + export const outboundSchema = SortDirection$outboundSchema; +} diff --git a/src/models/systemresource.ts b/src/models/systemresource.ts new file mode 100644 index 0000000..76f2901 --- /dev/null +++ b/src/models/systemresource.ts @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { + AuthenticationType, + AuthenticationType$inboundSchema, + AuthenticationType$outboundSchema, +} from "./authenticationtype.js"; +import { + DatabaseType, + DatabaseType$inboundSchema, + DatabaseType$outboundSchema, +} from "./databasetype.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + RuntimeMode, + RuntimeMode$inboundSchema, + RuntimeMode$outboundSchema, +} from "./runtimemode.js"; +import { + UpdateMechanism, + UpdateMechanism$inboundSchema, + UpdateMechanism$outboundSchema, +} from "./updatemechanism.js"; + +export type SystemResource = { + appName?: string | null | undefined; + instanceName?: string | null | undefined; + version?: string | null | undefined; + buildTime?: Date | undefined; + isDebug?: boolean | undefined; + isProduction?: boolean | undefined; + isAdmin?: boolean | undefined; + isUserInteractive?: boolean | undefined; + startupPath?: string | null | undefined; + appData?: string | null | undefined; + osName?: string | null | undefined; + osVersion?: string | null | undefined; + isNetCore?: boolean | undefined; + isLinux?: boolean | undefined; + isOsx?: boolean | undefined; + isWindows?: boolean | undefined; + isDocker?: boolean | undefined; + mode?: RuntimeMode | undefined; + branch?: string | null | undefined; + databaseType?: DatabaseType | undefined; + databaseVersion?: string | null | undefined; + authentication?: AuthenticationType | undefined; + migrationVersion?: number | undefined; + urlBase?: string | null | undefined; + runtimeVersion?: string | null | undefined; + runtimeName?: string | null | undefined; + startTime?: Date | undefined; + packageVersion?: string | null | undefined; + packageAuthor?: string | null | undefined; + packageUpdateMechanism?: UpdateMechanism | undefined; + packageUpdateMechanismMessage?: string | null | undefined; +}; + +/** @internal */ +export const SystemResource$inboundSchema: z.ZodType< + SystemResource, + z.ZodTypeDef, + unknown +> = z.object({ + appName: z.nullable(z.string()).optional(), + instanceName: z.nullable(z.string()).optional(), + version: z.nullable(z.string()).optional(), + buildTime: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + isDebug: z.boolean().optional(), + isProduction: z.boolean().optional(), + isAdmin: z.boolean().optional(), + isUserInteractive: z.boolean().optional(), + startupPath: z.nullable(z.string()).optional(), + appData: z.nullable(z.string()).optional(), + osName: z.nullable(z.string()).optional(), + osVersion: z.nullable(z.string()).optional(), + isNetCore: z.boolean().optional(), + isLinux: z.boolean().optional(), + isOsx: z.boolean().optional(), + isWindows: z.boolean().optional(), + isDocker: z.boolean().optional(), + mode: RuntimeMode$inboundSchema.optional(), + branch: z.nullable(z.string()).optional(), + databaseType: DatabaseType$inboundSchema.optional(), + databaseVersion: z.nullable(z.string()).optional(), + authentication: AuthenticationType$inboundSchema.optional(), + migrationVersion: z.number().int().optional(), + urlBase: z.nullable(z.string()).optional(), + runtimeVersion: z.nullable(z.string()).optional(), + runtimeName: z.nullable(z.string()).optional(), + startTime: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + packageVersion: z.nullable(z.string()).optional(), + packageAuthor: z.nullable(z.string()).optional(), + packageUpdateMechanism: UpdateMechanism$inboundSchema.optional(), + packageUpdateMechanismMessage: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SystemResource$Outbound = { + appName?: string | null | undefined; + instanceName?: string | null | undefined; + version?: string | null | undefined; + buildTime?: string | undefined; + isDebug?: boolean | undefined; + isProduction?: boolean | undefined; + isAdmin?: boolean | undefined; + isUserInteractive?: boolean | undefined; + startupPath?: string | null | undefined; + appData?: string | null | undefined; + osName?: string | null | undefined; + osVersion?: string | null | undefined; + isNetCore?: boolean | undefined; + isLinux?: boolean | undefined; + isOsx?: boolean | undefined; + isWindows?: boolean | undefined; + isDocker?: boolean | undefined; + mode?: string | undefined; + branch?: string | null | undefined; + databaseType?: string | undefined; + databaseVersion?: string | null | undefined; + authentication?: string | undefined; + migrationVersion?: number | undefined; + urlBase?: string | null | undefined; + runtimeVersion?: string | null | undefined; + runtimeName?: string | null | undefined; + startTime?: string | undefined; + packageVersion?: string | null | undefined; + packageAuthor?: string | null | undefined; + packageUpdateMechanism?: string | undefined; + packageUpdateMechanismMessage?: string | null | undefined; +}; + +/** @internal */ +export const SystemResource$outboundSchema: z.ZodType< + SystemResource$Outbound, + z.ZodTypeDef, + SystemResource +> = z.object({ + appName: z.nullable(z.string()).optional(), + instanceName: z.nullable(z.string()).optional(), + version: z.nullable(z.string()).optional(), + buildTime: z.date().transform(v => v.toISOString()).optional(), + isDebug: z.boolean().optional(), + isProduction: z.boolean().optional(), + isAdmin: z.boolean().optional(), + isUserInteractive: z.boolean().optional(), + startupPath: z.nullable(z.string()).optional(), + appData: z.nullable(z.string()).optional(), + osName: z.nullable(z.string()).optional(), + osVersion: z.nullable(z.string()).optional(), + isNetCore: z.boolean().optional(), + isLinux: z.boolean().optional(), + isOsx: z.boolean().optional(), + isWindows: z.boolean().optional(), + isDocker: z.boolean().optional(), + mode: RuntimeMode$outboundSchema.optional(), + branch: z.nullable(z.string()).optional(), + databaseType: DatabaseType$outboundSchema.optional(), + databaseVersion: z.nullable(z.string()).optional(), + authentication: AuthenticationType$outboundSchema.optional(), + migrationVersion: z.number().int().optional(), + urlBase: z.nullable(z.string()).optional(), + runtimeVersion: z.nullable(z.string()).optional(), + runtimeName: z.nullable(z.string()).optional(), + startTime: z.date().transform(v => v.toISOString()).optional(), + packageVersion: z.nullable(z.string()).optional(), + packageAuthor: z.nullable(z.string()).optional(), + packageUpdateMechanism: UpdateMechanism$outboundSchema.optional(), + packageUpdateMechanismMessage: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SystemResource$ { + /** @deprecated use `SystemResource$inboundSchema` instead. */ + export const inboundSchema = SystemResource$inboundSchema; + /** @deprecated use `SystemResource$outboundSchema` instead. */ + export const outboundSchema = SystemResource$outboundSchema; + /** @deprecated use `SystemResource$Outbound` instead. */ + export type Outbound = SystemResource$Outbound; +} + +export function systemResourceToJSON(systemResource: SystemResource): string { + return JSON.stringify(SystemResource$outboundSchema.parse(systemResource)); +} + +export function systemResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SystemResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SystemResource' from JSON`, + ); +} diff --git a/src/models/tagdetailsresource.ts b/src/models/tagdetailsresource.ts new file mode 100644 index 0000000..e221875 --- /dev/null +++ b/src/models/tagdetailsresource.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type TagDetailsResource = { + id?: number | undefined; + label?: string | null | undefined; + notificationIds?: Array | null | undefined; + indexerIds?: Array | null | undefined; + indexerProxyIds?: Array | null | undefined; + applicationIds?: Array | null | undefined; +}; + +/** @internal */ +export const TagDetailsResource$inboundSchema: z.ZodType< + TagDetailsResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + label: z.nullable(z.string()).optional(), + notificationIds: z.nullable(z.array(z.number().int())).optional(), + indexerIds: z.nullable(z.array(z.number().int())).optional(), + indexerProxyIds: z.nullable(z.array(z.number().int())).optional(), + applicationIds: z.nullable(z.array(z.number().int())).optional(), +}); + +/** @internal */ +export type TagDetailsResource$Outbound = { + id?: number | undefined; + label?: string | null | undefined; + notificationIds?: Array | null | undefined; + indexerIds?: Array | null | undefined; + indexerProxyIds?: Array | null | undefined; + applicationIds?: Array | null | undefined; +}; + +/** @internal */ +export const TagDetailsResource$outboundSchema: z.ZodType< + TagDetailsResource$Outbound, + z.ZodTypeDef, + TagDetailsResource +> = z.object({ + id: z.number().int().optional(), + label: z.nullable(z.string()).optional(), + notificationIds: z.nullable(z.array(z.number().int())).optional(), + indexerIds: z.nullable(z.array(z.number().int())).optional(), + indexerProxyIds: z.nullable(z.array(z.number().int())).optional(), + applicationIds: z.nullable(z.array(z.number().int())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TagDetailsResource$ { + /** @deprecated use `TagDetailsResource$inboundSchema` instead. */ + export const inboundSchema = TagDetailsResource$inboundSchema; + /** @deprecated use `TagDetailsResource$outboundSchema` instead. */ + export const outboundSchema = TagDetailsResource$outboundSchema; + /** @deprecated use `TagDetailsResource$Outbound` instead. */ + export type Outbound = TagDetailsResource$Outbound; +} + +export function tagDetailsResourceToJSON( + tagDetailsResource: TagDetailsResource, +): string { + return JSON.stringify( + TagDetailsResource$outboundSchema.parse(tagDetailsResource), + ); +} + +export function tagDetailsResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TagDetailsResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TagDetailsResource' from JSON`, + ); +} diff --git a/src/models/tagresource.ts b/src/models/tagresource.ts new file mode 100644 index 0000000..23f66f8 --- /dev/null +++ b/src/models/tagresource.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type TagResource = { + id?: number | undefined; + label?: string | null | undefined; +}; + +/** @internal */ +export const TagResource$inboundSchema: z.ZodType< + TagResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + label: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type TagResource$Outbound = { + id?: number | undefined; + label?: string | null | undefined; +}; + +/** @internal */ +export const TagResource$outboundSchema: z.ZodType< + TagResource$Outbound, + z.ZodTypeDef, + TagResource +> = z.object({ + id: z.number().int().optional(), + label: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TagResource$ { + /** @deprecated use `TagResource$inboundSchema` instead. */ + export const inboundSchema = TagResource$inboundSchema; + /** @deprecated use `TagResource$outboundSchema` instead. */ + export const outboundSchema = TagResource$outboundSchema; + /** @deprecated use `TagResource$Outbound` instead. */ + export type Outbound = TagResource$Outbound; +} + +export function tagResourceToJSON(tagResource: TagResource): string { + return JSON.stringify(TagResource$outboundSchema.parse(tagResource)); +} + +export function tagResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TagResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TagResource' from JSON`, + ); +} diff --git a/src/models/taskresource.ts b/src/models/taskresource.ts new file mode 100644 index 0000000..de86c62 --- /dev/null +++ b/src/models/taskresource.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type TaskResource = { + id?: number | undefined; + name?: string | null | undefined; + taskName?: string | null | undefined; + interval?: number | undefined; + lastExecution?: Date | undefined; + lastStartTime?: Date | undefined; + nextExecution?: Date | undefined; + lastDuration?: string | undefined; +}; + +/** @internal */ +export const TaskResource$inboundSchema: z.ZodType< + TaskResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + taskName: z.nullable(z.string()).optional(), + interval: z.number().int().optional(), + lastExecution: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + lastStartTime: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + nextExecution: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + lastDuration: z.string().optional(), +}); + +/** @internal */ +export type TaskResource$Outbound = { + id?: number | undefined; + name?: string | null | undefined; + taskName?: string | null | undefined; + interval?: number | undefined; + lastExecution?: string | undefined; + lastStartTime?: string | undefined; + nextExecution?: string | undefined; + lastDuration?: string | undefined; +}; + +/** @internal */ +export const TaskResource$outboundSchema: z.ZodType< + TaskResource$Outbound, + z.ZodTypeDef, + TaskResource +> = z.object({ + id: z.number().int().optional(), + name: z.nullable(z.string()).optional(), + taskName: z.nullable(z.string()).optional(), + interval: z.number().int().optional(), + lastExecution: z.date().transform(v => v.toISOString()).optional(), + lastStartTime: z.date().transform(v => v.toISOString()).optional(), + nextExecution: z.date().transform(v => v.toISOString()).optional(), + lastDuration: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TaskResource$ { + /** @deprecated use `TaskResource$inboundSchema` instead. */ + export const inboundSchema = TaskResource$inboundSchema; + /** @deprecated use `TaskResource$outboundSchema` instead. */ + export const outboundSchema = TaskResource$outboundSchema; + /** @deprecated use `TaskResource$Outbound` instead. */ + export type Outbound = TaskResource$Outbound; +} + +export function taskResourceToJSON(taskResource: TaskResource): string { + return JSON.stringify(TaskResource$outboundSchema.parse(taskResource)); +} + +export function taskResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TaskResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TaskResource' from JSON`, + ); +} diff --git a/src/models/tvsearchparam.ts b/src/models/tvsearchparam.ts new file mode 100644 index 0000000..ba763a0 --- /dev/null +++ b/src/models/tvsearchparam.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const TvSearchParam = { + Q: "q", + Season: "season", + Ep: "ep", + ImdbId: "imdbId", + TvdbId: "tvdbId", + RId: "rId", + TvMazeId: "tvMazeId", + TraktId: "traktId", + TmdbId: "tmdbId", + DoubanId: "doubanId", + Genre: "genre", + Year: "year", +} as const; +export type TvSearchParam = ClosedEnum; + +/** @internal */ +export const TvSearchParam$inboundSchema: z.ZodNativeEnum< + typeof TvSearchParam +> = z.nativeEnum(TvSearchParam); + +/** @internal */ +export const TvSearchParam$outboundSchema: z.ZodNativeEnum< + typeof TvSearchParam +> = TvSearchParam$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TvSearchParam$ { + /** @deprecated use `TvSearchParam$inboundSchema` instead. */ + export const inboundSchema = TvSearchParam$inboundSchema; + /** @deprecated use `TvSearchParam$outboundSchema` instead. */ + export const outboundSchema = TvSearchParam$outboundSchema; +} diff --git a/src/models/uiconfigresource.ts b/src/models/uiconfigresource.ts new file mode 100644 index 0000000..db03a72 --- /dev/null +++ b/src/models/uiconfigresource.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type UiConfigResource = { + id?: number | undefined; + firstDayOfWeek?: number | undefined; + calendarWeekColumnHeader?: string | null | undefined; + shortDateFormat?: string | null | undefined; + longDateFormat?: string | null | undefined; + timeFormat?: string | null | undefined; + showRelativeDates?: boolean | undefined; + enableColorImpairedMode?: boolean | undefined; + uiLanguage?: string | null | undefined; + theme?: string | null | undefined; +}; + +/** @internal */ +export const UiConfigResource$inboundSchema: z.ZodType< + UiConfigResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + firstDayOfWeek: z.number().int().optional(), + calendarWeekColumnHeader: z.nullable(z.string()).optional(), + shortDateFormat: z.nullable(z.string()).optional(), + longDateFormat: z.nullable(z.string()).optional(), + timeFormat: z.nullable(z.string()).optional(), + showRelativeDates: z.boolean().optional(), + enableColorImpairedMode: z.boolean().optional(), + uiLanguage: z.nullable(z.string()).optional(), + theme: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UiConfigResource$Outbound = { + id?: number | undefined; + firstDayOfWeek?: number | undefined; + calendarWeekColumnHeader?: string | null | undefined; + shortDateFormat?: string | null | undefined; + longDateFormat?: string | null | undefined; + timeFormat?: string | null | undefined; + showRelativeDates?: boolean | undefined; + enableColorImpairedMode?: boolean | undefined; + uiLanguage?: string | null | undefined; + theme?: string | null | undefined; +}; + +/** @internal */ +export const UiConfigResource$outboundSchema: z.ZodType< + UiConfigResource$Outbound, + z.ZodTypeDef, + UiConfigResource +> = z.object({ + id: z.number().int().optional(), + firstDayOfWeek: z.number().int().optional(), + calendarWeekColumnHeader: z.nullable(z.string()).optional(), + shortDateFormat: z.nullable(z.string()).optional(), + longDateFormat: z.nullable(z.string()).optional(), + timeFormat: z.nullable(z.string()).optional(), + showRelativeDates: z.boolean().optional(), + enableColorImpairedMode: z.boolean().optional(), + uiLanguage: z.nullable(z.string()).optional(), + theme: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UiConfigResource$ { + /** @deprecated use `UiConfigResource$inboundSchema` instead. */ + export const inboundSchema = UiConfigResource$inboundSchema; + /** @deprecated use `UiConfigResource$outboundSchema` instead. */ + export const outboundSchema = UiConfigResource$outboundSchema; + /** @deprecated use `UiConfigResource$Outbound` instead. */ + export type Outbound = UiConfigResource$Outbound; +} + +export function uiConfigResourceToJSON( + uiConfigResource: UiConfigResource, +): string { + return JSON.stringify( + UiConfigResource$outboundSchema.parse(uiConfigResource), + ); +} + +export function uiConfigResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UiConfigResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UiConfigResource' from JSON`, + ); +} diff --git a/src/models/updatechanges.ts b/src/models/updatechanges.ts new file mode 100644 index 0000000..cc6e82a --- /dev/null +++ b/src/models/updatechanges.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type UpdateChanges = { + new?: Array | null | undefined; + fixed?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateChanges$inboundSchema: z.ZodType< + UpdateChanges, + z.ZodTypeDef, + unknown +> = z.object({ + new: z.nullable(z.array(z.string())).optional(), + fixed: z.nullable(z.array(z.string())).optional(), +}); + +/** @internal */ +export type UpdateChanges$Outbound = { + new?: Array | null | undefined; + fixed?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateChanges$outboundSchema: z.ZodType< + UpdateChanges$Outbound, + z.ZodTypeDef, + UpdateChanges +> = z.object({ + new: z.nullable(z.array(z.string())).optional(), + fixed: z.nullable(z.array(z.string())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChanges$ { + /** @deprecated use `UpdateChanges$inboundSchema` instead. */ + export const inboundSchema = UpdateChanges$inboundSchema; + /** @deprecated use `UpdateChanges$outboundSchema` instead. */ + export const outboundSchema = UpdateChanges$outboundSchema; + /** @deprecated use `UpdateChanges$Outbound` instead. */ + export type Outbound = UpdateChanges$Outbound; +} + +export function updateChangesToJSON(updateChanges: UpdateChanges): string { + return JSON.stringify(UpdateChanges$outboundSchema.parse(updateChanges)); +} + +export function updateChangesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChanges$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChanges' from JSON`, + ); +} diff --git a/src/models/updatemechanism.ts b/src/models/updatemechanism.ts new file mode 100644 index 0000000..cc7426b --- /dev/null +++ b/src/models/updatemechanism.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +export const UpdateMechanism = { + BuiltIn: "builtIn", + Script: "script", + External: "external", + Apt: "apt", + Docker: "docker", +} as const; +export type UpdateMechanism = ClosedEnum; + +/** @internal */ +export const UpdateMechanism$inboundSchema: z.ZodNativeEnum< + typeof UpdateMechanism +> = z.nativeEnum(UpdateMechanism); + +/** @internal */ +export const UpdateMechanism$outboundSchema: z.ZodNativeEnum< + typeof UpdateMechanism +> = UpdateMechanism$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateMechanism$ { + /** @deprecated use `UpdateMechanism$inboundSchema` instead. */ + export const inboundSchema = UpdateMechanism$inboundSchema; + /** @deprecated use `UpdateMechanism$outboundSchema` instead. */ + export const outboundSchema = UpdateMechanism$outboundSchema; +} diff --git a/src/models/updateresource.ts b/src/models/updateresource.ts new file mode 100644 index 0000000..c32f0f6 --- /dev/null +++ b/src/models/updateresource.ts @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + UpdateChanges, + UpdateChanges$inboundSchema, + UpdateChanges$Outbound, + UpdateChanges$outboundSchema, +} from "./updatechanges.js"; + +export type UpdateResource = { + id?: number | undefined; + version?: string | null | undefined; + branch?: string | null | undefined; + releaseDate?: Date | undefined; + fileName?: string | null | undefined; + url?: string | null | undefined; + installed?: boolean | undefined; + installedOn?: Date | null | undefined; + installable?: boolean | undefined; + latest?: boolean | undefined; + changes?: UpdateChanges | undefined; + hash?: string | null | undefined; +}; + +/** @internal */ +export const UpdateResource$inboundSchema: z.ZodType< + UpdateResource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + version: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + releaseDate: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + fileName: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + installed: z.boolean().optional(), + installedOn: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + installable: z.boolean().optional(), + latest: z.boolean().optional(), + changes: UpdateChanges$inboundSchema.optional(), + hash: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateResource$Outbound = { + id?: number | undefined; + version?: string | null | undefined; + branch?: string | null | undefined; + releaseDate?: string | undefined; + fileName?: string | null | undefined; + url?: string | null | undefined; + installed?: boolean | undefined; + installedOn?: string | null | undefined; + installable?: boolean | undefined; + latest?: boolean | undefined; + changes?: UpdateChanges$Outbound | undefined; + hash?: string | null | undefined; +}; + +/** @internal */ +export const UpdateResource$outboundSchema: z.ZodType< + UpdateResource$Outbound, + z.ZodTypeDef, + UpdateResource +> = z.object({ + id: z.number().int().optional(), + version: z.nullable(z.string()).optional(), + branch: z.nullable(z.string()).optional(), + releaseDate: z.date().transform(v => v.toISOString()).optional(), + fileName: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + installed: z.boolean().optional(), + installedOn: z.nullable(z.date().transform(v => v.toISOString())).optional(), + installable: z.boolean().optional(), + latest: z.boolean().optional(), + changes: UpdateChanges$outboundSchema.optional(), + hash: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateResource$ { + /** @deprecated use `UpdateResource$inboundSchema` instead. */ + export const inboundSchema = UpdateResource$inboundSchema; + /** @deprecated use `UpdateResource$outboundSchema` instead. */ + export const outboundSchema = UpdateResource$outboundSchema; + /** @deprecated use `UpdateResource$Outbound` instead. */ + export type Outbound = UpdateResource$Outbound; +} + +export function updateResourceToJSON(updateResource: UpdateResource): string { + return JSON.stringify(UpdateResource$outboundSchema.parse(updateResource)); +} + +export function updateResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateResource' from JSON`, + ); +} diff --git a/src/models/useragentstatistics.ts b/src/models/useragentstatistics.ts new file mode 100644 index 0000000..124b783 --- /dev/null +++ b/src/models/useragentstatistics.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type UserAgentStatistics = { + userAgent?: string | null | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; +}; + +/** @internal */ +export const UserAgentStatistics$inboundSchema: z.ZodType< + UserAgentStatistics, + z.ZodTypeDef, + unknown +> = z.object({ + userAgent: z.nullable(z.string()).optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), +}); + +/** @internal */ +export type UserAgentStatistics$Outbound = { + userAgent?: string | null | undefined; + numberOfQueries?: number | undefined; + numberOfGrabs?: number | undefined; +}; + +/** @internal */ +export const UserAgentStatistics$outboundSchema: z.ZodType< + UserAgentStatistics$Outbound, + z.ZodTypeDef, + UserAgentStatistics +> = z.object({ + userAgent: z.nullable(z.string()).optional(), + numberOfQueries: z.number().int().optional(), + numberOfGrabs: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UserAgentStatistics$ { + /** @deprecated use `UserAgentStatistics$inboundSchema` instead. */ + export const inboundSchema = UserAgentStatistics$inboundSchema; + /** @deprecated use `UserAgentStatistics$outboundSchema` instead. */ + export const outboundSchema = UserAgentStatistics$outboundSchema; + /** @deprecated use `UserAgentStatistics$Outbound` instead. */ + export type Outbound = UserAgentStatistics$Outbound; +} + +export function userAgentStatisticsToJSON( + userAgentStatistics: UserAgentStatistics, +): string { + return JSON.stringify( + UserAgentStatistics$outboundSchema.parse(userAgentStatistics), + ); +} + +export function userAgentStatisticsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UserAgentStatistics$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UserAgentStatistics' from JSON`, + ); +} diff --git a/src/sdk/apiinfo.ts b/src/sdk/apiinfo.ts new file mode 100644 index 0000000..e462b0a --- /dev/null +++ b/src/sdk/apiinfo.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { apiInfoGetApi } from "../funcs/apiInfoGetApi.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class ApiInfo extends ClientSDK { + async getApi( + options?: RequestOptions, + ): Promise { + return unwrapAsync(apiInfoGetApi( + this, + options, + )); + } +} diff --git a/src/sdk/application.ts b/src/sdk/application.ts new file mode 100644 index 0000000..92cb931 --- /dev/null +++ b/src/sdk/application.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { applicationDeleteApiV1ApplicationsBulk } from "../funcs/applicationDeleteApiV1ApplicationsBulk.js"; +import { applicationDeleteApiV1ApplicationsId } from "../funcs/applicationDeleteApiV1ApplicationsId.js"; +import { applicationGetApiV1Applications } from "../funcs/applicationGetApiV1Applications.js"; +import { applicationGetApiV1ApplicationsId } from "../funcs/applicationGetApiV1ApplicationsId.js"; +import { applicationGetApiV1ApplicationsSchema } from "../funcs/applicationGetApiV1ApplicationsSchema.js"; +import { applicationPostApiV1Applications } from "../funcs/applicationPostApiV1Applications.js"; +import { applicationPostApiV1ApplicationsActionName } from "../funcs/applicationPostApiV1ApplicationsActionName.js"; +import { applicationPostApiV1ApplicationsTest } from "../funcs/applicationPostApiV1ApplicationsTest.js"; +import { applicationPostApiV1ApplicationsTestall } from "../funcs/applicationPostApiV1ApplicationsTestall.js"; +import { applicationPutApiV1ApplicationsBulk } from "../funcs/applicationPutApiV1ApplicationsBulk.js"; +import { applicationPutApiV1ApplicationsId } from "../funcs/applicationPutApiV1ApplicationsId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Application extends ClientSDK { + async getApiV1ApplicationsId( + request: operations.GetApiV1ApplicationsIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationGetApiV1ApplicationsId( + this, + request, + options, + )); + } + + async putApiV1ApplicationsId( + request: operations.PutApiV1ApplicationsIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPutApiV1ApplicationsId( + this, + request, + options, + )); + } + + async deleteApiV1ApplicationsId( + request: operations.DeleteApiV1ApplicationsIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationDeleteApiV1ApplicationsId( + this, + request, + options, + )); + } + + async getApiV1Applications( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(applicationGetApiV1Applications( + this, + options, + )); + } + + async postApiV1Applications( + request: operations.PostApiV1ApplicationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPostApiV1Applications( + this, + request, + options, + )); + } + + async putApiV1ApplicationsBulk( + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPutApiV1ApplicationsBulk( + this, + request, + options, + )); + } + + async deleteApiV1ApplicationsBulk( + request?: models.ApplicationBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationDeleteApiV1ApplicationsBulk( + this, + request, + options, + )); + } + + async getApiV1ApplicationsSchema( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(applicationGetApiV1ApplicationsSchema( + this, + options, + )); + } + + async postApiV1ApplicationsTest( + request: operations.PostApiV1ApplicationsTestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPostApiV1ApplicationsTest( + this, + request, + options, + )); + } + + async postApiV1ApplicationsTestall( + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPostApiV1ApplicationsTestall( + this, + options, + )); + } + + async postApiV1ApplicationsActionName( + request: operations.PostApiV1ApplicationsActionNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(applicationPostApiV1ApplicationsActionName( + this, + request, + options, + )); + } +} diff --git a/src/sdk/appprofile.ts b/src/sdk/appprofile.ts new file mode 100644 index 0000000..e3459a2 --- /dev/null +++ b/src/sdk/appprofile.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { appProfileDeleteApiV1AppprofileId } from "../funcs/appProfileDeleteApiV1AppprofileId.js"; +import { appProfileGetApiV1Appprofile } from "../funcs/appProfileGetApiV1Appprofile.js"; +import { appProfileGetApiV1AppprofileId } from "../funcs/appProfileGetApiV1AppprofileId.js"; +import { appProfileGetApiV1AppprofileSchema } from "../funcs/appProfileGetApiV1AppprofileSchema.js"; +import { appProfilePostApiV1Appprofile } from "../funcs/appProfilePostApiV1Appprofile.js"; +import { appProfilePutApiV1AppprofileId } from "../funcs/appProfilePutApiV1AppprofileId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class AppProfile extends ClientSDK { + async postApiV1Appprofile( + request?: models.AppProfileResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(appProfilePostApiV1Appprofile( + this, + request, + options, + )); + } + + async getApiV1Appprofile( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(appProfileGetApiV1Appprofile( + this, + options, + )); + } + + async deleteApiV1AppprofileId( + request: operations.DeleteApiV1AppprofileIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(appProfileDeleteApiV1AppprofileId( + this, + request, + options, + )); + } + + async putApiV1AppprofileId( + request: operations.PutApiV1AppprofileIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(appProfilePutApiV1AppprofileId( + this, + request, + options, + )); + } + + async getApiV1AppprofileId( + request: operations.GetApiV1AppprofileIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(appProfileGetApiV1AppprofileId( + this, + request, + options, + )); + } + + async getApiV1AppprofileSchema( + options?: RequestOptions, + ): Promise { + return unwrapAsync(appProfileGetApiV1AppprofileSchema( + this, + options, + )); + } +} diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts new file mode 100644 index 0000000..bcabce1 --- /dev/null +++ b/src/sdk/authentication.ts @@ -0,0 +1,18 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { authenticationGetLogout } from "../funcs/authenticationGetLogout.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Authentication extends ClientSDK { + async getLogout( + options?: RequestOptions, + ): Promise { + return unwrapAsync(authenticationGetLogout( + this, + options, + )); + } +} diff --git a/src/sdk/backup.ts b/src/sdk/backup.ts new file mode 100644 index 0000000..c36f638 --- /dev/null +++ b/src/sdk/backup.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { backupDeleteApiV1SystemBackupId } from "../funcs/backupDeleteApiV1SystemBackupId.js"; +import { backupGetApiV1SystemBackup } from "../funcs/backupGetApiV1SystemBackup.js"; +import { backupPostApiV1SystemBackupRestoreId } from "../funcs/backupPostApiV1SystemBackupRestoreId.js"; +import { backupPostApiV1SystemBackupRestoreUpload } from "../funcs/backupPostApiV1SystemBackupRestoreUpload.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Backup extends ClientSDK { + async getApiV1SystemBackup( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(backupGetApiV1SystemBackup( + this, + options, + )); + } + + async deleteApiV1SystemBackupId( + request: operations.DeleteApiV1SystemBackupIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupDeleteApiV1SystemBackupId( + this, + request, + options, + )); + } + + async postApiV1SystemBackupRestoreId( + request: operations.PostApiV1SystemBackupRestoreIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupPostApiV1SystemBackupRestoreId( + this, + request, + options, + )); + } + + async postApiV1SystemBackupRestoreUpload( + options?: RequestOptions, + ): Promise { + return unwrapAsync(backupPostApiV1SystemBackupRestoreUpload( + this, + options, + )); + } +} diff --git a/src/sdk/command.ts b/src/sdk/command.ts new file mode 100644 index 0000000..9b19de9 --- /dev/null +++ b/src/sdk/command.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { commandDeleteApiV1CommandId } from "../funcs/commandDeleteApiV1CommandId.js"; +import { commandGetApiV1Command } from "../funcs/commandGetApiV1Command.js"; +import { commandGetApiV1CommandId } from "../funcs/commandGetApiV1CommandId.js"; +import { commandPostApiV1Command } from "../funcs/commandPostApiV1Command.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Command extends ClientSDK { + async getApiV1CommandId( + request: operations.GetApiV1CommandIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(commandGetApiV1CommandId( + this, + request, + options, + )); + } + + async deleteApiV1CommandId( + request: operations.DeleteApiV1CommandIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(commandDeleteApiV1CommandId( + this, + request, + options, + )); + } + + async postApiV1Command( + request?: models.CommandResourceInput | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(commandPostApiV1Command( + this, + request, + options, + )); + } + + async getApiV1Command( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(commandGetApiV1Command( + this, + options, + )); + } +} diff --git a/src/sdk/customfilter.ts b/src/sdk/customfilter.ts new file mode 100644 index 0000000..4f69647 --- /dev/null +++ b/src/sdk/customfilter.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { customFilterDeleteApiV1CustomfilterId } from "../funcs/customFilterDeleteApiV1CustomfilterId.js"; +import { customFilterGetApiV1Customfilter } from "../funcs/customFilterGetApiV1Customfilter.js"; +import { customFilterGetApiV1CustomfilterId } from "../funcs/customFilterGetApiV1CustomfilterId.js"; +import { customFilterPostApiV1Customfilter } from "../funcs/customFilterPostApiV1Customfilter.js"; +import { customFilterPutApiV1CustomfilterId } from "../funcs/customFilterPutApiV1CustomfilterId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class CustomFilter extends ClientSDK { + async getApiV1CustomfilterId( + request: operations.GetApiV1CustomfilterIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFilterGetApiV1CustomfilterId( + this, + request, + options, + )); + } + + async putApiV1CustomfilterId( + request: operations.PutApiV1CustomfilterIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFilterPutApiV1CustomfilterId( + this, + request, + options, + )); + } + + async deleteApiV1CustomfilterId( + request: operations.DeleteApiV1CustomfilterIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFilterDeleteApiV1CustomfilterId( + this, + request, + options, + )); + } + + async getApiV1Customfilter( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(customFilterGetApiV1Customfilter( + this, + options, + )); + } + + async postApiV1Customfilter( + request?: models.CustomFilterResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(customFilterPostApiV1Customfilter( + this, + request, + options, + )); + } +} diff --git a/src/sdk/developmentconfig.ts b/src/sdk/developmentconfig.ts new file mode 100644 index 0000000..a212c07 --- /dev/null +++ b/src/sdk/developmentconfig.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { developmentConfigGetApiV1ConfigDevelopment } from "../funcs/developmentConfigGetApiV1ConfigDevelopment.js"; +import { developmentConfigGetApiV1ConfigDevelopmentId } from "../funcs/developmentConfigGetApiV1ConfigDevelopmentId.js"; +import { developmentConfigPutApiV1ConfigDevelopmentId } from "../funcs/developmentConfigPutApiV1ConfigDevelopmentId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class DevelopmentConfig extends ClientSDK { + async putApiV1ConfigDevelopmentId( + request: operations.PutApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(developmentConfigPutApiV1ConfigDevelopmentId( + this, + request, + options, + )); + } + + async getApiV1ConfigDevelopmentId( + request: operations.GetApiV1ConfigDevelopmentIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(developmentConfigGetApiV1ConfigDevelopmentId( + this, + request, + options, + )); + } + + async getApiV1ConfigDevelopment( + options?: RequestOptions, + ): Promise { + return unwrapAsync(developmentConfigGetApiV1ConfigDevelopment( + this, + options, + )); + } +} diff --git a/src/sdk/downloadclient.ts b/src/sdk/downloadclient.ts new file mode 100644 index 0000000..e447d17 --- /dev/null +++ b/src/sdk/downloadclient.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientDeleteApiV1DownloadclientBulk } from "../funcs/downloadClientDeleteApiV1DownloadclientBulk.js"; +import { downloadClientDeleteApiV1DownloadclientId } from "../funcs/downloadClientDeleteApiV1DownloadclientId.js"; +import { downloadClientGetApiV1Downloadclient } from "../funcs/downloadClientGetApiV1Downloadclient.js"; +import { downloadClientGetApiV1DownloadclientId } from "../funcs/downloadClientGetApiV1DownloadclientId.js"; +import { downloadClientGetApiV1DownloadclientSchema } from "../funcs/downloadClientGetApiV1DownloadclientSchema.js"; +import { downloadClientPostApiV1Downloadclient } from "../funcs/downloadClientPostApiV1Downloadclient.js"; +import { downloadClientPostApiV1DownloadclientActionName } from "../funcs/downloadClientPostApiV1DownloadclientActionName.js"; +import { downloadClientPostApiV1DownloadclientTest } from "../funcs/downloadClientPostApiV1DownloadclientTest.js"; +import { downloadClientPostApiV1DownloadclientTestall } from "../funcs/downloadClientPostApiV1DownloadclientTestall.js"; +import { downloadClientPutApiV1DownloadclientBulk } from "../funcs/downloadClientPutApiV1DownloadclientBulk.js"; +import { downloadClientPutApiV1DownloadclientId } from "../funcs/downloadClientPutApiV1DownloadclientId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class DownloadClient extends ClientSDK { + async getApiV1DownloadclientId( + request: operations.GetApiV1DownloadclientIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientGetApiV1DownloadclientId( + this, + request, + options, + )); + } + + async putApiV1DownloadclientId( + request: operations.PutApiV1DownloadclientIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPutApiV1DownloadclientId( + this, + request, + options, + )); + } + + async deleteApiV1DownloadclientId( + request: operations.DeleteApiV1DownloadclientIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientDeleteApiV1DownloadclientId( + this, + request, + options, + )); + } + + async getApiV1Downloadclient( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(downloadClientGetApiV1Downloadclient( + this, + options, + )); + } + + async postApiV1Downloadclient( + request: operations.PostApiV1DownloadclientRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPostApiV1Downloadclient( + this, + request, + options, + )); + } + + async putApiV1DownloadclientBulk( + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPutApiV1DownloadclientBulk( + this, + request, + options, + )); + } + + async deleteApiV1DownloadclientBulk( + request?: models.DownloadClientBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientDeleteApiV1DownloadclientBulk( + this, + request, + options, + )); + } + + async getApiV1DownloadclientSchema( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(downloadClientGetApiV1DownloadclientSchema( + this, + options, + )); + } + + async postApiV1DownloadclientTest( + request: operations.PostApiV1DownloadclientTestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPostApiV1DownloadclientTest( + this, + request, + options, + )); + } + + async postApiV1DownloadclientTestall( + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPostApiV1DownloadclientTestall( + this, + options, + )); + } + + async postApiV1DownloadclientActionName( + request: operations.PostApiV1DownloadclientActionNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientPostApiV1DownloadclientActionName( + this, + request, + options, + )); + } +} diff --git a/src/sdk/downloadclientconfig.ts b/src/sdk/downloadclientconfig.ts new file mode 100644 index 0000000..65790a3 --- /dev/null +++ b/src/sdk/downloadclientconfig.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { downloadClientConfigGetApiV1ConfigDownloadclient } from "../funcs/downloadClientConfigGetApiV1ConfigDownloadclient.js"; +import { downloadClientConfigGetApiV1ConfigDownloadclientId } from "../funcs/downloadClientConfigGetApiV1ConfigDownloadclientId.js"; +import { downloadClientConfigPutApiV1ConfigDownloadclientId } from "../funcs/downloadClientConfigPutApiV1ConfigDownloadclientId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class DownloadClientConfig extends ClientSDK { + async getApiV1ConfigDownloadclientId( + request: operations.GetApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientConfigGetApiV1ConfigDownloadclientId( + this, + request, + options, + )); + } + + async putApiV1ConfigDownloadclientId( + request: operations.PutApiV1ConfigDownloadclientIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientConfigPutApiV1ConfigDownloadclientId( + this, + request, + options, + )); + } + + async getApiV1ConfigDownloadclient( + options?: RequestOptions, + ): Promise { + return unwrapAsync(downloadClientConfigGetApiV1ConfigDownloadclient( + this, + options, + )); + } +} diff --git a/src/sdk/filesystem.ts b/src/sdk/filesystem.ts new file mode 100644 index 0000000..0298a53 --- /dev/null +++ b/src/sdk/filesystem.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { fileSystemGetApiV1Filesystem } from "../funcs/fileSystemGetApiV1Filesystem.js"; +import { fileSystemGetApiV1FilesystemType } from "../funcs/fileSystemGetApiV1FilesystemType.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class FileSystem extends ClientSDK { + async getApiV1Filesystem( + request: operations.GetApiV1FilesystemRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(fileSystemGetApiV1Filesystem( + this, + request, + options, + )); + } + + async getApiV1FilesystemType( + request: operations.GetApiV1FilesystemTypeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(fileSystemGetApiV1FilesystemType( + this, + request, + options, + )); + } +} diff --git a/src/sdk/health.ts b/src/sdk/health.ts new file mode 100644 index 0000000..372abed --- /dev/null +++ b/src/sdk/health.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { healthGetApiV1Health } from "../funcs/healthGetApiV1Health.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Health extends ClientSDK { + async getApiV1Health( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(healthGetApiV1Health( + this, + options, + )); + } +} diff --git a/src/sdk/history.ts b/src/sdk/history.ts new file mode 100644 index 0000000..8a747dd --- /dev/null +++ b/src/sdk/history.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { historyGetApiV1History } from "../funcs/historyGetApiV1History.js"; +import { historyGetApiV1HistoryIndexer } from "../funcs/historyGetApiV1HistoryIndexer.js"; +import { historyGetApiV1HistorySince } from "../funcs/historyGetApiV1HistorySince.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class History extends ClientSDK { + async getApiV1History( + request: operations.GetApiV1HistoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(historyGetApiV1History( + this, + request, + options, + )); + } + + async getApiV1HistorySince( + request: operations.GetApiV1HistorySinceRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(historyGetApiV1HistorySince( + this, + request, + options, + )); + } + + async getApiV1HistoryIndexer( + request: operations.GetApiV1HistoryIndexerRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(historyGetApiV1HistoryIndexer( + this, + request, + options, + )); + } +} diff --git a/src/sdk/hostconfig.ts b/src/sdk/hostconfig.ts new file mode 100644 index 0000000..c61cc32 --- /dev/null +++ b/src/sdk/hostconfig.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { hostConfigGetApiV1ConfigHost } from "../funcs/hostConfigGetApiV1ConfigHost.js"; +import { hostConfigGetApiV1ConfigHostId } from "../funcs/hostConfigGetApiV1ConfigHostId.js"; +import { hostConfigPutApiV1ConfigHostId } from "../funcs/hostConfigPutApiV1ConfigHostId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class HostConfig extends ClientSDK { + async getApiV1ConfigHostId( + request: operations.GetApiV1ConfigHostIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hostConfigGetApiV1ConfigHostId( + this, + request, + options, + )); + } + + async putApiV1ConfigHostId( + request: operations.PutApiV1ConfigHostIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hostConfigPutApiV1ConfigHostId( + this, + request, + options, + )); + } + + async getApiV1ConfigHost( + options?: RequestOptions, + ): Promise { + return unwrapAsync(hostConfigGetApiV1ConfigHost( + this, + options, + )); + } +} diff --git a/src/sdk/index.ts b/src/sdk/index.ts new file mode 100644 index 0000000..ecac226 --- /dev/null +++ b/src/sdk/index.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./sdk.js"; diff --git a/src/sdk/indexer.ts b/src/sdk/indexer.ts new file mode 100644 index 0000000..a2bacc9 --- /dev/null +++ b/src/sdk/indexer.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerDeleteApiV1IndexerBulk } from "../funcs/indexerDeleteApiV1IndexerBulk.js"; +import { indexerDeleteApiV1IndexerId } from "../funcs/indexerDeleteApiV1IndexerId.js"; +import { indexerGetApiV1Indexer } from "../funcs/indexerGetApiV1Indexer.js"; +import { indexerGetApiV1IndexerId } from "../funcs/indexerGetApiV1IndexerId.js"; +import { indexerGetApiV1IndexerSchema } from "../funcs/indexerGetApiV1IndexerSchema.js"; +import { indexerPostApiV1Indexer } from "../funcs/indexerPostApiV1Indexer.js"; +import { indexerPostApiV1IndexerActionName } from "../funcs/indexerPostApiV1IndexerActionName.js"; +import { indexerPostApiV1IndexerTest } from "../funcs/indexerPostApiV1IndexerTest.js"; +import { indexerPostApiV1IndexerTestall } from "../funcs/indexerPostApiV1IndexerTestall.js"; +import { indexerPutApiV1IndexerBulk } from "../funcs/indexerPutApiV1IndexerBulk.js"; +import { indexerPutApiV1IndexerId } from "../funcs/indexerPutApiV1IndexerId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Indexer extends ClientSDK { + async getApiV1IndexerId( + request: operations.GetApiV1IndexerIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerGetApiV1IndexerId( + this, + request, + options, + )); + } + + async putApiV1IndexerId( + request: operations.PutApiV1IndexerIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPutApiV1IndexerId( + this, + request, + options, + )); + } + + async deleteApiV1IndexerId( + request: operations.DeleteApiV1IndexerIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerDeleteApiV1IndexerId( + this, + request, + options, + )); + } + + async getApiV1Indexer( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerGetApiV1Indexer( + this, + options, + )); + } + + async postApiV1Indexer( + request: operations.PostApiV1IndexerRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPostApiV1Indexer( + this, + request, + options, + )); + } + + async putApiV1IndexerBulk( + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPutApiV1IndexerBulk( + this, + request, + options, + )); + } + + async deleteApiV1IndexerBulk( + request?: models.IndexerBulkResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerDeleteApiV1IndexerBulk( + this, + request, + options, + )); + } + + async getApiV1IndexerSchema( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerGetApiV1IndexerSchema( + this, + options, + )); + } + + async postApiV1IndexerTest( + request: operations.PostApiV1IndexerTestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPostApiV1IndexerTest( + this, + request, + options, + )); + } + + async postApiV1IndexerTestall( + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPostApiV1IndexerTestall( + this, + options, + )); + } + + async postApiV1IndexerActionName( + request: operations.PostApiV1IndexerActionNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerPostApiV1IndexerActionName( + this, + request, + options, + )); + } +} diff --git a/src/sdk/indexerdefaultcategories.ts b/src/sdk/indexerdefaultcategories.ts new file mode 100644 index 0000000..3ec7a1e --- /dev/null +++ b/src/sdk/indexerdefaultcategories.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerDefaultCategoriesGetApiV1IndexerCategories } from "../funcs/indexerDefaultCategoriesGetApiV1IndexerCategories.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class IndexerDefaultCategories extends ClientSDK { + async getApiV1IndexerCategories( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerDefaultCategoriesGetApiV1IndexerCategories( + this, + options, + )); + } +} diff --git a/src/sdk/indexerproxy.ts b/src/sdk/indexerproxy.ts new file mode 100644 index 0000000..c121e0f --- /dev/null +++ b/src/sdk/indexerproxy.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerProxyDeleteApiV1IndexerproxyId } from "../funcs/indexerProxyDeleteApiV1IndexerproxyId.js"; +import { indexerProxyGetApiV1Indexerproxy } from "../funcs/indexerProxyGetApiV1Indexerproxy.js"; +import { indexerProxyGetApiV1IndexerproxyId } from "../funcs/indexerProxyGetApiV1IndexerproxyId.js"; +import { indexerProxyGetApiV1IndexerproxySchema } from "../funcs/indexerProxyGetApiV1IndexerproxySchema.js"; +import { indexerProxyPostApiV1Indexerproxy } from "../funcs/indexerProxyPostApiV1Indexerproxy.js"; +import { indexerProxyPostApiV1IndexerproxyActionName } from "../funcs/indexerProxyPostApiV1IndexerproxyActionName.js"; +import { indexerProxyPostApiV1IndexerproxyTest } from "../funcs/indexerProxyPostApiV1IndexerproxyTest.js"; +import { indexerProxyPostApiV1IndexerproxyTestall } from "../funcs/indexerProxyPostApiV1IndexerproxyTestall.js"; +import { indexerProxyPutApiV1IndexerproxyId } from "../funcs/indexerProxyPutApiV1IndexerproxyId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class IndexerProxy extends ClientSDK { + async getApiV1IndexerproxyId( + request: operations.GetApiV1IndexerproxyIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyGetApiV1IndexerproxyId( + this, + request, + options, + )); + } + + async putApiV1IndexerproxyId( + request: operations.PutApiV1IndexerproxyIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyPutApiV1IndexerproxyId( + this, + request, + options, + )); + } + + async deleteApiV1IndexerproxyId( + request: operations.DeleteApiV1IndexerproxyIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyDeleteApiV1IndexerproxyId( + this, + request, + options, + )); + } + + async getApiV1Indexerproxy( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerProxyGetApiV1Indexerproxy( + this, + options, + )); + } + + async postApiV1Indexerproxy( + request: operations.PostApiV1IndexerproxyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyPostApiV1Indexerproxy( + this, + request, + options, + )); + } + + async getApiV1IndexerproxySchema( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerProxyGetApiV1IndexerproxySchema( + this, + options, + )); + } + + async postApiV1IndexerproxyTest( + request: operations.PostApiV1IndexerproxyTestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyPostApiV1IndexerproxyTest( + this, + request, + options, + )); + } + + async postApiV1IndexerproxyTestall( + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyPostApiV1IndexerproxyTestall( + this, + options, + )); + } + + async postApiV1IndexerproxyActionName( + request: operations.PostApiV1IndexerproxyActionNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerProxyPostApiV1IndexerproxyActionName( + this, + request, + options, + )); + } +} diff --git a/src/sdk/indexerstats.ts b/src/sdk/indexerstats.ts new file mode 100644 index 0000000..03347a8 --- /dev/null +++ b/src/sdk/indexerstats.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerStatsGetApiV1Indexerstats } from "../funcs/indexerStatsGetApiV1Indexerstats.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class IndexerStats extends ClientSDK { + async getApiV1Indexerstats( + request: operations.GetApiV1IndexerstatsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(indexerStatsGetApiV1Indexerstats( + this, + request, + options, + )); + } +} diff --git a/src/sdk/indexerstatus.ts b/src/sdk/indexerstatus.ts new file mode 100644 index 0000000..76ae7b4 --- /dev/null +++ b/src/sdk/indexerstatus.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { indexerStatusGetApiV1Indexerstatus } from "../funcs/indexerStatusGetApiV1Indexerstatus.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class IndexerStatus extends ClientSDK { + async getApiV1Indexerstatus( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(indexerStatusGetApiV1Indexerstatus( + this, + options, + )); + } +} diff --git a/src/sdk/localization.ts b/src/sdk/localization.ts new file mode 100644 index 0000000..50fc690 --- /dev/null +++ b/src/sdk/localization.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { localizationGetApiV1Localization } from "../funcs/localizationGetApiV1Localization.js"; +import { localizationGetApiV1LocalizationOptions } from "../funcs/localizationGetApiV1LocalizationOptions.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Localization extends ClientSDK { + async getApiV1Localization( + options?: RequestOptions, + ): Promise { + return unwrapAsync(localizationGetApiV1Localization( + this, + options, + )); + } + + async getApiV1LocalizationOptions( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(localizationGetApiV1LocalizationOptions( + this, + options, + )); + } +} diff --git a/src/sdk/log.ts b/src/sdk/log.ts new file mode 100644 index 0000000..712f7f5 --- /dev/null +++ b/src/sdk/log.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { logGetApiV1Log } from "../funcs/logGetApiV1Log.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Log extends ClientSDK { + async getApiV1Log( + request: operations.GetApiV1LogRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(logGetApiV1Log( + this, + request, + options, + )); + } +} diff --git a/src/sdk/logfile.ts b/src/sdk/logfile.ts new file mode 100644 index 0000000..be5cb94 --- /dev/null +++ b/src/sdk/logfile.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { logFileGetApiV1LogFile } from "../funcs/logFileGetApiV1LogFile.js"; +import { logFileGetApiV1LogFileFilename } from "../funcs/logFileGetApiV1LogFileFilename.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class LogFile extends ClientSDK { + async getApiV1LogFile( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(logFileGetApiV1LogFile( + this, + options, + )); + } + + async getApiV1LogFileFilename( + request: operations.GetApiV1LogFileFilenameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(logFileGetApiV1LogFileFilename( + this, + request, + options, + )); + } +} diff --git a/src/sdk/newznab.ts b/src/sdk/newznab.ts new file mode 100644 index 0000000..aaf9d57 --- /dev/null +++ b/src/sdk/newznab.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { newznabGetApiV1IndexerIdDownload } from "../funcs/newznabGetApiV1IndexerIdDownload.js"; +import { newznabGetApiV1IndexerIdNewznab } from "../funcs/newznabGetApiV1IndexerIdNewznab.js"; +import { newznabGetIdApi } from "../funcs/newznabGetIdApi.js"; +import { newznabGetIdDownload } from "../funcs/newznabGetIdDownload.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Newznab extends ClientSDK { + async getApiV1IndexerIdNewznab( + request: operations.GetApiV1IndexerIdNewznabRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(newznabGetApiV1IndexerIdNewznab( + this, + request, + options, + )); + } + + async getIdApi( + request: operations.GetIdApiRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(newznabGetIdApi( + this, + request, + options, + )); + } + + async getApiV1IndexerIdDownload( + request: operations.GetApiV1IndexerIdDownloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(newznabGetApiV1IndexerIdDownload( + this, + request, + options, + )); + } + + async getIdDownload( + request: operations.GetIdDownloadRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(newznabGetIdDownload( + this, + request, + options, + )); + } +} diff --git a/src/sdk/notification.ts b/src/sdk/notification.ts new file mode 100644 index 0000000..f2b46d7 --- /dev/null +++ b/src/sdk/notification.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { notificationDeleteApiV1NotificationId } from "../funcs/notificationDeleteApiV1NotificationId.js"; +import { notificationGetApiV1Notification } from "../funcs/notificationGetApiV1Notification.js"; +import { notificationGetApiV1NotificationId } from "../funcs/notificationGetApiV1NotificationId.js"; +import { notificationGetApiV1NotificationSchema } from "../funcs/notificationGetApiV1NotificationSchema.js"; +import { notificationPostApiV1Notification } from "../funcs/notificationPostApiV1Notification.js"; +import { notificationPostApiV1NotificationActionName } from "../funcs/notificationPostApiV1NotificationActionName.js"; +import { notificationPostApiV1NotificationTest } from "../funcs/notificationPostApiV1NotificationTest.js"; +import { notificationPostApiV1NotificationTestall } from "../funcs/notificationPostApiV1NotificationTestall.js"; +import { notificationPutApiV1NotificationId } from "../funcs/notificationPutApiV1NotificationId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Notification extends ClientSDK { + async getApiV1NotificationId( + request: operations.GetApiV1NotificationIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationGetApiV1NotificationId( + this, + request, + options, + )); + } + + async putApiV1NotificationId( + request: operations.PutApiV1NotificationIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationPutApiV1NotificationId( + this, + request, + options, + )); + } + + async deleteApiV1NotificationId( + request: operations.DeleteApiV1NotificationIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationDeleteApiV1NotificationId( + this, + request, + options, + )); + } + + async getApiV1Notification( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(notificationGetApiV1Notification( + this, + options, + )); + } + + async postApiV1Notification( + request: operations.PostApiV1NotificationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationPostApiV1Notification( + this, + request, + options, + )); + } + + async getApiV1NotificationSchema( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(notificationGetApiV1NotificationSchema( + this, + options, + )); + } + + async postApiV1NotificationTest( + request: operations.PostApiV1NotificationTestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationPostApiV1NotificationTest( + this, + request, + options, + )); + } + + async postApiV1NotificationTestall( + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationPostApiV1NotificationTestall( + this, + options, + )); + } + + async postApiV1NotificationActionName( + request: operations.PostApiV1NotificationActionNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(notificationPostApiV1NotificationActionName( + this, + request, + options, + )); + } +} diff --git a/src/sdk/ping.ts b/src/sdk/ping.ts new file mode 100644 index 0000000..c6dd3ab --- /dev/null +++ b/src/sdk/ping.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { pingGetPing } from "../funcs/pingGetPing.js"; +import { pingHeadPing } from "../funcs/pingHeadPing.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Ping extends ClientSDK { + async getPing( + options?: RequestOptions, + ): Promise { + return unwrapAsync(pingGetPing( + this, + options, + )); + } + + async headPing( + options?: RequestOptions, + ): Promise { + return unwrapAsync(pingHeadPing( + this, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts new file mode 100644 index 0000000..5851d62 --- /dev/null +++ b/src/sdk/sdk.ts @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "../lib/sdks.js"; +import { ApiInfo } from "./apiinfo.js"; +import { Application } from "./application.js"; +import { AppProfile } from "./appprofile.js"; +import { Authentication } from "./authentication.js"; +import { Backup } from "./backup.js"; +import { Command } from "./command.js"; +import { CustomFilter } from "./customfilter.js"; +import { DevelopmentConfig } from "./developmentconfig.js"; +import { DownloadClient } from "./downloadclient.js"; +import { DownloadClientConfig } from "./downloadclientconfig.js"; +import { FileSystem } from "./filesystem.js"; +import { Health } from "./health.js"; +import { History } from "./history.js"; +import { HostConfig } from "./hostconfig.js"; +import { Indexer } from "./indexer.js"; +import { IndexerDefaultCategories } from "./indexerdefaultcategories.js"; +import { IndexerProxy } from "./indexerproxy.js"; +import { IndexerStats } from "./indexerstats.js"; +import { IndexerStatus } from "./indexerstatus.js"; +import { Localization } from "./localization.js"; +import { Log } from "./log.js"; +import { LogFile } from "./logfile.js"; +import { Newznab } from "./newznab.js"; +import { Notification } from "./notification.js"; +import { Ping } from "./ping.js"; +import { Search } from "./search.js"; +import { StaticResource } from "./staticresource.js"; +import { System } from "./system.js"; +import { Tag } from "./tag.js"; +import { TagDetails } from "./tagdetails.js"; +import { Task } from "./task.js"; +import { UiConfig } from "./uiconfig.js"; +import { Update } from "./update.js"; +import { UpdateLogFile } from "./updatelogfile.js"; + +export class Prowlarr extends ClientSDK { + private _apiInfo?: ApiInfo; + get apiInfo(): ApiInfo { + return (this._apiInfo ??= new ApiInfo(this._options)); + } + + private _application?: Application; + get application(): Application { + return (this._application ??= new Application(this._options)); + } + + private _appProfile?: AppProfile; + get appProfile(): AppProfile { + return (this._appProfile ??= new AppProfile(this._options)); + } + + private _staticResource?: StaticResource; + get staticResource(): StaticResource { + return (this._staticResource ??= new StaticResource(this._options)); + } + + private _authentication?: Authentication; + get authentication(): Authentication { + return (this._authentication ??= new Authentication(this._options)); + } + + private _backup?: Backup; + get backup(): Backup { + return (this._backup ??= new Backup(this._options)); + } + + private _command?: Command; + get command(): Command { + return (this._command ??= new Command(this._options)); + } + + private _customFilter?: CustomFilter; + get customFilter(): CustomFilter { + return (this._customFilter ??= new CustomFilter(this._options)); + } + + private _developmentConfig?: DevelopmentConfig; + get developmentConfig(): DevelopmentConfig { + return (this._developmentConfig ??= new DevelopmentConfig(this._options)); + } + + private _downloadClient?: DownloadClient; + get downloadClient(): DownloadClient { + return (this._downloadClient ??= new DownloadClient(this._options)); + } + + private _downloadClientConfig?: DownloadClientConfig; + get downloadClientConfig(): DownloadClientConfig { + return (this._downloadClientConfig ??= new DownloadClientConfig( + this._options, + )); + } + + private _fileSystem?: FileSystem; + get fileSystem(): FileSystem { + return (this._fileSystem ??= new FileSystem(this._options)); + } + + private _health?: Health; + get health(): Health { + return (this._health ??= new Health(this._options)); + } + + private _history?: History; + get history(): History { + return (this._history ??= new History(this._options)); + } + + private _hostConfig?: HostConfig; + get hostConfig(): HostConfig { + return (this._hostConfig ??= new HostConfig(this._options)); + } + + private _indexer?: Indexer; + get indexer(): Indexer { + return (this._indexer ??= new Indexer(this._options)); + } + + private _indexerDefaultCategories?: IndexerDefaultCategories; + get indexerDefaultCategories(): IndexerDefaultCategories { + return (this._indexerDefaultCategories ??= new IndexerDefaultCategories( + this._options, + )); + } + + private _indexerProxy?: IndexerProxy; + get indexerProxy(): IndexerProxy { + return (this._indexerProxy ??= new IndexerProxy(this._options)); + } + + private _indexerStats?: IndexerStats; + get indexerStats(): IndexerStats { + return (this._indexerStats ??= new IndexerStats(this._options)); + } + + private _indexerStatus?: IndexerStatus; + get indexerStatus(): IndexerStatus { + return (this._indexerStatus ??= new IndexerStatus(this._options)); + } + + private _localization?: Localization; + get localization(): Localization { + return (this._localization ??= new Localization(this._options)); + } + + private _log?: Log; + get log(): Log { + return (this._log ??= new Log(this._options)); + } + + private _logFile?: LogFile; + get logFile(): LogFile { + return (this._logFile ??= new LogFile(this._options)); + } + + private _newznab?: Newznab; + get newznab(): Newznab { + return (this._newznab ??= new Newznab(this._options)); + } + + private _notification?: Notification; + get notification(): Notification { + return (this._notification ??= new Notification(this._options)); + } + + private _ping?: Ping; + get ping(): Ping { + return (this._ping ??= new Ping(this._options)); + } + + private _search?: Search; + get search(): Search { + return (this._search ??= new Search(this._options)); + } + + private _system?: System; + get system(): System { + return (this._system ??= new System(this._options)); + } + + private _tag?: Tag; + get tag(): Tag { + return (this._tag ??= new Tag(this._options)); + } + + private _tagDetails?: TagDetails; + get tagDetails(): TagDetails { + return (this._tagDetails ??= new TagDetails(this._options)); + } + + private _task?: Task; + get task(): Task { + return (this._task ??= new Task(this._options)); + } + + private _uiConfig?: UiConfig; + get uiConfig(): UiConfig { + return (this._uiConfig ??= new UiConfig(this._options)); + } + + private _update?: Update; + get update(): Update { + return (this._update ??= new Update(this._options)); + } + + private _updateLogFile?: UpdateLogFile; + get updateLogFile(): UpdateLogFile { + return (this._updateLogFile ??= new UpdateLogFile(this._options)); + } +} diff --git a/src/sdk/search.ts b/src/sdk/search.ts new file mode 100644 index 0000000..6690ea5 --- /dev/null +++ b/src/sdk/search.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { searchGetApiV1Search } from "../funcs/searchGetApiV1Search.js"; +import { searchPostApiV1Search } from "../funcs/searchPostApiV1Search.js"; +import { searchPostApiV1SearchBulk } from "../funcs/searchPostApiV1SearchBulk.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Search extends ClientSDK { + async postApiV1Search( + request?: models.ReleaseResourceInput | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchPostApiV1Search( + this, + request, + options, + )); + } + + async getApiV1Search( + request: operations.GetApiV1SearchRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(searchGetApiV1Search( + this, + request, + options, + )); + } + + async postApiV1SearchBulk( + request?: Array | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchPostApiV1SearchBulk( + this, + request, + options, + )); + } +} diff --git a/src/sdk/staticresource.ts b/src/sdk/staticresource.ts new file mode 100644 index 0000000..ba77fd1 --- /dev/null +++ b/src/sdk/staticresource.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { staticResourceGet } from "../funcs/staticResourceGet.js"; +import { staticResourceGetContentPath } from "../funcs/staticResourceGetContentPath.js"; +import { staticResourceGetLogin } from "../funcs/staticResourceGetLogin.js"; +import { staticResourceGetPath } from "../funcs/staticResourceGetPath.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class StaticResource extends ClientSDK { + async getLogin( + options?: RequestOptions, + ): Promise { + return unwrapAsync(staticResourceGetLogin( + this, + options, + )); + } + + async getContentPath( + request: operations.GetContentPathRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(staticResourceGetContentPath( + this, + request, + options, + )); + } + + async get( + options?: RequestOptions, + ): Promise { + return unwrapAsync(staticResourceGet( + this, + options, + )); + } + + async getPath( + request: operations.GetPathRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(staticResourceGetPath( + this, + request, + options, + )); + } +} diff --git a/src/sdk/system.ts b/src/sdk/system.ts new file mode 100644 index 0000000..cb5aeba --- /dev/null +++ b/src/sdk/system.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { systemGetApiV1SystemRoutes } from "../funcs/systemGetApiV1SystemRoutes.js"; +import { systemGetApiV1SystemRoutesDuplicate } from "../funcs/systemGetApiV1SystemRoutesDuplicate.js"; +import { systemGetApiV1SystemStatus } from "../funcs/systemGetApiV1SystemStatus.js"; +import { systemPostApiV1SystemRestart } from "../funcs/systemPostApiV1SystemRestart.js"; +import { systemPostApiV1SystemShutdown } from "../funcs/systemPostApiV1SystemShutdown.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class System extends ClientSDK { + async getApiV1SystemStatus( + options?: RequestOptions, + ): Promise { + return unwrapAsync(systemGetApiV1SystemStatus( + this, + options, + )); + } + + async getApiV1SystemRoutes( + options?: RequestOptions, + ): Promise { + return unwrapAsync(systemGetApiV1SystemRoutes( + this, + options, + )); + } + + async getApiV1SystemRoutesDuplicate( + options?: RequestOptions, + ): Promise { + return unwrapAsync(systemGetApiV1SystemRoutesDuplicate( + this, + options, + )); + } + + async postApiV1SystemShutdown( + options?: RequestOptions, + ): Promise { + return unwrapAsync(systemPostApiV1SystemShutdown( + this, + options, + )); + } + + async postApiV1SystemRestart( + options?: RequestOptions, + ): Promise { + return unwrapAsync(systemPostApiV1SystemRestart( + this, + options, + )); + } +} diff --git a/src/sdk/tag.ts b/src/sdk/tag.ts new file mode 100644 index 0000000..f601342 --- /dev/null +++ b/src/sdk/tag.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagDeleteApiV1TagId } from "../funcs/tagDeleteApiV1TagId.js"; +import { tagGetApiV1Tag } from "../funcs/tagGetApiV1Tag.js"; +import { tagGetApiV1TagId } from "../funcs/tagGetApiV1TagId.js"; +import { tagPostApiV1Tag } from "../funcs/tagPostApiV1Tag.js"; +import { tagPutApiV1TagId } from "../funcs/tagPutApiV1TagId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Tag extends ClientSDK { + async getApiV1TagId( + request: operations.GetApiV1TagIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagGetApiV1TagId( + this, + request, + options, + )); + } + + async putApiV1TagId( + request: operations.PutApiV1TagIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagPutApiV1TagId( + this, + request, + options, + )); + } + + async deleteApiV1TagId( + request: operations.DeleteApiV1TagIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagDeleteApiV1TagId( + this, + request, + options, + )); + } + + async getApiV1Tag( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(tagGetApiV1Tag( + this, + options, + )); + } + + async postApiV1Tag( + request?: models.TagResource | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagPostApiV1Tag( + this, + request, + options, + )); + } +} diff --git a/src/sdk/tagdetails.ts b/src/sdk/tagdetails.ts new file mode 100644 index 0000000..ba1ce0d --- /dev/null +++ b/src/sdk/tagdetails.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tagDetailsGetApiV1TagDetail } from "../funcs/tagDetailsGetApiV1TagDetail.js"; +import { tagDetailsGetApiV1TagDetailId } from "../funcs/tagDetailsGetApiV1TagDetailId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class TagDetails extends ClientSDK { + async getApiV1TagDetailId( + request: operations.GetApiV1TagDetailIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tagDetailsGetApiV1TagDetailId( + this, + request, + options, + )); + } + + async getApiV1TagDetail( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(tagDetailsGetApiV1TagDetail( + this, + options, + )); + } +} diff --git a/src/sdk/task.ts b/src/sdk/task.ts new file mode 100644 index 0000000..cd3276a --- /dev/null +++ b/src/sdk/task.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { taskGetApiV1SystemTask } from "../funcs/taskGetApiV1SystemTask.js"; +import { taskGetApiV1SystemTaskId } from "../funcs/taskGetApiV1SystemTaskId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Task extends ClientSDK { + async getApiV1SystemTask( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(taskGetApiV1SystemTask( + this, + options, + )); + } + + async getApiV1SystemTaskId( + request: operations.GetApiV1SystemTaskIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(taskGetApiV1SystemTaskId( + this, + request, + options, + )); + } +} diff --git a/src/sdk/uiconfig.ts b/src/sdk/uiconfig.ts new file mode 100644 index 0000000..70f0199 --- /dev/null +++ b/src/sdk/uiconfig.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { uiConfigGetApiV1ConfigUi } from "../funcs/uiConfigGetApiV1ConfigUi.js"; +import { uiConfigGetApiV1ConfigUiId } from "../funcs/uiConfigGetApiV1ConfigUiId.js"; +import { uiConfigPutApiV1ConfigUiId } from "../funcs/uiConfigPutApiV1ConfigUiId.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class UiConfig extends ClientSDK { + async putApiV1ConfigUiId( + request: operations.PutApiV1ConfigUiIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uiConfigPutApiV1ConfigUiId( + this, + request, + options, + )); + } + + async getApiV1ConfigUiId( + request: operations.GetApiV1ConfigUiIdRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(uiConfigGetApiV1ConfigUiId( + this, + request, + options, + )); + } + + async getApiV1ConfigUi( + options?: RequestOptions, + ): Promise { + return unwrapAsync(uiConfigGetApiV1ConfigUi( + this, + options, + )); + } +} diff --git a/src/sdk/update.ts b/src/sdk/update.ts new file mode 100644 index 0000000..b13821b --- /dev/null +++ b/src/sdk/update.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { updateGetApiV1Update } from "../funcs/updateGetApiV1Update.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Update extends ClientSDK { + async getApiV1Update( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(updateGetApiV1Update( + this, + options, + )); + } +} diff --git a/src/sdk/updatelogfile.ts b/src/sdk/updatelogfile.ts new file mode 100644 index 0000000..d817e75 --- /dev/null +++ b/src/sdk/updatelogfile.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { updateLogFileGetApiV1LogFileUpdate } from "../funcs/updateLogFileGetApiV1LogFileUpdate.js"; +import { updateLogFileGetApiV1LogFileUpdateFilename } from "../funcs/updateLogFileGetApiV1LogFileUpdateFilename.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class UpdateLogFile extends ClientSDK { + async getApiV1LogFileUpdate( + options?: RequestOptions, + ): Promise> { + return unwrapAsync(updateLogFileGetApiV1LogFileUpdate( + this, + options, + )); + } + + async getApiV1LogFileUpdateFilename( + request: operations.GetApiV1LogFileUpdateFilenameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(updateLogFileGetApiV1LogFileUpdateFilename( + this, + request, + options, + )); + } +} diff --git a/src/types/async.ts b/src/types/async.ts new file mode 100644 index 0000000..689dba5 --- /dev/null +++ b/src/types/async.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type APICall = + | { + status: "complete"; + request: Request; + response: Response; + } + | { + status: "request-error"; + request: Request; + response?: undefined; + } + | { + status: "invalid"; + request?: undefined; + response?: undefined; + }; + +export class APIPromise implements Promise { + readonly #promise: Promise<[T, APICall]>; + readonly #unwrapped: Promise; + + readonly [Symbol.toStringTag] = "APIPromise"; + + constructor(p: [T, APICall] | Promise<[T, APICall]>) { + this.#promise = p instanceof Promise ? p : Promise.resolve(p); + this.#unwrapped = + p instanceof Promise + ? this.#promise.then(([value]) => value) + : Promise.resolve(p[0]); + } + + then( + onfulfilled?: + | ((value: T) => TResult1 | PromiseLike) + | null + | undefined, + onrejected?: + | ((reason: any) => TResult2 | PromiseLike) + | null + | undefined, + ): Promise { + return this.#promise.then( + onfulfilled ? ([value]) => onfulfilled(value) : void 0, + onrejected, + ); + } + + catch( + onrejected?: + | ((reason: any) => TResult | PromiseLike) + | null + | undefined, + ): Promise { + return this.#unwrapped.catch(onrejected); + } + + finally(onfinally?: (() => void) | null | undefined): Promise { + return this.#unwrapped.finally(onfinally); + } + + $inspect(): Promise<[T, APICall]> { + return this.#promise; + } +} diff --git a/src/types/blobs.ts b/src/types/blobs.ts new file mode 100644 index 0000000..4ce8460 --- /dev/null +++ b/src/types/blobs.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const blobLikeSchema: z.ZodType = + z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, + }); + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/src/types/constdatetime.ts b/src/types/constdatetime.ts new file mode 100644 index 0000000..c0a4409 --- /dev/null +++ b/src/types/constdatetime.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function constDateTime( + val: string, +): z.ZodType { + return z.custom((v) => { + return ( + typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() + ); + }, `Value must be equivelant to ${val}`); +} diff --git a/src/types/enums.ts b/src/types/enums.ts new file mode 100644 index 0000000..6fb6d91 --- /dev/null +++ b/src/types/enums.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +export function catchUnrecognizedEnum(value: T): Unrecognized { + return value as Unrecognized; +} + +type Prettify = { [K in keyof T]: T[K] } & {}; +export type ClosedEnum = T[keyof T]; +export type OpenEnum = + | Prettify + | Unrecognized; diff --git a/src/types/fp.ts b/src/types/fp.ts new file mode 100644 index 0000000..ccbe51e --- /dev/null +++ b/src/types/fp.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * A monad that captures the result of a function call or an error if it was not + * successful. Railway programming, enabled by this type, can be a nicer + * alternative to traditional exception throwing because it allows functions to + * declare all _known_ errors with static types and then check for them + * exhaustively in application code. Thrown exception have a type of `unknown` + * and break out of regular control flow of programs making them harder to + * inspect and more verbose work with due to try-catch blocks. + */ +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; + +export function OK(value: V): Result { + return { ok: true, value }; +} + +export function ERR(error: E): Result { + return { ok: false, error }; +} + +/** + * unwrap is a convenience function for extracting a value from a result or + * throwing if there was an error. + */ +export function unwrap(r: Result): T { + if (!r.ok) { + throw r.error; + } + return r.value; +} + +/** + * unwrapAsync is a convenience function for resolving a value from a Promise + * of a result or rejecting if an error occurred. + */ +export async function unwrapAsync( + pr: Promise>, +): Promise { + const r = await pr; + if (!r.ok) { + throw r.error; + } + + return r.value; +} diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..e124e81 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,11 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export { blobLikeSchema, isBlobLike } from "./blobs.js"; +export { catchUnrecognizedEnum } 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/types/operations.ts b/src/types/operations.ts new file mode 100644 index 0000000..beb81e1 --- /dev/null +++ b/src/types/operations.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Result } from "./fp.js"; + +export type Paginator = () => Promise }> | null; + +export type PageIterator = V & { + next: Paginator; + [Symbol.asyncIterator]: () => AsyncIterableIterator; + "~next"?: PageState | undefined; +}; + +export function createPageIterator( + page: V & { next: Paginator }, + halt: (v: V) => boolean, +): { + [Symbol.asyncIterator]: () => AsyncIterableIterator; +} { + return { + [Symbol.asyncIterator]: async function* paginator() { + yield page; + if (halt(page)) { + return; + } + + let p: typeof page | null = page; + for (p = await p.next(); p != null; p = await p.next()) { + yield p; + if (halt(p)) { + return; + } + } + }, + }; +} + +/** + * This utility create a special iterator that yields a single value and + * terminates. It is useful in paginated SDK functions that have early return + * paths when things go wrong. + */ +export function haltIterator( + v: V, +): PageIterator { + return { + ...v, + next: () => null, + [Symbol.asyncIterator]: async function* paginator() { + yield v; + }, + }; +} + +/** + * Converts an async iterator of `Result` into an async iterator of `V`. + * When error results occur, the underlying error value is thrown. + */ +export async function unwrapResultIterator( + iteratorPromise: Promise, PageState>>, +): Promise> { + const resultIter = await iteratorPromise; + + if (!resultIter.ok) { + throw resultIter.error; + } + + return { + ...resultIter.value, + next: unwrapPaginator(resultIter.next), + "~next": resultIter["~next"], + [Symbol.asyncIterator]: async function* paginator() { + for await (const page of resultIter) { + if (!page.ok) { + throw page.error; + } + yield page.value; + } + }, + }; +} + +function unwrapPaginator( + paginator: Paginator>, +): Paginator { + return () => { + const nextResult = paginator(); + if (nextResult == null) { + return null; + } + return nextResult.then((res) => { + if (!res.ok) { + throw res.error; + } + const out = { + ...res.value, + next: unwrapPaginator(res.next), + }; + return out; + }); + }; +} + +export const URL_OVERRIDE = Symbol("URL_OVERRIDE"); diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts new file mode 100644 index 0000000..c79b3f5 --- /dev/null +++ b/src/types/rfcdate.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + +export class RFCDate { + private serialized: string; + + /** + * Creates a new RFCDate instance using today's date. + */ + static today(): RFCDate { + return new RFCDate(new Date()); + } + + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); + } + + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); + } + + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } + } + + toJSON(): string { + return this.toString(); + } + + toString(): string { + return this.serialized; + } +} diff --git a/src/types/streams.ts b/src/types/streams.ts new file mode 100644 index 0000000..a0163e7 --- /dev/null +++ b/src/types/streams.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isReadableStream( + val: unknown, +): val is ReadableStream { + if (typeof val !== "object" || val === null) { + return false; + } + + // Check for the presence of methods specific to ReadableStream + const stream = val as ReadableStream; + + // ReadableStream has methods like getReader, cancel, and tee + return ( + typeof stream.getReader === "function" && + typeof stream.cancel === "function" && + typeof stream.tee === "function" + ); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..94d81a3 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,41 @@ +{ + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2020", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + + "module": "Node16", + "moduleResolution": "Node16", + + "allowJs": true, + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": ".", + + + // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json + "strict": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "isolatedModules": true, + "checkJs": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"], + "exclude": ["node_modules"] +}