diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ccf17d6..7fb99ae 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.544.0 +speakeasyVersion: 1.567.2 sources: SolarWinds Observability: sourceNamespace: solar-winds-observability @@ -9,11 +9,11 @@ sources: - 1.0.5 swov1: sourceNamespace: solar-winds-observability - sourceRevisionDigest: sha256:497ba59b0679735cf007ad4dc32e8ff9e4bb9f989efd06b0032cc64e0cdc21b7 - sourceBlobDigest: sha256:63f72a00d701ceb5cabc7f120a563af340b18802c95a74cc919e7228ab89659c + sourceRevisionDigest: sha256:2b5e36ce90af45f1acb414b90f3e10fa27d799a0338d501146d02b8683a8d6d5 + sourceBlobDigest: sha256:26271d4c6d5d17a2003484c97284a76661b24de2e5171d6b3b74df78d1864a4c tags: - latest - - speakeasy-sdk-regen-1743639567 + - speakeasy-sdk-regen-1747267414 - 1.0.8 targets: swo: @@ -26,10 +26,10 @@ targets: swov1: source: swov1 sourceNamespace: solar-winds-observability - sourceRevisionDigest: sha256:497ba59b0679735cf007ad4dc32e8ff9e4bb9f989efd06b0032cc64e0cdc21b7 - sourceBlobDigest: sha256:63f72a00d701ceb5cabc7f120a563af340b18802c95a74cc919e7228ab89659c + sourceRevisionDigest: sha256:2b5e36ce90af45f1acb414b90f3e10fa27d799a0338d501146d02b8683a8d6d5 + sourceBlobDigest: sha256:26271d4c6d5d17a2003484c97284a76661b24de2e5171d6b3b74df78d1864a4c codeSamplesNamespace: solar-winds-observability-typescript-code-samples - codeSamplesRevisionDigest: sha256:62329997f68a2482f69e190e3289b4760e725bb0d62fa4537e747359a6428897 + codeSamplesRevisionDigest: sha256:eb9d3817f0bf4c24a19dda49c119618668f7514f682c3ab849f6717f326dc44e workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -46,6 +46,9 @@ workflow: target: typescript source: swov1 output: swov1 + publish: + npm: + token: $npm_token codeSamples: registry: location: registry.speakeasyapi.dev/swo/swo/solar-winds-observability-typescript-code-samples diff --git a/swov1/.speakeasy/gen.lock b/swov1/.speakeasy/gen.lock index 96be750..aa70c03 100644 --- a/swov1/.speakeasy/gen.lock +++ b/swov1/.speakeasy/gen.lock @@ -1,20 +1,21 @@ lockVersion: 2.0.0 id: 07bd7da1-2b9c-45f1-ab2f-485c7af5c2f1 management: - docChecksum: 240eb0763cf70f894669c01877296ade + docChecksum: 616da72631d7dbb0760449d37bb6ae71 docVersion: 1.0.8 - speakeasyVersion: 1.544.0 - generationVersion: 2.599.0 - releaseVersion: 0.2.0 - configChecksum: 3ccf1f471507cc2de889f16a422a0bbc + speakeasyVersion: 1.567.2 + generationVersion: 2.632.1 + releaseVersion: 0.3.0 + configChecksum: 77f8f9b1a55c8d32b9fc4ee3e372d3ce repoURL: https://github.com/solarwinds/swo-sdk-typescript.git repoSubDirectory: swov1 installationURL: https://gitpkg.now.sh/solarwinds/swo-sdk-typescript/swov1 + published: true features: typescript: additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.11 - core: 3.21.7 + constsAndDefaults: 0.1.12 + core: 3.21.11 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 @@ -31,7 +32,7 @@ features: pagination: 2.83.0 responseFormat: 0.2.3 retries: 2.83.0 - sdkHooks: 0.2.0 + sdkHooks: 0.3.0 generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json @@ -43,13 +44,9 @@ generatedFiles: - USAGE.md - docs/lib/utils/retryconfig.md - docs/models/components/activateawsintegrationrequest.md - - docs/models/components/availabilitychecksettings.md - docs/models/components/awsorganisationalunitrequest.md - - docs/models/components/capturemethod.md - docs/models/components/category.md - docs/models/components/changeevent.md - - docs/models/components/checkforstring.md - - docs/models/components/checkforstringoperator.md - docs/models/components/commonkeyvaluepair.md - docs/models/components/commonlink.md - docs/models/components/commonmetricinfo.md @@ -57,24 +54,42 @@ generatedFiles: - docs/models/components/compositemetric.md - docs/models/components/coordinates.md - docs/models/components/createtokenrequest.md + - docs/models/components/createtokenrequesttype.md + - docs/models/components/createtokenresponse.md - docs/models/components/customheaders.md - docs/models/components/databaseauthmethod.md - docs/models/components/databaseconnectionoptions.md - - docs/models/components/databaseconnectionoptionssslmode.md - - docs/models/components/databaseconnectionoptionsssloptions.md + - docs/models/components/databaseconnectionoptionsupdate.md - docs/models/components/databasecredentialspublickeyresponse.md + - docs/models/components/databasemetricscapturemethod.md - docs/models/components/databasepluginconfig.md - docs/models/components/databasepluginconfigresponse.md - docs/models/components/databasepluginstatus.md - docs/models/components/databasepluginstatusresponse.md + - docs/models/components/databasessloptions.md + - docs/models/components/databasessloptionssslmode.md + - docs/models/components/databasessloptionsupdate.md + - docs/models/components/databasessloptionsupdatesslmode.md - docs/models/components/databasetype.md - - docs/models/components/dbconnoptions.md - docs/models/components/entity.md - docs/models/components/entityid.md - docs/models/components/entityinput.md - docs/models/components/fillmethod.md + - docs/models/components/geturiresponse.md + - docs/models/components/geturiresponsestatus.md + - docs/models/components/getwebsiteresponse.md + - docs/models/components/getwebsiteresponseavailabilitychecksettings.md + - docs/models/components/getwebsiteresponsecheckforstring.md + - docs/models/components/getwebsiteresponsefailingtestlocations.md + - docs/models/components/getwebsiteresponseoperator.md + - docs/models/components/getwebsiteresponseoutageconfiguration.md + - docs/models/components/getwebsiteresponseplatformoptions.md + - docs/models/components/getwebsiteresponserum.md + - docs/models/components/getwebsiteresponsessl.md + - docs/models/components/getwebsiteresponsestatus.md - docs/models/components/healthscore.md - docs/models/components/integrationtype.md + - docs/models/components/listprobesresponse.md - docs/models/components/logsarchive.md - docs/models/components/logsevent.md - docs/models/components/metricmeasurementsrequest.md @@ -84,41 +99,49 @@ generatedFiles: - docs/models/components/metricsmeasurement.md - docs/models/components/mgmtaccountonboardingrequest.md - docs/models/components/mgmtaccountonboardingresponse.md + - docs/models/components/monitoringoptions.md - docs/models/components/observedatabaserequest.md - docs/models/components/organisationalunit.md - docs/models/components/outageconfiguration.md - docs/models/components/outageconfigurationfailingtestlocations.md - - docs/models/components/ping.md - docs/models/components/platform.md - docs/models/components/pregroupbymethod.md - docs/models/components/probe.md - - docs/models/components/probelocationtype.md - docs/models/components/probeplatform.md - - docs/models/components/rum.md + - docs/models/components/protocol.md - docs/models/components/security.md - docs/models/components/seriestype.md - - docs/models/components/ssl.md - docs/models/components/tag.md - docs/models/components/tags.md - - docs/models/components/tcp.md - docs/models/components/testfrom.md - - docs/models/components/type.md + - docs/models/components/testfromtype.md - docs/models/components/updateawsintegrationrequest.md - docs/models/components/updateawsintegrationresponse.md - docs/models/components/updatecompositemetric.md - docs/models/components/updatedatabaserequest.md - - docs/models/components/updatedatabaserequestsslmode.md - - docs/models/components/updatedatabaserequestssloptions.md - docs/models/components/uri.md + - docs/models/components/uriavailabilitychecksettings.md + - docs/models/components/uriavailabilitychecksettingsfailingtestlocations.md - docs/models/components/uriavailabilitychecksettingsinput.md - docs/models/components/uriavailabilitychecksettingsinputfailingtestlocations.md - docs/models/components/uriavailabilitychecksettingsinputoutageconfiguration.md + - docs/models/components/uriavailabilitychecksettingsinputping.md - docs/models/components/uriavailabilitychecksettingsinputplatformoptions.md + - docs/models/components/uriavailabilitychecksettingsinputtcp.md + - docs/models/components/uriavailabilitychecksettingsoutageconfiguration.md + - docs/models/components/uriavailabilitychecksettingsping.md + - docs/models/components/uriavailabilitychecksettingsplatformoptions.md + - docs/models/components/uriavailabilitychecksettingstcp.md - docs/models/components/website.md + - docs/models/components/websiteavailabilitychecksettings.md + - docs/models/components/websitecheckforstring.md - docs/models/components/websitefailingtestlocations.md + - docs/models/components/websiteoperator.md - docs/models/components/websiteoutageconfiguration.md - docs/models/components/websiteplatformoptions.md - docs/models/components/websiteprotocol.md + - docs/models/components/websiterum.md + - docs/models/components/websitessl.md - docs/models/errors/activateawsintegrationbadrequesterror.md - docs/models/errors/activateawsintegrationinternalservererror.md - docs/models/errors/activateawsintegrationnotfounderror.md @@ -182,9 +205,7 @@ generatedFiles: - docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md - docs/models/errors/validatemgmtaccountonboardinginternalservererror.md - docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md - - docs/models/operations/checkforstring.md - docs/models/operations/createchangeeventresponse.md - - docs/models/operations/createtokenresponse.md - docs/models/operations/deletecompositemetricrequest.md - docs/models/operations/deletedatabaserequest.md - docs/models/operations/deleteurirequest.md @@ -194,20 +215,8 @@ generatedFiles: - docs/models/operations/getmetricbynameresponse.md - docs/models/operations/getpluginconfigrequest.md - docs/models/operations/getpluginsrequest.md - - docs/models/operations/geturiavailabilitychecksettings.md - - docs/models/operations/geturifailingtestlocations.md - - docs/models/operations/geturioutageconfiguration.md - - docs/models/operations/geturiplatformoptions.md - docs/models/operations/geturirequest.md - - docs/models/operations/geturiresponse.md - - docs/models/operations/geturistatus.md - - docs/models/operations/getwebsiteavailabilitychecksettings.md - - docs/models/operations/getwebsitefailingtestlocations.md - - docs/models/operations/getwebsiteoutageconfiguration.md - - docs/models/operations/getwebsiteplatformoptions.md - docs/models/operations/getwebsiterequest.md - - docs/models/operations/getwebsiteresponse.md - - docs/models/operations/getwebsitestatus.md - docs/models/operations/listentitiesrequest.md - docs/models/operations/listentitiesresponse.md - docs/models/operations/listentitiesresponsebody.md @@ -233,21 +242,14 @@ generatedFiles: - docs/models/operations/listmultimetricmeasurementsrequestbody.md - docs/models/operations/listmultimetricmeasurementsresponse.md - docs/models/operations/listmultimetricmeasurementsresponsebody.md - - docs/models/operations/listprobesresponse.md - docs/models/operations/metric.md - - docs/models/operations/monitoringoptions.md - docs/models/operations/observedatabaseresponse.md - docs/models/operations/pauseurimonitoringrequest.md - docs/models/operations/pausewebsitemonitoringrequest.md - - docs/models/operations/ping.md - docs/models/operations/pluginoperationrequest.md - - docs/models/operations/protocol.md - - docs/models/operations/rum.md - docs/models/operations/searchlogsrequest.md - docs/models/operations/searchlogsresponse.md - docs/models/operations/searchlogsresponsebody.md - - docs/models/operations/ssl.md - - docs/models/operations/tcp.md - docs/models/operations/unpauseurimonitoringrequest.md - docs/models/operations/unpausewebsitemonitoringrequest.md - docs/models/operations/updatecompositemetricrequest.md @@ -394,26 +396,33 @@ generatedFiles: - src/models/components/activateawsintegrationrequest.ts - src/models/components/awsorganisationalunitrequest.ts - src/models/components/changeevent.ts - - src/models/components/checkforstringoperator.ts - src/models/components/commonkeyvaluepair.ts - src/models/components/commonlink.ts - src/models/components/commonmetricinfo.ts - src/models/components/commonpageinfo.ts - src/models/components/compositemetric.ts - src/models/components/createtokenrequest.ts + - src/models/components/createtokenresponse.ts - src/models/components/customheaders.ts - src/models/components/databaseauthmethod.ts - src/models/components/databaseconnectionoptions.ts + - src/models/components/databaseconnectionoptionsupdate.ts - src/models/components/databasecredentialspublickeyresponse.ts + - src/models/components/databasemetricscapturemethod.ts - src/models/components/databasepluginconfig.ts - src/models/components/databasepluginconfigresponse.ts - src/models/components/databasepluginstatus.ts - src/models/components/databasepluginstatusresponse.ts + - src/models/components/databasessloptions.ts + - src/models/components/databasessloptionsupdate.ts - src/models/components/databasetype.ts - src/models/components/entity.ts - src/models/components/entityid.ts - src/models/components/entityinput.ts + - src/models/components/geturiresponse.ts + - src/models/components/getwebsiteresponse.ts - src/models/components/index.ts + - src/models/components/listprobesresponse.ts - src/models/components/logsarchive.ts - src/models/components/logsevent.ts - src/models/components/metricmeasurementsrequest.ts @@ -427,7 +436,6 @@ generatedFiles: - src/models/components/organisationalunit.ts - src/models/components/outageconfiguration.ts - src/models/components/probe.ts - - src/models/components/probelocationtype.ts - src/models/components/probeplatform.ts - src/models/components/security.ts - src/models/components/tag.ts @@ -437,6 +445,7 @@ generatedFiles: - src/models/components/updatecompositemetric.ts - src/models/components/updatedatabaserequest.ts - src/models/components/uri.ts + - src/models/components/uriavailabilitychecksettings.ts - src/models/components/uriavailabilitychecksettingsinput.ts - src/models/components/website.ts - src/models/components/websiteprotocol.ts @@ -470,7 +479,9 @@ generatedFiles: - src/models/errors/pauseurimonitoring.ts - src/models/errors/pausewebsitemonitoring.ts - src/models/errors/pluginoperation.ts + - src/models/errors/responsevalidationerror.ts - src/models/errors/sdkvalidationerror.ts + - src/models/errors/swoerror.ts - src/models/errors/unpauseurimonitoring.ts - src/models/errors/unpausewebsitemonitoring.ts - src/models/errors/updateawsintegration.ts @@ -481,7 +492,6 @@ generatedFiles: - src/models/errors/updatewebsite.ts - src/models/errors/validatemgmtaccountonboarding.ts - src/models/operations/createchangeevent.ts - - src/models/operations/createtoken.ts - src/models/operations/deletecompositemetric.ts - src/models/operations/deletedatabase.ts - src/models/operations/deleteuri.ts @@ -502,7 +512,6 @@ generatedFiles: - src/models/operations/listmetrics.ts - src/models/operations/listmetricsforentitytype.ts - src/models/operations/listmultimetricmeasurements.ts - - src/models/operations/listprobes.ts - src/models/operations/observedatabase.ts - src/models/operations/pauseurimonitoring.ts - src/models/operations/pausewebsitemonitoring.ts @@ -544,46 +553,46 @@ examples: application/json: {"id": 1731676626, "name": "app-deploys", "title": "deployed v45", "timestamp": 1731676626, "source": "foo3.example.com", "tags": {"app": "foo", "environment": "production"}, "links": [{"rel": "self", "href": "https://example.com"}]} responses: "200": - application/json: {"id": 119883} + application/json: {"id": 208943} activateAwsIntegration: speakeasy-default-activate-aws-integration: requestBody: - application/json: {"managementAccountId": "", "accountId": "", "enable": false} + application/json: {"managementAccountId": "", "accountId": "", "enable": true} responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} "500": - application/json: {"code": 500, "message": "Internal error"} + application/json: {"message": "Internal error"} createOrgStructure: speakeasy-default-create-org-structure: requestBody: - application/json: {"mgmtAccountId": "", "structure": [{"child_id": "", "child_name": ""}, {"child_id": "", "child_name": ""}, {"child_id": "", "child_name": ""}]} + application/json: {"mgmtAccountId": "", "structure": []} responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} "500": - application/json: {"code": 500, "message": "Internal error"} + application/json: {"message": "Internal error"} updateAwsIntegration: speakeasy-default-update-aws-integration: requestBody: application/json: {"managementAccountId": "", "accountId": "", "accountName": "", "roleArn": ""} responses: "200": - application/json: {"selectedRegions": ["", "", ""], "externalId": "", "integrationId": "", "integrationType": "POLLING", "isNewAccount": true} + application/json: {"selectedRegions": ["", "", ""], "externalId": "", "integrationId": "", "integrationType": "STREAMING", "isNewAccount": true} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "500": - application/json: {"code": 500, "message": "Internal error"} + application/json: {"message": "Internal error"} validateMgmtAccountOnboarding: speakeasy-default-validate-mgmt-account-onboarding: parameters: @@ -591,31 +600,31 @@ examples: request: {"managementAccountId": ""} responses: "200": - application/json: {"isOnboarded": false} + application/json: {"isOnboarded": true} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "500": - application/json: {"code": 500, "message": "Internal error"} + application/json: {"message": "Internal error"} observeDatabase: speakeasy-default-observe-database: requestBody: - application/json: {"name": "", "agentId": "", "dbType": "mongo", "authMethod": "entraclientsecret", "captureMethod": null, "configOptions": [{"key": "", "value": ""}], "dbConnOptions": {"host": "dependent-bar.com", "port": "", "encryptedCredentials": "", "user": "", "sslEnabled": false, "sslOptions": {"sslMode": "require", "sslCAPath": "", "sslKeyPath": "", "sslCertPath": ""}, "cloudRegion": ""}, "tags": []} + application/json: {"name": "", "agentId": "", "dbType": "mongo", "authMethod": "entraclientsecret", "dbConnOptions": {"host": "mixed-scrap.com", "port": "", "dbname": "", "encryptedCredentials": "", "user": "", "sslEnabled": false, "cloudRegion": "", "bindings": ""}} responses: "201": application/json: {"id": ""} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} getPublicKey: speakeasy-default-get-public-key: responses: "200": application/json: {"publicKey": ""} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} updateDatabase: speakeasy-default-update-database: parameters: @@ -625,9 +634,9 @@ examples: application/json: {"name": ""} responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} deleteDatabase: speakeasy-default-delete-database: parameters: @@ -635,9 +644,9 @@ examples: entityId: "" responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} getPluginConfig: speakeasy-default-get-plugin-config: parameters: @@ -645,11 +654,11 @@ examples: entityId: "" responses: "200": - application/json: {"pluginConfig": [{"pluginName": "", "config": [{"key": "", "value": ""}]}, {"pluginName": "", "config": []}, {"pluginName": "", "config": [{"key": "", "value": ""}]}]} + application/json: {"pluginConfig": [{"pluginName": "", "configOptions": [{"key": "", "value": ""}], "dbConnOptions": []}]} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} getPlugins: speakeasy-default-get-plugins: parameters: @@ -657,11 +666,11 @@ examples: entityId: "" responses: "200": - application/json: {"plugins": [{"pluginName": "", "status": ""}, {"pluginName": "", "status": ""}]} + application/json: {"plugins": [{"pluginName": "", "deploymentStatus": "", "healthStatus": ""}]} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} pluginOperation: speakeasy-default-plugin-operation: parameters: @@ -670,16 +679,16 @@ examples: operation: "" responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listProbes: speakeasy-default-list-probes: responses: "200": application/json: {"probes": [{"id": "probe-1", "name": "Washington", "active": true, "platform": "AWS", "region": "NA", "country": "US", "city": "Washington D.C.", "coordinates": {"latitude": 38.89511, "longitude": -77.03637}, "ipv4Addresses": ["34.232.5.40", "44.207.30.12"], "ipv6Addresses": ["2001:0db8:85a3:0000:0000:8a2e:0370:7334"]}]} "500": - application/json: {"code": 500, "message": "Internal error"} + application/json: {"message": "Internal error"} getDemSettings: speakeasy-default-get-dem-settings: responses: @@ -692,12 +701,12 @@ examples: createUri: speakeasy-default-create-uri: requestBody: - application/json: {"name": "example-uri", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 300, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "tcp": {"enabled": true, "port": 443}}, "tags": [{"key": "environment", "value": "production"}]} + application/json: {"name": "solarwinds.com", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 14400, "outageConfiguration": null, "ping": {"enabled": true}, "tcp": {"enabled": true, "port": 443, "stringToSend": "GET / HTTP/1.1\r\nHost: solarwinds.com\r\nConnection: close\r\n\r\n", "stringToExpect": "HTTP/1.1 200 OK"}}, "tags": [{"key": "environment", "value": "production"}]} responses: "201": application/json: {"id": "e-1448474379026206720"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} getUri: speakeasy-default-get-uri: parameters: @@ -705,23 +714,23 @@ examples: entityId: "" responses: "200": - application/json: {"id": "e-1448474379026206720", "type": "Uri", "status": "up", "name": "solarwinds.com", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 14400, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "ping": {"enabled": true}, "protocol": "PING"}, "tags": [{"key": "environment", "value": "production"}], "lastOutageStartTime": "2025-01-15T14:31:19.735Z", "lastOutageEndTime": "2025-01-15T14:31:19.735Z", "lastTestTime": "2025-01-15T14:31:19.735Z", "lastErrorTime": "2025-01-15T14:31:19.735Z", "lastResponseTime": 376} + application/json: {"id": "e-1448474379026206720", "type": "Uri", "status": "up", "name": "solarwinds.com", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 14400, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "ping": {"enabled": true}, "tcp": {"enabled": true, "port": 443, "stringToSend": "GET / HTTP/1.1\r\nHost: solarwinds.com\r\nConnection: close\r\n\r\n", "stringToExpect": "HTTP/1.1 200 OK"}, "protocol": "PING"}, "tags": [{"key": "environment", "value": "production"}], "lastOutageStartTime": "2025-01-15T14:31:19.735Z", "lastOutageEndTime": "2025-01-15T14:31:19.735Z", "lastTestTime": "2025-01-15T14:31:19.735Z", "lastErrorTime": "2025-01-15T14:31:19.735Z", "lastResponseTime": 376} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} updateUri: speakeasy-default-update-uri: parameters: path: entityId: "" requestBody: - application/json: {"name": "example-uri", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 300, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "tcp": {"enabled": true, "port": 443}}, "tags": [{"key": "environment", "value": "production"}]} + application/json: {"name": "solarwinds.com", "ipOrDomain": "solarwinds.com", "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 14400, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "ping": {"enabled": true}, "tcp": {"enabled": true, "port": 443, "stringToSend": "GET / HTTP/1.1\r\nHost: solarwinds.com\r\nConnection: close\r\n\r\n", "stringToExpect": "HTTP/1.1 200 OK"}}, "tags": [{"key": "environment", "value": "production"}]} responses: "200": application/json: {"id": "e-1448474379026206720"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} deleteUri: speakeasy-default-delete-uri: parameters: @@ -731,7 +740,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} pauseUriMonitoring: speakeasy-default-pause-uri-monitoring: parameters: @@ -741,7 +750,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} unpauseUriMonitoring: speakeasy-default-unpause-uri-monitoring: parameters: @@ -751,7 +760,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} createWebsite: speakeasy-default-create-website: requestBody: @@ -760,7 +769,7 @@ examples: "201": application/json: {"id": "e-1448474379026206720"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} getWebsite: speakeasy-default-get-website: parameters: @@ -768,9 +777,9 @@ examples: entityId: "" responses: "200": - application/json: {"id": "e-1448474379026206720", "type": "Website", "status": "up", "name": "solarwinds.com", "url": "https://www.solarwinds.com", "monitoringOptions": {"isAvailabilityActive": true, "isRumActive": false}, "availabilityCheckSettings": {"platformOptions": {"probePlatforms": ["AWS"], "testFromAll": true}, "testFrom": {"type": "REGION", "values": ["NA"]}, "testIntervalInSeconds": 14400, "outageConfiguration": {"failingTestLocations": "all", "consecutiveForDown": 2}, "checkForString": {"operator": "CONTAINS", "value": "string"}, "protocols": ["HTTP", "HTTPS"], "ssl": {"enabled": true, "daysPriorToExpiration": 7, "ignoreIntermediateCertificates": true}, "customHeaders": [{"name": "string", "value": "string"}], "allowInsecureRenegotiation": true, "postData": "{\"example\": \"value\"}"}, "tags": [{"key": "environment", "value": "production"}], "rum": {"apdexTimeInSeconds": 4, "snippet": "string", "spa": true}, "lastOutageStartTime": "2025-01-15T14:31:19.735Z", "lastOutageEndTime": "2025-01-15T14:31:19.735Z", "lastTestTime": "2025-01-15T14:31:19.735Z", "lastErrorTime": "2025-01-15T14:31:19.735Z", "lastResponseTime": 376, "nextOnDemandAvailabilityTime": 0} + application/json: {"id": "e-1448474379026206720", "type": "Website", "status": "up", "name": "solarwinds.com", "url": "https://www.solarwinds.com", "monitoringOptions": {"isAvailabilityActive": true, "isRumActive": false}, "availabilityCheckSettings": null, "tags": [{"key": "environment", "value": "production"}], "rum": {"apdexTimeInSeconds": 4, "snippet": "string", "spa": true}, "lastOutageStartTime": "2025-01-15T14:31:19.735Z", "lastOutageEndTime": "2025-01-15T14:31:19.735Z", "lastTestTime": "2025-01-15T14:31:19.735Z", "lastErrorTime": "2025-01-15T14:31:19.735Z", "lastResponseTime": 376, "nextOnDemandAvailabilityTime": 0} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} updateWebsite: speakeasy-default-update-website: parameters: @@ -782,9 +791,9 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} deleteWebsite: speakeasy-default-delete-website: parameters: @@ -794,7 +803,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} pauseWebsiteMonitoring: speakeasy-default-pause-website-monitoring: parameters: @@ -804,7 +813,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} unpauseWebsiteMonitoring: speakeasy-default-unpause-website-monitoring: parameters: @@ -814,7 +823,7 @@ examples: "200": application/json: {"id": "e-1448474379026206720"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listEntities: speakeasy-default-list-entities: parameters: @@ -824,9 +833,9 @@ examples: "200": application/json: {"entities": [{"id": "e-1234567890", "type": "SyslogHost", "name": "syslog-host-1", "displayName": "SyslogTest", "createdTime": "2024-11-25T16:38:24Z", "updatedTime": "2024-12-01T16:38:24Z", "lastSeenTime": "2024-11-25T16:38:24Z", "inMaintenance": false, "healthscore": {"score": 100, "category": "good"}, "tags": {"gg.tk.token": "test", "kfi.tk.token": "qa-test"}, "attributes": {"protocols": ["HTTP"], "features": ["rum"], "isAvailabilityCheckPaused": false, "extensions": {"has_extension": true}}}], "pageInfo": {"prevPage": "", "nextPage": ""}} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} getEntityById: speakeasy-default-get-entity-by-id: parameters: @@ -836,11 +845,11 @@ examples: "200": application/json: {"id": "e-1234567890", "type": "SyslogHost", "name": "syslog-host-1", "displayName": "SyslogTest", "createdTime": "2024-11-25T16:38:24Z", "updatedTime": "2024-12-01T16:38:24Z", "lastSeenTime": "2024-11-25T16:38:24Z", "inMaintenance": false, "healthscore": {"score": 100, "category": "good"}, "tags": {"gg.tk.token": "test", "kfi.tk.token": "qa-test"}, "attributes": {"protocols": ["HTTP"], "features": ["rum"], "isAvailabilityCheckPaused": false, "extensions": {"has_extension": true}}} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} updateEntityById: speakeasy-default-update-entity-by-id: parameters: @@ -850,11 +859,11 @@ examples: application/json: {"displayName": "SyslogTest", "tags": {"gg.tk.token": "test", "kfi.tk.token": "qa-test"}} responses: "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "401": - application/json: {"code": 401, "message": "Access is unauthorized"} + application/json: {"message": "Access is unauthorized"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} searchLogs: speakeasy-default-search-logs: parameters: @@ -862,7 +871,7 @@ examples: direction: "backward" responses: "200": - application/json: {"logs": [{"id": "1793698955374546944", "time": "2024-01-01T00:00:00Z", "message": "This is a log message", "hostname": "webserver.example.com", "severity": "INFO", "program": "httpd"}], "pageInfo": {"prevPage": "", "nextPage": ""}} + application/json: {"logs": [], "pageInfo": {"prevPage": "", "nextPage": ""}} listLogArchives: speakeasy-default-list-log-archives: parameters: @@ -871,7 +880,7 @@ examples: endTime: "" responses: "200": - application/json: {"logArchives": [{"id": "logs/138723/dt=2024-01-23/2024-01-23-08.json.gz", "name": "2024-01-23-08.json.gz", "downloadUrl": "https://ssp-log-archives.s3.amazonaws.com/logs/138723/dt%3D2024-01-23/2024-01-23-08.json.gz?X-Amz-Security-Token=IQ...", "archivedTimestamp": "1706020985", "archiveSize": 817226354}, {"id": "logs/138723/dt=2024-01-23/2024-01-23-08.json.gz", "name": "2024-01-23-08.json.gz", "downloadUrl": "https://ssp-log-archives.s3.amazonaws.com/logs/138723/dt%3D2024-01-23/2024-01-23-08.json.gz?X-Amz-Security-Token=IQ...", "archivedTimestamp": "1706020985", "archiveSize": 817226354}, {"id": "logs/138723/dt=2024-01-23/2024-01-23-08.json.gz", "name": "2024-01-23-08.json.gz", "downloadUrl": "https://ssp-log-archives.s3.amazonaws.com/logs/138723/dt%3D2024-01-23/2024-01-23-08.json.gz?X-Amz-Security-Token=IQ...", "archivedTimestamp": "1706020985", "archiveSize": 817226354}], "pageInfo": {"prevPage": "", "nextPage": ""}} + application/json: {"logArchives": [], "pageInfo": {"prevPage": "", "nextPage": ""}} listEntityTypes: speakeasy-default-list-entity-types: responses: @@ -882,12 +891,11 @@ examples: parameters: path: type: "" - query: {} responses: "200": - application/json: {"type": "KubernetesCluster", "metrics": [{"name": "composite.custom.system.disk.io.rate", "displayName": "Disk IO rate", "description": "Disk bytes transferred per second", "units": "bytes/s", "formula": "rate(system.disk.io[5m]", "lastReportedTime": "2024-11-25T16:38:24Z"}]} + application/json: {"type": "KubernetesCluster", "metrics": [{"name": "composite.k8s.pod.container.status.restarts.increase", "units": "count", "formula": "increase(k8s.kube_pod_container_status_restarts_total[5m])", "lastReportedTime": "2021-01-01T00:00:00Z"}]} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listMetrics: speakeasy-default-list-metrics: responses: @@ -901,21 +909,21 @@ examples: "201": application/json: {"name": "composite.custom.system.disk.io.rate", "displayName": "Disk IO rate", "description": "Disk bytes transferred per second", "formula": "rate(system.disk.io[5m])", "units": "bytes/s"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "403": - application/json: {"code": 403, "message": "Access is forbidden"} + application/json: {"message": "Access is forbidden"} listMultiMetricMeasurements: speakeasy-default-list-multi-metric-measurements: parameters: query: forcePositional: false requestBody: - application/json: {"metrics": [{"id": "throughput-series", "name": "dbo.host.queries.tput", "filter": "id:[id1,id2] category:moderate", "groupBy": ["query"], "preGroupBy": ["host"], "preGroupByMethod": "SUM", "seriesType": "TIMESERIES", "fillMethod": "NONE", "fillIfEmpty": false}, {"id": "throughput-series", "name": "dbo.host.queries.tput", "filter": "id:[id1,id2] category:moderate", "groupBy": ["query"], "preGroupBy": ["host"], "preGroupByMethod": "SUM", "seriesType": "TIMESERIES", "fillMethod": "NONE", "fillIfEmpty": false}]} + application/json: {"metrics": []} responses: "200": application/json: {"metrics": [], "pageInfo": {"prevPage": "", "nextPage": ""}} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} updateCompositeMetric: speakeasy-default-update-composite-metric: parameters: @@ -927,11 +935,11 @@ examples: "200": application/json: {"name": "composite.custom.system.disk.io.rate", "displayName": "Disk IO rate", "description": "Disk bytes transferred per second", "formula": "rate(system.disk.io[5m])", "units": "bytes/s"} "400": - application/json: {"code": 400, "message": "Bad request"} + application/json: {"message": "Bad request"} "403": - application/json: {"code": 403, "message": "Access is forbidden"} + application/json: {"message": "Access is forbidden"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} deleteCompositeMetric: speakeasy-default-delete-composite-metric: parameters: @@ -939,9 +947,9 @@ examples: name: "" responses: "403": - application/json: {"code": 403, "message": "Access is forbidden"} + application/json: {"message": "Access is forbidden"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} getMetricByName: speakeasy-default-get-metric-by-name: parameters: @@ -951,48 +959,46 @@ examples: "200": application/json: {"name": "composite.custom.system.disk.io.rate", "displayName": "Disk IO rate", "description": "Disk bytes transferred per second", "units": "bytes/s", "formula": "rate(system.disk.io[5m]", "lastReportedTime": "2024-11-25T16:38:24Z"} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listMetricAttributes: speakeasy-default-list-metric-attributes: parameters: path: name: "" - query: {} responses: "200": - application/json: {"names": [], "pageInfo": {"prevPage": "", "nextPage": ""}} + application/json: {"names": ["", "", ""], "pageInfo": {"prevPage": "", "nextPage": ""}} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listMetricAttributeValues: speakeasy-default-list-metric-attribute-values: parameters: path: name: "" attributeName: "" - query: {} responses: "200": - application/json: {"name": "", "values": [], "pageInfo": {"prevPage": "", "nextPage": ""}} + application/json: {"name": "", "values": ["", "", ""], "pageInfo": {"prevPage": "", "nextPage": ""}} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} listMetricMeasurements: speakeasy-default-list-metric-measurements: parameters: path: name: "" query: - seriesType: "SCALAR" + seriesType: "TIMESERIES" responses: "200": - application/json: {"groupings": [{"attributes": [], "measurements": [{"time": "2025-07-08T21:51:20.598Z", "value": 7307.56}, {"time": "2023-05-07T22:33:23.333Z", "value": 250.26}, {"time": "2023-06-20T08:27:21.001Z", "value": 4929.43}]}, {"attributes": [], "measurements": []}], "bucketSizeInSeconds": 614937, "pageInfo": {"prevPage": "", "nextPage": ""}} + application/json: {"groupings": [{"attributes": [], "measurements": []}], "bucketSizeInSeconds": 845799, "pageInfo": {"prevPage": "", "nextPage": ""}} "404": - application/json: {"code": 404, "message": "Cannot find resource"} + application/json: {"message": "Cannot find resource"} createToken: speakeasy-default-create-token: requestBody: application/json: {"name": "", "tags": {"server": "", "tag_without_value": ""}, "type": "ingestion"} responses: "200": - application/json: {"token": ""} -examplesVersion: 1.0.1 + application/json: {"token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"} +examplesVersion: 1.0.2 generatedTests: {} diff --git a/swov1/.speakeasy/gen.yaml b/swov1/.speakeasy/gen.yaml index 9582aea..cec738b 100644 --- a/swov1/.speakeasy/gen.yaml +++ b/swov1/.speakeasy/gen.yaml @@ -7,6 +7,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -19,14 +20,16 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true typescript: - version: 0.2.0 + version: 0.3.0 additionalDependencies: dependencies: {} devDependencies: {} peerDependencies: {} additionalPackageJSON: {} author: Speakeasy + baseErrorName: SwoError clientServerStatusCodesAsErrors: true + constFieldsAlwaysOptional: true defaultErrorName: APIError enableCustomCodeRegions: false enableMCPServer: true diff --git a/swov1/FUNCTIONS.md b/swov1/FUNCTIONS.md index 11bc024..6bd2f71 100644 --- a/swov1/FUNCTIONS.md +++ b/swov1/FUNCTIONS.md @@ -21,7 +21,6 @@ specific category of applications. ```typescript import { SwoCore } from "@solarwinds/swo-sdk-typescript/core.js"; import { changeEventsCreateChangeEvent } from "@solarwinds/swo-sdk-typescript/funcs/changeEventsCreateChangeEvent.js"; -import { SDKValidationError } from "@solarwinds/swo-sdk-typescript/models/errors/sdkvalidationerror.js"; // Use `SwoCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -47,28 +46,12 @@ async function run() { }, ], }); - - 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); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("changeEventsCreateChangeEvent failed:", res.error); } - - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/swov1/README.md b/swov1/README.md index d2e291a..4f8d2bd 100644 --- a/swov1/README.md +++ b/swov1/README.md @@ -46,34 +46,30 @@ SolarWinds Observability: SolarWinds Observability REST API ## 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 https://gitpkg.now.sh/solarwinds/swo-sdk-typescript/swov1 +npm add @solarwinds/swo-sdk-typescript ``` ### PNPM ```bash -pnpm add https://gitpkg.now.sh/solarwinds/swo-sdk-typescript/swov1 +pnpm add @solarwinds/swo-sdk-typescript ``` ### Bun ```bash -bun add https://gitpkg.now.sh/solarwinds/swo-sdk-typescript/swov1 +bun add @solarwinds/swo-sdk-typescript ``` ### Yarn ```bash -yarn add https://gitpkg.now.sh/solarwinds/swo-sdk-typescript/swov1 zod +yarn add @solarwinds/swo-sdk-typescript zod # Note that Yarn does not install peer dependencies automatically. You will need # to install zod as shown above. @@ -204,7 +200,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -251,7 +246,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -429,7 +423,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -482,7 +475,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -527,7 +519,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -539,27 +530,21 @@ run(); ## Error Handling -Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `activateAwsIntegration` method may throw the following errors: - -| Error Type | Status Code | Content Type | -| ------------------------------------------------ | ----------- | ---------------- | -| errors.ActivateAwsIntegrationBadRequestError | 400 | application/json | -| errors.ActivateAwsIntegrationUnauthorizedError | 401 | application/json | -| errors.ActivateAwsIntegrationNotFoundError | 404 | application/json | -| errors.ActivateAwsIntegrationInternalServerError | 500 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +[`SwoError`](./src/models/errors/swoerror.ts) is the base class for all HTTP error responses. It has the following properties: -If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`. +| Property | Type | Description | +| ------------------- | ---------- | --------------------------------------------------------------------------------------- | +| `error.message` | `string` | Error message | +| `error.statusCode` | `number` | HTTP response status code eg `404` | +| `error.headers` | `Headers` | HTTP response headers | +| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | +| `error.rawResponse` | `Response` | Raw HTTP response | +| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | +### Example ```typescript import { Swo } from "@solarwinds/swo-sdk-typescript"; -import { - ActivateAwsIntegrationBadRequestError, - ActivateAwsIntegrationInternalServerError, - ActivateAwsIntegrationNotFoundError, - ActivateAwsIntegrationUnauthorizedError, - SDKValidationError, -} from "@solarwinds/swo-sdk-typescript/models/errors"; +import * as errors from "@solarwinds/swo-sdk-typescript/models/errors"; const swo = new Swo({ apiToken: process.env["SWO_API_TOKEN"] ?? "", @@ -570,41 +555,20 @@ async function run() { await swo.cloudAccounts.activateAwsIntegration({ managementAccountId: "", accountId: "", - enable: false, + enable: true, }); - } 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; - } - case (err instanceof ActivateAwsIntegrationBadRequestError): { - // Handle err.data$: ActivateAwsIntegrationBadRequestErrorData - console.error(err); - return; - } - case (err instanceof ActivateAwsIntegrationUnauthorizedError): { - // Handle err.data$: ActivateAwsIntegrationUnauthorizedErrorData - console.error(err); - return; - } - case (err instanceof ActivateAwsIntegrationNotFoundError): { - // Handle err.data$: ActivateAwsIntegrationNotFoundErrorData - console.error(err); - return; - } - case (err instanceof ActivateAwsIntegrationInternalServerError): { - // Handle err.data$: ActivateAwsIntegrationInternalServerErrorData - console.error(err); - return; - } - default: { - // Other errors such as network errors, see HTTPClientErrors for more details - throw err; + } catch (error) { + // The base class for HTTP error responses + if (error instanceof errors.SwoError) { + console.log(error.message); + console.log(error.statusCode); + console.log(error.body); + console.log(error.headers); + + // Depending on the method different errors may be thrown + if (error instanceof errors.ActivateAwsIntegrationBadRequestError) { + console.log(error.data$.message); // string + console.log(error.data$.target); // string } } } @@ -614,17 +578,91 @@ 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. +### Error Classes +**Primary error:** +* [`SwoError`](./src/models/errors/swoerror.ts): The base class for HTTP error responses. + +
Less common errors (69) + +
+ +**Network errors:** +* [`ConnectionError`](./src/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server. +* [`RequestTimeoutError`](./src/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal. +* [`RequestAbortedError`](./src/models/errors/httpclienterrors.ts): HTTP request was aborted by the client. +* [`InvalidRequestError`](./src/models/errors/httpclienterrors.ts): Any input used to create a request is invalid. +* [`UnexpectedClientError`](./src/models/errors/httpclienterrors.ts): Unrecognised or unexpected error. + + +**Inherit from [`SwoError`](./src/models/errors/swoerror.ts)**: +* [`ActivateAwsIntegrationBadRequestError`](docs/models/errors/activateawsintegrationbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`CreateOrgStructureBadRequestError`](docs/models/errors/createorgstructurebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateAwsIntegrationBadRequestError`](docs/models/errors/updateawsintegrationbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`ValidateMgmtAccountOnboardingBadRequestError`](docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`ObserveDatabaseBadRequestError`](docs/models/errors/observedatabasebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`GetPublicKeyBadRequestError`](docs/models/errors/getpublickeybadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateDatabaseBadRequestError`](docs/models/errors/updatedatabasebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`DeleteDatabaseBadRequestError`](docs/models/errors/deletedatabasebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`GetPluginConfigBadRequestError`](docs/models/errors/getpluginconfigbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`GetPluginsBadRequestError`](docs/models/errors/getpluginsbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`PluginOperationBadRequestError`](docs/models/errors/pluginoperationbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`CreateUriBadRequestError`](docs/models/errors/createuribadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateUriBadRequestError`](docs/models/errors/updateuribadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`CreateWebsiteBadRequestError`](docs/models/errors/createwebsitebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateWebsiteBadRequestError`](docs/models/errors/updatewebsitebadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`ListEntitiesBadRequestError`](docs/models/errors/listentitiesbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`GetEntityByIdBadRequestError`](docs/models/errors/getentitybyidbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateEntityByIdBadRequestError`](docs/models/errors/updateentitybyidbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`CreateCompositeMetricBadRequestError`](docs/models/errors/createcompositemetricbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`ListMultiMetricMeasurementsBadRequestError`](docs/models/errors/listmultimetricmeasurementsbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`UpdateCompositeMetricBadRequestError`](docs/models/errors/updatecompositemetricbadrequesterror.md): The server could not understand the request due to invalid syntax. Status code `400`. Applicable to 1 of 44 methods.* +* [`ActivateAwsIntegrationUnauthorizedError`](docs/models/errors/activateawsintegrationunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`CreateOrgStructureUnauthorizedError`](docs/models/errors/createorgstructureunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`UpdateAwsIntegrationUnauthorizedError`](docs/models/errors/updateawsintegrationunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`ValidateMgmtAccountOnboardingUnauthorizedError`](docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`ListEntitiesUnauthorizedError`](docs/models/errors/listentitiesunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`GetEntityByIdUnauthorizedError`](docs/models/errors/getentitybyidunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`UpdateEntityByIdUnauthorizedError`](docs/models/errors/updateentitybyidunauthorizederror.md): Access is unauthorized. Status code `401`. Applicable to 1 of 44 methods.* +* [`CreateCompositeMetricForbiddenError`](docs/models/errors/createcompositemetricforbiddenerror.md): Access is forbidden. Status code `403`. Applicable to 1 of 44 methods.* +* [`UpdateCompositeMetricForbiddenError`](docs/models/errors/updatecompositemetricforbiddenerror.md): Access is forbidden. Status code `403`. Applicable to 1 of 44 methods.* +* [`DeleteCompositeMetricForbiddenError`](docs/models/errors/deletecompositemetricforbiddenerror.md): Access is forbidden. Status code `403`. Applicable to 1 of 44 methods.* +* [`ActivateAwsIntegrationNotFoundError`](docs/models/errors/activateawsintegrationnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`CreateOrgStructureNotFoundError`](docs/models/errors/createorgstructurenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetPublicKeyNotFoundError`](docs/models/errors/getpublickeynotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UpdateDatabaseNotFoundError`](docs/models/errors/updatedatabasenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`DeleteDatabaseNotFoundError`](docs/models/errors/deletedatabasenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetPluginConfigNotFoundError`](docs/models/errors/getpluginconfignotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetPluginsNotFoundError`](docs/models/errors/getpluginsnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`PluginOperationNotFoundError`](docs/models/errors/pluginoperationnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetUriNotFoundError`](docs/models/errors/geturinotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UpdateUriNotFoundError`](docs/models/errors/updateurinotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`DeleteUriNotFoundError`](docs/models/errors/deleteurinotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`PauseUriMonitoringNotFoundError`](docs/models/errors/pauseurimonitoringnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UnpauseUriMonitoringNotFoundError`](docs/models/errors/unpauseurimonitoringnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetWebsiteNotFoundError`](docs/models/errors/getwebsitenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UpdateWebsiteNotFoundError`](docs/models/errors/updatewebsitenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`DeleteWebsiteNotFoundError`](docs/models/errors/deletewebsitenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`PauseWebsiteMonitoringNotFoundError`](docs/models/errors/pausewebsitemonitoringnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UnpauseWebsiteMonitoringNotFoundError`](docs/models/errors/unpausewebsitemonitoringnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetEntityByIdNotFoundError`](docs/models/errors/getentitybyidnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UpdateEntityByIdNotFoundError`](docs/models/errors/updateentitybyidnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`ListMetricsForEntityTypeNotFoundError`](docs/models/errors/listmetricsforentitytypenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`UpdateCompositeMetricNotFoundError`](docs/models/errors/updatecompositemetricnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`DeleteCompositeMetricNotFoundError`](docs/models/errors/deletecompositemetricnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`GetMetricByNameNotFoundError`](docs/models/errors/getmetricbynamenotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`ListMetricAttributesNotFoundError`](docs/models/errors/listmetricattributesnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`ListMetricAttributeValuesNotFoundError`](docs/models/errors/listmetricattributevaluesnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`ListMetricMeasurementsNotFoundError`](docs/models/errors/listmetricmeasurementsnotfounderror.md): The server cannot find the requested resource. Status code `404`. Applicable to 1 of 44 methods.* +* [`ActivateAwsIntegrationInternalServerError`](docs/models/errors/activateawsintegrationinternalservererror.md): Server error. Status code `500`. Applicable to 1 of 44 methods.* +* [`CreateOrgStructureInternalServerError`](docs/models/errors/createorgstructureinternalservererror.md): Server error. Status code `500`. Applicable to 1 of 44 methods.* +* [`UpdateAwsIntegrationInternalServerError`](docs/models/errors/updateawsintegrationinternalservererror.md): Server error. Status code `500`. Applicable to 1 of 44 methods.* +* [`ValidateMgmtAccountOnboardingInternalServerError`](docs/models/errors/validatemgmtaccountonboardinginternalservererror.md): Server error. Status code `500`. Applicable to 1 of 44 methods.* +* [`ListProbesInternalServerError`](docs/models/errors/listprobesinternalservererror.md): Server error. Status code `500`. Applicable to 1 of 44 methods.* +* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string. -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 | +\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable. @@ -667,7 +705,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -705,7 +742,6 @@ async function run() { ], }); - // Handle the result console.log(result); } diff --git a/swov1/RELEASES.md b/swov1/RELEASES.md index 8cb4348..93dec86 100644 --- a/swov1/RELEASES.md +++ b/swov1/RELEASES.md @@ -14,4 +14,14 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.544.0 (2.599.0) https://github.com/speakeasy-api/speakeasy ### Generated -- [typescript v0.2.0] swov1 \ No newline at end of file +- [typescript v0.2.0] swov1 + +## 2025-06-20 00:03:20 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.567.2 (2.632.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.3.0] swov1 +### Releases +- [NPM v0.3.0] https://www.npmjs.com/package/@solarwinds/swo-sdk-typescript/v/0.3.0 - swov1 \ No newline at end of file diff --git a/swov1/USAGE.md b/swov1/USAGE.md index 528f253..a096d32 100644 --- a/swov1/USAGE.md +++ b/swov1/USAGE.md @@ -25,7 +25,6 @@ async function run() { ], }); - // Handle the result console.log(result); } diff --git a/swov1/docs/models/components/activateawsintegrationrequest.md b/swov1/docs/models/components/activateawsintegrationrequest.md index d91a753..7311da9 100644 --- a/swov1/docs/models/components/activateawsintegrationrequest.md +++ b/swov1/docs/models/components/activateawsintegrationrequest.md @@ -8,7 +8,7 @@ import { ActivateAwsIntegrationRequest } from "@solarwinds/swo-sdk-typescript/mo let value: ActivateAwsIntegrationRequest = { managementAccountId: "", accountId: "", - enable: false, + enable: true, }; ``` diff --git a/swov1/docs/models/components/capturemethod.md b/swov1/docs/models/components/capturemethod.md deleted file mode 100644 index af250b5..0000000 --- a/swov1/docs/models/components/capturemethod.md +++ /dev/null @@ -1,17 +0,0 @@ -# CaptureMethod - -Method for capturing metrics from database server: sniff/profiler/slow-log/poll, ignored for SqlServer and Redis - -## Example Usage - -```typescript -import { CaptureMethod } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: CaptureMethod = "slow-log"; -``` - -## Values - -```typescript -"sniffer" | "poll" | "profiler" | "slow-log" -``` \ No newline at end of file diff --git a/swov1/docs/models/components/checkforstringoperator.md b/swov1/docs/models/components/checkforstringoperator.md deleted file mode 100644 index e4e7f1a..0000000 --- a/swov1/docs/models/components/checkforstringoperator.md +++ /dev/null @@ -1,15 +0,0 @@ -# CheckForStringOperator - -## Example Usage - -```typescript -import { CheckForStringOperator } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: CheckForStringOperator = "CONTAINS"; -``` - -## Values - -```typescript -"CONTAINS" | "DOES_NOT_CONTAIN" -``` \ No newline at end of file diff --git a/swov1/docs/models/components/createtokenrequest.md b/swov1/docs/models/components/createtokenrequest.md index 849124f..2799e8b 100644 --- a/swov1/docs/models/components/createtokenrequest.md +++ b/swov1/docs/models/components/createtokenrequest.md @@ -17,8 +17,8 @@ let value: CreateTokenRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `tags` | [components.Tags](../../models/components/tags.md) | :heavy_check_mark: | N/A | -| `type` | [components.Type](../../models/components/type.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `tags` | [components.Tags](../../models/components/tags.md) | :heavy_check_mark: | N/A | +| `type` | [components.CreateTokenRequestType](../../models/components/createtokenrequesttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/swov1/docs/models/components/createtokenrequesttype.md b/swov1/docs/models/components/createtokenrequesttype.md new file mode 100644 index 0000000..7194cd8 --- /dev/null +++ b/swov1/docs/models/components/createtokenrequesttype.md @@ -0,0 +1,15 @@ +# CreateTokenRequestType + +## Example Usage + +```typescript +import { CreateTokenRequestType } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: CreateTokenRequestType = "ingestion"; +``` + +## Values + +```typescript +"ingestion" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/createtokenresponse.md b/swov1/docs/models/components/createtokenresponse.md new file mode 100644 index 0000000..9246752 --- /dev/null +++ b/swov1/docs/models/components/createtokenresponse.md @@ -0,0 +1,17 @@ +# CreateTokenResponse + +## Example Usage + +```typescript +import { CreateTokenResponse } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: CreateTokenResponse = { + token: "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `token` | *string* | :heavy_check_mark: | API token. | 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef | \ No newline at end of file diff --git a/swov1/docs/models/components/customheaders.md b/swov1/docs/models/components/customheaders.md index ee171dd..77a1b7e 100644 --- a/swov1/docs/models/components/customheaders.md +++ b/swov1/docs/models/components/customheaders.md @@ -6,14 +6,14 @@ import { CustomHeaders } from "@solarwinds/swo-sdk-typescript/models/components"; let value: CustomHeaders = { - name: "", - value: "", + name: "string", + value: "string", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name of a request header. Must contain only characters allowed by RFC: a-z, A-Z, 0-9, - and _. | -| `value` | *string* | :heavy_check_mark: | Value of a request header. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name of a request header. Must contain only characters allowed by RFC: a-z, A-Z, 0-9, - and _. | string | +| `value` | *string* | :heavy_check_mark: | Value of a request header. | string | \ No newline at end of file diff --git a/swov1/docs/models/components/databaseauthmethod.md b/swov1/docs/models/components/databaseauthmethod.md index 8de3a7b..29ca2c8 100644 --- a/swov1/docs/models/components/databaseauthmethod.md +++ b/swov1/docs/models/components/databaseauthmethod.md @@ -11,5 +11,5 @@ let value: DatabaseAuthMethod = "basic"; ## Values ```typescript -"basic" | "awsiam" | "windows" | "entraclientcert" | "entraclientsecret" | "cert" +"basic" | "awsiam" | "windows" | "entraclientsecret" | "entraclientcert" | "cert" ``` \ No newline at end of file diff --git a/swov1/docs/models/components/databaseconnectionoptions.md b/swov1/docs/models/components/databaseconnectionoptions.md index 153abeb..cdb4b61 100644 --- a/swov1/docs/models/components/databaseconnectionoptions.md +++ b/swov1/docs/models/components/databaseconnectionoptions.md @@ -7,19 +7,19 @@ import { DatabaseConnectionOptions } from "@solarwinds/swo-sdk-typescript/models let value: DatabaseConnectionOptions = { host: "ornery-plain.com", - port: "", - sslOptions: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `host` | *string* | :heavy_check_mark: | Database server host | -| `port` | *string* | :heavy_check_mark: | Database server port | -| `encryptedCredentials` | *string* | :heavy_minus_sign: | Encrypted credentials for connecting to database server when using basic auth method (username, password) | -| `user` | *string* | :heavy_minus_sign: | Username for connecting to database server needed only for auth methods other than basic auth | -| `sslEnabled` | *boolean* | :heavy_minus_sign: | Enable ssl when agent connects to database server | -| `sslOptions` | [components.DatabaseConnectionOptionsSslOptions](../../models/components/databaseconnectionoptionsssloptions.md) | :heavy_check_mark: | SSL connection options, when sslEnabled is true | -| `cloudRegion` | *string* | :heavy_minus_sign: | Cloud region in case of database managed by cloud provider, required for IAM authentication | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `host` | *string* | :heavy_check_mark: | Database server host | +| `port` | *string* | :heavy_minus_sign: | Database server port | +| `dbname` | *string* | :heavy_minus_sign: | Database schema name | +| `encryptedCredentials` | *string* | :heavy_minus_sign: | Encrypted credentials for connecting to database server when using basic auth method (username, password) | +| `user` | *string* | :heavy_minus_sign: | Username for connecting to database server needed only for auth methods other than basic auth | +| `sslEnabled` | *boolean* | :heavy_minus_sign: | Enable ssl when agent connects to database server | +| `sslOptions` | [components.DatabaseSslOptions](../../models/components/databasessloptions.md) | :heavy_minus_sign: | SSL connection options, when sslEnabled is true | +| `cloudRegion` | *string* | :heavy_minus_sign: | Cloud region in case of database managed by cloud provider, required for IAM authentication | +| `bindings` | *string* | :heavy_minus_sign: | binding for packet sniffing for sniffer captureMethod (on-host), example: 0.0.0.0:6379,[::]:6379 | \ No newline at end of file diff --git a/swov1/docs/models/components/databaseconnectionoptionssslmode.md b/swov1/docs/models/components/databaseconnectionoptionssslmode.md deleted file mode 100644 index 1c54bed..0000000 --- a/swov1/docs/models/components/databaseconnectionoptionssslmode.md +++ /dev/null @@ -1,17 +0,0 @@ -# DatabaseConnectionOptionsSslMode - -SSL mode such as require, verify-ca, verify-full as applicable - -## Example Usage - -```typescript -import { DatabaseConnectionOptionsSslMode } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: DatabaseConnectionOptionsSslMode = "verfify-ca"; -``` - -## Values - -```typescript -"require" | "verfify-ca" | "verify-full" -``` \ No newline at end of file diff --git a/swov1/docs/models/components/databaseconnectionoptionsssloptions.md b/swov1/docs/models/components/databaseconnectionoptionsssloptions.md deleted file mode 100644 index 8874b89..0000000 --- a/swov1/docs/models/components/databaseconnectionoptionsssloptions.md +++ /dev/null @@ -1,20 +0,0 @@ -# DatabaseConnectionOptionsSslOptions - -SSL connection options, when sslEnabled is true - -## Example Usage - -```typescript -import { DatabaseConnectionOptionsSslOptions } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: DatabaseConnectionOptionsSslOptions = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `sslMode` | [components.DatabaseConnectionOptionsSslMode](../../models/components/databaseconnectionoptionssslmode.md) | :heavy_minus_sign: | SSL mode such as require, verify-ca, verify-full as applicable | -| `sslCAPath` | *string* | :heavy_minus_sign: | CA file path | -| `sslKeyPath` | *string* | :heavy_minus_sign: | SSL key file path | -| `sslCertPath` | *string* | :heavy_minus_sign: | SSL cert file path | \ No newline at end of file diff --git a/swov1/docs/models/components/dbconnoptions.md b/swov1/docs/models/components/databaseconnectionoptionsupdate.md similarity index 74% rename from swov1/docs/models/components/dbconnoptions.md rename to swov1/docs/models/components/databaseconnectionoptionsupdate.md index b37eece..578011c 100644 --- a/swov1/docs/models/components/dbconnoptions.md +++ b/swov1/docs/models/components/databaseconnectionoptionsupdate.md @@ -1,13 +1,11 @@ -# DbConnOptions - -Options specifying how plugins connect to database server, authentication method change is not supported +# DatabaseConnectionOptionsUpdate ## Example Usage ```typescript -import { DbConnOptions } from "@solarwinds/swo-sdk-typescript/models/components"; +import { DatabaseConnectionOptionsUpdate } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: DbConnOptions = {}; +let value: DatabaseConnectionOptionsUpdate = {}; ``` ## Fields @@ -16,8 +14,10 @@ let value: DbConnOptions = {}; | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `host` | *string* | :heavy_minus_sign: | Database server host | | `port` | *string* | :heavy_minus_sign: | Database server port | +| `dbname` | *string* | :heavy_minus_sign: | Database schema name | | `encryptedCredentials` | *string* | :heavy_minus_sign: | Encrypted credentials for connecting to database server when using basic auth method (username, password) | | `user` | *string* | :heavy_minus_sign: | Username for connecting to database server needed only for auth methods other than basic auth | | `sslEnabled` | *boolean* | :heavy_minus_sign: | Enable ssl when agent connects to database server | -| `sslOptions` | [components.UpdateDatabaseRequestSslOptions](../../models/components/updatedatabaserequestssloptions.md) | :heavy_minus_sign: | SSL connection options, when sslEnabled is true | -| `cloudRegion` | *string* | :heavy_minus_sign: | Cloud region in case of database managed by cloud provider, required for IAM authentication | \ No newline at end of file +| `sslOptions` | [components.DatabaseSslOptionsUpdate](../../models/components/databasessloptionsupdate.md) | :heavy_minus_sign: | SSL connection options, when sslEnabled is true | +| `cloudRegion` | *string* | :heavy_minus_sign: | Cloud region in case of database managed by cloud provider, required for IAM authentication | +| `bindings` | *string* | :heavy_minus_sign: | binding for packet sniffing for sniffer captureMethod (on-host), example: 0.0.0.0:6379,[::]:6379 | \ No newline at end of file diff --git a/swov1/docs/models/components/databasemetricscapturemethod.md b/swov1/docs/models/components/databasemetricscapturemethod.md new file mode 100644 index 0000000..31358b7 --- /dev/null +++ b/swov1/docs/models/components/databasemetricscapturemethod.md @@ -0,0 +1,15 @@ +# DatabaseMetricsCaptureMethod + +## Example Usage + +```typescript +import { DatabaseMetricsCaptureMethod } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: DatabaseMetricsCaptureMethod = "sniffer"; +``` + +## Values + +```typescript +"sniffer" | "poll" | "profiler" | "slow-log" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/databasepluginconfig.md b/swov1/docs/models/components/databasepluginconfig.md index d2cd7ec..a963482 100644 --- a/swov1/docs/models/components/databasepluginconfig.md +++ b/swov1/docs/models/components/databasepluginconfig.md @@ -7,12 +7,8 @@ import { DatabasePluginConfig } from "@solarwinds/swo-sdk-typescript/models/comp let value: DatabasePluginConfig = { pluginName: "", - config: [ - { - key: "", - value: "", - }, - ], + configOptions: [], + dbConnOptions: [], }; ``` @@ -21,4 +17,5 @@ let value: DatabasePluginConfig = { | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `pluginName` | *string* | :heavy_check_mark: | Name of plugin observing database server | -| `config` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_check_mark: | Configuration of plugin observing database server | \ No newline at end of file +| `configOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_check_mark: | Configuration of plugin observing database server | +| `dbConnOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_check_mark: | Database connection options of plugin observing database server | \ No newline at end of file diff --git a/swov1/docs/models/components/databasepluginconfigresponse.md b/swov1/docs/models/components/databasepluginconfigresponse.md index 407e3bd..704a648 100644 --- a/swov1/docs/models/components/databasepluginconfigresponse.md +++ b/swov1/docs/models/components/databasepluginconfigresponse.md @@ -6,17 +6,7 @@ import { DatabasePluginConfigResponse } from "@solarwinds/swo-sdk-typescript/models/components"; let value: DatabasePluginConfigResponse = { - pluginConfig: [ - { - pluginName: "", - config: [ - { - key: "", - value: "", - }, - ], - }, - ], + pluginConfig: [], }; ``` diff --git a/swov1/docs/models/components/databasepluginstatus.md b/swov1/docs/models/components/databasepluginstatus.md index 8ffe0d0..a820e89 100644 --- a/swov1/docs/models/components/databasepluginstatus.md +++ b/swov1/docs/models/components/databasepluginstatus.md @@ -7,13 +7,15 @@ import { DatabasePluginStatus } from "@solarwinds/swo-sdk-typescript/models/comp let value: DatabasePluginStatus = { pluginName: "", - status: "", + deploymentStatus: "", + healthStatus: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `pluginName` | *string* | :heavy_check_mark: | Name of plugin observing database server | -| `status` | *string* | :heavy_check_mark: | Status of plugin observing database server | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `pluginName` | *string* | :heavy_check_mark: | Name of plugin observing database server | +| `deploymentStatus` | *string* | :heavy_check_mark: | Deployment Status of plugin observing database server | +| `healthStatus` | *string* | :heavy_check_mark: | Health Status of plugin observing database server | \ No newline at end of file diff --git a/swov1/docs/models/components/databasepluginstatusresponse.md b/swov1/docs/models/components/databasepluginstatusresponse.md index 62ecb25..21c3e0d 100644 --- a/swov1/docs/models/components/databasepluginstatusresponse.md +++ b/swov1/docs/models/components/databasepluginstatusresponse.md @@ -6,12 +6,7 @@ import { DatabasePluginStatusResponse } from "@solarwinds/swo-sdk-typescript/models/components"; let value: DatabasePluginStatusResponse = { - plugins: [ - { - pluginName: "", - status: "", - }, - ], + plugins: [], }; ``` diff --git a/swov1/docs/models/components/databasessloptions.md b/swov1/docs/models/components/databasessloptions.md new file mode 100644 index 0000000..e92a7b2 --- /dev/null +++ b/swov1/docs/models/components/databasessloptions.md @@ -0,0 +1,18 @@ +# DatabaseSslOptions + +## Example Usage + +```typescript +import { DatabaseSslOptions } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: DatabaseSslOptions = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `sslMode` | [components.DatabaseSslOptionsSslMode](../../models/components/databasessloptionssslmode.md) | :heavy_minus_sign: | SSL mode such as require, verify-ca, verify-full as applicable | +| `sslCAPath` | *string* | :heavy_minus_sign: | CA file path | +| `sslKeyPath` | *string* | :heavy_minus_sign: | SSL key file path | +| `sslCertPath` | *string* | :heavy_minus_sign: | SSL cert file path | \ No newline at end of file diff --git a/swov1/docs/models/components/databasessloptionssslmode.md b/swov1/docs/models/components/databasessloptionssslmode.md new file mode 100644 index 0000000..8a96e3a --- /dev/null +++ b/swov1/docs/models/components/databasessloptionssslmode.md @@ -0,0 +1,17 @@ +# DatabaseSslOptionsSslMode + +SSL mode such as require, verify-ca, verify-full as applicable + +## Example Usage + +```typescript +import { DatabaseSslOptionsSslMode } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: DatabaseSslOptionsSslMode = "verify-full"; +``` + +## Values + +```typescript +"require" | "verify-ca" | "verify-full" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/databasessloptionsupdate.md b/swov1/docs/models/components/databasessloptionsupdate.md new file mode 100644 index 0000000..c6ca2bc --- /dev/null +++ b/swov1/docs/models/components/databasessloptionsupdate.md @@ -0,0 +1,18 @@ +# DatabaseSslOptionsUpdate + +## Example Usage + +```typescript +import { DatabaseSslOptionsUpdate } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: DatabaseSslOptionsUpdate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `sslMode` | [components.DatabaseSslOptionsUpdateSslMode](../../models/components/databasessloptionsupdatesslmode.md) | :heavy_minus_sign: | SSL mode such as require, verify-ca, verify-full as applicable | +| `sslCAPath` | *string* | :heavy_minus_sign: | CA file path | +| `sslKeyPath` | *string* | :heavy_minus_sign: | SSL key file path | +| `sslCertPath` | *string* | :heavy_minus_sign: | SSL cert file path | \ No newline at end of file diff --git a/swov1/docs/models/components/databasessloptionsupdatesslmode.md b/swov1/docs/models/components/databasessloptionsupdatesslmode.md new file mode 100644 index 0000000..f45b45f --- /dev/null +++ b/swov1/docs/models/components/databasessloptionsupdatesslmode.md @@ -0,0 +1,17 @@ +# DatabaseSslOptionsUpdateSslMode + +SSL mode such as require, verify-ca, verify-full as applicable + +## Example Usage + +```typescript +import { DatabaseSslOptionsUpdateSslMode } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: DatabaseSslOptionsUpdateSslMode = "require"; +``` + +## Values + +```typescript +"require" | "verify-ca" | "verify-full" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/geturiresponse.md b/swov1/docs/models/components/geturiresponse.md new file mode 100644 index 0000000..1291c72 --- /dev/null +++ b/swov1/docs/models/components/geturiresponse.md @@ -0,0 +1,67 @@ +# GetUriResponse + +## Example Usage + +```typescript +import { GetUriResponse } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetUriResponse = { + id: "e-1448474379026206720", + type: "Uri", + status: "up", + name: "solarwinds.com", + ipOrDomain: "solarwinds.com", + availabilityCheckSettings: { + platformOptions: { + probePlatforms: [ + "AWS", + ], + testFromAll: true, + }, + testFrom: { + type: "REGION", + values: [ + "NA", + ], + }, + testIntervalInSeconds: 14400, + outageConfiguration: { + failingTestLocations: "all", + consecutiveForDown: 2, + }, + ping: { + enabled: true, + }, + tcp: null, + protocol: "PING", + }, + tags: [ + { + key: "environment", + value: "production", + }, + ], + lastOutageStartTime: new Date("2025-01-15T14:31:19.735Z"), + lastOutageEndTime: new Date("2025-01-15T14:31:19.735Z"), + lastTestTime: new Date("2025-01-15T14:31:19.735Z"), + lastErrorTime: new Date("2025-01-15T14:31:19.735Z"), + lastResponseTime: 376, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | e-1448474379026206720 | +| `type` | *string* | :heavy_check_mark: | N/A | Uri | +| `status` | [components.GetUriResponseStatus](../../models/components/geturiresponsestatus.md) | :heavy_check_mark: | N/A | up | +| `name` | *string* | :heavy_check_mark: | Name of the URI, which must be unique within the organization.
The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | +| `ipOrDomain` | *string* | :heavy_check_mark: | IP/domain address of the URI. | solarwinds.com | +| `availabilityCheckSettings` | [components.UriAvailabilityCheckSettings](../../models/components/uriavailabilitychecksettings.md) | :heavy_check_mark: | Availability tests configuration for the URI. | | +| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | [
{
"key": "environment",
"value": "production"
}
] | +| `lastOutageStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage started. | 2025-01-15T14:31:19.735Z | +| `lastOutageEndTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage ended. | 2025-01-15T14:31:19.735Z | +| `lastTestTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last test was performed. | 2025-01-15T14:31:19.735Z | +| `lastErrorTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Last time when a synthetic test failed. | 2025-01-15T14:31:19.735Z | +| `lastResponseTime` | *number* | :heavy_minus_sign: | Response time from the last synthetic check in milliseconds. | 376 | \ No newline at end of file diff --git a/swov1/docs/models/components/geturiresponsestatus.md b/swov1/docs/models/components/geturiresponsestatus.md new file mode 100644 index 0000000..ce4d501 --- /dev/null +++ b/swov1/docs/models/components/geturiresponsestatus.md @@ -0,0 +1,15 @@ +# GetUriResponseStatus + +## Example Usage + +```typescript +import { GetUriResponseStatus } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetUriResponseStatus = "up"; +``` + +## Values + +```typescript +"up" | "down" | "paused" | "maintenance" | "unknown" +``` \ No newline at end of file diff --git a/swov1/docs/models/operations/geturiresponse.md b/swov1/docs/models/components/getwebsiteresponse.md similarity index 51% rename from swov1/docs/models/operations/geturiresponse.md rename to swov1/docs/models/components/getwebsiteresponse.md index 6aabdf5..f70715b 100644 --- a/swov1/docs/models/operations/geturiresponse.md +++ b/swov1/docs/models/components/getwebsiteresponse.md @@ -1,25 +1,22 @@ -# GetUriResponse - -The request has succeeded. +# GetWebsiteResponse ## Example Usage ```typescript -import { GetUriResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { GetWebsiteResponse } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: GetUriResponse = { +let value: GetWebsiteResponse = { id: "e-1448474379026206720", - type: "Uri", + type: "Website", status: "up", name: "solarwinds.com", - ipOrDomain: "solarwinds.com", + url: "https://www.solarwinds.com", + monitoringOptions: { + isAvailabilityActive: true, + isRumActive: false, + }, availabilityCheckSettings: { - platformOptions: { - probePlatforms: [ - "AWS", - ], - testFromAll: true, - }, + platformOptions: null, testFrom: { type: "REGION", values: [ @@ -29,12 +26,26 @@ let value: GetUriResponse = { testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", - consecutiveForDown: 3, + consecutiveForDown: 2, }, - ping: { + checkForString: null, + protocols: [ + "HTTP", + "HTTPS", + ], + ssl: { enabled: true, + daysPriorToExpiration: 7, + ignoreIntermediateCertificates: true, }, - protocol: "PING", + customHeaders: [ + { + name: "string", + value: "string", + }, + ], + allowInsecureRenegotiation: true, + postData: "{\"example\": \"value\"}", }, tags: [ { @@ -42,27 +53,36 @@ let value: GetUriResponse = { value: "production", }, ], + rum: { + apdexTimeInSeconds: 4, + snippet: "string", + spa: true, + }, lastOutageStartTime: new Date("2025-01-15T14:31:19.735Z"), lastOutageEndTime: new Date("2025-01-15T14:31:19.735Z"), lastTestTime: new Date("2025-01-15T14:31:19.735Z"), lastErrorTime: new Date("2025-01-15T14:31:19.735Z"), lastResponseTime: 376, + nextOnDemandAvailabilityTime: 0, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | e-1448474379026206720 | -| `type` | *string* | :heavy_check_mark: | N/A | Uri | -| `status` | [operations.GetUriStatus](../../models/operations/geturistatus.md) | :heavy_check_mark: | N/A | up | -| `name` | *string* | :heavy_check_mark: | Name of the URI, which must be unique within the organization.
The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | -| `ipOrDomain` | *string* | :heavy_check_mark: | IP/domain address of the URI. | solarwinds.com | -| `availabilityCheckSettings` | [operations.GetUriAvailabilityCheckSettings](../../models/operations/geturiavailabilitychecksettings.md) | :heavy_check_mark: | Availability tests configuration for the URI. | {
"testIntervalInSeconds": 14400,
"protocol": "PING",
"platformOptions": {
"probePlatforms": [
"AWS"
],
"testFromAll": true
},
"testFrom": {
"type": "REGION",
"values": [
"NA"
]
},
"outageConfiguration": {
"failingTestLocations": "all",
"consecutiveForDown": 3
},
"ping": {
"enabled": true
}
} | -| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | [
{
"key": "environment",
"value": "production"
}
] | -| `lastOutageStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage started. | 2025-01-15T14:31:19.735Z | -| `lastOutageEndTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage ended. | 2025-01-15T14:31:19.735Z | -| `lastTestTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last test was performed. | 2025-01-15T14:31:19.735Z | -| `lastErrorTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Last time when a synthetic test failed. | 2025-01-15T14:31:19.735Z | -| `lastResponseTime` | *number* | :heavy_minus_sign: | Response time from the last synthetic check in milliseconds. | 376 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | e-1448474379026206720 | +| `type` | *string* | :heavy_check_mark: | N/A | Website | +| `status` | [components.GetWebsiteResponseStatus](../../models/components/getwebsiteresponsestatus.md) | :heavy_check_mark: | N/A | up | +| `name` | *string* | :heavy_check_mark: | Name of the website, which must be unique within the organization.
The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | +| `url` | *string* | :heavy_check_mark: | URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). | https://www.solarwinds.com | +| `monitoringOptions` | [components.MonitoringOptions](../../models/components/monitoringoptions.md) | :heavy_check_mark: | Defines which monitoring features are enabled for a website. | | +| `availabilityCheckSettings` | [components.GetWebsiteResponseAvailabilityCheckSettings](../../models/components/getwebsiteresponseavailabilitychecksettings.md) | :heavy_minus_sign: | Use this field to configure availability tests for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | | +| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | | +| `rum` | [components.GetWebsiteResponseRum](../../models/components/getwebsiteresponserum.md) | :heavy_minus_sign: | Use this field to configure real user monitoring (RUM) for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | {
"apdexTimeInSeconds": 4,
"snippet": "string",
"spa": true
} | +| `lastOutageStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage started. | 2025-01-15T14:31:19.735Z | +| `lastOutageEndTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage ended. | 2025-01-15T14:31:19.735Z | +| `lastTestTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last test was performed. | 2025-01-15T14:31:19.735Z | +| `lastErrorTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Last time when a synthetic test failed. | 2025-01-15T14:31:19.735Z | +| `lastResponseTime` | *number* | :heavy_minus_sign: | Response time from the last synthetic check in milliseconds. | 376 | +| `nextOnDemandAvailabilityTime` | *number* | :heavy_minus_sign: | Timestamp for when the next on-demand check could be executed. If at '0', it means you can execute it anytime. | 0 | \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsiteavailabilitychecksettings.md b/swov1/docs/models/components/getwebsiteresponseavailabilitychecksettings.md similarity index 96% rename from swov1/docs/models/operations/getwebsiteavailabilitychecksettings.md rename to swov1/docs/models/components/getwebsiteresponseavailabilitychecksettings.md index 6bf2fb7..3b3e04c 100644 --- a/swov1/docs/models/operations/getwebsiteavailabilitychecksettings.md +++ b/swov1/docs/models/components/getwebsiteresponseavailabilitychecksettings.md @@ -1,4 +1,4 @@ -# GetWebsiteAvailabilityCheckSettings +# GetWebsiteResponseAvailabilityCheckSettings Use this field to configure availability tests for the website. You are required to configure at least availability monitoring or real user monitoring to be able to create website. @@ -6,9 +6,9 @@ ## Example Usage ```typescript -import { GetWebsiteAvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { GetWebsiteResponseAvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: GetWebsiteAvailabilityCheckSettings = { +let value: GetWebsiteResponseAvailabilityCheckSettings = { platformOptions: { probePlatforms: [ "AWS", @@ -24,7 +24,7 @@ let value: GetWebsiteAvailabilityCheckSettings = { testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", - consecutiveForDown: 3, + consecutiveForDown: 2, }, checkForString: { operator: "CONTAINS", @@ -54,13 +54,13 @@ let value: GetWebsiteAvailabilityCheckSettings = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `platformOptions` | [operations.GetWebsitePlatformOptions](../../models/operations/getwebsiteplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | +| `platformOptions` | [components.GetWebsiteResponsePlatformOptions](../../models/components/getwebsiteresponseplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | | `testFrom` | [components.TestFrom](../../models/components/testfrom.md) | :heavy_check_mark: | Configure locations of the synthetic availability test probes.
Acceptable values depend on the selected type and actual values of existing probes. | {
"type": "REGION",
"values": [
"NA"
]
} | -| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | | -| `outageConfiguration` | [operations.GetWebsiteOutageConfiguration](../../models/operations/getwebsiteoutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | -| `checkForString` | [operations.CheckForString](../../models/operations/checkforstring.md) | :heavy_minus_sign: | Use this field to configure whether availability tests should check for presence or absence of a particular string on a page.
If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail.
Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail.
If omitted or set to null, the string checking functionality will be disabled. | | -| `protocols` | [components.WebsiteProtocol](../../models/components/websiteprotocol.md)[] | :heavy_check_mark: | Configure which protocols need availability tests to be performed. At least one protocol must be provided. | | -| `ssl` | [operations.Ssl](../../models/operations/ssl.md) | :heavy_minus_sign: | Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only.
If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. | | +| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | 14400 | +| `outageConfiguration` | [components.GetWebsiteResponseOutageConfiguration](../../models/components/getwebsiteresponseoutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | +| `checkForString` | [components.GetWebsiteResponseCheckForString](../../models/components/getwebsiteresponsecheckforstring.md) | :heavy_minus_sign: | Use this field to configure whether availability tests should check for presence or absence of a particular string on a page.
If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail.
Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail.
If omitted or set to null, the string checking functionality will be disabled. | | +| `protocols` | [components.WebsiteProtocol](../../models/components/websiteprotocol.md)[] | :heavy_check_mark: | Configure which protocols need availability tests to be performed. At least one protocol must be provided. | [
"HTTP",
"HTTPS"
] | +| `ssl` | [components.GetWebsiteResponseSsl](../../models/components/getwebsiteresponsessl.md) | :heavy_minus_sign: | Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only.
If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. | | | `customHeaders` | [components.CustomHeaders](../../models/components/customheaders.md)[] | :heavy_minus_sign: | Configure custom request headers to be sent with each availability test. It is possible to provide multiple headers with the same name.
If omitted, set to null or set to an empty array, no custom headers will be sent. | | -| `allowInsecureRenegotiation` | *boolean* | :heavy_minus_sign: | Allow insecure SSL renegotiation which introduces a security risk in the communication process.
Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel.
Available only with HTTPS check.
If omitted or set to null, insecure SSL renegotiation won't be allowed. | | -| `postData` | *string* | :heavy_minus_sign: | Configure data that will be sent as POST request body by the synthetic probe.
If omitted or set to null/empty string, the probe will send the usual GET requests. | | \ No newline at end of file +| `allowInsecureRenegotiation` | *boolean* | :heavy_minus_sign: | Allow insecure SSL renegotiation which introduces a security risk in the communication process.
Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel.
Available only with HTTPS check.
If omitted or set to null, insecure SSL renegotiation won't be allowed. | true | +| `postData` | *string* | :heavy_minus_sign: | Configure data that will be sent as POST request body by the synthetic probe.
If omitted or set to null/empty string, the probe will send the usual GET requests. | {"example": "value"} | \ No newline at end of file diff --git a/swov1/docs/models/components/checkforstring.md b/swov1/docs/models/components/getwebsiteresponsecheckforstring.md similarity index 68% rename from swov1/docs/models/components/checkforstring.md rename to swov1/docs/models/components/getwebsiteresponsecheckforstring.md index 8546362..8e915e5 100644 --- a/swov1/docs/models/components/checkforstring.md +++ b/swov1/docs/models/components/getwebsiteresponsecheckforstring.md @@ -1,4 +1,4 @@ -# CheckForString +# GetWebsiteResponseCheckForString Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. @@ -8,17 +8,17 @@ ## Example Usage ```typescript -import { CheckForString } from "@solarwinds/swo-sdk-typescript/models/components"; +import { GetWebsiteResponseCheckForString } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: CheckForString = { +let value: GetWebsiteResponseCheckForString = { operator: "CONTAINS", - value: "", + value: "string", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `operator` | [components.CheckForStringOperator](../../models/components/checkforstringoperator.md) | :heavy_check_mark: | Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). | -| `value` | *string* | :heavy_check_mark: | The string that which will be searched in the page source code. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `operator` | [components.GetWebsiteResponseOperator](../../models/components/getwebsiteresponseoperator.md) | :heavy_check_mark: | Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). | CONTAINS | +| `value` | *string* | :heavy_check_mark: | The string that which will be searched in the page source code. | string | \ No newline at end of file diff --git a/swov1/docs/models/components/getwebsiteresponsefailingtestlocations.md b/swov1/docs/models/components/getwebsiteresponsefailingtestlocations.md new file mode 100644 index 0000000..c81705d --- /dev/null +++ b/swov1/docs/models/components/getwebsiteresponsefailingtestlocations.md @@ -0,0 +1,17 @@ +# GetWebsiteResponseFailingTestLocations + +How many locations must report a failure for an entity to be considered down. + +## Example Usage + +```typescript +import { GetWebsiteResponseFailingTestLocations } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetWebsiteResponseFailingTestLocations = "all"; +``` + +## Values + +```typescript +"all" | "any" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/getwebsiteresponseoperator.md b/swov1/docs/models/components/getwebsiteresponseoperator.md new file mode 100644 index 0000000..e9d144f --- /dev/null +++ b/swov1/docs/models/components/getwebsiteresponseoperator.md @@ -0,0 +1,17 @@ +# GetWebsiteResponseOperator + +Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + +## Example Usage + +```typescript +import { GetWebsiteResponseOperator } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetWebsiteResponseOperator = "CONTAINS"; +``` + +## Values + +```typescript +"CONTAINS" | "DOES_NOT_CONTAIN" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/getwebsiteresponseoutageconfiguration.md b/swov1/docs/models/components/getwebsiteresponseoutageconfiguration.md new file mode 100644 index 0000000..ca087f5 --- /dev/null +++ b/swov1/docs/models/components/getwebsiteresponseoutageconfiguration.md @@ -0,0 +1,22 @@ +# GetWebsiteResponseOutageConfiguration + + Default conditions when the entity is considered down. + If omitted or set to null, organization configuration will be used for this entity. + +## Example Usage + +```typescript +import { GetWebsiteResponseOutageConfiguration } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetWebsiteResponseOutageConfiguration = { + failingTestLocations: "all", + consecutiveForDown: 2, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `failingTestLocations` | [components.GetWebsiteResponseFailingTestLocations](../../models/components/getwebsiteresponsefailingtestlocations.md) | :heavy_check_mark: | How many locations must report a failure for an entity to be considered down. | all | +| `consecutiveForDown` | *number* | :heavy_check_mark: | Number of consecutive failing tests for an entity to be considered down. | 2 | \ No newline at end of file diff --git a/swov1/docs/models/operations/geturiplatformoptions.md b/swov1/docs/models/components/getwebsiteresponseplatformoptions.md similarity index 76% rename from swov1/docs/models/operations/geturiplatformoptions.md rename to swov1/docs/models/components/getwebsiteresponseplatformoptions.md index 5ca5043..42576e3 100644 --- a/swov1/docs/models/operations/geturiplatformoptions.md +++ b/swov1/docs/models/components/getwebsiteresponseplatformoptions.md @@ -1,22 +1,23 @@ -# GetUriPlatformOptions +# GetWebsiteResponsePlatformOptions Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. ## Example Usage ```typescript -import { GetUriPlatformOptions } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { GetWebsiteResponsePlatformOptions } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: GetUriPlatformOptions = { +let value: GetWebsiteResponsePlatformOptions = { probePlatforms: [ - "AZURE", + "AWS", ], + testFromAll: true, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | -| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | [
"AWS"
] | +| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/operations/rum.md b/swov1/docs/models/components/getwebsiteresponserum.md similarity index 83% rename from swov1/docs/models/operations/rum.md rename to swov1/docs/models/components/getwebsiteresponserum.md index 0014198..39be305 100644 --- a/swov1/docs/models/operations/rum.md +++ b/swov1/docs/models/components/getwebsiteresponserum.md @@ -1,4 +1,4 @@ -# Rum +# GetWebsiteResponseRum Use this field to configure real user monitoring (RUM) for the website. You are required to configure at least availability monitoring or real user monitoring to be able to create website. @@ -6,9 +6,9 @@ You are required to configure at least availability monitoring or real user moni ## Example Usage ```typescript -import { Rum } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { GetWebsiteResponseRum } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Rum = { +let value: GetWebsiteResponseRum = { apdexTimeInSeconds: 4, snippet: "string", spa: true, diff --git a/swov1/docs/models/operations/ssl.md b/swov1/docs/models/components/getwebsiteresponsessl.md similarity index 78% rename from swov1/docs/models/operations/ssl.md rename to swov1/docs/models/components/getwebsiteresponsessl.md index f1a2fbf..ea4ad37 100644 --- a/swov1/docs/models/operations/ssl.md +++ b/swov1/docs/models/components/getwebsiteresponsessl.md @@ -1,4 +1,4 @@ -# Ssl +# GetWebsiteResponseSsl Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. @@ -6,15 +6,19 @@ ## Example Usage ```typescript -import { Ssl } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { GetWebsiteResponseSsl } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Ssl = {}; +let value: GetWebsiteResponseSsl = { + enabled: true, + daysPriorToExpiration: 7, + ignoreIntermediateCertificates: true, +}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_minus_sign: | Whether SSL monitoring is enabled for the website.
If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | -| `daysPriorToExpiration` | *number* | :heavy_minus_sign: | Number of days before the expiration date an SSL certificate will be considered 'expiring.' | -| `ignoreIntermediateCertificates` | *boolean* | :heavy_minus_sign: | Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate).
This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain.
This option does not affect any other certificate validity checks besides expiration.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_minus_sign: | Whether SSL monitoring is enabled for the website.
If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | true | +| `daysPriorToExpiration` | *number* | :heavy_minus_sign: | Number of days before the expiration date an SSL certificate will be considered 'expiring.' | 7 | +| `ignoreIntermediateCertificates` | *boolean* | :heavy_minus_sign: | Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate).
This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain.
This option does not affect any other certificate validity checks besides expiration.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/components/getwebsiteresponsestatus.md b/swov1/docs/models/components/getwebsiteresponsestatus.md new file mode 100644 index 0000000..78de3fc --- /dev/null +++ b/swov1/docs/models/components/getwebsiteresponsestatus.md @@ -0,0 +1,15 @@ +# GetWebsiteResponseStatus + +## Example Usage + +```typescript +import { GetWebsiteResponseStatus } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: GetWebsiteResponseStatus = "up"; +``` + +## Values + +```typescript +"up" | "down" | "paused" | "maintenance" | "unknown" +``` \ No newline at end of file diff --git a/swov1/docs/models/operations/listprobesresponse.md b/swov1/docs/models/components/listprobesresponse.md similarity index 63% rename from swov1/docs/models/operations/listprobesresponse.md rename to swov1/docs/models/components/listprobesresponse.md index 769bacd..6df0ea2 100644 --- a/swov1/docs/models/operations/listprobesresponse.md +++ b/swov1/docs/models/components/listprobesresponse.md @@ -1,35 +1,12 @@ # ListProbesResponse -The request has succeeded. - ## Example Usage ```typescript -import { ListProbesResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { ListProbesResponse } from "@solarwinds/swo-sdk-typescript/models/components"; let value: ListProbesResponse = { - probes: [ - { - id: "probe-1", - name: "Washington", - active: true, - platform: "AWS", - region: "NA", - country: "US", - city: "Washington D.C.", - coordinates: { - latitude: 38.89511, - longitude: -77.03637, - }, - ipv4Addresses: [ - "34.232.5.40", - "44.207.30.12", - ], - ipv6Addresses: [ - "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - ], - }, - ], + probes: [], }; ``` diff --git a/swov1/docs/models/components/metricsgrouping.md b/swov1/docs/models/components/metricsgrouping.md index f72568f..7ef7459 100644 --- a/swov1/docs/models/components/metricsgrouping.md +++ b/swov1/docs/models/components/metricsgrouping.md @@ -12,12 +12,7 @@ let value: MetricsGrouping = { value: "", }, ], - measurements: [ - { - time: new Date("2025-10-01T01:48:52.101Z"), - value: 4001.92, - }, - ], + measurements: [], }; ``` diff --git a/swov1/docs/models/components/mgmtaccountonboardingresponse.md b/swov1/docs/models/components/mgmtaccountonboardingresponse.md index 7bb240e..d47d261 100644 --- a/swov1/docs/models/components/mgmtaccountonboardingresponse.md +++ b/swov1/docs/models/components/mgmtaccountonboardingresponse.md @@ -6,7 +6,7 @@ import { MgmtAccountOnboardingResponse } from "@solarwinds/swo-sdk-typescript/models/components"; let value: MgmtAccountOnboardingResponse = { - isOnboarded: false, + isOnboarded: true, }; ``` diff --git a/swov1/docs/models/operations/monitoringoptions.md b/swov1/docs/models/components/monitoringoptions.md similarity index 98% rename from swov1/docs/models/operations/monitoringoptions.md rename to swov1/docs/models/components/monitoringoptions.md index b03bdf5..d4e14e8 100644 --- a/swov1/docs/models/operations/monitoringoptions.md +++ b/swov1/docs/models/components/monitoringoptions.md @@ -5,7 +5,7 @@ Defines which monitoring features are enabled for a website. ## Example Usage ```typescript -import { MonitoringOptions } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { MonitoringOptions } from "@solarwinds/swo-sdk-typescript/models/components"; let value: MonitoringOptions = { isAvailabilityActive: true, diff --git a/swov1/docs/models/components/observedatabaserequest.md b/swov1/docs/models/components/observedatabaserequest.md index 1bf8173..d90dfdb 100644 --- a/swov1/docs/models/components/observedatabaserequest.md +++ b/swov1/docs/models/components/observedatabaserequest.md @@ -10,35 +10,21 @@ let value: ObserveDatabaseRequest = { agentId: "", dbType: "pgsql", authMethod: "awsiam", - configOptions: [ - { - key: "", - value: "", - }, - ], dbConnOptions: { host: "caring-quit.net", - port: "", - sslOptions: {}, }, - tags: [ - { - key: "", - value: "", - }, - ], }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name for the observed database entity | -| `agentId` | *string* | :heavy_check_mark: | Swo Agent ID wehre the plugins for observing database server should run | -| `dbType` | [components.DatabaseType](../../models/components/databasetype.md) | :heavy_check_mark: | Database server type: mysql/mongo/mssql/pgsql/redis | -| `authMethod` | [components.DatabaseAuthMethod](../../models/components/databaseauthmethod.md) | :heavy_check_mark: | Auth method to be used by the agent to connect to database server | -| `captureMethod` | [components.CaptureMethod](../../models/components/capturemethod.md) | :heavy_minus_sign: | Method for capturing metrics from database server: sniff/profiler/slow-log/poll, ignored for SqlServer and Redis | -| `configOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_check_mark: | Optional advanced configuration options for plugins, e.g. disable-sampling | -| `dbConnOptions` | [components.DatabaseConnectionOptions](../../models/components/databaseconnectionoptions.md) | :heavy_check_mark: | Options specifying how plugins connect to database server | -| `tags` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_check_mark: | Tags for observed database entity | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name for the observed database entity | +| `agentId` | *string* | :heavy_check_mark: | Swo Agent ID where the plugin(s) for observing database server should run | +| `dbType` | [components.DatabaseType](../../models/components/databasetype.md) | :heavy_check_mark: | Database server type: mysql/mongo/mssql/pgsql/redis | +| `authMethod` | [components.DatabaseAuthMethod](../../models/components/databaseauthmethod.md) | :heavy_check_mark: | Auth method to be used by the agent to connect to database server | +| `captureMethod` | [components.DatabaseMetricsCaptureMethod](../../models/components/databasemetricscapturemethod.md) | :heavy_minus_sign: | Method for capturing metrics from database server: sniffer/poll/profiler/slow-log, ignored for SqlServer and Redis
Sniffer is supported for mysql, mongo, redis and pgsql.
Poll is supported for mysql, mssql, pgsql.
profiler and slow-log are supported for mongo. | +| `configOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Optional advanced configuration options for plugins, e.g. disable-sampling set to true | +| `dbConnOptions` | [components.DatabaseConnectionOptions](../../models/components/databaseconnectionoptions.md) | :heavy_check_mark: | Options specifying how plugins connect to database server | +| `tags` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Tags for observed database entity | \ No newline at end of file diff --git a/swov1/docs/models/components/probelocationtype.md b/swov1/docs/models/components/probelocationtype.md deleted file mode 100644 index 13c856b..0000000 --- a/swov1/docs/models/components/probelocationtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ProbeLocationType - -## Example Usage - -```typescript -import { ProbeLocationType } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: ProbeLocationType = "REGION"; -``` - -## Values - -```typescript -"REGION" | "COUNTRY" | "CITY" -``` \ No newline at end of file diff --git a/swov1/docs/models/operations/protocol.md b/swov1/docs/models/components/protocol.md similarity index 94% rename from swov1/docs/models/operations/protocol.md rename to swov1/docs/models/components/protocol.md index 077c3ba..ed550e9 100644 --- a/swov1/docs/models/operations/protocol.md +++ b/swov1/docs/models/components/protocol.md @@ -5,7 +5,7 @@ Protocol used to test availability of the URI. ## Example Usage ```typescript -import { Protocol } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { Protocol } from "@solarwinds/swo-sdk-typescript/models/components"; let value: Protocol = "PING"; ``` diff --git a/swov1/docs/models/components/tag.md b/swov1/docs/models/components/tag.md index 2774bc1..6745076 100644 --- a/swov1/docs/models/components/tag.md +++ b/swov1/docs/models/components/tag.md @@ -13,7 +13,7 @@ let value: Tag = { ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `key` | *string* | :heavy_check_mark: | N/A | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| `key` | *string* | :heavy_check_mark: | N/A | environment | +| `value` | *string* | :heavy_check_mark: | N/A | production | \ No newline at end of file diff --git a/swov1/docs/models/components/testfrom.md b/swov1/docs/models/components/testfrom.md index 09ef192..4adf951 100644 --- a/swov1/docs/models/components/testfrom.md +++ b/swov1/docs/models/components/testfrom.md @@ -15,7 +15,7 @@ let value: TestFrom = { ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ProbeLocationType](../../models/components/probelocationtype.md) | :heavy_check_mark: | Specificity for location of synthetic probes to be used for availability tests. | -| `values` | *string*[] | :heavy_check_mark: | A list of probe location values of the selected type. At least one value matching an existing probe must be provided. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.TestFromType](../../models/components/testfromtype.md) | :heavy_check_mark: | Specificity for location of synthetic probes to be used for availability tests. | REGION | +| `values` | *string*[] | :heavy_check_mark: | A list of probe location values of the selected type. At least one value matching an existing probe must be provided. | [
"NA"
] | \ No newline at end of file diff --git a/swov1/docs/models/components/testfromtype.md b/swov1/docs/models/components/testfromtype.md new file mode 100644 index 0000000..0877823 --- /dev/null +++ b/swov1/docs/models/components/testfromtype.md @@ -0,0 +1,17 @@ +# TestFromType + +Specificity for location of synthetic probes to be used for availability tests. + +## Example Usage + +```typescript +import { TestFromType } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: TestFromType = "REGION"; +``` + +## Values + +```typescript +"REGION" | "COUNTRY" | "CITY" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/type.md b/swov1/docs/models/components/type.md deleted file mode 100644 index 495be28..0000000 --- a/swov1/docs/models/components/type.md +++ /dev/null @@ -1,15 +0,0 @@ -# Type - -## Example Usage - -```typescript -import { Type } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: Type = "ingestion"; -``` - -## Values - -```typescript -"ingestion" -``` \ No newline at end of file diff --git a/swov1/docs/models/components/updateawsintegrationresponse.md b/swov1/docs/models/components/updateawsintegrationresponse.md index 9c27f0c..b27c158 100644 --- a/swov1/docs/models/components/updateawsintegrationresponse.md +++ b/swov1/docs/models/components/updateawsintegrationresponse.md @@ -7,7 +7,7 @@ import { UpdateAwsIntegrationResponse } from "@solarwinds/swo-sdk-typescript/mod let value: UpdateAwsIntegrationResponse = { selectedRegions: [ - "", + "", ], externalId: "", integrationId: "", diff --git a/swov1/docs/models/components/updatedatabaserequest.md b/swov1/docs/models/components/updatedatabaserequest.md index 673e5a2..b3ec77d 100644 --- a/swov1/docs/models/components/updatedatabaserequest.md +++ b/swov1/docs/models/components/updatedatabaserequest.md @@ -13,6 +13,7 @@ let value: UpdateDatabaseRequest = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `name` | *string* | :heavy_minus_sign: | Name for the observed database entity | -| `configOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Optional advanced configuration options for plugins, e.g. disable-sampling | -| `dbConnOptions` | [components.DbConnOptions](../../models/components/dbconnoptions.md) | :heavy_minus_sign: | Options specifying how plugins connect to database server, authentication method change is not supported | -| `tags` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Tags for observed database entity | \ No newline at end of file +| `configOptions` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Optional advanced configuration options for plugins, e.g. disable-sampling set to true | +| `dbConnOptions` | [components.DatabaseConnectionOptionsUpdate](../../models/components/databaseconnectionoptionsupdate.md) | :heavy_minus_sign: | Options specifying how plugins connect to database server, authentication method change is not supported | +| `tags` | [components.CommonKeyValuePair](../../models/components/commonkeyvaluepair.md)[] | :heavy_minus_sign: | Tags for observed database entity | +| `deployedOn` | *string*[] | :heavy_minus_sign: | Host entity/entities where database server is deployed on | \ No newline at end of file diff --git a/swov1/docs/models/components/updatedatabaserequestsslmode.md b/swov1/docs/models/components/updatedatabaserequestsslmode.md deleted file mode 100644 index 1eaa7bb..0000000 --- a/swov1/docs/models/components/updatedatabaserequestsslmode.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateDatabaseRequestSslMode - -SSL mode such as require, verify-ca, verify-full as applicable - -## Example Usage - -```typescript -import { UpdateDatabaseRequestSslMode } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: UpdateDatabaseRequestSslMode = "require"; -``` - -## Values - -```typescript -"require" | "verfify-ca" | "verify-full" -``` \ No newline at end of file diff --git a/swov1/docs/models/components/updatedatabaserequestssloptions.md b/swov1/docs/models/components/updatedatabaserequestssloptions.md deleted file mode 100644 index 2a609af..0000000 --- a/swov1/docs/models/components/updatedatabaserequestssloptions.md +++ /dev/null @@ -1,20 +0,0 @@ -# UpdateDatabaseRequestSslOptions - -SSL connection options, when sslEnabled is true - -## Example Usage - -```typescript -import { UpdateDatabaseRequestSslOptions } from "@solarwinds/swo-sdk-typescript/models/components"; - -let value: UpdateDatabaseRequestSslOptions = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `sslMode` | [components.UpdateDatabaseRequestSslMode](../../models/components/updatedatabaserequestsslmode.md) | :heavy_minus_sign: | SSL mode such as require, verify-ca, verify-full as applicable | -| `sslCAPath` | *string* | :heavy_minus_sign: | CA file path | -| `sslKeyPath` | *string* | :heavy_minus_sign: | SSL key file path | -| `sslCertPath` | *string* | :heavy_minus_sign: | SSL cert file path | \ No newline at end of file diff --git a/swov1/docs/models/components/uri.md b/swov1/docs/models/components/uri.md index 768b12b..9f3aa0c 100644 --- a/swov1/docs/models/components/uri.md +++ b/swov1/docs/models/components/uri.md @@ -6,7 +6,7 @@ import { Uri } from "@solarwinds/swo-sdk-typescript/models/components"; let value: Uri = { - name: "example-uri", + name: "solarwinds.com", ipOrDomain: "solarwinds.com", availabilityCheckSettings: { platformOptions: { @@ -18,19 +18,32 @@ let value: Uri = { testFrom: { type: "REGION", values: [ - "EU", + "NA", ], }, - testIntervalInSeconds: 300, + testIntervalInSeconds: 14400, + outageConfiguration: { + failingTestLocations: "all", + consecutiveForDown: 2, + }, + ping: { + enabled: true, + }, tcp: { enabled: true, port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }, }, tags: [ { - key: "team", - value: "backend", + key: "environment", + value: "production", }, ], }; @@ -38,9 +51,9 @@ let value: Uri = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name of the URI, which must be unique within the organization. The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | -| `ipOrDomain` | *string* | :heavy_check_mark: | IP/domain of the URI. | -| `availabilityCheckSettings` | [components.UriAvailabilityCheckSettingsInput](../../models/components/uriavailabilitychecksettingsinput.md) | :heavy_check_mark: | Use this field to configure availability tests for the URI. | -| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Tags associated with the URI for categorization. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name of the URI, which must be unique within the organization. The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | +| `ipOrDomain` | *string* | :heavy_check_mark: | IP/domain of the URI. | solarwinds.com | +| `availabilityCheckSettings` | [components.UriAvailabilityCheckSettingsInput](../../models/components/uriavailabilitychecksettingsinput.md) | :heavy_check_mark: | Use this field to configure availability tests for the URI. | | +| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Tags associated with the URI for categorization. | | \ No newline at end of file diff --git a/swov1/docs/models/operations/geturiavailabilitychecksettings.md b/swov1/docs/models/components/uriavailabilitychecksettings.md similarity index 82% rename from swov1/docs/models/operations/geturiavailabilitychecksettings.md rename to swov1/docs/models/components/uriavailabilitychecksettings.md index 17e94cf..af60ced 100644 --- a/swov1/docs/models/operations/geturiavailabilitychecksettings.md +++ b/swov1/docs/models/components/uriavailabilitychecksettings.md @@ -1,13 +1,11 @@ -# GetUriAvailabilityCheckSettings - -Availability tests configuration for the URI. +# UriAvailabilityCheckSettings ## Example Usage ```typescript -import { GetUriAvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { UriAvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: GetUriAvailabilityCheckSettings = { +let value: UriAvailabilityCheckSettings = { platformOptions: { probePlatforms: [ "AWS", @@ -23,11 +21,21 @@ let value: GetUriAvailabilityCheckSettings = { testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", - consecutiveForDown: 3, + consecutiveForDown: 2, }, ping: { enabled: true, }, + tcp: { + enabled: true, + port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", + }, protocol: "PING", }; ``` @@ -36,10 +44,10 @@ let value: GetUriAvailabilityCheckSettings = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `platformOptions` | [operations.GetUriPlatformOptions](../../models/operations/geturiplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | +| `platformOptions` | [components.UriAvailabilityCheckSettingsPlatformOptions](../../models/components/uriavailabilitychecksettingsplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | | `testFrom` | [components.TestFrom](../../models/components/testfrom.md) | :heavy_check_mark: | Configure locations of the synthetic availability test probes.
Acceptable values depend on the selected type and actual values of existing probes. | {
"type": "REGION",
"values": [
"NA"
]
} | -| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | | -| `outageConfiguration` | [operations.GetUriOutageConfiguration](../../models/operations/geturioutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | -| `ping` | [operations.Ping](../../models/operations/ping.md) | :heavy_minus_sign: | Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | -| `tcp` | [operations.Tcp](../../models/operations/tcp.md) | :heavy_minus_sign: | Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | -| `protocol` | [operations.Protocol](../../models/operations/protocol.md) | :heavy_check_mark: | Protocol used to test availability of the URI. | | \ No newline at end of file +| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | 14400 | +| `outageConfiguration` | [components.UriAvailabilityCheckSettingsOutageConfiguration](../../models/components/uriavailabilitychecksettingsoutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | +| `ping` | [components.UriAvailabilityCheckSettingsPing](../../models/components/uriavailabilitychecksettingsping.md) | :heavy_minus_sign: | Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | +| `tcp` | [components.UriAvailabilityCheckSettingsTcp](../../models/components/uriavailabilitychecksettingstcp.md) | :heavy_minus_sign: | Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | +| `protocol` | [components.Protocol](../../models/components/protocol.md) | :heavy_check_mark: | Protocol used to test availability of the URI. | PING | \ No newline at end of file diff --git a/swov1/docs/models/components/uriavailabilitychecksettingsfailingtestlocations.md b/swov1/docs/models/components/uriavailabilitychecksettingsfailingtestlocations.md new file mode 100644 index 0000000..5895dd0 --- /dev/null +++ b/swov1/docs/models/components/uriavailabilitychecksettingsfailingtestlocations.md @@ -0,0 +1,17 @@ +# UriAvailabilityCheckSettingsFailingTestLocations + +How many locations must report a failure for an entity to be considered down. + +## Example Usage + +```typescript +import { UriAvailabilityCheckSettingsFailingTestLocations } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: UriAvailabilityCheckSettingsFailingTestLocations = "all"; +``` + +## Values + +```typescript +"all" | "any" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/uriavailabilitychecksettingsinput.md b/swov1/docs/models/components/uriavailabilitychecksettingsinput.md index 0e23adb..30fda84 100644 --- a/swov1/docs/models/components/uriavailabilitychecksettingsinput.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsinput.md @@ -6,17 +6,36 @@ import { UriAvailabilityCheckSettingsInput } from "@solarwinds/swo-sdk-typescript/models/components"; let value: UriAvailabilityCheckSettingsInput = { + platformOptions: { + probePlatforms: [ + "AWS", + ], + testFromAll: true, + }, testFrom: { type: "REGION", values: [ "NA", ], }, - testIntervalInSeconds: 7216.44, + testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", consecutiveForDown: 2, }, + ping: { + enabled: true, + }, + tcp: { + enabled: true, + port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", + }, }; ``` @@ -26,7 +45,7 @@ let value: UriAvailabilityCheckSettingsInput = { | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `platformOptions` | [components.UriAvailabilityCheckSettingsInputPlatformOptions](../../models/components/uriavailabilitychecksettingsinputplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | | `testFrom` | [components.TestFrom](../../models/components/testfrom.md) | :heavy_check_mark: | Configure locations of the synthetic availability test probes.
Acceptable values depend on the selected type and actual values of existing probes. | {
"type": "REGION",
"values": [
"NA"
]
} | -| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | | +| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | 14400 | | `outageConfiguration` | [components.UriAvailabilityCheckSettingsInputOutageConfiguration](../../models/components/uriavailabilitychecksettingsinputoutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | -| `ping` | [components.Ping](../../models/components/ping.md) | :heavy_minus_sign: | Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | -| `tcp` | [components.Tcp](../../models/components/tcp.md) | :heavy_minus_sign: | Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | \ No newline at end of file +| `ping` | [components.UriAvailabilityCheckSettingsInputPing](../../models/components/uriavailabilitychecksettingsinputping.md) | :heavy_minus_sign: | Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | +| `tcp` | [components.UriAvailabilityCheckSettingsInputTcp](../../models/components/uriavailabilitychecksettingsinputtcp.md) | :heavy_minus_sign: | Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | | \ No newline at end of file diff --git a/swov1/docs/models/components/ping.md b/swov1/docs/models/components/uriavailabilitychecksettingsinputping.md similarity index 72% rename from swov1/docs/models/components/ping.md rename to swov1/docs/models/components/uriavailabilitychecksettingsinputping.md index dee993d..9ef9390 100644 --- a/swov1/docs/models/components/ping.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsinputping.md @@ -1,4 +1,4 @@ -# Ping +# UriAvailabilityCheckSettingsInputPing Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. One test type (ping or TCP) must be enabled for a URI. @@ -6,15 +6,15 @@ ## Example Usage ```typescript -import { Ping } from "@solarwinds/swo-sdk-typescript/models/components"; +import { UriAvailabilityCheckSettingsInputPing } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Ping = { - enabled: false, +let value: UriAvailabilityCheckSettingsInputPing = { + enabled: true, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | true | \ No newline at end of file diff --git a/swov1/docs/models/components/uriavailabilitychecksettingsinputplatformoptions.md b/swov1/docs/models/components/uriavailabilitychecksettingsinputplatformoptions.md index deaee1d..29f641c 100644 --- a/swov1/docs/models/components/uriavailabilitychecksettingsinputplatformoptions.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsinputplatformoptions.md @@ -9,14 +9,15 @@ import { UriAvailabilityCheckSettingsInputPlatformOptions } from "@solarwinds/sw let value: UriAvailabilityCheckSettingsInputPlatformOptions = { probePlatforms: [ - "GOOGLE_CLOUD", + "AWS", ], + testFromAll: true, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | -| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | [
"AWS"
] | +| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/operations/tcp.md b/swov1/docs/models/components/uriavailabilitychecksettingsinputtcp.md similarity index 72% rename from swov1/docs/models/operations/tcp.md rename to swov1/docs/models/components/uriavailabilitychecksettingsinputtcp.md index 4ae3ac9..501ea1b 100644 --- a/swov1/docs/models/operations/tcp.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsinputtcp.md @@ -1,4 +1,4 @@ -# Tcp +# UriAvailabilityCheckSettingsInputTcp Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. One test type (ping or TCP) must be enabled for a URI. @@ -6,19 +6,25 @@ ## Example Usage ```typescript -import { Tcp } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { UriAvailabilityCheckSettingsInputTcp } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Tcp = { - enabled: false, - port: 61671, +let value: UriAvailabilityCheckSettingsInputTcp = { + enabled: true, + port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | -| `port` | *number* | :heavy_check_mark: | Port number to be used in TCP tests. | -| `stringToSend` | *string* | :heavy_minus_sign: | Use this field to specify a string to send in the body of a TCP request. | -| `stringToExpect` | *string* | :heavy_minus_sign: | Use this field to specify a string to search for in the body of a TCP response. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | true | +| `port` | *number* | :heavy_check_mark: | Port number to be used in TCP tests. | 443 | +| `stringToSend` | *string* | :heavy_minus_sign: | Use this field to specify a string to send in the body of a TCP request. | GET / HTTP/1.1
Host: solarwinds.com
Connection: close

| +| `stringToExpect` | *string* | :heavy_minus_sign: | Use this field to specify a string to search for in the body of a TCP response. | HTTP/1.1 200 OK | \ No newline at end of file diff --git a/swov1/docs/models/components/uriavailabilitychecksettingsoutageconfiguration.md b/swov1/docs/models/components/uriavailabilitychecksettingsoutageconfiguration.md new file mode 100644 index 0000000..eb181a9 --- /dev/null +++ b/swov1/docs/models/components/uriavailabilitychecksettingsoutageconfiguration.md @@ -0,0 +1,22 @@ +# UriAvailabilityCheckSettingsOutageConfiguration + + Default conditions when the entity is considered down. + If omitted or set to null, organization configuration will be used for this entity. + +## Example Usage + +```typescript +import { UriAvailabilityCheckSettingsOutageConfiguration } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: UriAvailabilityCheckSettingsOutageConfiguration = { + failingTestLocations: "all", + consecutiveForDown: 2, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `failingTestLocations` | [components.UriAvailabilityCheckSettingsFailingTestLocations](../../models/components/uriavailabilitychecksettingsfailingtestlocations.md) | :heavy_check_mark: | How many locations must report a failure for an entity to be considered down. | all | +| `consecutiveForDown` | *number* | :heavy_check_mark: | Number of consecutive failing tests for an entity to be considered down. | 2 | \ No newline at end of file diff --git a/swov1/docs/models/operations/ping.md b/swov1/docs/models/components/uriavailabilitychecksettingsping.md similarity index 73% rename from swov1/docs/models/operations/ping.md rename to swov1/docs/models/components/uriavailabilitychecksettingsping.md index 9f901a9..8073f19 100644 --- a/swov1/docs/models/operations/ping.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsping.md @@ -1,4 +1,4 @@ -# Ping +# UriAvailabilityCheckSettingsPing Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. One test type (ping or TCP) must be enabled for a URI. @@ -6,15 +6,15 @@ ## Example Usage ```typescript -import { Ping } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { UriAvailabilityCheckSettingsPing } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Ping = { - enabled: false, +let value: UriAvailabilityCheckSettingsPing = { + enabled: true, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | true | \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsiteplatformoptions.md b/swov1/docs/models/components/uriavailabilitychecksettingsplatformoptions.md similarity index 76% rename from swov1/docs/models/operations/getwebsiteplatformoptions.md rename to swov1/docs/models/components/uriavailabilitychecksettingsplatformoptions.md index 1b54492..5358d1d 100644 --- a/swov1/docs/models/operations/getwebsiteplatformoptions.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingsplatformoptions.md @@ -1,22 +1,23 @@ -# GetWebsitePlatformOptions +# UriAvailabilityCheckSettingsPlatformOptions Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. ## Example Usage ```typescript -import { GetWebsitePlatformOptions } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { UriAvailabilityCheckSettingsPlatformOptions } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: GetWebsitePlatformOptions = { +let value: UriAvailabilityCheckSettingsPlatformOptions = { probePlatforms: [ - "GOOGLE_CLOUD", + "AWS", ], + testFromAll: true, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | -| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | [
"AWS"
] | +| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/components/tcp.md b/swov1/docs/models/components/uriavailabilitychecksettingstcp.md similarity index 72% rename from swov1/docs/models/components/tcp.md rename to swov1/docs/models/components/uriavailabilitychecksettingstcp.md index ba86723..ec4ffb7 100644 --- a/swov1/docs/models/components/tcp.md +++ b/swov1/docs/models/components/uriavailabilitychecksettingstcp.md @@ -1,4 +1,4 @@ -# Tcp +# UriAvailabilityCheckSettingsTcp Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. One test type (ping or TCP) must be enabled for a URI. @@ -6,19 +6,25 @@ ## Example Usage ```typescript -import { Tcp } from "@solarwinds/swo-sdk-typescript/models/components"; +import { UriAvailabilityCheckSettingsTcp } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Tcp = { - enabled: false, - port: 61671, +let value: UriAvailabilityCheckSettingsTcp = { + enabled: true, + port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | -| `port` | *number* | :heavy_check_mark: | Port number to be used in TCP tests. | -| `stringToSend` | *string* | :heavy_minus_sign: | Use this field to specify a string to send in the body of a TCP request. | -| `stringToExpect` | *string* | :heavy_minus_sign: | Use this field to specify a string to search for in the body of a TCP response. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_check_mark: | Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled.
One test type (ping or TCP) must be enabled for a URI. | true | +| `port` | *number* | :heavy_check_mark: | Port number to be used in TCP tests. | 443 | +| `stringToSend` | *string* | :heavy_minus_sign: | Use this field to specify a string to send in the body of a TCP request. | GET / HTTP/1.1
Host: solarwinds.com
Connection: close

| +| `stringToExpect` | *string* | :heavy_minus_sign: | Use this field to specify a string to search for in the body of a TCP response. | HTTP/1.1 200 OK | \ No newline at end of file diff --git a/swov1/docs/models/components/website.md b/swov1/docs/models/components/website.md index 8a4aa1a..d0c9399 100644 --- a/swov1/docs/models/components/website.md +++ b/swov1/docs/models/components/website.md @@ -8,46 +8,11 @@ import { Website } from "@solarwinds/swo-sdk-typescript/models/components"; let value: Website = { name: "solarwinds.com", url: "https://www.solarwinds.com", - availabilityCheckSettings: { - platformOptions: { - probePlatforms: [ - "AWS", - ], - testFromAll: true, - }, - testFrom: { - type: "REGION", - values: [ - "NA", - ], - }, - testIntervalInSeconds: 14400, - checkForString: { - operator: "CONTAINS", - value: "string", - }, - protocols: [ - "HTTP", - "HTTPS", - ], - ssl: { - enabled: true, - daysPriorToExpiration: 7, - ignoreIntermediateCertificates: true, - }, - customHeaders: [ - { - name: "string", - value: "string", - }, - ], - allowInsecureRenegotiation: true, - postData: "{\"example\": \"value\"}", - }, + availabilityCheckSettings: null, tags: [ { - key: "string", - value: "string", + key: "environment", + value: "production", }, ], rum: { @@ -59,10 +24,10 @@ let value: Website = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name of the website, which must be unique within the organization. The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | -| `url` | *string* | :heavy_check_mark: | URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). | -| `availabilityCheckSettings` | [components.AvailabilityCheckSettings](../../models/components/availabilitychecksettings.md) | :heavy_minus_sign: | Use this field to configure availability tests for the website. | -| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | -| `rum` | [components.Rum](../../models/components/rum.md) | :heavy_minus_sign: | Use this field to configure real user monitoring (RUM) for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name of the website, which must be unique within the organization. The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | +| `url` | *string* | :heavy_check_mark: | URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). | https://www.solarwinds.com | +| `availabilityCheckSettings` | [components.WebsiteAvailabilityCheckSettings](../../models/components/websiteavailabilitychecksettings.md) | :heavy_minus_sign: | Use this field to configure availability tests for the website. | | +| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | | +| `rum` | [components.WebsiteRum](../../models/components/websiterum.md) | :heavy_minus_sign: | Use this field to configure real user monitoring (RUM) for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | {
"apdexTimeInSeconds": 4,
"spa": true
} | \ No newline at end of file diff --git a/swov1/docs/models/components/availabilitychecksettings.md b/swov1/docs/models/components/websiteavailabilitychecksettings.md similarity index 95% rename from swov1/docs/models/components/availabilitychecksettings.md rename to swov1/docs/models/components/websiteavailabilitychecksettings.md index c1d7f03..57bbd01 100644 --- a/swov1/docs/models/components/availabilitychecksettings.md +++ b/swov1/docs/models/components/websiteavailabilitychecksettings.md @@ -1,27 +1,51 @@ -# AvailabilityCheckSettings +# WebsiteAvailabilityCheckSettings Use this field to configure availability tests for the website. ## Example Usage ```typescript -import { AvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/components"; +import { WebsiteAvailabilityCheckSettings } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: AvailabilityCheckSettings = { +let value: WebsiteAvailabilityCheckSettings = { + platformOptions: { + probePlatforms: [ + "AWS", + ], + testFromAll: true, + }, testFrom: { type: "REGION", values: [ "NA", ], }, - testIntervalInSeconds: 683.32, + testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", consecutiveForDown: 2, }, + checkForString: { + operator: "CONTAINS", + value: "string", + }, protocols: [ + "HTTP", "HTTPS", ], + ssl: { + enabled: true, + daysPriorToExpiration: 7, + ignoreIntermediateCertificates: true, + }, + customHeaders: [ + { + name: "string", + value: "string", + }, + ], + allowInsecureRenegotiation: true, + postData: "{\"example\": \"value\"}", }; ``` @@ -31,11 +55,11 @@ let value: AvailabilityCheckSettings = { | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `platformOptions` | [components.WebsitePlatformOptions](../../models/components/websiteplatformoptions.md) | :heavy_minus_sign: | Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. | | | `testFrom` | [components.TestFrom](../../models/components/testfrom.md) | :heavy_check_mark: | Configure locations of the synthetic availability test probes.
Acceptable values depend on the selected type and actual values of existing probes. | {
"type": "REGION",
"values": [
"NA"
]
} | -| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | | +| `testIntervalInSeconds` | *number* | :heavy_check_mark: | Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. | 14400 | | `outageConfiguration` | [components.WebsiteOutageConfiguration](../../models/components/websiteoutageconfiguration.md) | :heavy_minus_sign: | Default conditions when the entity is considered down.
If omitted or set to null, organization configuration will be used for this entity. | | -| `checkForString` | [components.CheckForString](../../models/components/checkforstring.md) | :heavy_minus_sign: | Use this field to configure whether availability tests should check for presence or absence of a particular string on a page.
If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail.
Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail.
If omitted or set to null, the string checking functionality will be disabled. | | -| `protocols` | [components.WebsiteProtocol](../../models/components/websiteprotocol.md)[] | :heavy_check_mark: | Configure which protocols need availability tests to be performed. At least one protocol must be provided. | | -| `ssl` | [components.Ssl](../../models/components/ssl.md) | :heavy_minus_sign: | Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only.
If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. | | +| `checkForString` | [components.WebsiteCheckForString](../../models/components/websitecheckforstring.md) | :heavy_minus_sign: | Use this field to configure whether availability tests should check for presence or absence of a particular string on a page.
If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail.
Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail.
If omitted or set to null, the string checking functionality will be disabled. | | +| `protocols` | [components.WebsiteProtocol](../../models/components/websiteprotocol.md)[] | :heavy_check_mark: | Configure which protocols need availability tests to be performed. At least one protocol must be provided. | [
"HTTP",
"HTTPS"
] | +| `ssl` | [components.WebsiteSsl](../../models/components/websitessl.md) | :heavy_minus_sign: | Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only.
If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. | | | `customHeaders` | [components.CustomHeaders](../../models/components/customheaders.md)[] | :heavy_minus_sign: | Configure custom request headers to be sent with each availability test. It is possible to provide multiple headers with the same name.
If omitted, set to null or set to an empty array, no custom headers will be sent. | | -| `allowInsecureRenegotiation` | *boolean* | :heavy_minus_sign: | Allow insecure SSL renegotiation which introduces a security risk in the communication process.
Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel.
Available only with HTTPS check.
If omitted or set to null, insecure SSL renegotiation won't be allowed. | | -| `postData` | *string* | :heavy_minus_sign: | Configure data that will be sent as POST request body by the synthetic probe.
If omitted or set to null/empty string, the probe will send the usual GET requests. | | \ No newline at end of file +| `allowInsecureRenegotiation` | *boolean* | :heavy_minus_sign: | Allow insecure SSL renegotiation which introduces a security risk in the communication process.
Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel.
Available only with HTTPS check.
If omitted or set to null, insecure SSL renegotiation won't be allowed. | true | +| `postData` | *string* | :heavy_minus_sign: | Configure data that will be sent as POST request body by the synthetic probe.
If omitted or set to null/empty string, the probe will send the usual GET requests. | {"example": "value"} | \ No newline at end of file diff --git a/swov1/docs/models/operations/checkforstring.md b/swov1/docs/models/components/websitecheckforstring.md similarity index 69% rename from swov1/docs/models/operations/checkforstring.md rename to swov1/docs/models/components/websitecheckforstring.md index 423fd76..ca5c493 100644 --- a/swov1/docs/models/operations/checkforstring.md +++ b/swov1/docs/models/components/websitecheckforstring.md @@ -1,4 +1,4 @@ -# CheckForString +# WebsiteCheckForString Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. @@ -8,17 +8,17 @@ ## Example Usage ```typescript -import { CheckForString } from "@solarwinds/swo-sdk-typescript/models/operations"; +import { WebsiteCheckForString } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: CheckForString = { +let value: WebsiteCheckForString = { operator: "CONTAINS", - value: "", + value: "string", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `operator` | [components.CheckForStringOperator](../../models/components/checkforstringoperator.md) | :heavy_check_mark: | Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). | -| `value` | *string* | :heavy_check_mark: | The string that which will be searched in the page source code. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `operator` | [components.WebsiteOperator](../../models/components/websiteoperator.md) | :heavy_check_mark: | Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). | CONTAINS | +| `value` | *string* | :heavy_check_mark: | The string that which will be searched in the page source code. | string | \ No newline at end of file diff --git a/swov1/docs/models/components/websiteoperator.md b/swov1/docs/models/components/websiteoperator.md new file mode 100644 index 0000000..53903eb --- /dev/null +++ b/swov1/docs/models/components/websiteoperator.md @@ -0,0 +1,17 @@ +# WebsiteOperator + +Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + +## Example Usage + +```typescript +import { WebsiteOperator } from "@solarwinds/swo-sdk-typescript/models/components"; + +let value: WebsiteOperator = "CONTAINS"; +``` + +## Values + +```typescript +"CONTAINS" | "DOES_NOT_CONTAIN" +``` \ No newline at end of file diff --git a/swov1/docs/models/components/websiteplatformoptions.md b/swov1/docs/models/components/websiteplatformoptions.md index 1f32f14..d93d721 100644 --- a/swov1/docs/models/components/websiteplatformoptions.md +++ b/swov1/docs/models/components/websiteplatformoptions.md @@ -9,14 +9,15 @@ import { WebsitePlatformOptions } from "@solarwinds/swo-sdk-typescript/models/co let value: WebsitePlatformOptions = { probePlatforms: [ - "AZURE", + "AWS", ], + testFromAll: true, }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | -| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `probePlatforms` | [components.ProbePlatform](../../models/components/probeplatform.md)[] | :heavy_check_mark: | Cloud platforms hosting synthetic probes. | [
"AWS"
] | +| `testFromAll` | *boolean* | :heavy_minus_sign: | Use this field to configure whether availability tests should be performed from all selected
platforms or one randomly selected platform. It has no effect if you provided only one platform
in the `probePlatforms` field.

If set to true, a separate test is made from each of the selected platforms.

If set to false, only one of the selected platforms is chosen every time.

If omitted, the previous setting will stay in effect. If there is no previous setting, the value
will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/components/rum.md b/swov1/docs/models/components/websiterum.md similarity index 80% rename from swov1/docs/models/components/rum.md rename to swov1/docs/models/components/websiterum.md index 50d4dca..81dcadc 100644 --- a/swov1/docs/models/components/rum.md +++ b/swov1/docs/models/components/websiterum.md @@ -1,4 +1,4 @@ -# Rum +# WebsiteRum Use this field to configure real user monitoring (RUM) for the website. You are required to configure at least availability monitoring or real user monitoring to be able to create website. @@ -6,10 +6,11 @@ ## Example Usage ```typescript -import { Rum } from "@solarwinds/swo-sdk-typescript/models/components"; +import { WebsiteRum } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Rum = { - spa: false, +let value: WebsiteRum = { + apdexTimeInSeconds: 4, + spa: true, }; ``` diff --git a/swov1/docs/models/components/ssl.md b/swov1/docs/models/components/websitessl.md similarity index 78% rename from swov1/docs/models/components/ssl.md rename to swov1/docs/models/components/websitessl.md index a72f6a8..e4d36df 100644 --- a/swov1/docs/models/components/ssl.md +++ b/swov1/docs/models/components/websitessl.md @@ -1,4 +1,4 @@ -# Ssl +# WebsiteSsl Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. @@ -6,15 +6,19 @@ ## Example Usage ```typescript -import { Ssl } from "@solarwinds/swo-sdk-typescript/models/components"; +import { WebsiteSsl } from "@solarwinds/swo-sdk-typescript/models/components"; -let value: Ssl = {}; +let value: WebsiteSsl = { + enabled: true, + daysPriorToExpiration: 7, + ignoreIntermediateCertificates: true, +}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `enabled` | *boolean* | :heavy_minus_sign: | Whether SSL monitoring is enabled for the website.
If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | -| `daysPriorToExpiration` | *number* | :heavy_minus_sign: | Number of days before the expiration date an SSL certificate will be considered 'expiring.' | -| `ignoreIntermediateCertificates` | *boolean* | :heavy_minus_sign: | Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate).
This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain.
This option does not affect any other certificate validity checks besides expiration.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `enabled` | *boolean* | :heavy_minus_sign: | Whether SSL monitoring is enabled for the website.
If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | true | +| `daysPriorToExpiration` | *number* | :heavy_minus_sign: | Number of days before the expiration date an SSL certificate will be considered 'expiring.' | 7 | +| `ignoreIntermediateCertificates` | *boolean* | :heavy_minus_sign: | Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate).
This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain.
This option does not affect any other certificate validity checks besides expiration.
If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. | true | \ No newline at end of file diff --git a/swov1/docs/models/errors/activateawsintegrationbadrequesterror.md b/swov1/docs/models/errors/activateawsintegrationbadrequesterror.md index 185edb2..a5d34fe 100644 --- a/swov1/docs/models/errors/activateawsintegrationbadrequesterror.md +++ b/swov1/docs/models/errors/activateawsintegrationbadrequesterror.md @@ -12,8 +12,7 @@ import { ActivateAwsIntegrationBadRequestError } from "@solarwinds/swo-sdk-types ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/activateawsintegrationinternalservererror.md b/swov1/docs/models/errors/activateawsintegrationinternalservererror.md index e43eb65..eaf5db2 100644 --- a/swov1/docs/models/errors/activateawsintegrationinternalservererror.md +++ b/swov1/docs/models/errors/activateawsintegrationinternalservererror.md @@ -12,8 +12,6 @@ import { ActivateAwsIntegrationInternalServerError } from "@solarwinds/swo-sdk-t ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 500 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | \ No newline at end of file diff --git a/swov1/docs/models/errors/activateawsintegrationnotfounderror.md b/swov1/docs/models/errors/activateawsintegrationnotfounderror.md index a6adf9b..42c8f40 100644 --- a/swov1/docs/models/errors/activateawsintegrationnotfounderror.md +++ b/swov1/docs/models/errors/activateawsintegrationnotfounderror.md @@ -12,8 +12,6 @@ import { ActivateAwsIntegrationNotFoundError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/activateawsintegrationunauthorizederror.md b/swov1/docs/models/errors/activateawsintegrationunauthorizederror.md index a1525ba..8a47d83 100644 --- a/swov1/docs/models/errors/activateawsintegrationunauthorizederror.md +++ b/swov1/docs/models/errors/activateawsintegrationunauthorizederror.md @@ -12,8 +12,6 @@ import { ActivateAwsIntegrationUnauthorizedError } from "@solarwinds/swo-sdk-typ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/createcompositemetricbadrequesterror.md b/swov1/docs/models/errors/createcompositemetricbadrequesterror.md index 540bf5e..e7df42c 100644 --- a/swov1/docs/models/errors/createcompositemetricbadrequesterror.md +++ b/swov1/docs/models/errors/createcompositemetricbadrequesterror.md @@ -12,8 +12,7 @@ import { CreateCompositeMetricBadRequestError } from "@solarwinds/swo-sdk-typesc ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/createcompositemetricforbiddenerror.md b/swov1/docs/models/errors/createcompositemetricforbiddenerror.md index 80e72be..375d688 100644 --- a/swov1/docs/models/errors/createcompositemetricforbiddenerror.md +++ b/swov1/docs/models/errors/createcompositemetricforbiddenerror.md @@ -12,8 +12,6 @@ import { CreateCompositeMetricForbiddenError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 403 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | \ No newline at end of file diff --git a/swov1/docs/models/errors/createorgstructurebadrequesterror.md b/swov1/docs/models/errors/createorgstructurebadrequesterror.md index ff0727d..5ddd3c5 100644 --- a/swov1/docs/models/errors/createorgstructurebadrequesterror.md +++ b/swov1/docs/models/errors/createorgstructurebadrequesterror.md @@ -12,8 +12,7 @@ import { CreateOrgStructureBadRequestError } from "@solarwinds/swo-sdk-typescrip ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/createorgstructureinternalservererror.md b/swov1/docs/models/errors/createorgstructureinternalservererror.md index 576857a..f170929 100644 --- a/swov1/docs/models/errors/createorgstructureinternalservererror.md +++ b/swov1/docs/models/errors/createorgstructureinternalservererror.md @@ -12,8 +12,6 @@ import { CreateOrgStructureInternalServerError } from "@solarwinds/swo-sdk-types ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 500 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | \ No newline at end of file diff --git a/swov1/docs/models/errors/createorgstructurenotfounderror.md b/swov1/docs/models/errors/createorgstructurenotfounderror.md index 30c1666..06a3e94 100644 --- a/swov1/docs/models/errors/createorgstructurenotfounderror.md +++ b/swov1/docs/models/errors/createorgstructurenotfounderror.md @@ -12,8 +12,6 @@ import { CreateOrgStructureNotFoundError } from "@solarwinds/swo-sdk-typescript/ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/createorgstructureunauthorizederror.md b/swov1/docs/models/errors/createorgstructureunauthorizederror.md index 524bee9..c4a6327 100644 --- a/swov1/docs/models/errors/createorgstructureunauthorizederror.md +++ b/swov1/docs/models/errors/createorgstructureunauthorizederror.md @@ -12,8 +12,6 @@ import { CreateOrgStructureUnauthorizedError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/createuribadrequesterror.md b/swov1/docs/models/errors/createuribadrequesterror.md index 5cebfb9..9563b19 100644 --- a/swov1/docs/models/errors/createuribadrequesterror.md +++ b/swov1/docs/models/errors/createuribadrequesterror.md @@ -12,8 +12,7 @@ import { CreateUriBadRequestError } from "@solarwinds/swo-sdk-typescript/models/ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/createwebsitebadrequesterror.md b/swov1/docs/models/errors/createwebsitebadrequesterror.md index 5764215..d3beb12 100644 --- a/swov1/docs/models/errors/createwebsitebadrequesterror.md +++ b/swov1/docs/models/errors/createwebsitebadrequesterror.md @@ -12,8 +12,7 @@ import { CreateWebsiteBadRequestError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/deletecompositemetricforbiddenerror.md b/swov1/docs/models/errors/deletecompositemetricforbiddenerror.md index 2f407eb..1f001cc 100644 --- a/swov1/docs/models/errors/deletecompositemetricforbiddenerror.md +++ b/swov1/docs/models/errors/deletecompositemetricforbiddenerror.md @@ -12,8 +12,6 @@ import { DeleteCompositeMetricForbiddenError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 403 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | \ No newline at end of file diff --git a/swov1/docs/models/errors/deletecompositemetricnotfounderror.md b/swov1/docs/models/errors/deletecompositemetricnotfounderror.md index ed8a760..9b0a6a3 100644 --- a/swov1/docs/models/errors/deletecompositemetricnotfounderror.md +++ b/swov1/docs/models/errors/deletecompositemetricnotfounderror.md @@ -12,8 +12,6 @@ import { DeleteCompositeMetricNotFoundError } from "@solarwinds/swo-sdk-typescri ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/deletedatabasebadrequesterror.md b/swov1/docs/models/errors/deletedatabasebadrequesterror.md index c2aa1bc..c514d1f 100644 --- a/swov1/docs/models/errors/deletedatabasebadrequesterror.md +++ b/swov1/docs/models/errors/deletedatabasebadrequesterror.md @@ -12,8 +12,7 @@ import { DeleteDatabaseBadRequestError } from "@solarwinds/swo-sdk-typescript/mo ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/deletedatabasenotfounderror.md b/swov1/docs/models/errors/deletedatabasenotfounderror.md index 65ea609..56d8556 100644 --- a/swov1/docs/models/errors/deletedatabasenotfounderror.md +++ b/swov1/docs/models/errors/deletedatabasenotfounderror.md @@ -12,8 +12,6 @@ import { DeleteDatabaseNotFoundError } from "@solarwinds/swo-sdk-typescript/mode ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/deleteurinotfounderror.md b/swov1/docs/models/errors/deleteurinotfounderror.md index ec0f060..212cc67 100644 --- a/swov1/docs/models/errors/deleteurinotfounderror.md +++ b/swov1/docs/models/errors/deleteurinotfounderror.md @@ -12,8 +12,6 @@ import { DeleteUriNotFoundError } from "@solarwinds/swo-sdk-typescript/models/er ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/deletewebsitenotfounderror.md b/swov1/docs/models/errors/deletewebsitenotfounderror.md index c18f925..f9a1948 100644 --- a/swov1/docs/models/errors/deletewebsitenotfounderror.md +++ b/swov1/docs/models/errors/deletewebsitenotfounderror.md @@ -12,8 +12,6 @@ import { DeleteWebsiteNotFoundError } from "@solarwinds/swo-sdk-typescript/model ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getentitybyidbadrequesterror.md b/swov1/docs/models/errors/getentitybyidbadrequesterror.md index bef73fa..4d6c2d1 100644 --- a/swov1/docs/models/errors/getentitybyidbadrequesterror.md +++ b/swov1/docs/models/errors/getentitybyidbadrequesterror.md @@ -12,8 +12,7 @@ import { GetEntityByIdBadRequestError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/getentitybyidnotfounderror.md b/swov1/docs/models/errors/getentitybyidnotfounderror.md index 1ad647c..0b5e45d 100644 --- a/swov1/docs/models/errors/getentitybyidnotfounderror.md +++ b/swov1/docs/models/errors/getentitybyidnotfounderror.md @@ -12,8 +12,6 @@ import { GetEntityByIdNotFoundError } from "@solarwinds/swo-sdk-typescript/model ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getentitybyidunauthorizederror.md b/swov1/docs/models/errors/getentitybyidunauthorizederror.md index 10ff95d..5bbce76 100644 --- a/swov1/docs/models/errors/getentitybyidunauthorizederror.md +++ b/swov1/docs/models/errors/getentitybyidunauthorizederror.md @@ -12,8 +12,6 @@ import { GetEntityByIdUnauthorizedError } from "@solarwinds/swo-sdk-typescript/m ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/getmetricbynamenotfounderror.md b/swov1/docs/models/errors/getmetricbynamenotfounderror.md index 9178cf2..f050df8 100644 --- a/swov1/docs/models/errors/getmetricbynamenotfounderror.md +++ b/swov1/docs/models/errors/getmetricbynamenotfounderror.md @@ -12,8 +12,6 @@ import { GetMetricByNameNotFoundError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpluginconfigbadrequesterror.md b/swov1/docs/models/errors/getpluginconfigbadrequesterror.md index 2855fb4..2182cef 100644 --- a/swov1/docs/models/errors/getpluginconfigbadrequesterror.md +++ b/swov1/docs/models/errors/getpluginconfigbadrequesterror.md @@ -12,8 +12,7 @@ import { GetPluginConfigBadRequestError } from "@solarwinds/swo-sdk-typescript/m ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpluginconfignotfounderror.md b/swov1/docs/models/errors/getpluginconfignotfounderror.md index e8570f0..fef3026 100644 --- a/swov1/docs/models/errors/getpluginconfignotfounderror.md +++ b/swov1/docs/models/errors/getpluginconfignotfounderror.md @@ -12,8 +12,6 @@ import { GetPluginConfigNotFoundError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpluginsbadrequesterror.md b/swov1/docs/models/errors/getpluginsbadrequesterror.md index 46cedab..219d84d 100644 --- a/swov1/docs/models/errors/getpluginsbadrequesterror.md +++ b/swov1/docs/models/errors/getpluginsbadrequesterror.md @@ -12,8 +12,7 @@ import { GetPluginsBadRequestError } from "@solarwinds/swo-sdk-typescript/models ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpluginsnotfounderror.md b/swov1/docs/models/errors/getpluginsnotfounderror.md index 7126519..f5b40f2 100644 --- a/swov1/docs/models/errors/getpluginsnotfounderror.md +++ b/swov1/docs/models/errors/getpluginsnotfounderror.md @@ -12,8 +12,6 @@ import { GetPluginsNotFoundError } from "@solarwinds/swo-sdk-typescript/models/e ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpublickeybadrequesterror.md b/swov1/docs/models/errors/getpublickeybadrequesterror.md index 270bf81..8a1b38f 100644 --- a/swov1/docs/models/errors/getpublickeybadrequesterror.md +++ b/swov1/docs/models/errors/getpublickeybadrequesterror.md @@ -12,8 +12,7 @@ import { GetPublicKeyBadRequestError } from "@solarwinds/swo-sdk-typescript/mode ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/getpublickeynotfounderror.md b/swov1/docs/models/errors/getpublickeynotfounderror.md index 6c093c2..b73acd7 100644 --- a/swov1/docs/models/errors/getpublickeynotfounderror.md +++ b/swov1/docs/models/errors/getpublickeynotfounderror.md @@ -12,8 +12,6 @@ import { GetPublicKeyNotFoundError } from "@solarwinds/swo-sdk-typescript/models ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/geturinotfounderror.md b/swov1/docs/models/errors/geturinotfounderror.md index 315054a..0034e8d 100644 --- a/swov1/docs/models/errors/geturinotfounderror.md +++ b/swov1/docs/models/errors/geturinotfounderror.md @@ -12,8 +12,6 @@ import { GetUriNotFoundError } from "@solarwinds/swo-sdk-typescript/models/error ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/getwebsitenotfounderror.md b/swov1/docs/models/errors/getwebsitenotfounderror.md index dc27b76..8454906 100644 --- a/swov1/docs/models/errors/getwebsitenotfounderror.md +++ b/swov1/docs/models/errors/getwebsitenotfounderror.md @@ -12,8 +12,6 @@ import { GetWebsiteNotFoundError } from "@solarwinds/swo-sdk-typescript/models/e ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/listentitiesbadrequesterror.md b/swov1/docs/models/errors/listentitiesbadrequesterror.md index 98b7429..c730873 100644 --- a/swov1/docs/models/errors/listentitiesbadrequesterror.md +++ b/swov1/docs/models/errors/listentitiesbadrequesterror.md @@ -12,8 +12,7 @@ import { ListEntitiesBadRequestError } from "@solarwinds/swo-sdk-typescript/mode ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/listentitiesunauthorizederror.md b/swov1/docs/models/errors/listentitiesunauthorizederror.md index ca00777..49cf2c9 100644 --- a/swov1/docs/models/errors/listentitiesunauthorizederror.md +++ b/swov1/docs/models/errors/listentitiesunauthorizederror.md @@ -12,8 +12,6 @@ import { ListEntitiesUnauthorizedError } from "@solarwinds/swo-sdk-typescript/mo ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/listmetricattributesnotfounderror.md b/swov1/docs/models/errors/listmetricattributesnotfounderror.md index f82f12c..0e0c187 100644 --- a/swov1/docs/models/errors/listmetricattributesnotfounderror.md +++ b/swov1/docs/models/errors/listmetricattributesnotfounderror.md @@ -12,8 +12,6 @@ import { ListMetricAttributesNotFoundError } from "@solarwinds/swo-sdk-typescrip ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/listmetricattributevaluesnotfounderror.md b/swov1/docs/models/errors/listmetricattributevaluesnotfounderror.md index c2874d6..2580af1 100644 --- a/swov1/docs/models/errors/listmetricattributevaluesnotfounderror.md +++ b/swov1/docs/models/errors/listmetricattributevaluesnotfounderror.md @@ -12,8 +12,6 @@ import { ListMetricAttributeValuesNotFoundError } from "@solarwinds/swo-sdk-type ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/listmetricmeasurementsnotfounderror.md b/swov1/docs/models/errors/listmetricmeasurementsnotfounderror.md index bf5550d..8a4f5f0 100644 --- a/swov1/docs/models/errors/listmetricmeasurementsnotfounderror.md +++ b/swov1/docs/models/errors/listmetricmeasurementsnotfounderror.md @@ -12,8 +12,6 @@ import { ListMetricMeasurementsNotFoundError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/listmetricsforentitytypenotfounderror.md b/swov1/docs/models/errors/listmetricsforentitytypenotfounderror.md index 0cd0898..7a08793 100644 --- a/swov1/docs/models/errors/listmetricsforentitytypenotfounderror.md +++ b/swov1/docs/models/errors/listmetricsforentitytypenotfounderror.md @@ -12,8 +12,6 @@ import { ListMetricsForEntityTypeNotFoundError } from "@solarwinds/swo-sdk-types ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/listmultimetricmeasurementsbadrequesterror.md b/swov1/docs/models/errors/listmultimetricmeasurementsbadrequesterror.md index fe7c783..d5d25fc 100644 --- a/swov1/docs/models/errors/listmultimetricmeasurementsbadrequesterror.md +++ b/swov1/docs/models/errors/listmultimetricmeasurementsbadrequesterror.md @@ -12,8 +12,7 @@ import { ListMultiMetricMeasurementsBadRequestError } from "@solarwinds/swo-sdk- ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/listprobesinternalservererror.md b/swov1/docs/models/errors/listprobesinternalservererror.md index 72d0598..82fd438 100644 --- a/swov1/docs/models/errors/listprobesinternalservererror.md +++ b/swov1/docs/models/errors/listprobesinternalservererror.md @@ -12,8 +12,6 @@ import { ListProbesInternalServerError } from "@solarwinds/swo-sdk-typescript/mo ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 500 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | \ No newline at end of file diff --git a/swov1/docs/models/errors/observedatabasebadrequesterror.md b/swov1/docs/models/errors/observedatabasebadrequesterror.md index 8b26b69..00b26d9 100644 --- a/swov1/docs/models/errors/observedatabasebadrequesterror.md +++ b/swov1/docs/models/errors/observedatabasebadrequesterror.md @@ -12,8 +12,7 @@ import { ObserveDatabaseBadRequestError } from "@solarwinds/swo-sdk-typescript/m ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/pauseurimonitoringnotfounderror.md b/swov1/docs/models/errors/pauseurimonitoringnotfounderror.md index d7fd964..40ab373 100644 --- a/swov1/docs/models/errors/pauseurimonitoringnotfounderror.md +++ b/swov1/docs/models/errors/pauseurimonitoringnotfounderror.md @@ -12,8 +12,6 @@ import { PauseUriMonitoringNotFoundError } from "@solarwinds/swo-sdk-typescript/ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/pausewebsitemonitoringnotfounderror.md b/swov1/docs/models/errors/pausewebsitemonitoringnotfounderror.md index fecba63..13fb4fd 100644 --- a/swov1/docs/models/errors/pausewebsitemonitoringnotfounderror.md +++ b/swov1/docs/models/errors/pausewebsitemonitoringnotfounderror.md @@ -12,8 +12,6 @@ import { PauseWebsiteMonitoringNotFoundError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/pluginoperationbadrequesterror.md b/swov1/docs/models/errors/pluginoperationbadrequesterror.md index 8c3aa57..bf5671e 100644 --- a/swov1/docs/models/errors/pluginoperationbadrequesterror.md +++ b/swov1/docs/models/errors/pluginoperationbadrequesterror.md @@ -12,8 +12,7 @@ import { PluginOperationBadRequestError } from "@solarwinds/swo-sdk-typescript/m ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/pluginoperationnotfounderror.md b/swov1/docs/models/errors/pluginoperationnotfounderror.md index 793e49a..300b0f2 100644 --- a/swov1/docs/models/errors/pluginoperationnotfounderror.md +++ b/swov1/docs/models/errors/pluginoperationnotfounderror.md @@ -12,8 +12,6 @@ import { PluginOperationNotFoundError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/unpauseurimonitoringnotfounderror.md b/swov1/docs/models/errors/unpauseurimonitoringnotfounderror.md index 8e2af63..3b5c0a1 100644 --- a/swov1/docs/models/errors/unpauseurimonitoringnotfounderror.md +++ b/swov1/docs/models/errors/unpauseurimonitoringnotfounderror.md @@ -12,8 +12,6 @@ import { UnpauseUriMonitoringNotFoundError } from "@solarwinds/swo-sdk-typescrip ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/unpausewebsitemonitoringnotfounderror.md b/swov1/docs/models/errors/unpausewebsitemonitoringnotfounderror.md index c40a3ce..4bdde81 100644 --- a/swov1/docs/models/errors/unpausewebsitemonitoringnotfounderror.md +++ b/swov1/docs/models/errors/unpausewebsitemonitoringnotfounderror.md @@ -12,8 +12,6 @@ import { UnpauseWebsiteMonitoringNotFoundError } from "@solarwinds/swo-sdk-types ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateawsintegrationbadrequesterror.md b/swov1/docs/models/errors/updateawsintegrationbadrequesterror.md index 9ae8288..564bbc8 100644 --- a/swov1/docs/models/errors/updateawsintegrationbadrequesterror.md +++ b/swov1/docs/models/errors/updateawsintegrationbadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateAwsIntegrationBadRequestError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateawsintegrationinternalservererror.md b/swov1/docs/models/errors/updateawsintegrationinternalservererror.md index 34cc12d..1a1a5c0 100644 --- a/swov1/docs/models/errors/updateawsintegrationinternalservererror.md +++ b/swov1/docs/models/errors/updateawsintegrationinternalservererror.md @@ -12,8 +12,6 @@ import { UpdateAwsIntegrationInternalServerError } from "@solarwinds/swo-sdk-typ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 500 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateawsintegrationunauthorizederror.md b/swov1/docs/models/errors/updateawsintegrationunauthorizederror.md index 39cb3f0..bf8b874 100644 --- a/swov1/docs/models/errors/updateawsintegrationunauthorizederror.md +++ b/swov1/docs/models/errors/updateawsintegrationunauthorizederror.md @@ -12,8 +12,6 @@ import { UpdateAwsIntegrationUnauthorizedError } from "@solarwinds/swo-sdk-types ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatecompositemetricbadrequesterror.md b/swov1/docs/models/errors/updatecompositemetricbadrequesterror.md index 291b69d..a02f023 100644 --- a/swov1/docs/models/errors/updatecompositemetricbadrequesterror.md +++ b/swov1/docs/models/errors/updatecompositemetricbadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateCompositeMetricBadRequestError } from "@solarwinds/swo-sdk-typesc ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatecompositemetricforbiddenerror.md b/swov1/docs/models/errors/updatecompositemetricforbiddenerror.md index 1bca595..97bddd1 100644 --- a/swov1/docs/models/errors/updatecompositemetricforbiddenerror.md +++ b/swov1/docs/models/errors/updatecompositemetricforbiddenerror.md @@ -12,8 +12,6 @@ import { UpdateCompositeMetricForbiddenError } from "@solarwinds/swo-sdk-typescr ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 403 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is forbidden | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatecompositemetricnotfounderror.md b/swov1/docs/models/errors/updatecompositemetricnotfounderror.md index ac8bdc6..864be87 100644 --- a/swov1/docs/models/errors/updatecompositemetricnotfounderror.md +++ b/swov1/docs/models/errors/updatecompositemetricnotfounderror.md @@ -12,8 +12,6 @@ import { UpdateCompositeMetricNotFoundError } from "@solarwinds/swo-sdk-typescri ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatedatabasebadrequesterror.md b/swov1/docs/models/errors/updatedatabasebadrequesterror.md index a09a65b..4ea7b6a 100644 --- a/swov1/docs/models/errors/updatedatabasebadrequesterror.md +++ b/swov1/docs/models/errors/updatedatabasebadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateDatabaseBadRequestError } from "@solarwinds/swo-sdk-typescript/mo ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatedatabasenotfounderror.md b/swov1/docs/models/errors/updatedatabasenotfounderror.md index bbebb8b..50fdf56 100644 --- a/swov1/docs/models/errors/updatedatabasenotfounderror.md +++ b/swov1/docs/models/errors/updatedatabasenotfounderror.md @@ -12,8 +12,6 @@ import { UpdateDatabaseNotFoundError } from "@solarwinds/swo-sdk-typescript/mode ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateentitybyidbadrequesterror.md b/swov1/docs/models/errors/updateentitybyidbadrequesterror.md index cd004a3..640540d 100644 --- a/swov1/docs/models/errors/updateentitybyidbadrequesterror.md +++ b/swov1/docs/models/errors/updateentitybyidbadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateEntityByIdBadRequestError } from "@solarwinds/swo-sdk-typescript/ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateentitybyidnotfounderror.md b/swov1/docs/models/errors/updateentitybyidnotfounderror.md index d7f3a12..502b0a7 100644 --- a/swov1/docs/models/errors/updateentitybyidnotfounderror.md +++ b/swov1/docs/models/errors/updateentitybyidnotfounderror.md @@ -12,8 +12,6 @@ import { UpdateEntityByIdNotFoundError } from "@solarwinds/swo-sdk-typescript/mo ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateentitybyidunauthorizederror.md b/swov1/docs/models/errors/updateentitybyidunauthorizederror.md index dd9fc06..1e72afa 100644 --- a/swov1/docs/models/errors/updateentitybyidunauthorizederror.md +++ b/swov1/docs/models/errors/updateentitybyidunauthorizederror.md @@ -12,8 +12,6 @@ import { UpdateEntityByIdUnauthorizedError } from "@solarwinds/swo-sdk-typescrip ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateuribadrequesterror.md b/swov1/docs/models/errors/updateuribadrequesterror.md index d6a3ccf..f6df17b 100644 --- a/swov1/docs/models/errors/updateuribadrequesterror.md +++ b/swov1/docs/models/errors/updateuribadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateUriBadRequestError } from "@solarwinds/swo-sdk-typescript/models/ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updateurinotfounderror.md b/swov1/docs/models/errors/updateurinotfounderror.md index e8ae850..10ad655 100644 --- a/swov1/docs/models/errors/updateurinotfounderror.md +++ b/swov1/docs/models/errors/updateurinotfounderror.md @@ -12,8 +12,6 @@ import { UpdateUriNotFoundError } from "@solarwinds/swo-sdk-typescript/models/er ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatewebsitebadrequesterror.md b/swov1/docs/models/errors/updatewebsitebadrequesterror.md index 5c62975..0632602 100644 --- a/swov1/docs/models/errors/updatewebsitebadrequesterror.md +++ b/swov1/docs/models/errors/updatewebsitebadrequesterror.md @@ -12,8 +12,7 @@ import { UpdateWebsiteBadRequestError } from "@solarwinds/swo-sdk-typescript/mod ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/updatewebsitenotfounderror.md b/swov1/docs/models/errors/updatewebsitenotfounderror.md index e209b93..65309d3 100644 --- a/swov1/docs/models/errors/updatewebsitenotfounderror.md +++ b/swov1/docs/models/errors/updatewebsitenotfounderror.md @@ -12,8 +12,6 @@ import { UpdateWebsiteNotFoundError } from "@solarwinds/swo-sdk-typescript/model ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 404 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Cannot find resource | \ No newline at end of file diff --git a/swov1/docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md b/swov1/docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md index c66e753..bc213c4 100644 --- a/swov1/docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md +++ b/swov1/docs/models/errors/validatemgmtaccountonboardingbadrequesterror.md @@ -12,8 +12,7 @@ import { ValidateMgmtAccountOnboardingBadRequestError } from "@solarwinds/swo-sd ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 400 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Bad request | +| `target` | *string* | :heavy_minus_sign: | Indicates the invalid field | | \ No newline at end of file diff --git a/swov1/docs/models/errors/validatemgmtaccountonboardinginternalservererror.md b/swov1/docs/models/errors/validatemgmtaccountonboardinginternalservererror.md index ccc75e3..6c16b64 100644 --- a/swov1/docs/models/errors/validatemgmtaccountonboardinginternalservererror.md +++ b/swov1/docs/models/errors/validatemgmtaccountonboardinginternalservererror.md @@ -12,8 +12,6 @@ import { ValidateMgmtAccountOnboardingInternalServerError } from "@solarwinds/sw ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 500 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Internal error | \ No newline at end of file diff --git a/swov1/docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md b/swov1/docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md index 77b936f..263e92d 100644 --- a/swov1/docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md +++ b/swov1/docs/models/errors/validatemgmtaccountonboardingunauthorizederror.md @@ -12,8 +12,6 @@ import { ValidateMgmtAccountOnboardingUnauthorizedError } from "@solarwinds/swo- ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `code` | *number* | :heavy_check_mark: | HTTP status code as defined in RFC 2817 | 401 | -| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | -| `target` | *string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `message` | *string* | :heavy_check_mark: | Supporting description of the error | Access is unauthorized | \ No newline at end of file diff --git a/swov1/docs/models/operations/createtokenresponse.md b/swov1/docs/models/operations/createtokenresponse.md deleted file mode 100644 index 52d4fd4..0000000 --- a/swov1/docs/models/operations/createtokenresponse.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateTokenResponse - -The request has succeeded. - -## Example Usage - -```typescript -import { CreateTokenResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: CreateTokenResponse = { - token: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `token` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/swov1/docs/models/operations/getmetricbynameresponse.md b/swov1/docs/models/operations/getmetricbynameresponse.md index e41706c..9398a07 100644 --- a/swov1/docs/models/operations/getmetricbynameresponse.md +++ b/swov1/docs/models/operations/getmetricbynameresponse.md @@ -5,16 +5,7 @@ ```typescript import { GetMetricByNameResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: GetMetricByNameResponse = { - result: { - name: "composite.custom.system.disk.io.rate", - displayName: "Disk IO rate", - description: "Disk bytes transferred per second", - units: "bytes/s", - formula: "rate(system.disk.io[5m]", - lastReportedTime: new Date("2024-11-25T16:38:24Z"), - }, -}; +let value: GetMetricByNameResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/geturifailingtestlocations.md b/swov1/docs/models/operations/geturifailingtestlocations.md deleted file mode 100644 index 57f35cb..0000000 --- a/swov1/docs/models/operations/geturifailingtestlocations.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetUriFailingTestLocations - -How many locations must report a failure for an entity to be considered down. - -## Example Usage - -```typescript -import { GetUriFailingTestLocations } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetUriFailingTestLocations = "all"; -``` - -## Values - -```typescript -"all" | "any" -``` \ No newline at end of file diff --git a/swov1/docs/models/operations/geturioutageconfiguration.md b/swov1/docs/models/operations/geturioutageconfiguration.md deleted file mode 100644 index e8ea016..0000000 --- a/swov1/docs/models/operations/geturioutageconfiguration.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetUriOutageConfiguration - - Default conditions when the entity is considered down. - If omitted or set to null, organization configuration will be used for this entity. - -## Example Usage - -```typescript -import { GetUriOutageConfiguration } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetUriOutageConfiguration = { - failingTestLocations: "all", - consecutiveForDown: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `failingTestLocations` | [operations.GetUriFailingTestLocations](../../models/operations/geturifailingtestlocations.md) | :heavy_check_mark: | How many locations must report a failure for an entity to be considered down. | all | -| `consecutiveForDown` | *number* | :heavy_check_mark: | Number of consecutive failing tests for an entity to be considered down. | 2 | \ No newline at end of file diff --git a/swov1/docs/models/operations/geturistatus.md b/swov1/docs/models/operations/geturistatus.md deleted file mode 100644 index f0c2ee5..0000000 --- a/swov1/docs/models/operations/geturistatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetUriStatus - -## Example Usage - -```typescript -import { GetUriStatus } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetUriStatus = "up"; -``` - -## Values - -```typescript -"up" | "down" | "paused" | "maintenance" | "unknown" -``` \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsitefailingtestlocations.md b/swov1/docs/models/operations/getwebsitefailingtestlocations.md deleted file mode 100644 index 19a7997..0000000 --- a/swov1/docs/models/operations/getwebsitefailingtestlocations.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetWebsiteFailingTestLocations - -How many locations must report a failure for an entity to be considered down. - -## Example Usage - -```typescript -import { GetWebsiteFailingTestLocations } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetWebsiteFailingTestLocations = "all"; -``` - -## Values - -```typescript -"all" | "any" -``` \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsiteoutageconfiguration.md b/swov1/docs/models/operations/getwebsiteoutageconfiguration.md deleted file mode 100644 index 163ab7d..0000000 --- a/swov1/docs/models/operations/getwebsiteoutageconfiguration.md +++ /dev/null @@ -1,22 +0,0 @@ -# GetWebsiteOutageConfiguration - - Default conditions when the entity is considered down. - If omitted or set to null, organization configuration will be used for this entity. - -## Example Usage - -```typescript -import { GetWebsiteOutageConfiguration } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetWebsiteOutageConfiguration = { - failingTestLocations: "all", - consecutiveForDown: 2, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `failingTestLocations` | [operations.GetWebsiteFailingTestLocations](../../models/operations/getwebsitefailingtestlocations.md) | :heavy_check_mark: | How many locations must report a failure for an entity to be considered down. | all | -| `consecutiveForDown` | *number* | :heavy_check_mark: | Number of consecutive failing tests for an entity to be considered down. | 2 | \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsiteresponse.md b/swov1/docs/models/operations/getwebsiteresponse.md deleted file mode 100644 index f8cd891..0000000 --- a/swov1/docs/models/operations/getwebsiteresponse.md +++ /dev/null @@ -1,98 +0,0 @@ -# GetWebsiteResponse - -The request has succeeded. - -## Example Usage - -```typescript -import { GetWebsiteResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetWebsiteResponse = { - id: "e-1448474379026206720", - type: "Website", - status: "up", - name: "solarwinds.com", - url: "https://www.solarwinds.com", - monitoringOptions: { - isAvailabilityActive: true, - isRumActive: false, - }, - availabilityCheckSettings: { - platformOptions: { - probePlatforms: [ - "AWS", - ], - testFromAll: true, - }, - testFrom: { - type: "REGION", - values: [ - "NA", - ], - }, - testIntervalInSeconds: 14400, - outageConfiguration: { - failingTestLocations: "all", - consecutiveForDown: 3, - }, - checkForString: { - operator: "CONTAINS", - value: "string", - }, - protocols: [ - "HTTP", - "HTTPS", - ], - ssl: { - enabled: true, - daysPriorToExpiration: 7, - ignoreIntermediateCertificates: true, - }, - customHeaders: [ - { - name: "string", - value: "string", - }, - ], - allowInsecureRenegotiation: true, - postData: "{\"example\": \"value\"}", - }, - tags: [ - { - key: "environment", - value: "production", - }, - ], - rum: { - apdexTimeInSeconds: 4, - snippet: "string", - spa: true, - }, - lastOutageStartTime: new Date("2025-01-15T14:31:19.735Z"), - lastOutageEndTime: new Date("2025-01-15T14:31:19.735Z"), - lastTestTime: new Date("2025-01-15T14:31:19.735Z"), - lastErrorTime: new Date("2025-01-15T14:31:19.735Z"), - lastResponseTime: 376, - nextOnDemandAvailabilityTime: 0, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | e-1448474379026206720 | -| `type` | *string* | :heavy_check_mark: | N/A | Website | -| `status` | [operations.GetWebsiteStatus](../../models/operations/getwebsitestatus.md) | :heavy_check_mark: | N/A | up | -| `name` | *string* | :heavy_check_mark: | Name of the website, which must be unique within the organization.
The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. | solarwinds.com | -| `url` | *string* | :heavy_check_mark: | URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). | https://www.solarwinds.com | -| `monitoringOptions` | [operations.MonitoringOptions](../../models/operations/monitoringoptions.md) | :heavy_check_mark: | Defines which monitoring features are enabled for a website. | | -| `availabilityCheckSettings` | [operations.GetWebsiteAvailabilityCheckSettings](../../models/operations/getwebsiteavailabilitychecksettings.md) | :heavy_minus_sign: | Use this field to configure availability tests for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | {
"checkForString": {
"operator": "CONTAINS",
"value": "string"
},
"testIntervalInSeconds": 14400,
"protocols": [
"HTTP",
"HTTPS"
],
"platformOptions": {
"probePlatforms": [
"AWS"
],
"testFromAll": true
},
"testFrom": {
"type": "REGION",
"values": [
"NA"
]
},
"ssl": {
"enabled": true,
"daysPriorToExpiration": 7,
"ignoreIntermediateCertificates": true
},
"customHeaders": [
{
"name": "string",
"value": "string"
}
],
"allowInsecureRenegotiation": true,
"postData": "{\"example\": \"value\"}",
"outageConfiguration": {
"failingTestLocations": "all",
"consecutiveForDown": 3
}
} | -| `tags` | [components.Tag](../../models/components/tag.md)[] | :heavy_minus_sign: | Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. | [
{
"key": "environment",
"value": "production"
}
] | -| `rum` | [operations.Rum](../../models/operations/rum.md) | :heavy_minus_sign: | Use this field to configure real user monitoring (RUM) for the website.
You are required to configure at least availability monitoring or real user monitoring to be able to create website. | {
"apdexTimeInSeconds": 4,
"snippet": "string",
"spa": true
} | -| `lastOutageStartTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage started. | 2025-01-15T14:31:19.735Z | -| `lastOutageEndTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last outage ended. | 2025-01-15T14:31:19.735Z | -| `lastTestTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time when the last test was performed. | 2025-01-15T14:31:19.735Z | -| `lastErrorTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Last time when a synthetic test failed. | 2025-01-15T14:31:19.735Z | -| `lastResponseTime` | *number* | :heavy_minus_sign: | Response time from the last synthetic check in milliseconds. | 376 | -| `nextOnDemandAvailabilityTime` | *number* | :heavy_minus_sign: | Timestamp for when the next on-demand check could be executed. If at '0', it means you can execute it anytime. | 0 | \ No newline at end of file diff --git a/swov1/docs/models/operations/getwebsitestatus.md b/swov1/docs/models/operations/getwebsitestatus.md deleted file mode 100644 index 82d1112..0000000 --- a/swov1/docs/models/operations/getwebsitestatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetWebsiteStatus - -## Example Usage - -```typescript -import { GetWebsiteStatus } from "@solarwinds/swo-sdk-typescript/models/operations"; - -let value: GetWebsiteStatus = "up"; -``` - -## Values - -```typescript -"up" | "down" | "paused" | "maintenance" | "unknown" -``` \ No newline at end of file diff --git a/swov1/docs/models/operations/listentitiesresponse.md b/swov1/docs/models/operations/listentitiesresponse.md index d55950b..f34c842 100644 --- a/swov1/docs/models/operations/listentitiesresponse.md +++ b/swov1/docs/models/operations/listentitiesresponse.md @@ -5,46 +5,7 @@ ```typescript import { ListEntitiesResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListEntitiesResponse = { - result: { - entities: [ - { - id: "e-1234567890", - type: "SyslogHost", - name: "syslog-host-1", - displayName: "SyslogTest", - createdTime: new Date("2024-11-25T16:38:24Z"), - updatedTime: new Date("2024-12-01T16:38:24Z"), - lastSeenTime: new Date("2024-11-25T16:38:24Z"), - inMaintenance: false, - healthscore: { - score: 100, - category: "good", - }, - tags: { - "gg.tk.token": "test", - "kfi.tk.token": "qa-test", - }, - attributes: { - "protocols": [ - "HTTP", - ], - "features": [ - "rum", - ], - "isAvailabilityCheckPaused": false, - "extensions": { - "has_extension": true, - }, - }, - }, - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListEntitiesResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listentitiesresponsebody.md b/swov1/docs/models/operations/listentitiesresponsebody.md index 32e181a..15aa6bf 100644 --- a/swov1/docs/models/operations/listentitiesresponsebody.md +++ b/swov1/docs/models/operations/listentitiesresponsebody.md @@ -8,38 +8,7 @@ The request has succeeded. import { ListEntitiesResponseBody } from "@solarwinds/swo-sdk-typescript/models/operations"; let value: ListEntitiesResponseBody = { - entities: [ - { - id: "e-1234567890", - type: "SyslogHost", - name: "syslog-host-1", - displayName: "SyslogTest", - createdTime: new Date("2024-11-25T16:38:24Z"), - updatedTime: new Date("2024-12-01T16:38:24Z"), - lastSeenTime: new Date("2024-11-25T16:38:24Z"), - inMaintenance: false, - healthscore: { - score: 100, - category: "good", - }, - tags: { - "gg.tk.token": "test", - "kfi.tk.token": "qa-test", - }, - attributes: { - "protocols": [ - "HTTP", - ], - "features": [ - "rum", - ], - "isAvailabilityCheckPaused": false, - "extensions": { - "has_extension": true, - }, - }, - }, - ], + entities: [], pageInfo: { prevPage: "", nextPage: "", diff --git a/swov1/docs/models/operations/listlogarchivesresponse.md b/swov1/docs/models/operations/listlogarchivesresponse.md index 943d026..9c477e4 100644 --- a/swov1/docs/models/operations/listlogarchivesresponse.md +++ b/swov1/docs/models/operations/listlogarchivesresponse.md @@ -5,24 +5,7 @@ ```typescript import { ListLogArchivesResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListLogArchivesResponse = { - result: { - logArchives: [ - { - id: "logs/138723/dt=2024-01-23/2024-01-23-08.json.gz", - name: "2024-01-23-08.json.gz", - downloadUrl: - "https://ssp-log-archives.s3.amazonaws.com/logs/138723/dt%3D2024-01-23/2024-01-23-08.json.gz?X-Amz-Security-Token=IQ...", - archivedTimestamp: "1706020985", - archiveSize: 817226354, - }, - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListLogArchivesResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmetricattributesresponse.md b/swov1/docs/models/operations/listmetricattributesresponse.md index 021d399..36dafe6 100644 --- a/swov1/docs/models/operations/listmetricattributesresponse.md +++ b/swov1/docs/models/operations/listmetricattributesresponse.md @@ -5,17 +5,7 @@ ```typescript import { ListMetricAttributesResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMetricAttributesResponse = { - result: { - names: [ - "", - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListMetricAttributesResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmetricattributesresponsebody.md b/swov1/docs/models/operations/listmetricattributesresponsebody.md index 7640ea1..65735ff 100644 --- a/swov1/docs/models/operations/listmetricattributesresponsebody.md +++ b/swov1/docs/models/operations/listmetricattributesresponsebody.md @@ -9,7 +9,7 @@ import { ListMetricAttributesResponseBody } from "@solarwinds/swo-sdk-typescript let value: ListMetricAttributesResponseBody = { names: [ - "", + "", ], pageInfo: { prevPage: "", diff --git a/swov1/docs/models/operations/listmetricattributevaluesresponse.md b/swov1/docs/models/operations/listmetricattributevaluesresponse.md index 55b60a2..27bbde2 100644 --- a/swov1/docs/models/operations/listmetricattributevaluesresponse.md +++ b/swov1/docs/models/operations/listmetricattributevaluesresponse.md @@ -5,18 +5,7 @@ ```typescript import { ListMetricAttributeValuesResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMetricAttributeValuesResponse = { - result: { - name: "", - values: [ - "", - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListMetricAttributeValuesResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmetricattributevaluesresponsebody.md b/swov1/docs/models/operations/listmetricattributevaluesresponsebody.md index a1923d6..c83ae30 100644 --- a/swov1/docs/models/operations/listmetricattributevaluesresponsebody.md +++ b/swov1/docs/models/operations/listmetricattributevaluesresponsebody.md @@ -10,7 +10,7 @@ import { ListMetricAttributeValuesResponseBody } from "@solarwinds/swo-sdk-types let value: ListMetricAttributeValuesResponseBody = { name: "", values: [ - "", + "", ], pageInfo: { prevPage: "", diff --git a/swov1/docs/models/operations/listmetricmeasurementsresponse.md b/swov1/docs/models/operations/listmetricmeasurementsresponse.md index 6d4f042..143c830 100644 --- a/swov1/docs/models/operations/listmetricmeasurementsresponse.md +++ b/swov1/docs/models/operations/listmetricmeasurementsresponse.md @@ -5,31 +5,7 @@ ```typescript import { ListMetricMeasurementsResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMetricMeasurementsResponse = { - result: { - groupings: [ - { - attributes: [ - { - key: "", - value: "", - }, - ], - measurements: [ - { - time: new Date("2025-11-09T11:58:33.263Z"), - value: 2581.91, - }, - ], - }, - ], - bucketSizeInSeconds: 861932, - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListMetricMeasurementsResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmetricmeasurementsresponsebody.md b/swov1/docs/models/operations/listmetricmeasurementsresponsebody.md index 6ea22ba..4a372c2 100644 --- a/swov1/docs/models/operations/listmetricmeasurementsresponsebody.md +++ b/swov1/docs/models/operations/listmetricmeasurementsresponsebody.md @@ -8,23 +8,8 @@ The request has succeeded. import { ListMetricMeasurementsResponseBody } from "@solarwinds/swo-sdk-typescript/models/operations"; let value: ListMetricMeasurementsResponseBody = { - groupings: [ - { - attributes: [ - { - key: "", - value: "", - }, - ], - measurements: [ - { - time: new Date("2024-04-22T08:27:29.790Z"), - value: 5467.36, - }, - ], - }, - ], - bucketSizeInSeconds: 394183, + groupings: [], + bucketSizeInSeconds: 546736, pageInfo: { prevPage: "", nextPage: "", diff --git a/swov1/docs/models/operations/listmetricsresponse.md b/swov1/docs/models/operations/listmetricsresponse.md index 7db24dd..3f82642 100644 --- a/swov1/docs/models/operations/listmetricsresponse.md +++ b/swov1/docs/models/operations/listmetricsresponse.md @@ -5,24 +5,7 @@ ```typescript import { ListMetricsResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMetricsResponse = { - result: { - metricsInfo: [ - { - name: "composite.custom.system.disk.io.rate", - displayName: "Disk IO rate", - description: "Disk bytes transferred per second", - units: "bytes/s", - formula: "rate(system.disk.io[5m]", - lastReportedTime: new Date("2024-11-25T16:38:24Z"), - }, - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListMetricsResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmetricsresponsebody.md b/swov1/docs/models/operations/listmetricsresponsebody.md index 77803a7..578aecf 100644 --- a/swov1/docs/models/operations/listmetricsresponsebody.md +++ b/swov1/docs/models/operations/listmetricsresponsebody.md @@ -8,16 +8,7 @@ The request has succeeded. import { ListMetricsResponseBody } from "@solarwinds/swo-sdk-typescript/models/operations"; let value: ListMetricsResponseBody = { - metricsInfo: [ - { - name: "composite.custom.system.disk.io.rate", - displayName: "Disk IO rate", - description: "Disk bytes transferred per second", - units: "bytes/s", - formula: "rate(system.disk.io[5m]", - lastReportedTime: new Date("2024-11-25T16:38:24Z"), - }, - ], + metricsInfo: [], pageInfo: { prevPage: "", nextPage: "", diff --git a/swov1/docs/models/operations/listmultimetricmeasurementsrequest.md b/swov1/docs/models/operations/listmultimetricmeasurementsrequest.md index 4bd573b..16faa9c 100644 --- a/swov1/docs/models/operations/listmultimetricmeasurementsrequest.md +++ b/swov1/docs/models/operations/listmultimetricmeasurementsrequest.md @@ -5,24 +5,7 @@ ```typescript import { ListMultiMetricMeasurementsRequest } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMultiMetricMeasurementsRequest = { - requestBody: { - metrics: [ - { - id: "throughput-series", - name: "dbo.host.queries.tput", - filter: "id:[id1,id2] category:moderate", - groupBy: [ - "query", - ], - preGroupBy: [ - "host", - ], - preGroupByMethod: "SUM", - }, - ], - }, -}; +let value: ListMultiMetricMeasurementsRequest = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmultimetricmeasurementsresponse.md b/swov1/docs/models/operations/listmultimetricmeasurementsresponse.md index 4b9dee2..696e317 100644 --- a/swov1/docs/models/operations/listmultimetricmeasurementsresponse.md +++ b/swov1/docs/models/operations/listmultimetricmeasurementsresponse.md @@ -5,37 +5,7 @@ ```typescript import { ListMultiMetricMeasurementsResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: ListMultiMetricMeasurementsResponse = { - result: { - metrics: [ - { - id: "throughput-series", - name: "dbo.host.queries.tput", - groupings: [ - { - attributes: [ - { - key: "", - value: "", - }, - ], - measurements: [ - { - time: new Date("2024-10-07T14:39:00.483Z"), - value: 4417.41, - }, - ], - }, - ], - bucketSizeInSeconds: 1, - }, - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: ListMultiMetricMeasurementsResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/listmultimetricmeasurementsresponsebody.md b/swov1/docs/models/operations/listmultimetricmeasurementsresponsebody.md index cc7e7f3..01bb9b9 100644 --- a/swov1/docs/models/operations/listmultimetricmeasurementsresponsebody.md +++ b/swov1/docs/models/operations/listmultimetricmeasurementsresponsebody.md @@ -12,22 +12,7 @@ let value: ListMultiMetricMeasurementsResponseBody = { { id: "throughput-series", name: "dbo.host.queries.tput", - groupings: [ - { - attributes: [ - { - key: "", - value: "", - }, - ], - measurements: [ - { - time: new Date("2025-10-29T03:45:37.462Z"), - value: 2221.64, - }, - ], - }, - ], + groupings: [], bucketSizeInSeconds: 1, }, ], diff --git a/swov1/docs/models/operations/metric.md b/swov1/docs/models/operations/metric.md index 109a0b2..210c800 100644 --- a/swov1/docs/models/operations/metric.md +++ b/swov1/docs/models/operations/metric.md @@ -10,16 +10,11 @@ let value: Metric = { name: "dbo.host.queries.tput", groupings: [ { - attributes: [ - { - key: "", - value: "", - }, - ], + attributes: [], measurements: [ { - time: new Date("2025-05-30T00:58:39.369Z"), - value: 1009.14, + time: new Date("2025-06-12T04:58:43.421Z"), + value: 1220.89, }, ], }, diff --git a/swov1/docs/models/operations/searchlogsresponse.md b/swov1/docs/models/operations/searchlogsresponse.md index 7097159..da2281c 100644 --- a/swov1/docs/models/operations/searchlogsresponse.md +++ b/swov1/docs/models/operations/searchlogsresponse.md @@ -5,24 +5,7 @@ ```typescript import { SearchLogsResponse } from "@solarwinds/swo-sdk-typescript/models/operations"; -let value: SearchLogsResponse = { - result: { - logs: [ - { - id: "1793698955374546944", - time: "2024-01-01T00:00:00Z", - message: "This is a log message", - hostname: "webserver.example.com", - severity: "INFO", - program: "httpd", - }, - ], - pageInfo: { - prevPage: "", - nextPage: "", - }, - }, -}; +let value: SearchLogsResponse = {}; ``` ## Fields diff --git a/swov1/docs/models/operations/updatecompositemetricrequest.md b/swov1/docs/models/operations/updatecompositemetricrequest.md index c0fe98a..35f7b1e 100644 --- a/swov1/docs/models/operations/updatecompositemetricrequest.md +++ b/swov1/docs/models/operations/updatecompositemetricrequest.md @@ -7,12 +7,6 @@ import { UpdateCompositeMetricRequest } from "@solarwinds/swo-sdk-typescript/mod let value: UpdateCompositeMetricRequest = { name: "", - updateCompositeMetric: { - displayName: "Disk IO rate", - description: "Disk bytes transferred per second", - formula: "rate(system.disk.io[5m])", - units: "bytes/s", - }, }; ``` diff --git a/swov1/docs/models/operations/updatedatabaserequest.md b/swov1/docs/models/operations/updatedatabaserequest.md index b4ef610..e76850c 100644 --- a/swov1/docs/models/operations/updatedatabaserequest.md +++ b/swov1/docs/models/operations/updatedatabaserequest.md @@ -7,7 +7,6 @@ import { UpdateDatabaseRequest } from "@solarwinds/swo-sdk-typescript/models/ope let value: UpdateDatabaseRequest = { entityId: "", - updateDatabaseRequest: {}, }; ``` diff --git a/swov1/docs/models/operations/updateentitybyidrequest.md b/swov1/docs/models/operations/updateentitybyidrequest.md index c5a2ecb..be9aa7f 100644 --- a/swov1/docs/models/operations/updateentitybyidrequest.md +++ b/swov1/docs/models/operations/updateentitybyidrequest.md @@ -7,13 +7,6 @@ import { UpdateEntityByIdRequest } from "@solarwinds/swo-sdk-typescript/models/o let value: UpdateEntityByIdRequest = { id: "", - entity: { - displayName: "SyslogTest", - tags: { - "gg.tk.token": "test", - "kfi.tk.token": "qa-test", - }, - }, }; ``` diff --git a/swov1/docs/models/operations/updateurirequest.md b/swov1/docs/models/operations/updateurirequest.md index fc64fc7..48087d5 100644 --- a/swov1/docs/models/operations/updateurirequest.md +++ b/swov1/docs/models/operations/updateurirequest.md @@ -7,41 +7,12 @@ import { UpdateUriRequest } from "@solarwinds/swo-sdk-typescript/models/operatio let value: UpdateUriRequest = { entityId: "", - uri: { - name: "example-uri", - ipOrDomain: "solarwinds.com", - availabilityCheckSettings: { - platformOptions: { - probePlatforms: [ - "AWS", - ], - testFromAll: true, - }, - testFrom: { - type: "REGION", - values: [ - "EU", - ], - }, - testIntervalInSeconds: 300, - tcp: { - enabled: true, - port: 443, - }, - }, - tags: [ - { - key: "team", - value: "backend", - }, - ], - }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `entityId` | *string* | :heavy_check_mark: | N/A | | -| `uri` | [components.Uri](../../models/components/uri.md) | :heavy_check_mark: | The updated URI monitoring configuration | {
"name": "example-uri",
"ipOrDomain": "solarwinds.com",
"availabilityCheckSettings": {
"platformOptions": {
"probePlatforms": [
"AWS"
],
"testFromAll": true
},
"testFrom": {
"type": "REGION",
"values": [
"EU"
]
},
"testIntervalInSeconds": 300,
"tcp": {
"enabled": true,
"port": 443
}
},
"tags": [
{
"key": "team",
"value": "backend"
}
]
} | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `entityId` | *string* | :heavy_check_mark: | N/A | +| `uri` | [components.Uri](../../models/components/uri.md) | :heavy_check_mark: | The updated URI monitoring configuration | \ No newline at end of file diff --git a/swov1/docs/models/operations/updatewebsiterequest.md b/swov1/docs/models/operations/updatewebsiterequest.md index ac7e4eb..c317b9b 100644 --- a/swov1/docs/models/operations/updatewebsiterequest.md +++ b/swov1/docs/models/operations/updatewebsiterequest.md @@ -7,62 +7,12 @@ import { UpdateWebsiteRequest } from "@solarwinds/swo-sdk-typescript/models/oper let value: UpdateWebsiteRequest = { entityId: "", - website: { - name: "solarwinds.com", - url: "https://www.solarwinds.com", - availabilityCheckSettings: { - platformOptions: { - probePlatforms: [ - "AWS", - ], - testFromAll: true, - }, - testFrom: { - type: "REGION", - values: [ - "NA", - ], - }, - testIntervalInSeconds: 14400, - checkForString: { - operator: "CONTAINS", - value: "string", - }, - protocols: [ - "HTTP", - "HTTPS", - ], - ssl: { - enabled: true, - daysPriorToExpiration: 7, - ignoreIntermediateCertificates: true, - }, - customHeaders: [ - { - name: "string", - value: "string", - }, - ], - allowInsecureRenegotiation: true, - postData: "{\"example\": \"value\"}", - }, - tags: [ - { - key: "string", - value: "string", - }, - ], - rum: { - apdexTimeInSeconds: 4, - spa: true, - }, - }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `entityId` | *string* | :heavy_check_mark: | N/A | | -| `website` | [components.Website](../../models/components/website.md) | :heavy_check_mark: | The updated website monitoring configuration | {
"name": "solarwinds.com",
"url": "https://www.solarwinds.com",
"availabilityCheckSettings": {
"checkForString": {
"operator": "CONTAINS",
"value": "string"
},
"testIntervalInSeconds": 14400,
"protocols": [
"HTTP",
"HTTPS"
],
"platformOptions": {
"probePlatforms": [
"AWS"
],
"testFromAll": true
},
"testFrom": {
"type": "REGION",
"values": [
"NA"
]
},
"ssl": {
"enabled": true,
"daysPriorToExpiration": 7,
"ignoreIntermediateCertificates": true
},
"customHeaders": [
{
"name": "string",
"value": "string"
}
],
"allowInsecureRenegotiation": true,
"postData": "{\"example\": \"value\"}"
},
"tags": [
{
"key": "string",
"value": "string"
}
],
"rum": {
"apdexTimeInSeconds": 4,
"spa": true
}
} | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `entityId` | *string* | :heavy_check_mark: | N/A | +| `website` | [components.Website](../../models/components/website.md) | :heavy_check_mark: | The updated website monitoring configuration | \ No newline at end of file diff --git a/swov1/docs/sdks/changeevents/README.md b/swov1/docs/sdks/changeevents/README.md index 9fcf381..de4f1c2 100644 --- a/swov1/docs/sdks/changeevents/README.md +++ b/swov1/docs/sdks/changeevents/README.md @@ -39,7 +39,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -78,15 +77,12 @@ async function run() { }, ], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("changeEventsCreateChangeEvent failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/swov1/docs/sdks/cloudaccounts/README.md b/swov1/docs/sdks/cloudaccounts/README.md index eca5274..385a29f 100644 --- a/swov1/docs/sdks/cloudaccounts/README.md +++ b/swov1/docs/sdks/cloudaccounts/README.md @@ -27,7 +27,7 @@ async function run() { await swo.cloudAccounts.activateAwsIntegration({ managementAccountId: "", accountId: "", - enable: false, + enable: true, }); @@ -54,16 +54,14 @@ async function run() { const res = await cloudAccountsActivateAwsIntegration(swo, { managementAccountId: "", accountId: "", - enable: false, + enable: true, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("cloudAccountsActivateAwsIntegration failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -108,20 +106,7 @@ const swo = new Swo({ async function run() { await swo.cloudAccounts.createOrgStructure({ mgmtAccountId: "", - structure: [ - { - childId: "", - childName: "", - }, - { - childId: "", - childName: "", - }, - { - childId: "", - childName: "", - }, - ], + structure: [], }); @@ -147,29 +132,14 @@ const swo = new SwoCore({ async function run() { const res = await cloudAccountsCreateOrgStructure(swo, { mgmtAccountId: "", - structure: [ - { - childId: "", - childName: "", - }, - { - childId: "", - childName: "", - }, - { - childId: "", - childName: "", - }, - ], + structure: [], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("cloudAccountsCreateOrgStructure failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -219,7 +189,6 @@ async function run() { roleArn: "", }); - // Handle the result console.log(result); } @@ -247,15 +216,12 @@ async function run() { accountName: "", roleArn: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("cloudAccountsUpdateAwsIntegration failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -303,7 +269,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -330,15 +295,12 @@ async function run() { managementAccountId: "", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("cloudAccountsValidateMgmtAccountOnboarding failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/swov1/docs/sdks/dbo/README.md b/swov1/docs/sdks/dbo/README.md index f435c62..63630ec 100644 --- a/swov1/docs/sdks/dbo/README.md +++ b/swov1/docs/sdks/dbo/README.md @@ -32,21 +32,11 @@ async function run() { agentId: "", dbType: "mongo", authMethod: "entraclientsecret", - configOptions: [ - { - key: "", - value: "", - }, - ], dbConnOptions: { - host: "dependent-bar.com", - port: "", - sslOptions: {}, + host: "mixed-scrap.com", }, - tags: [], }); - // Handle the result console.log(result); } @@ -73,28 +63,16 @@ async function run() { agentId: "", dbType: "mongo", authMethod: "entraclientsecret", - configOptions: [ - { - key: "", - value: "", - }, - ], dbConnOptions: { - host: "dependent-bar.com", - port: "", - sslOptions: {}, + host: "mixed-scrap.com", }, - tags: [], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dboObserveDatabase failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -136,7 +114,6 @@ const swo = new Swo({ async function run() { const result = await swo.dbo.getPublicKey(); - // Handle the result console.log(result); } @@ -159,15 +136,12 @@ const swo = new SwoCore({ async function run() { const res = await dboGetPublicKey(swo); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dboGetPublicKey failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -237,14 +211,12 @@ async function run() { entityId: "", updateDatabaseRequest: {}, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("dboUpdateDatabase failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -313,14 +285,12 @@ async function run() { const res = await dboDeleteDatabase(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("dboDeleteDatabase failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -365,7 +335,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -390,15 +359,12 @@ async function run() { const res = await dboGetPluginConfig(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dboGetPluginConfig failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -443,7 +409,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -468,15 +433,12 @@ async function run() { const res = await dboGetPlugins(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("dboGetPlugins failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -547,14 +509,12 @@ async function run() { entityId: "", operation: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("dboPluginOperation failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/swov1/docs/sdks/dem/README.md b/swov1/docs/sdks/dem/README.md index 2a7f8a3..70e2853 100644 --- a/swov1/docs/sdks/dem/README.md +++ b/swov1/docs/sdks/dem/README.md @@ -37,7 +37,6 @@ const swo = new Swo({ async function run() { const result = await swo.dem.listProbes(); - // Handle the result console.log(result); } @@ -60,15 +59,12 @@ const swo = new SwoCore({ async function run() { const res = await demListProbes(swo); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demListProbes failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -84,7 +80,7 @@ run(); ### Response -**Promise\<[operations.ListProbesResponse](../../models/operations/listprobesresponse.md)\>** +**Promise\<[components.ListProbesResponse](../../models/components/listprobesresponse.md)\>** ### Errors @@ -109,7 +105,6 @@ const swo = new Swo({ async function run() { const result = await swo.dem.getDemSettings(); - // Handle the result console.log(result); } @@ -132,15 +127,12 @@ const swo = new SwoCore({ async function run() { const res = await demGetDemSettings(swo); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demGetDemSettings failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -208,14 +200,12 @@ async function run() { failingTestLocations: "all", consecutiveForDown: 2, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("demSetDemSettings failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -255,7 +245,7 @@ const swo = new Swo({ async function run() { const result = await swo.dem.createUri({ - name: "example-uri", + name: "solarwinds.com", ipOrDomain: "solarwinds.com", availabilityCheckSettings: { platformOptions: { @@ -270,14 +260,20 @@ async function run() { "NA", ], }, - testIntervalInSeconds: 300, - outageConfiguration: { - failingTestLocations: "all", - consecutiveForDown: 2, + testIntervalInSeconds: 14400, + outageConfiguration: null, + ping: { + enabled: true, }, tcp: { enabled: true, port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }, }, tags: [ @@ -288,7 +284,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -311,7 +306,7 @@ const swo = new SwoCore({ async function run() { const res = await demCreateUri(swo, { - name: "example-uri", + name: "solarwinds.com", ipOrDomain: "solarwinds.com", availabilityCheckSettings: { platformOptions: { @@ -326,14 +321,20 @@ async function run() { "NA", ], }, - testIntervalInSeconds: 300, - outageConfiguration: { - failingTestLocations: "all", - consecutiveForDown: 2, + testIntervalInSeconds: 14400, + outageConfiguration: null, + ping: { + enabled: true, }, tcp: { enabled: true, port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }, }, tags: [ @@ -343,15 +344,12 @@ async function run() { }, ], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demCreateUri failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -395,7 +393,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -420,15 +417,12 @@ async function run() { const res = await demGetUri(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demGetUri failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -445,7 +439,7 @@ run(); ### Response -**Promise\<[operations.GetUriResponse](../../models/operations/geturiresponse.md)\>** +**Promise\<[components.GetUriResponse](../../models/components/geturiresponse.md)\>** ### Errors @@ -471,7 +465,7 @@ async function run() { const result = await swo.dem.updateUri({ entityId: "", uri: { - name: "example-uri", + name: "solarwinds.com", ipOrDomain: "solarwinds.com", availabilityCheckSettings: { platformOptions: { @@ -486,14 +480,23 @@ async function run() { "NA", ], }, - testIntervalInSeconds: 300, + testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", consecutiveForDown: 2, }, + ping: { + enabled: true, + }, tcp: { enabled: true, port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }, }, tags: [ @@ -505,7 +508,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -530,7 +532,7 @@ async function run() { const res = await demUpdateUri(swo, { entityId: "", uri: { - name: "example-uri", + name: "solarwinds.com", ipOrDomain: "solarwinds.com", availabilityCheckSettings: { platformOptions: { @@ -545,14 +547,23 @@ async function run() { "NA", ], }, - testIntervalInSeconds: 300, + testIntervalInSeconds: 14400, outageConfiguration: { failingTestLocations: "all", consecutiveForDown: 2, }, + ping: { + enabled: true, + }, tcp: { enabled: true, port: 443, + stringToSend: "GET / HTTP/1.1\r\n" + + "Host: solarwinds.com\r\n" + + "Connection: close\r\n" + + "\r\n" + + "", + stringToExpect: "HTTP/1.1 200 OK", }, }, tags: [ @@ -563,15 +574,12 @@ async function run() { ], }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demUpdateUri failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -616,7 +624,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -641,15 +648,12 @@ async function run() { const res = await demDeleteUri(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demDeleteUri failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -693,7 +697,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -718,15 +721,12 @@ async function run() { const res = await demPauseUriMonitoring(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demPauseUriMonitoring failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -770,7 +770,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -795,15 +794,12 @@ async function run() { const res = await demUnpauseUriMonitoring(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demUnpauseUriMonitoring failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -898,7 +894,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -974,15 +969,12 @@ async function run() { spa: true, }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demCreateWebsite failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -1026,7 +1018,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -1051,15 +1042,12 @@ async function run() { const res = await demGetWebsite(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demGetWebsite failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -1076,7 +1064,7 @@ run(); ### Response -**Promise\<[operations.GetWebsiteResponse](../../models/operations/getwebsiteresponse.md)\>** +**Promise\<[components.GetWebsiteResponse](../../models/components/getwebsiteresponse.md)\>** ### Errors @@ -1157,7 +1145,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -1236,15 +1223,12 @@ async function run() { }, }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demUpdateWebsite failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -1289,7 +1273,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -1314,15 +1297,12 @@ async function run() { const res = await demDeleteWebsite(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demDeleteWebsite failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -1366,7 +1346,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -1391,15 +1370,12 @@ async function run() { const res = await demPauseWebsiteMonitoring(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demPauseWebsiteMonitoring failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -1443,7 +1419,6 @@ async function run() { entityId: "", }); - // Handle the result console.log(result); } @@ -1468,15 +1443,12 @@ async function run() { const res = await demUnpauseWebsiteMonitoring(swo, { entityId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("demUnpauseWebsiteMonitoring failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/swov1/docs/sdks/entities/README.md b/swov1/docs/sdks/entities/README.md index f5074aa..3062491 100644 --- a/swov1/docs/sdks/entities/README.md +++ b/swov1/docs/sdks/entities/README.md @@ -28,7 +28,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -54,17 +53,14 @@ async function run() { const res = await entitiesListEntities(swo, { type: "", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("entitiesListEntities failed:", res.error); + } } run(); @@ -109,7 +105,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -134,15 +129,12 @@ async function run() { const res = await entitiesGetEntityById(swo, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("entitiesGetEntityById failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -226,14 +218,12 @@ async function run() { }, }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("entitiesUpdateEntityById failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/swov1/docs/sdks/logs/README.md b/swov1/docs/sdks/logs/README.md index 2dcfef0..5f673a9 100644 --- a/swov1/docs/sdks/logs/README.md +++ b/swov1/docs/sdks/logs/README.md @@ -25,7 +25,6 @@ async function run() { const result = await swo.logs.searchLogs({}); for await (const page of result) { - // Handle the page console.log(page); } } @@ -49,17 +48,14 @@ const swo = new SwoCore({ async function run() { const res = await logsSearchLogs(swo, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("logsSearchLogs failed:", res.error); + } } run(); @@ -104,7 +100,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -131,17 +126,14 @@ async function run() { startTime: "", endTime: "", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("logsListLogArchives failed:", res.error); + } } run(); diff --git a/swov1/docs/sdks/metadata/README.md b/swov1/docs/sdks/metadata/README.md index a6b98f4..ab35e23 100644 --- a/swov1/docs/sdks/metadata/README.md +++ b/swov1/docs/sdks/metadata/README.md @@ -24,7 +24,6 @@ const swo = new Swo({ async function run() { const result = await swo.metadata.listEntityTypes(); - // Handle the result console.log(result); } @@ -47,15 +46,12 @@ const swo = new SwoCore({ async function run() { const res = await metadataListEntityTypes(swo); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metadataListEntityTypes failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -97,7 +93,6 @@ async function run() { type: "", }); - // Handle the result console.log(result); } @@ -122,15 +117,12 @@ async function run() { const res = await metadataListMetricsForEntityType(swo, { type: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metadataListMetricsForEntityType failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/swov1/docs/sdks/metrics/README.md b/swov1/docs/sdks/metrics/README.md index 92c2281..06e970e 100644 --- a/swov1/docs/sdks/metrics/README.md +++ b/swov1/docs/sdks/metrics/README.md @@ -32,7 +32,6 @@ async function run() { const result = await swo.metrics.listMetrics({}); for await (const page of result) { - // Handle the page console.log(page); } } @@ -56,17 +55,14 @@ const swo = new SwoCore({ async function run() { const res = await metricsListMetrics(swo, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsListMetrics failed:", res.error); + } } run(); @@ -113,7 +109,6 @@ async function run() { units: "bytes/s", }); - // Handle the result console.log(result); } @@ -142,15 +137,12 @@ async function run() { formula: "rate(system.disk.io[5m])", units: "bytes/s", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metricsCreateCompositeMetric failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -214,37 +206,11 @@ const swo = new Swo({ async function run() { const result = await swo.metrics.listMultiMetricMeasurements({ requestBody: { - metrics: [ - { - id: "throughput-series", - name: "dbo.host.queries.tput", - filter: "id:[id1,id2] category:moderate", - groupBy: [ - "query", - ], - preGroupBy: [ - "host", - ], - preGroupByMethod: "SUM", - }, - { - id: "throughput-series", - name: "dbo.host.queries.tput", - filter: "id:[id1,id2] category:moderate", - groupBy: [ - "query", - ], - preGroupBy: [ - "host", - ], - preGroupByMethod: "SUM", - }, - ], + metrics: [], }, }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -269,45 +235,17 @@ const swo = new SwoCore({ async function run() { const res = await metricsListMultiMetricMeasurements(swo, { requestBody: { - metrics: [ - { - id: "throughput-series", - name: "dbo.host.queries.tput", - filter: "id:[id1,id2] category:moderate", - groupBy: [ - "query", - ], - preGroupBy: [ - "host", - ], - preGroupByMethod: "SUM", - }, - { - id: "throughput-series", - name: "dbo.host.queries.tput", - filter: "id:[id1,id2] category:moderate", - groupBy: [ - "query", - ], - preGroupBy: [ - "host", - ], - preGroupByMethod: "SUM", - }, - ], + metrics: [], }, }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsListMultiMetricMeasurements failed:", res.error); + } } run(); @@ -357,7 +295,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -388,15 +325,12 @@ async function run() { units: "bytes/s", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metricsUpdateCompositeMetric failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -466,14 +400,12 @@ async function run() { const res = await metricsDeleteCompositeMetric(swo, { name: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("metricsDeleteCompositeMetric failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -519,7 +451,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -545,17 +476,14 @@ async function run() { const res = await metricsGetMetricByName(swo, { name: "", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsGetMetricByName failed:", res.error); + } } run(); @@ -600,7 +528,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -626,17 +553,14 @@ async function run() { const res = await metricsListMetricAttributes(swo, { name: "", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsListMetricAttributes failed:", res.error); + } } run(); @@ -682,7 +606,6 @@ async function run() { }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -709,17 +632,14 @@ async function run() { name: "", attributeName: "", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsListMetricAttributeValues failed:", res.error); + } } run(); @@ -761,11 +681,10 @@ const swo = new Swo({ async function run() { const result = await swo.metrics.listMetricMeasurements({ name: "", - seriesType: "SCALAR", + seriesType: "TIMESERIES", }); for await (const page of result) { - // Handle the page console.log(page); } } @@ -790,19 +709,16 @@ const swo = new SwoCore({ async function run() { const res = await metricsListMetricMeasurements(swo, { name: "", - seriesType: "SCALAR", + seriesType: "TIMESERIES", }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - for await (const page of result) { - // Handle the page + if (res.ok) { + const { value: result } = res; + for await (const page of result) { console.log(page); } + } else { + console.log("metricsListMetricMeasurements failed:", res.error); + } } run(); diff --git a/swov1/docs/sdks/tokens/README.md b/swov1/docs/sdks/tokens/README.md index 23c19ac..87ca74f 100644 --- a/swov1/docs/sdks/tokens/README.md +++ b/swov1/docs/sdks/tokens/README.md @@ -30,7 +30,6 @@ async function run() { type: "ingestion", }); - // Handle the result console.log(result); } @@ -60,15 +59,12 @@ async function run() { }, type: "ingestion", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("tokensCreateToken failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -85,7 +81,7 @@ run(); ### Response -**Promise\<[operations.CreateTokenResponse](../../models/operations/createtokenresponse.md)\>** +**Promise\<[components.CreateTokenResponse](../../models/components/createtokenresponse.md)\>** ### Errors diff --git a/swov1/jsr.json b/swov1/jsr.json index 94aa7ef..e434860 100644 --- a/swov1/jsr.json +++ b/swov1/jsr.json @@ -2,7 +2,7 @@ { "name": "@solarwinds/swo-sdk-typescript", - "version": "0.2.0", + "version": "0.3.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/swov1/package-lock.json b/swov1/package-lock.json index e56a2b5..33eb5b7 100644 --- a/swov1/package-lock.json +++ b/swov1/package-lock.json @@ -1,12 +1,12 @@ { "name": "@solarwinds/swo-sdk-typescript", - "version": "0.2.0", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@solarwinds/swo-sdk-typescript", - "version": "0.2.0", + "version": "0.3.0", "bin": { "mcp": "bin/mcp-server.js" }, @@ -23,7 +23,7 @@ "tshy": "^2.0.0", "typescript": "^5.4.5", "typescript-eslint": "^8.22.0", - "zod": "^3.23.4" + "zod": "^3.25.17" }, "peerDependencies": { "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", @@ -3742,10 +3742,11 @@ } }, "node_modules/zod": { - "version": "3.24.2", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.2.tgz", - "integrity": "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==", + "version": "3.25.67", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.67.tgz", + "integrity": "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/swov1/package.json b/swov1/package.json index b344d65..3f234e1 100644 --- a/swov1/package.json +++ b/swov1/package.json @@ -1,6 +1,6 @@ { "name": "@solarwinds/swo-sdk-typescript", - "version": "0.2.0", + "version": "0.3.0", "author": "Speakeasy", "type": "module", "bin": { @@ -55,7 +55,7 @@ "tshy": "^2.0.0", "typescript": "^5.4.5", "typescript-eslint": "^8.22.0", - "zod": "^3.23.4" + "zod": "^3.25.17" }, "dependencies": {}, "exports": { diff --git a/swov1/src/funcs/changeEventsCreateChangeEvent.ts b/swov1/src/funcs/changeEventsCreateChangeEvent.ts index 3b72711..8e9f426 100644 --- a/swov1/src/funcs/changeEventsCreateChangeEvent.ts +++ b/swov1/src/funcs/changeEventsCreateChangeEvent.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -19,7 +18,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -34,13 +35,14 @@ export function changeEventsCreateChangeEvent( ): APIPromise< Result< operations.CreateChangeEventResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -58,13 +60,14 @@ async function $do( [ Result< operations.CreateChangeEventResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -92,6 +95,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createChangeEvent", oAuth2Scopes: [], @@ -122,6 +126,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -142,18 +147,19 @@ async function $do( const [result] = await M.match< operations.CreateChangeEventResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.CreateChangeEventResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/cloudAccountsActivateAwsIntegration.ts b/swov1/src/funcs/cloudAccountsActivateAwsIntegration.ts index 1ab44d7..87e903f 100644 --- a/swov1/src/funcs/cloudAccountsActivateAwsIntegration.ts +++ b/swov1/src/funcs/cloudAccountsActivateAwsIntegration.ts @@ -12,7 +12,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -21,7 +20,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -42,13 +43,14 @@ export function cloudAccountsActivateAwsIntegration( | errors.ActivateAwsIntegrationUnauthorizedError | errors.ActivateAwsIntegrationNotFoundError | errors.ActivateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -70,13 +72,14 @@ async function $do( | errors.ActivateAwsIntegrationUnauthorizedError | errors.ActivateAwsIntegrationNotFoundError | errors.ActivateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -105,6 +108,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "activateAwsIntegration", oAuth2Scopes: [], @@ -135,6 +139,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -163,13 +168,14 @@ async function $do( | errors.ActivateAwsIntegrationUnauthorizedError | errors.ActivateAwsIntegrationNotFoundError | errors.ActivateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.jsonErr(400, errors.ActivateAwsIntegrationBadRequestError$inboundSchema), @@ -184,7 +190,7 @@ async function $do( ), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/cloudAccountsCreateOrgStructure.ts b/swov1/src/funcs/cloudAccountsCreateOrgStructure.ts index 29e7a26..6679932 100644 --- a/swov1/src/funcs/cloudAccountsCreateOrgStructure.ts +++ b/swov1/src/funcs/cloudAccountsCreateOrgStructure.ts @@ -12,7 +12,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -21,7 +20,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -42,13 +43,14 @@ export function cloudAccountsCreateOrgStructure( | errors.CreateOrgStructureUnauthorizedError | errors.CreateOrgStructureNotFoundError | errors.CreateOrgStructureInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -70,13 +72,14 @@ async function $do( | errors.CreateOrgStructureUnauthorizedError | errors.CreateOrgStructureNotFoundError | errors.CreateOrgStructureInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -105,6 +108,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createOrgStructure", oAuth2Scopes: [], @@ -135,6 +139,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -163,13 +168,14 @@ async function $do( | errors.CreateOrgStructureUnauthorizedError | errors.CreateOrgStructureNotFoundError | errors.CreateOrgStructureInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.jsonErr(400, errors.CreateOrgStructureBadRequestError$inboundSchema), @@ -178,7 +184,7 @@ async function $do( M.jsonErr(500, errors.CreateOrgStructureInternalServerError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/cloudAccountsUpdateAwsIntegration.ts b/swov1/src/funcs/cloudAccountsUpdateAwsIntegration.ts index d9f2b50..9215345 100644 --- a/swov1/src/funcs/cloudAccountsUpdateAwsIntegration.ts +++ b/swov1/src/funcs/cloudAccountsUpdateAwsIntegration.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -40,13 +41,14 @@ export function cloudAccountsUpdateAwsIntegration( | errors.UpdateAwsIntegrationBadRequestError | errors.UpdateAwsIntegrationUnauthorizedError | errors.UpdateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -67,13 +69,14 @@ async function $do( | errors.UpdateAwsIntegrationBadRequestError | errors.UpdateAwsIntegrationUnauthorizedError | errors.UpdateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -102,6 +105,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateAwsIntegration", oAuth2Scopes: [], @@ -132,6 +136,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,13 +164,14 @@ async function $do( | errors.UpdateAwsIntegrationBadRequestError | errors.UpdateAwsIntegrationUnauthorizedError | errors.UpdateAwsIntegrationInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.UpdateAwsIntegrationResponse$inboundSchema), M.jsonErr(400, errors.UpdateAwsIntegrationBadRequestError$inboundSchema), @@ -176,7 +182,7 @@ async function $do( ), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/cloudAccountsValidateMgmtAccountOnboarding.ts b/swov1/src/funcs/cloudAccountsValidateMgmtAccountOnboarding.ts index f5fa243..c5f21e5 100644 --- a/swov1/src/funcs/cloudAccountsValidateMgmtAccountOnboarding.ts +++ b/swov1/src/funcs/cloudAccountsValidateMgmtAccountOnboarding.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -41,13 +42,14 @@ export function cloudAccountsValidateMgmtAccountOnboarding( | errors.ValidateMgmtAccountOnboardingBadRequestError | errors.ValidateMgmtAccountOnboardingUnauthorizedError | errors.ValidateMgmtAccountOnboardingInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -68,13 +70,14 @@ async function $do( | errors.ValidateMgmtAccountOnboardingBadRequestError | errors.ValidateMgmtAccountOnboardingUnauthorizedError | errors.ValidateMgmtAccountOnboardingInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -108,6 +111,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "validateMgmtAccountOnboarding", oAuth2Scopes: [], @@ -139,6 +143,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -166,13 +171,14 @@ async function $do( | errors.ValidateMgmtAccountOnboardingBadRequestError | errors.ValidateMgmtAccountOnboardingUnauthorizedError | errors.ValidateMgmtAccountOnboardingInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.MgmtAccountOnboardingResponse$inboundSchema), M.jsonErr( @@ -189,7 +195,7 @@ async function $do( ), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboDeleteDatabase.ts b/swov1/src/funcs/dboDeleteDatabase.ts index 19b08b1..8aa7d27 100644 --- a/swov1/src/funcs/dboDeleteDatabase.ts +++ b/swov1/src/funcs/dboDeleteDatabase.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function dboDeleteDatabase( void, | errors.DeleteDatabaseBadRequestError | errors.DeleteDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( void, | errors.DeleteDatabaseBadRequestError | errors.DeleteDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -103,6 +106,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteDatabase", oAuth2Scopes: [], @@ -133,6 +137,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,20 +164,21 @@ async function $do( void, | errors.DeleteDatabaseBadRequestError | errors.DeleteDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), M.jsonErr(400, errors.DeleteDatabaseBadRequestError$inboundSchema), M.jsonErr(404, errors.DeleteDatabaseNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboGetPluginConfig.ts b/swov1/src/funcs/dboGetPluginConfig.ts index 3f808e5..0f2fa99 100644 --- a/swov1/src/funcs/dboGetPluginConfig.ts +++ b/swov1/src/funcs/dboGetPluginConfig.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function dboGetPluginConfig( components.DatabasePluginConfigResponse, | errors.GetPluginConfigBadRequestError | errors.GetPluginConfigNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( components.DatabasePluginConfigResponse, | errors.GetPluginConfigBadRequestError | errors.GetPluginConfigNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -105,6 +108,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getPluginConfig", oAuth2Scopes: [], @@ -135,6 +139,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -161,20 +166,21 @@ async function $do( components.DatabasePluginConfigResponse, | errors.GetPluginConfigBadRequestError | errors.GetPluginConfigNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.DatabasePluginConfigResponse$inboundSchema), M.jsonErr(400, errors.GetPluginConfigBadRequestError$inboundSchema), M.jsonErr(404, errors.GetPluginConfigNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboGetPlugins.ts b/swov1/src/funcs/dboGetPlugins.ts index 32cac56..0a2732e 100644 --- a/swov1/src/funcs/dboGetPlugins.ts +++ b/swov1/src/funcs/dboGetPlugins.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function dboGetPlugins( components.DatabasePluginStatusResponse, | errors.GetPluginsBadRequestError | errors.GetPluginsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( components.DatabasePluginStatusResponse, | errors.GetPluginsBadRequestError | errors.GetPluginsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -103,6 +106,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getPlugins", oAuth2Scopes: [], @@ -133,6 +137,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,20 +164,21 @@ async function $do( components.DatabasePluginStatusResponse, | errors.GetPluginsBadRequestError | errors.GetPluginsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.DatabasePluginStatusResponse$inboundSchema), M.jsonErr(400, errors.GetPluginsBadRequestError$inboundSchema), M.jsonErr(404, errors.GetPluginsNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboGetPublicKey.ts b/swov1/src/funcs/dboGetPublicKey.ts index 5921302..7c51760 100644 --- a/swov1/src/funcs/dboGetPublicKey.ts +++ b/swov1/src/funcs/dboGetPublicKey.ts @@ -9,7 +9,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,7 +17,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,13 +34,14 @@ export function dboGetPublicKey( components.DatabaseCredentialsPublicKeyResponse, | errors.GetPublicKeyBadRequestError | errors.GetPublicKeyNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( components.DatabaseCredentialsPublicKeyResponse, | errors.GetPublicKeyBadRequestError | errors.GetPublicKeyNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -79,6 +82,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getPublicKey", oAuth2Scopes: [], @@ -108,6 +112,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -134,20 +139,21 @@ async function $do( components.DatabaseCredentialsPublicKeyResponse, | errors.GetPublicKeyBadRequestError | errors.GetPublicKeyNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.DatabaseCredentialsPublicKeyResponse$inboundSchema), M.jsonErr(400, errors.GetPublicKeyBadRequestError$inboundSchema), M.jsonErr(404, errors.GetPublicKeyNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboObserveDatabase.ts b/swov1/src/funcs/dboObserveDatabase.ts index edafef7..fb57d17 100644 --- a/swov1/src/funcs/dboObserveDatabase.ts +++ b/swov1/src/funcs/dboObserveDatabase.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function dboObserveDatabase( Result< operations.ObserveDatabaseResponse, | errors.ObserveDatabaseBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< operations.ObserveDatabaseResponse, | errors.ObserveDatabaseBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -95,6 +98,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "observeDatabase", oAuth2Scopes: [], @@ -125,6 +129,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -150,19 +155,20 @@ async function $do( const [result] = await M.match< operations.ObserveDatabaseResponse, | errors.ObserveDatabaseBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, operations.ObserveDatabaseResponse$inboundSchema), M.jsonErr(400, errors.ObserveDatabaseBadRequestError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboPluginOperation.ts b/swov1/src/funcs/dboPluginOperation.ts index d7c38a1..04745a3 100644 --- a/swov1/src/funcs/dboPluginOperation.ts +++ b/swov1/src/funcs/dboPluginOperation.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function dboPluginOperation( void, | errors.PluginOperationBadRequestError | errors.PluginOperationNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( void, | errors.PluginOperationBadRequestError | errors.PluginOperationNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -109,6 +112,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "pluginOperation", oAuth2Scopes: [], @@ -139,6 +143,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -165,20 +170,21 @@ async function $do( void, | errors.PluginOperationBadRequestError | errors.PluginOperationNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), M.jsonErr(400, errors.PluginOperationBadRequestError$inboundSchema), M.jsonErr(404, errors.PluginOperationNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/dboUpdateDatabase.ts b/swov1/src/funcs/dboUpdateDatabase.ts index c6c37d8..a917a25 100644 --- a/swov1/src/funcs/dboUpdateDatabase.ts +++ b/swov1/src/funcs/dboUpdateDatabase.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function dboUpdateDatabase( void, | errors.UpdateDatabaseBadRequestError | errors.UpdateDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( void, | errors.UpdateDatabaseBadRequestError | errors.UpdateDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -106,6 +109,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateDatabase", oAuth2Scopes: [], @@ -136,6 +140,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -162,20 +167,21 @@ async function $do( void, | errors.UpdateDatabaseBadRequestError | errors.UpdateDatabaseNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), M.jsonErr(400, errors.UpdateDatabaseBadRequestError$inboundSchema), M.jsonErr(404, errors.UpdateDatabaseNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demCreateUri.ts b/swov1/src/funcs/demCreateUri.ts index 3484e43..56d93ac 100644 --- a/swov1/src/funcs/demCreateUri.ts +++ b/swov1/src/funcs/demCreateUri.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -35,13 +36,14 @@ export function demCreateUri( Result< components.EntityId, | errors.CreateUriBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( Result< components.EntityId, | errors.CreateUriBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -94,6 +97,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createUri", oAuth2Scopes: [], @@ -124,6 +128,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -149,19 +154,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.CreateUriBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.EntityId$inboundSchema), M.jsonErr(400, errors.CreateUriBadRequestError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demCreateWebsite.ts b/swov1/src/funcs/demCreateWebsite.ts index 8b82f3d..6dd81e6 100644 --- a/swov1/src/funcs/demCreateWebsite.ts +++ b/swov1/src/funcs/demCreateWebsite.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -35,13 +36,14 @@ export function demCreateWebsite( Result< components.EntityId, | errors.CreateWebsiteBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( Result< components.EntityId, | errors.CreateWebsiteBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -94,6 +97,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createWebsite", oAuth2Scopes: [], @@ -124,6 +128,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -149,19 +154,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.CreateWebsiteBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.EntityId$inboundSchema), M.jsonErr(400, errors.CreateWebsiteBadRequestError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demDeleteUri.ts b/swov1/src/funcs/demDeleteUri.ts index 3412e78..a60a4f6 100644 --- a/swov1/src/funcs/demDeleteUri.ts +++ b/swov1/src/funcs/demDeleteUri.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demDeleteUri( Result< components.EntityId, | errors.DeleteUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.DeleteUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -101,6 +104,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteUri", oAuth2Scopes: [], @@ -131,6 +135,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -156,19 +161,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.DeleteUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.DeleteUriNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demDeleteWebsite.ts b/swov1/src/funcs/demDeleteWebsite.ts index b6df515..6140d96 100644 --- a/swov1/src/funcs/demDeleteWebsite.ts +++ b/swov1/src/funcs/demDeleteWebsite.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demDeleteWebsite( Result< components.EntityId, | errors.DeleteWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.DeleteWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -101,6 +104,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteWebsite", oAuth2Scopes: [], @@ -131,6 +135,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -156,19 +161,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.DeleteWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.DeleteWebsiteNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demGetDemSettings.ts b/swov1/src/funcs/demGetDemSettings.ts index 2ff0d94..adc2044 100644 --- a/swov1/src/funcs/demGetDemSettings.ts +++ b/swov1/src/funcs/demGetDemSettings.ts @@ -9,7 +9,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -17,7 +16,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -30,13 +31,14 @@ export function demGetDemSettings( ): APIPromise< Result< components.OutageConfiguration, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -52,13 +54,14 @@ async function $do( [ Result< components.OutageConfiguration, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -74,6 +77,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getDemSettings", oAuth2Scopes: [], @@ -103,6 +107,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -123,18 +128,19 @@ async function $do( const [result] = await M.match< components.OutageConfiguration, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.OutageConfiguration$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demGetUri.ts b/swov1/src/funcs/demGetUri.ts index 947e3bb..3f46f94 100644 --- a/swov1/src/funcs/demGetUri.ts +++ b/swov1/src/funcs/demGetUri.ts @@ -10,7 +10,7 @@ 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 * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, @@ -19,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,15 +35,16 @@ export function demGetUri( options?: RequestOptions, ): APIPromise< Result< - operations.GetUriResponse, + components.GetUriResponse, | errors.GetUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -58,15 +61,16 @@ async function $do( ): Promise< [ Result< - operations.GetUriResponse, + components.GetUriResponse, | errors.GetUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -100,6 +104,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getUri", oAuth2Scopes: [], @@ -130,6 +135,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -153,21 +159,22 @@ async function $do( }; const [result] = await M.match< - operations.GetUriResponse, + components.GetUriResponse, | errors.GetUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( - M.json(200, operations.GetUriResponse$inboundSchema), + M.json(200, components.GetUriResponse$inboundSchema), M.jsonErr(404, errors.GetUriNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demGetWebsite.ts b/swov1/src/funcs/demGetWebsite.ts index 8b11bc8..7043f92 100644 --- a/swov1/src/funcs/demGetWebsite.ts +++ b/swov1/src/funcs/demGetWebsite.ts @@ -10,7 +10,7 @@ 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 * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, @@ -19,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,15 +35,16 @@ export function demGetWebsite( options?: RequestOptions, ): APIPromise< Result< - operations.GetWebsiteResponse, + components.GetWebsiteResponse, | errors.GetWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -58,15 +61,16 @@ async function $do( ): Promise< [ Result< - operations.GetWebsiteResponse, + components.GetWebsiteResponse, | errors.GetWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -100,6 +104,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getWebsite", oAuth2Scopes: [], @@ -130,6 +135,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -153,21 +159,22 @@ async function $do( }; const [result] = await M.match< - operations.GetWebsiteResponse, + components.GetWebsiteResponse, | errors.GetWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( - M.json(200, operations.GetWebsiteResponse$inboundSchema), + M.json(200, components.GetWebsiteResponse$inboundSchema), M.jsonErr(404, errors.GetWebsiteNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demListProbes.ts b/swov1/src/funcs/demListProbes.ts index 3ca11f0..b54f9b6 100644 --- a/swov1/src/funcs/demListProbes.ts +++ b/swov1/src/funcs/demListProbes.ts @@ -8,7 +8,7 @@ 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 * as components from "../models/components/index.js"; import { ConnectionError, InvalidRequestError, @@ -17,8 +17,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -30,15 +31,16 @@ export function demListProbes( options?: RequestOptions, ): APIPromise< Result< - operations.ListProbesResponse, + components.ListProbesResponse, | errors.ListProbesInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -53,15 +55,16 @@ async function $do( ): Promise< [ Result< - operations.ListProbesResponse, + components.ListProbesResponse, | errors.ListProbesInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -77,6 +80,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listProbes", oAuth2Scopes: [], @@ -106,6 +110,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -129,21 +134,22 @@ async function $do( }; const [result] = await M.match< - operations.ListProbesResponse, + components.ListProbesResponse, | errors.ListProbesInternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( - M.json(200, operations.ListProbesResponse$inboundSchema), + M.json(200, components.ListProbesResponse$inboundSchema), M.jsonErr(500, errors.ListProbesInternalServerError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demPauseUriMonitoring.ts b/swov1/src/funcs/demPauseUriMonitoring.ts index 2f2b068..f6b5e4c 100644 --- a/swov1/src/funcs/demPauseUriMonitoring.ts +++ b/swov1/src/funcs/demPauseUriMonitoring.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demPauseUriMonitoring( Result< components.EntityId, | errors.PauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.PauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -103,6 +106,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "pauseUriMonitoring", oAuth2Scopes: [], @@ -133,6 +137,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -158,19 +163,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.PauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.PauseUriMonitoringNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demPauseWebsiteMonitoring.ts b/swov1/src/funcs/demPauseWebsiteMonitoring.ts index 9b18b8e..cb72998 100644 --- a/swov1/src/funcs/demPauseWebsiteMonitoring.ts +++ b/swov1/src/funcs/demPauseWebsiteMonitoring.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demPauseWebsiteMonitoring( Result< components.EntityId, | errors.PauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.PauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -104,6 +107,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "pauseWebsiteMonitoring", oAuth2Scopes: [], @@ -134,6 +138,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,19 +164,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.PauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.PauseWebsiteMonitoringNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demSetDemSettings.ts b/swov1/src/funcs/demSetDemSettings.ts index 097cbdf..c71ad75 100644 --- a/swov1/src/funcs/demSetDemSettings.ts +++ b/swov1/src/funcs/demSetDemSettings.ts @@ -12,7 +12,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -34,13 +35,14 @@ export function demSetDemSettings( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -58,13 +60,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -92,6 +95,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "setDemSettings", oAuth2Scopes: [], @@ -122,6 +126,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -142,18 +147,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demUnpauseUriMonitoring.ts b/swov1/src/funcs/demUnpauseUriMonitoring.ts index 4302547..43c81e3 100644 --- a/swov1/src/funcs/demUnpauseUriMonitoring.ts +++ b/swov1/src/funcs/demUnpauseUriMonitoring.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demUnpauseUriMonitoring( Result< components.EntityId, | errors.UnpauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.UnpauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -104,6 +107,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "unpauseUriMonitoring", oAuth2Scopes: [], @@ -134,6 +138,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,19 +164,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.UnpauseUriMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.UnpauseUriMonitoringNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demUnpauseWebsiteMonitoring.ts b/swov1/src/funcs/demUnpauseWebsiteMonitoring.ts index 186d9b0..d474833 100644 --- a/swov1/src/funcs/demUnpauseWebsiteMonitoring.ts +++ b/swov1/src/funcs/demUnpauseWebsiteMonitoring.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,13 +37,14 @@ export function demUnpauseWebsiteMonitoring( Result< components.EntityId, | errors.UnpauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -61,13 +63,14 @@ async function $do( Result< components.EntityId, | errors.UnpauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -104,6 +107,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "unpauseWebsiteMonitoring", oAuth2Scopes: [], @@ -134,6 +138,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -159,19 +164,20 @@ async function $do( const [result] = await M.match< components.EntityId, | errors.UnpauseWebsiteMonitoringNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(404, errors.UnpauseWebsiteMonitoringNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demUpdateUri.ts b/swov1/src/funcs/demUpdateUri.ts index af4f280..c2c8191 100644 --- a/swov1/src/funcs/demUpdateUri.ts +++ b/swov1/src/funcs/demUpdateUri.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function demUpdateUri( components.EntityId, | errors.UpdateUriBadRequestError | errors.UpdateUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( components.EntityId, | errors.UpdateUriBadRequestError | errors.UpdateUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -104,6 +107,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateUri", oAuth2Scopes: [], @@ -134,6 +138,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -160,20 +165,21 @@ async function $do( components.EntityId, | errors.UpdateUriBadRequestError | errors.UpdateUriNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(400, errors.UpdateUriBadRequestError$inboundSchema), M.jsonErr(404, errors.UpdateUriNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/demUpdateWebsite.ts b/swov1/src/funcs/demUpdateWebsite.ts index 08ac904..257acbf 100644 --- a/swov1/src/funcs/demUpdateWebsite.ts +++ b/swov1/src/funcs/demUpdateWebsite.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -37,13 +38,14 @@ export function demUpdateWebsite( components.EntityId, | errors.UpdateWebsiteBadRequestError | errors.UpdateWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( components.EntityId, | errors.UpdateWebsiteBadRequestError | errors.UpdateWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -104,6 +107,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateWebsite", oAuth2Scopes: [], @@ -134,6 +138,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -160,20 +165,21 @@ async function $do( components.EntityId, | errors.UpdateWebsiteBadRequestError | errors.UpdateWebsiteNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.EntityId$inboundSchema), M.jsonErr(400, errors.UpdateWebsiteBadRequestError$inboundSchema), M.jsonErr(404, errors.UpdateWebsiteNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/entitiesGetEntityById.ts b/swov1/src/funcs/entitiesGetEntityById.ts index af6c115..4451835 100644 --- a/swov1/src/funcs/entitiesGetEntityById.ts +++ b/swov1/src/funcs/entitiesGetEntityById.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,13 +39,14 @@ export function entitiesGetEntityById( | errors.GetEntityByIdBadRequestError | errors.GetEntityByIdUnauthorizedError | errors.GetEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -65,13 +67,14 @@ async function $do( | errors.GetEntityByIdBadRequestError | errors.GetEntityByIdUnauthorizedError | errors.GetEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -105,6 +108,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getEntityById", oAuth2Scopes: [], @@ -135,6 +139,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -162,13 +167,14 @@ async function $do( | errors.GetEntityByIdBadRequestError | errors.GetEntityByIdUnauthorizedError | errors.GetEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.Entity$inboundSchema), M.jsonErr(400, errors.GetEntityByIdBadRequestError$inboundSchema), @@ -176,7 +182,7 @@ async function $do( M.jsonErr(404, errors.GetEntityByIdNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/entitiesListEntities.ts b/swov1/src/funcs/entitiesListEntities.ts index 267f5b6..174f33c 100644 --- a/swov1/src/funcs/entitiesListEntities.ts +++ b/swov1/src/funcs/entitiesListEntities.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -45,13 +46,14 @@ export function entitiesListEntities( operations.ListEntitiesResponse, | errors.ListEntitiesBadRequestError | errors.ListEntitiesUnauthorizedError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -74,13 +76,14 @@ async function $do( operations.ListEntitiesResponse, | errors.ListEntitiesBadRequestError | errors.ListEntitiesUnauthorizedError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -120,6 +123,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listEntities", oAuth2Scopes: [], @@ -151,6 +155,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -177,13 +182,14 @@ async function $do( operations.ListEntitiesResponse, | errors.ListEntitiesBadRequestError | errors.ListEntitiesUnauthorizedError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListEntitiesResponse$inboundSchema, { key: "Result", @@ -192,7 +198,7 @@ async function $do( M.jsonErr(401, errors.ListEntitiesUnauthorizedError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -209,13 +215,14 @@ async function $do( operations.ListEntitiesResponse, | errors.ListEntitiesBadRequestError | errors.ListEntitiesUnauthorizedError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/entitiesUpdateEntityById.ts b/swov1/src/funcs/entitiesUpdateEntityById.ts index dbcb6ea..327b200 100644 --- a/swov1/src/funcs/entitiesUpdateEntityById.ts +++ b/swov1/src/funcs/entitiesUpdateEntityById.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,13 +39,14 @@ export function entitiesUpdateEntityById( | errors.UpdateEntityByIdBadRequestError | errors.UpdateEntityByIdUnauthorizedError | errors.UpdateEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -65,13 +67,14 @@ async function $do( | errors.UpdateEntityByIdBadRequestError | errors.UpdateEntityByIdUnauthorizedError | errors.UpdateEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -106,6 +109,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateEntityById", oAuth2Scopes: [], @@ -136,6 +140,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -163,13 +168,14 @@ async function $do( | errors.UpdateEntityByIdBadRequestError | errors.UpdateEntityByIdUnauthorizedError | errors.UpdateEntityByIdNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(202, z.void()), M.jsonErr(400, errors.UpdateEntityByIdBadRequestError$inboundSchema), @@ -177,7 +183,7 @@ async function $do( M.jsonErr(404, errors.UpdateEntityByIdNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/logsListLogArchives.ts b/swov1/src/funcs/logsListLogArchives.ts index 6b25908..0aa7b3c 100644 --- a/swov1/src/funcs/logsListLogArchives.ts +++ b/swov1/src/funcs/logsListLogArchives.ts @@ -11,7 +11,6 @@ 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, @@ -19,7 +18,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -45,13 +46,14 @@ export function logsListLogArchives( PageIterator< Result< operations.ListLogArchivesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -72,13 +74,14 @@ async function $do( PageIterator< Result< operations.ListLogArchivesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -118,6 +121,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listLogArchives", oAuth2Scopes: [], @@ -149,6 +153,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -173,20 +178,21 @@ async function $do( const [result, raw] = await M.match< operations.ListLogArchivesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListLogArchivesResponse$inboundSchema, { key: "Result", }), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -201,13 +207,14 @@ async function $do( next: Paginator< Result< operations.ListLogArchivesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/logsSearchLogs.ts b/swov1/src/funcs/logsSearchLogs.ts index a3d2061..5ef5753 100644 --- a/swov1/src/funcs/logsSearchLogs.ts +++ b/swov1/src/funcs/logsSearchLogs.ts @@ -11,7 +11,6 @@ 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, @@ -19,7 +18,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -45,13 +46,14 @@ export function logsSearchLogs( PageIterator< Result< operations.SearchLogsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -72,13 +74,14 @@ async function $do( PageIterator< Result< operations.SearchLogsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -122,6 +125,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "searchLogs", oAuth2Scopes: [], @@ -153,6 +157,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -177,18 +182,19 @@ async function $do( const [result, raw] = await M.match< operations.SearchLogsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.SearchLogsResponse$inboundSchema, { key: "Result" }), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -203,13 +209,14 @@ async function $do( next: Paginator< Result< operations.SearchLogsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metadataListEntityTypes.ts b/swov1/src/funcs/metadataListEntityTypes.ts index 44e57f5..8e699b7 100644 --- a/swov1/src/funcs/metadataListEntityTypes.ts +++ b/swov1/src/funcs/metadataListEntityTypes.ts @@ -8,7 +8,6 @@ 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, @@ -16,7 +15,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,13 +34,14 @@ export function metadataListEntityTypes( ): APIPromise< Result< operations.ListEntityTypesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -55,13 +57,14 @@ async function $do( [ Result< operations.ListEntityTypesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -77,6 +80,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listEntityTypes", oAuth2Scopes: [], @@ -106,6 +110,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -126,18 +131,19 @@ async function $do( const [result] = await M.match< operations.ListEntityTypesResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListEntityTypesResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/metadataListMetricsForEntityType.ts b/swov1/src/funcs/metadataListMetricsForEntityType.ts index fc359cf..834cb37 100644 --- a/swov1/src/funcs/metadataListMetricsForEntityType.ts +++ b/swov1/src/funcs/metadataListMetricsForEntityType.ts @@ -10,7 +10,6 @@ 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, @@ -19,7 +18,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -38,13 +39,14 @@ export function metadataListMetricsForEntityType( Result< operations.ListMetricsForEntityTypeResponse, | errors.ListMetricsForEntityTypeNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -63,13 +65,14 @@ async function $do( Result< operations.ListMetricsForEntityTypeResponse, | errors.ListMetricsForEntityTypeNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -111,6 +114,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMetricsForEntityType", oAuth2Scopes: [], @@ -142,6 +146,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -167,19 +172,20 @@ async function $do( const [result] = await M.match< operations.ListMetricsForEntityTypeResponse, | errors.ListMetricsForEntityTypeNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMetricsForEntityTypeResponse$inboundSchema), M.jsonErr(404, errors.ListMetricsForEntityTypeNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/metricsCreateCompositeMetric.ts b/swov1/src/funcs/metricsCreateCompositeMetric.ts index c5741d2..c8064c3 100644 --- a/swov1/src/funcs/metricsCreateCompositeMetric.ts +++ b/swov1/src/funcs/metricsCreateCompositeMetric.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -39,13 +40,14 @@ export function metricsCreateCompositeMetric( components.CompositeMetric, | errors.CreateCompositeMetricBadRequestError | errors.CreateCompositeMetricForbiddenError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -65,13 +67,14 @@ async function $do( components.CompositeMetric, | errors.CreateCompositeMetricBadRequestError | errors.CreateCompositeMetricForbiddenError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -99,6 +102,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createCompositeMetric", oAuth2Scopes: [], @@ -129,6 +133,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -155,20 +160,21 @@ async function $do( components.CompositeMetric, | errors.CreateCompositeMetricBadRequestError | errors.CreateCompositeMetricForbiddenError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.CompositeMetric$inboundSchema), M.jsonErr(400, errors.CreateCompositeMetricBadRequestError$inboundSchema), M.jsonErr(403, errors.CreateCompositeMetricForbiddenError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/metricsDeleteCompositeMetric.ts b/swov1/src/funcs/metricsDeleteCompositeMetric.ts index 5ec5f22..22584eb 100644 --- a/swov1/src/funcs/metricsDeleteCompositeMetric.ts +++ b/swov1/src/funcs/metricsDeleteCompositeMetric.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -40,13 +41,14 @@ export function metricsDeleteCompositeMetric( void, | errors.DeleteCompositeMetricForbiddenError | errors.DeleteCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -66,13 +68,14 @@ async function $do( void, | errors.DeleteCompositeMetricForbiddenError | errors.DeleteCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -107,6 +110,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteCompositeMetric", oAuth2Scopes: [], @@ -137,6 +141,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -163,20 +168,21 @@ async function $do( void, | errors.DeleteCompositeMetricForbiddenError | errors.DeleteCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), M.jsonErr(403, errors.DeleteCompositeMetricForbiddenError$inboundSchema), M.jsonErr(404, errors.DeleteCompositeMetricNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/metricsGetMetricByName.ts b/swov1/src/funcs/metricsGetMetricByName.ts index f4b99bf..5860ad4 100644 --- a/swov1/src/funcs/metricsGetMetricByName.ts +++ b/swov1/src/funcs/metricsGetMetricByName.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -47,13 +48,14 @@ export function metricsGetMetricByName( Result< operations.GetMetricByNameResponse, | errors.GetMetricByNameNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -75,13 +77,14 @@ async function $do( Result< operations.GetMetricByNameResponse, | errors.GetMetricByNameNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -118,6 +121,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getMetricByName", oAuth2Scopes: [], @@ -148,6 +152,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -173,13 +178,14 @@ async function $do( const [result, raw] = await M.match< operations.GetMetricByNameResponse, | errors.GetMetricByNameNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.GetMetricByNameResponse$inboundSchema, { key: "Result", @@ -187,7 +193,7 @@ async function $do( M.jsonErr(404, errors.GetMetricByNameNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -203,13 +209,14 @@ async function $do( Result< operations.GetMetricByNameResponse, | errors.GetMetricByNameNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsListMetricAttributeValues.ts b/swov1/src/funcs/metricsListMetricAttributeValues.ts index 192c816..3d3d750 100644 --- a/swov1/src/funcs/metricsListMetricAttributeValues.ts +++ b/swov1/src/funcs/metricsListMetricAttributeValues.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -47,13 +48,14 @@ export function metricsListMetricAttributeValues( Result< operations.ListMetricAttributeValuesResponse, | errors.ListMetricAttributeValuesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -75,13 +77,14 @@ async function $do( Result< operations.ListMetricAttributeValuesResponse, | errors.ListMetricAttributeValuesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -132,6 +135,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMetricAttributeValues", oAuth2Scopes: [], @@ -163,6 +167,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -188,13 +193,14 @@ async function $do( const [result, raw] = await M.match< operations.ListMetricAttributeValuesResponse, | errors.ListMetricAttributeValuesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMetricAttributeValuesResponse$inboundSchema, { key: "Result", @@ -202,7 +208,7 @@ async function $do( M.jsonErr(404, errors.ListMetricAttributeValuesNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -218,13 +224,14 @@ async function $do( Result< operations.ListMetricAttributeValuesResponse, | errors.ListMetricAttributeValuesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsListMetricAttributes.ts b/swov1/src/funcs/metricsListMetricAttributes.ts index 33c04f2..fb9ca25 100644 --- a/swov1/src/funcs/metricsListMetricAttributes.ts +++ b/swov1/src/funcs/metricsListMetricAttributes.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -47,13 +48,14 @@ export function metricsListMetricAttributes( Result< operations.ListMetricAttributesResponse, | errors.ListMetricAttributesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -75,13 +77,14 @@ async function $do( Result< operations.ListMetricAttributesResponse, | errors.ListMetricAttributesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -128,6 +131,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMetricAttributes", oAuth2Scopes: [], @@ -159,6 +163,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -184,13 +189,14 @@ async function $do( const [result, raw] = await M.match< operations.ListMetricAttributesResponse, | errors.ListMetricAttributesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMetricAttributesResponse$inboundSchema, { key: "Result", @@ -198,7 +204,7 @@ async function $do( M.jsonErr(404, errors.ListMetricAttributesNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -214,13 +220,14 @@ async function $do( Result< operations.ListMetricAttributesResponse, | errors.ListMetricAttributesNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsListMetricMeasurements.ts b/swov1/src/funcs/metricsListMetricMeasurements.ts index 176dd6a..d1786cc 100644 --- a/swov1/src/funcs/metricsListMetricMeasurements.ts +++ b/swov1/src/funcs/metricsListMetricMeasurements.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -44,13 +45,14 @@ export function metricsListMetricMeasurements( Result< operations.ListMetricMeasurementsResponse, | errors.ListMetricMeasurementsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -72,13 +74,14 @@ async function $do( Result< operations.ListMetricMeasurementsResponse, | errors.ListMetricMeasurementsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -132,6 +135,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMetricMeasurements", oAuth2Scopes: [], @@ -163,6 +167,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -188,13 +193,14 @@ async function $do( const [result, raw] = await M.match< operations.ListMetricMeasurementsResponse, | errors.ListMetricMeasurementsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMetricMeasurementsResponse$inboundSchema, { key: "Result", @@ -202,7 +208,7 @@ async function $do( M.jsonErr(404, errors.ListMetricMeasurementsNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -218,13 +224,14 @@ async function $do( Result< operations.ListMetricMeasurementsResponse, | errors.ListMetricMeasurementsNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsListMetrics.ts b/swov1/src/funcs/metricsListMetrics.ts index 6b31ea0..93673a5 100644 --- a/swov1/src/funcs/metricsListMetrics.ts +++ b/swov1/src/funcs/metricsListMetrics.ts @@ -11,7 +11,6 @@ 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, @@ -19,7 +18,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -45,13 +46,14 @@ export function metricsListMetrics( PageIterator< Result< operations.ListMetricsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -72,13 +74,14 @@ async function $do( PageIterator< Result< operations.ListMetricsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -119,6 +122,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMetrics", oAuth2Scopes: [], @@ -150,6 +154,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -174,20 +179,21 @@ async function $do( const [result, raw] = await M.match< operations.ListMetricsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMetricsResponse$inboundSchema, { key: "Result", }), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -202,13 +208,14 @@ async function $do( next: Paginator< Result< operations.ListMetricsResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsListMultiMetricMeasurements.ts b/swov1/src/funcs/metricsListMultiMetricMeasurements.ts index 0f1e093..b9020f4 100644 --- a/swov1/src/funcs/metricsListMultiMetricMeasurements.ts +++ b/swov1/src/funcs/metricsListMultiMetricMeasurements.ts @@ -11,7 +11,6 @@ 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, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -68,13 +69,14 @@ export function metricsListMultiMetricMeasurements( Result< operations.ListMultiMetricMeasurementsResponse, | errors.ListMultiMetricMeasurementsBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } > @@ -96,13 +98,14 @@ async function $do( Result< operations.ListMultiMetricMeasurementsResponse, | errors.ListMultiMetricMeasurementsBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, { url: string } >, @@ -143,6 +146,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listMultiMetricMeasurements", oAuth2Scopes: [], @@ -174,6 +178,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -199,13 +204,14 @@ async function $do( const [result, raw] = await M.match< operations.ListMultiMetricMeasurementsResponse, | errors.ListMultiMetricMeasurementsBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.ListMultiMetricMeasurementsResponse$inboundSchema, { key: "Result", @@ -216,7 +222,7 @@ async function $do( ), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [haltIterator(result), { status: "complete", @@ -232,13 +238,14 @@ async function $do( Result< operations.ListMultiMetricMeasurementsResponse, | errors.ListMultiMetricMeasurementsBadRequestError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > >; "~next"?: { url: string }; diff --git a/swov1/src/funcs/metricsUpdateCompositeMetric.ts b/swov1/src/funcs/metricsUpdateCompositeMetric.ts index 790fd99..c7db3cd 100644 --- a/swov1/src/funcs/metricsUpdateCompositeMetric.ts +++ b/swov1/src/funcs/metricsUpdateCompositeMetric.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -20,7 +19,9 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { SwoError } from "../models/errors/swoerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -41,13 +42,14 @@ export function metricsUpdateCompositeMetric( | errors.UpdateCompositeMetricBadRequestError | errors.UpdateCompositeMetricForbiddenError | errors.UpdateCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -68,13 +70,14 @@ async function $do( | errors.UpdateCompositeMetricBadRequestError | errors.UpdateCompositeMetricForbiddenError | errors.UpdateCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -112,6 +115,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateCompositeMetric", oAuth2Scopes: [], @@ -142,6 +146,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -169,13 +174,14 @@ async function $do( | errors.UpdateCompositeMetricBadRequestError | errors.UpdateCompositeMetricForbiddenError | errors.UpdateCompositeMetricNotFoundError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.CompositeMetric$inboundSchema.optional()), M.nil(202, components.CompositeMetric$inboundSchema.optional()), @@ -184,7 +190,7 @@ async function $do( M.jsonErr(404, errors.UpdateCompositeMetricNotFoundError$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response, { extraFields: responseFields }); + )(response, req, { extraFields: responseFields }); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/funcs/tokensCreateToken.ts b/swov1/src/funcs/tokensCreateToken.ts index 9300787..4d951e2 100644 --- a/swov1/src/funcs/tokensCreateToken.ts +++ b/swov1/src/funcs/tokensCreateToken.ts @@ -11,7 +11,6 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -19,8 +18,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; +import { SwoError } from "../models/errors/swoerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,14 +33,15 @@ export function tokensCreateToken( options?: RequestOptions, ): APIPromise< Result< - operations.CreateTokenResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + components.CreateTokenResponse, + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,14 +58,15 @@ async function $do( ): Promise< [ Result< - operations.CreateTokenResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + components.CreateTokenResponse, + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -92,6 +94,7 @@ async function $do( const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createToken", oAuth2Scopes: [], @@ -122,6 +125,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -141,19 +145,20 @@ async function $do( const response = doResult.value; const [result] = await M.match< - operations.CreateTokenResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + components.CreateTokenResponse, + | SwoError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( - M.json(200, operations.CreateTokenResponse$inboundSchema), + M.json(200, components.CreateTokenResponse$inboundSchema), M.fail([401, 403, "4XX"]), M.fail([500, 503, "5XX"]), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/swov1/src/hooks/types.ts b/swov1/src/hooks/types.ts index 1d56c6f..8bfe4fe 100644 --- a/swov1/src/hooks/types.ts +++ b/swov1/src/hooks/types.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { SDKOptions } from "../lib/config.js"; import { HTTPClient, RequestInput } from "../lib/http.js"; import { RetryConfig } from "../lib/retries.js"; import { SecurityState } from "../lib/security.js"; @@ -13,6 +14,7 @@ export type HookContext = { securitySource?: any | (() => Promise); retryConfig: RetryConfig; resolvedSecurity: SecurityState | null; + options: SDKOptions; }; export type Awaitable = T | Promise; diff --git a/swov1/src/index.ts b/swov1/src/index.ts index 5ddc765..dbcba16 100644 --- a/swov1/src/index.ts +++ b/swov1/src/index.ts @@ -4,4 +4,6 @@ export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export { HTTPClient } from "./lib/http.js"; +export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; export * from "./sdk/sdk.js"; diff --git a/swov1/src/lib/config.ts b/swov1/src/lib/config.ts index 342dcc5..099a2ad 100644 --- a/swov1/src/lib/config.ts +++ b/swov1/src/lib/config.ts @@ -33,6 +33,10 @@ export type SDKOptions = { * Allows overriding the default server URL used by the SDK */ serverURL?: string | undefined; + /** + * Allows overriding the default user agent used by the SDK + */ + userAgent?: string | undefined; /** * Allows overriding the default retry config used by the SDK */ @@ -67,8 +71,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.8", - sdkVersion: "0.2.0", - genVersion: "2.599.0", + sdkVersion: "0.3.0", + genVersion: "2.632.1", userAgent: - "speakeasy-sdk/typescript 0.2.0 2.599.0 1.0.8 @solarwinds/swo-sdk-typescript", + "speakeasy-sdk/typescript 0.3.0 2.632.1 1.0.8 @solarwinds/swo-sdk-typescript", } as const; diff --git a/swov1/src/lib/files.ts b/swov1/src/lib/files.ts index 59d15f0..0344cd0 100644 --- a/swov1/src/lib/files.ts +++ b/swov1/src/lib/files.ts @@ -38,3 +38,45 @@ export async function readableStreamToArrayBuffer( return concatenatedChunks.buffer as ArrayBuffer; } + +/** + * Determines the MIME content type based on a file's extension. + * Returns null if the extension is not recognized. + */ +export function getContentTypeFromFileName(fileName: string): string | null { + if (!fileName) return null; + + const ext = fileName.toLowerCase().split(".").pop(); + if (!ext) return null; + + const mimeTypes: Record = { + json: "application/json", + xml: "application/xml", + html: "text/html", + htm: "text/html", + txt: "text/plain", + csv: "text/csv", + pdf: "application/pdf", + png: "image/png", + jpg: "image/jpeg", + jpeg: "image/jpeg", + gif: "image/gif", + svg: "image/svg+xml", + js: "application/javascript", + css: "text/css", + zip: "application/zip", + tar: "application/x-tar", + gz: "application/gzip", + mp4: "video/mp4", + mp3: "audio/mpeg", + wav: "audio/wav", + webp: "image/webp", + ico: "image/x-icon", + woff: "font/woff", + woff2: "font/woff2", + ttf: "font/ttf", + otf: "font/otf", + }; + + return mimeTypes[ext] || null; +} diff --git a/swov1/src/lib/matchers.ts b/swov1/src/lib/matchers.ts index 17151be..77d4108 100644 --- a/swov1/src/lib/matchers.ts +++ b/swov1/src/lib/matchers.ts @@ -3,11 +3,10 @@ */ import { APIError } from "../models/errors/apierror.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { ERR, OK, 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" @@ -176,17 +175,19 @@ export type MatchedError = Matchers extends Matcher[] : never; export type MatchFunc = ( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( ...matchers: Array> -): MatchFunc { +): MatchFunc { return async function matchFunc( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ): Promise< - [result: Result, raw: unknown] + [result: Result, raw: unknown] > { let raw: unknown; let matcher: Matcher | undefined; @@ -205,21 +206,22 @@ export function match( } if (!matcher) { - const responseBody = await response.text(); return [{ ok: false, - error: new APIError( - "Unexpected API response status or content-type", + error: new APIError("Unexpected Status or Content-Type", { response, - responseBody, - ), - }, responseBody]; + request, + body: await response.text().catch(() => ""), + }), + }, raw]; } const encoding = matcher.enc; + let body = ""; switch (encoding) { case "json": - raw = await response.json(); + body = await response.text(); + raw = JSON.parse(body); break; case "jsonl": raw = response.body; @@ -231,16 +233,19 @@ export function match( raw = response.body; break; case "text": - raw = await response.text(); + body = await response.text(); + raw = body; break; case "sse": raw = response.body; break; case "nil": - raw = await discardResponseBody(response); + body = await response.text(); + raw = undefined; break; case "fail": - raw = await response.text(); + body = await response.text(); + raw = body; break; default: encoding satisfies never; @@ -250,11 +255,7 @@ export function match( if (matcher.enc === "fail") { return [{ ok: false, - error: new APIError( - "API error occurred", - response, - typeof raw === "string" ? raw : "", - ), + error: new APIError("API error occurred", { request, response, body }), }, raw]; } @@ -266,6 +267,9 @@ export function match( ...options?.extraFields, ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), ...(isPlainObject(raw) ? raw : null), + request$: request, + response$: response, + body$: body, }; } else if (resultKey) { data = { @@ -284,18 +288,20 @@ export function match( } if ("err" in matcher) { - const result = safeParse( + const result = safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ); return [result.ok ? { ok: false, error: result.value } : result, raw]; } else { return [ - safeParse( + safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ), raw, ]; @@ -318,25 +324,22 @@ export function unpackHeaders(headers: Headers): Record { 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; - } - +function safeParseResponse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, + httpMeta: { response: Response; request: Request; body: string }, +): Result { try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + return OK(fn(rawValue)); + } catch (err) { + return ERR( + new ResponseValidationError(errorMessage, { + cause: err, + rawValue, + rawMessage: errorMessage, + ...httpMeta, + }), + ); } } diff --git a/swov1/src/lib/sdks.ts b/swov1/src/lib/sdks.ts index 94f8500..2e0b05d 100644 --- a/swov1/src/lib/sdks.ts +++ b/swov1/src/lib/sdks.ts @@ -65,6 +65,7 @@ type RequestConfig = { headers?: HeadersInit; security?: SecurityState | null; uaHeader?: string; + userAgent?: string | undefined; timeoutMs?: number; }; @@ -96,19 +97,21 @@ export class ClientSDK { } 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; + + this._options = { ...options, hooks: this.#hooks }; + + this.#logger = this._options.debugLogger; if (!this.#logger && env().SWO_DEBUG) { this.#logger = console; } @@ -184,7 +187,10 @@ export class ClientSDK { // 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); + headers.set( + conf.uaHeader ?? "user-agent", + conf.userAgent ?? SDK_METADATA.userAgent, + ); } const fetchOptions: Omit = { diff --git a/swov1/src/lib/security.ts b/swov1/src/lib/security.ts index 4730f0d..86165e6 100644 --- a/swov1/src/lib/security.ts +++ b/swov1/src/lib/security.ts @@ -7,8 +7,8 @@ import { env } from "./env.js"; type OAuth2PasswordFlow = { username: string; - password?: string | undefined; - clientID: string; + password: string; + clientID?: string | undefined; clientSecret?: string | undefined; tokenURL: string; }; diff --git a/swov1/src/mcp-server/cli/start/impl.ts b/swov1/src/mcp-server/cli/start/impl.ts index 1bd38f0..b9b39a3 100644 --- a/swov1/src/mcp-server/cli/start/impl.ts +++ b/swov1/src/mcp-server/cli/start/impl.ts @@ -51,7 +51,7 @@ async function startStdio(flags: StartCommandFlags) { logger, allowedTools: flags.tool, scopes: flags.scope, - ...{ apiToken: flags["api-token"] }, + ...{ apiToken: flags["api-token"] ?? "" }, serverURL: flags["server-url"], serverIdx: flags["server-index"], region: flags.region, @@ -73,7 +73,7 @@ async function startSSE(flags: StartCommandFlags) { logger, allowedTools: flags.tool, scopes: flags.scope, - ...{ apiToken: flags["api-token"] }, + ...{ apiToken: flags["api-token"] ?? "" }, serverURL: flags["server-url"], serverIdx: flags["server-index"], region: flags.region, diff --git a/swov1/src/mcp-server/mcp-server.ts b/swov1/src/mcp-server/mcp-server.ts index d643b83..a70686a 100644 --- a/swov1/src/mcp-server/mcp-server.ts +++ b/swov1/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.2.0", + currentVersion: "0.3.0", }, }); diff --git a/swov1/src/mcp-server/server.ts b/swov1/src/mcp-server/server.ts index a17aebc..d48eacf 100644 --- a/swov1/src/mcp-server/server.ts +++ b/swov1/src/mcp-server/server.ts @@ -69,7 +69,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Swo", - version: "0.2.0", + version: "0.3.0", }); const client = new SwoCore({ diff --git a/swov1/src/models/components/checkforstringoperator.ts b/swov1/src/models/components/checkforstringoperator.ts deleted file mode 100644 index 8a25a12..0000000 --- a/swov1/src/models/components/checkforstringoperator.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../../types/enums.js"; - -export const CheckForStringOperator = { - Contains: "CONTAINS", - DoesNotContain: "DOES_NOT_CONTAIN", -} as const; -export type CheckForStringOperator = ClosedEnum; - -/** @internal */ -export const CheckForStringOperator$inboundSchema: z.ZodNativeEnum< - typeof CheckForStringOperator -> = z.nativeEnum(CheckForStringOperator); - -/** @internal */ -export const CheckForStringOperator$outboundSchema: z.ZodNativeEnum< - typeof CheckForStringOperator -> = CheckForStringOperator$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CheckForStringOperator$ { - /** @deprecated use `CheckForStringOperator$inboundSchema` instead. */ - export const inboundSchema = CheckForStringOperator$inboundSchema; - /** @deprecated use `CheckForStringOperator$outboundSchema` instead. */ - export const outboundSchema = CheckForStringOperator$outboundSchema; -} diff --git a/swov1/src/models/components/createtokenrequest.ts b/swov1/src/models/components/createtokenrequest.ts index 8627086..05ac955 100644 --- a/swov1/src/models/components/createtokenrequest.ts +++ b/swov1/src/models/components/createtokenrequest.ts @@ -14,15 +14,15 @@ export type Tags = { tagWithoutValue: string; }; -export const Type = { +export const CreateTokenRequestType = { Ingestion: "ingestion", } as const; -export type Type = ClosedEnum; +export type CreateTokenRequestType = ClosedEnum; export type CreateTokenRequest = { name: string; tags: Tags; - type: Type; + type: CreateTokenRequestType; }; /** @internal */ @@ -81,23 +81,24 @@ export function tagsFromJSON( } /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); +export const CreateTokenRequestType$inboundSchema: z.ZodNativeEnum< + typeof CreateTokenRequestType +> = z.nativeEnum(CreateTokenRequestType); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; +export const CreateTokenRequestType$outboundSchema: z.ZodNativeEnum< + typeof CreateTokenRequestType +> = CreateTokenRequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; +export namespace CreateTokenRequestType$ { + /** @deprecated use `CreateTokenRequestType$inboundSchema` instead. */ + export const inboundSchema = CreateTokenRequestType$inboundSchema; + /** @deprecated use `CreateTokenRequestType$outboundSchema` instead. */ + export const outboundSchema = CreateTokenRequestType$outboundSchema; } /** @internal */ @@ -108,7 +109,7 @@ export const CreateTokenRequest$inboundSchema: z.ZodType< > = z.object({ name: z.string(), tags: z.lazy(() => Tags$inboundSchema), - type: Type$inboundSchema, + type: CreateTokenRequestType$inboundSchema, }); /** @internal */ @@ -126,7 +127,7 @@ export const CreateTokenRequest$outboundSchema: z.ZodType< > = z.object({ name: z.string(), tags: z.lazy(() => Tags$outboundSchema), - type: Type$outboundSchema, + type: CreateTokenRequestType$outboundSchema, }); /** diff --git a/swov1/src/models/operations/createtoken.ts b/swov1/src/models/components/createtokenresponse.ts similarity index 98% rename from swov1/src/models/operations/createtoken.ts rename to swov1/src/models/components/createtokenresponse.ts index fa74a14..5286c09 100644 --- a/swov1/src/models/operations/createtoken.ts +++ b/swov1/src/models/components/createtokenresponse.ts @@ -7,10 +7,10 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -/** - * The request has succeeded. - */ export type CreateTokenResponse = { + /** + * API token. + */ token: string; }; diff --git a/swov1/src/models/components/databaseauthmethod.ts b/swov1/src/models/components/databaseauthmethod.ts index 5983ee5..84a6af2 100644 --- a/swov1/src/models/components/databaseauthmethod.ts +++ b/swov1/src/models/components/databaseauthmethod.ts @@ -9,8 +9,8 @@ export const DatabaseAuthMethod = { Basic: "basic", Awsiam: "awsiam", Windows: "windows", - Entraclientcert: "entraclientcert", Entraclientsecret: "entraclientsecret", + Entraclientcert: "entraclientcert", Cert: "cert", } as const; export type DatabaseAuthMethod = ClosedEnum; diff --git a/swov1/src/models/components/databaseconnectionoptions.ts b/swov1/src/models/components/databaseconnectionoptions.ts index 7e06914..ecd7443 100644 --- a/swov1/src/models/components/databaseconnectionoptions.ts +++ b/swov1/src/models/components/databaseconnectionoptions.ts @@ -4,46 +4,14 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * SSL mode such as require, verify-ca, verify-full as applicable - */ -export const DatabaseConnectionOptionsSslMode = { - Require: "require", - VerfifyCa: "verfify-ca", - VerifyFull: "verify-full", -} as const; -/** - * SSL mode such as require, verify-ca, verify-full as applicable - */ -export type DatabaseConnectionOptionsSslMode = ClosedEnum< - typeof DatabaseConnectionOptionsSslMode ->; - -/** - * SSL connection options, when sslEnabled is true - */ -export type DatabaseConnectionOptionsSslOptions = { - /** - * SSL mode such as require, verify-ca, verify-full as applicable - */ - sslMode?: DatabaseConnectionOptionsSslMode | undefined; - /** - * CA file path - */ - sslCAPath?: string | undefined; - /** - * SSL key file path - */ - sslKeyPath?: string | undefined; - /** - * SSL cert file path - */ - sslCertPath?: string | undefined; -}; +import { + DatabaseSslOptions, + DatabaseSslOptions$inboundSchema, + DatabaseSslOptions$Outbound, + DatabaseSslOptions$outboundSchema, +} from "./databasessloptions.js"; export type DatabaseConnectionOptions = { /** @@ -53,7 +21,11 @@ export type DatabaseConnectionOptions = { /** * Database server port */ - port: string | null; + port?: string | undefined; + /** + * Database schema name + */ + dbname?: string | undefined; /** * Encrypted credentials for connecting to database server when using basic auth method (username, password) */ @@ -69,102 +41,17 @@ export type DatabaseConnectionOptions = { /** * SSL connection options, when sslEnabled is true */ - sslOptions: DatabaseConnectionOptionsSslOptions | null; + sslOptions?: DatabaseSslOptions | undefined; /** * Cloud region in case of database managed by cloud provider, required for IAM authentication */ cloudRegion?: string | undefined; + /** + * binding for packet sniffing for sniffer captureMethod (on-host), example: 0.0.0.0:6379,[::]:6379 + */ + bindings?: string | undefined; }; -/** @internal */ -export const DatabaseConnectionOptionsSslMode$inboundSchema: z.ZodNativeEnum< - typeof DatabaseConnectionOptionsSslMode -> = z.nativeEnum(DatabaseConnectionOptionsSslMode); - -/** @internal */ -export const DatabaseConnectionOptionsSslMode$outboundSchema: z.ZodNativeEnum< - typeof DatabaseConnectionOptionsSslMode -> = DatabaseConnectionOptionsSslMode$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DatabaseConnectionOptionsSslMode$ { - /** @deprecated use `DatabaseConnectionOptionsSslMode$inboundSchema` instead. */ - export const inboundSchema = DatabaseConnectionOptionsSslMode$inboundSchema; - /** @deprecated use `DatabaseConnectionOptionsSslMode$outboundSchema` instead. */ - export const outboundSchema = DatabaseConnectionOptionsSslMode$outboundSchema; -} - -/** @internal */ -export const DatabaseConnectionOptionsSslOptions$inboundSchema: z.ZodType< - DatabaseConnectionOptionsSslOptions, - z.ZodTypeDef, - unknown -> = z.object({ - sslMode: DatabaseConnectionOptionsSslMode$inboundSchema.default("require"), - sslCAPath: z.string().default(""), - sslKeyPath: z.string().default(""), - sslCertPath: z.string().default(""), -}); - -/** @internal */ -export type DatabaseConnectionOptionsSslOptions$Outbound = { - sslMode: string; - sslCAPath: string; - sslKeyPath: string; - sslCertPath: string; -}; - -/** @internal */ -export const DatabaseConnectionOptionsSslOptions$outboundSchema: z.ZodType< - DatabaseConnectionOptionsSslOptions$Outbound, - z.ZodTypeDef, - DatabaseConnectionOptionsSslOptions -> = z.object({ - sslMode: DatabaseConnectionOptionsSslMode$outboundSchema.default("require"), - sslCAPath: z.string().default(""), - sslKeyPath: z.string().default(""), - sslCertPath: z.string().default(""), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DatabaseConnectionOptionsSslOptions$ { - /** @deprecated use `DatabaseConnectionOptionsSslOptions$inboundSchema` instead. */ - export const inboundSchema = - DatabaseConnectionOptionsSslOptions$inboundSchema; - /** @deprecated use `DatabaseConnectionOptionsSslOptions$outboundSchema` instead. */ - export const outboundSchema = - DatabaseConnectionOptionsSslOptions$outboundSchema; - /** @deprecated use `DatabaseConnectionOptionsSslOptions$Outbound` instead. */ - export type Outbound = DatabaseConnectionOptionsSslOptions$Outbound; -} - -export function databaseConnectionOptionsSslOptionsToJSON( - databaseConnectionOptionsSslOptions: DatabaseConnectionOptionsSslOptions, -): string { - return JSON.stringify( - DatabaseConnectionOptionsSslOptions$outboundSchema.parse( - databaseConnectionOptionsSslOptions, - ), - ); -} - -export function databaseConnectionOptionsSslOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - DatabaseConnectionOptionsSslOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DatabaseConnectionOptionsSslOptions' from JSON`, - ); -} - /** @internal */ export const DatabaseConnectionOptions$inboundSchema: z.ZodType< DatabaseConnectionOptions, @@ -172,25 +59,27 @@ export const DatabaseConnectionOptions$inboundSchema: z.ZodType< unknown > = z.object({ host: z.string(), - port: z.nullable(z.string()), + port: z.string().default(""), + dbname: z.string().default(""), encryptedCredentials: z.string().default(""), user: z.string().default(""), sslEnabled: z.boolean().default(false), - sslOptions: z.nullable( - z.lazy(() => DatabaseConnectionOptionsSslOptions$inboundSchema), - ), + sslOptions: DatabaseSslOptions$inboundSchema.optional(), cloudRegion: z.string().default(""), + bindings: z.string().default(""), }); /** @internal */ export type DatabaseConnectionOptions$Outbound = { host: string; - port: string | null; + port: string; + dbname: string; encryptedCredentials: string; user: string; sslEnabled: boolean; - sslOptions: DatabaseConnectionOptionsSslOptions$Outbound | null; + sslOptions?: DatabaseSslOptions$Outbound | undefined; cloudRegion: string; + bindings: string; }; /** @internal */ @@ -200,14 +89,14 @@ export const DatabaseConnectionOptions$outboundSchema: z.ZodType< DatabaseConnectionOptions > = z.object({ host: z.string(), - port: z.nullable(z.string()), + port: z.string().default(""), + dbname: z.string().default(""), encryptedCredentials: z.string().default(""), user: z.string().default(""), sslEnabled: z.boolean().default(false), - sslOptions: z.nullable( - z.lazy(() => DatabaseConnectionOptionsSslOptions$outboundSchema), - ), + sslOptions: DatabaseSslOptions$outboundSchema.optional(), cloudRegion: z.string().default(""), + bindings: z.string().default(""), }); /** diff --git a/swov1/src/models/components/databaseconnectionoptionsupdate.ts b/swov1/src/models/components/databaseconnectionoptionsupdate.ts new file mode 100644 index 0000000..0cea1d5 --- /dev/null +++ b/swov1/src/models/components/databaseconnectionoptionsupdate.ts @@ -0,0 +1,133 @@ +/* + * 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 { + DatabaseSslOptionsUpdate, + DatabaseSslOptionsUpdate$inboundSchema, + DatabaseSslOptionsUpdate$Outbound, + DatabaseSslOptionsUpdate$outboundSchema, +} from "./databasessloptionsupdate.js"; + +export type DatabaseConnectionOptionsUpdate = { + /** + * Database server host + */ + host?: string | undefined; + /** + * Database server port + */ + port?: string | undefined; + /** + * Database schema name + */ + dbname?: string | undefined; + /** + * Encrypted credentials for connecting to database server when using basic auth method (username, password) + */ + encryptedCredentials?: string | undefined; + /** + * Username for connecting to database server needed only for auth methods other than basic auth + */ + user?: string | undefined; + /** + * Enable ssl when agent connects to database server + */ + sslEnabled?: boolean | undefined; + /** + * SSL connection options, when sslEnabled is true + */ + sslOptions?: DatabaseSslOptionsUpdate | undefined; + /** + * Cloud region in case of database managed by cloud provider, required for IAM authentication + */ + cloudRegion?: string | undefined; + /** + * binding for packet sniffing for sniffer captureMethod (on-host), example: 0.0.0.0:6379,[::]:6379 + */ + bindings?: string | undefined; +}; + +/** @internal */ +export const DatabaseConnectionOptionsUpdate$inboundSchema: z.ZodType< + DatabaseConnectionOptionsUpdate, + z.ZodTypeDef, + unknown +> = z.object({ + host: z.string().optional(), + port: z.string().default(""), + dbname: z.string().default(""), + encryptedCredentials: z.string().default(""), + user: z.string().default(""), + sslEnabled: z.boolean().default(false), + sslOptions: DatabaseSslOptionsUpdate$inboundSchema.optional(), + cloudRegion: z.string().default(""), + bindings: z.string().default(""), +}); + +/** @internal */ +export type DatabaseConnectionOptionsUpdate$Outbound = { + host?: string | undefined; + port: string; + dbname: string; + encryptedCredentials: string; + user: string; + sslEnabled: boolean; + sslOptions?: DatabaseSslOptionsUpdate$Outbound | undefined; + cloudRegion: string; + bindings: string; +}; + +/** @internal */ +export const DatabaseConnectionOptionsUpdate$outboundSchema: z.ZodType< + DatabaseConnectionOptionsUpdate$Outbound, + z.ZodTypeDef, + DatabaseConnectionOptionsUpdate +> = z.object({ + host: z.string().optional(), + port: z.string().default(""), + dbname: z.string().default(""), + encryptedCredentials: z.string().default(""), + user: z.string().default(""), + sslEnabled: z.boolean().default(false), + sslOptions: DatabaseSslOptionsUpdate$outboundSchema.optional(), + cloudRegion: z.string().default(""), + bindings: z.string().default(""), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseConnectionOptionsUpdate$ { + /** @deprecated use `DatabaseConnectionOptionsUpdate$inboundSchema` instead. */ + export const inboundSchema = DatabaseConnectionOptionsUpdate$inboundSchema; + /** @deprecated use `DatabaseConnectionOptionsUpdate$outboundSchema` instead. */ + export const outboundSchema = DatabaseConnectionOptionsUpdate$outboundSchema; + /** @deprecated use `DatabaseConnectionOptionsUpdate$Outbound` instead. */ + export type Outbound = DatabaseConnectionOptionsUpdate$Outbound; +} + +export function databaseConnectionOptionsUpdateToJSON( + databaseConnectionOptionsUpdate: DatabaseConnectionOptionsUpdate, +): string { + return JSON.stringify( + DatabaseConnectionOptionsUpdate$outboundSchema.parse( + databaseConnectionOptionsUpdate, + ), + ); +} + +export function databaseConnectionOptionsUpdateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DatabaseConnectionOptionsUpdate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatabaseConnectionOptionsUpdate' from JSON`, + ); +} diff --git a/swov1/src/models/components/databasemetricscapturemethod.ts b/swov1/src/models/components/databasemetricscapturemethod.ts new file mode 100644 index 0000000..0d08331 --- /dev/null +++ b/swov1/src/models/components/databasemetricscapturemethod.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 DatabaseMetricsCaptureMethod = { + Sniffer: "sniffer", + Poll: "poll", + Profiler: "profiler", + SlowLog: "slow-log", +} as const; +export type DatabaseMetricsCaptureMethod = ClosedEnum< + typeof DatabaseMetricsCaptureMethod +>; + +/** @internal */ +export const DatabaseMetricsCaptureMethod$inboundSchema: z.ZodNativeEnum< + typeof DatabaseMetricsCaptureMethod +> = z.nativeEnum(DatabaseMetricsCaptureMethod); + +/** @internal */ +export const DatabaseMetricsCaptureMethod$outboundSchema: z.ZodNativeEnum< + typeof DatabaseMetricsCaptureMethod +> = DatabaseMetricsCaptureMethod$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseMetricsCaptureMethod$ { + /** @deprecated use `DatabaseMetricsCaptureMethod$inboundSchema` instead. */ + export const inboundSchema = DatabaseMetricsCaptureMethod$inboundSchema; + /** @deprecated use `DatabaseMetricsCaptureMethod$outboundSchema` instead. */ + export const outboundSchema = DatabaseMetricsCaptureMethod$outboundSchema; +} diff --git a/swov1/src/models/components/databasepluginconfig.ts b/swov1/src/models/components/databasepluginconfig.ts index 7069b3b..231c8ec 100644 --- a/swov1/src/models/components/databasepluginconfig.ts +++ b/swov1/src/models/components/databasepluginconfig.ts @@ -21,7 +21,11 @@ export type DatabasePluginConfig = { /** * Configuration of plugin observing database server */ - config: Array; + configOptions: Array; + /** + * Database connection options of plugin observing database server + */ + dbConnOptions: Array; }; /** @internal */ @@ -31,13 +35,15 @@ export const DatabasePluginConfig$inboundSchema: z.ZodType< unknown > = z.object({ pluginName: z.string(), - config: z.array(CommonKeyValuePair$inboundSchema), + configOptions: z.array(CommonKeyValuePair$inboundSchema), + dbConnOptions: z.array(CommonKeyValuePair$inboundSchema), }); /** @internal */ export type DatabasePluginConfig$Outbound = { pluginName: string; - config: Array; + configOptions: Array; + dbConnOptions: Array; }; /** @internal */ @@ -47,7 +53,8 @@ export const DatabasePluginConfig$outboundSchema: z.ZodType< DatabasePluginConfig > = z.object({ pluginName: z.string(), - config: z.array(CommonKeyValuePair$outboundSchema), + configOptions: z.array(CommonKeyValuePair$outboundSchema), + dbConnOptions: z.array(CommonKeyValuePair$outboundSchema), }); /** diff --git a/swov1/src/models/components/databasepluginstatus.ts b/swov1/src/models/components/databasepluginstatus.ts index 56374c4..c667042 100644 --- a/swov1/src/models/components/databasepluginstatus.ts +++ b/swov1/src/models/components/databasepluginstatus.ts @@ -13,9 +13,13 @@ export type DatabasePluginStatus = { */ pluginName: string; /** - * Status of plugin observing database server + * Deployment Status of plugin observing database server */ - status: string; + deploymentStatus: string; + /** + * Health Status of plugin observing database server + */ + healthStatus: string; }; /** @internal */ @@ -25,13 +29,15 @@ export const DatabasePluginStatus$inboundSchema: z.ZodType< unknown > = z.object({ pluginName: z.string(), - status: z.string(), + deploymentStatus: z.string(), + healthStatus: z.string(), }); /** @internal */ export type DatabasePluginStatus$Outbound = { pluginName: string; - status: string; + deploymentStatus: string; + healthStatus: string; }; /** @internal */ @@ -41,7 +47,8 @@ export const DatabasePluginStatus$outboundSchema: z.ZodType< DatabasePluginStatus > = z.object({ pluginName: z.string(), - status: z.string(), + deploymentStatus: z.string(), + healthStatus: z.string(), }); /** diff --git a/swov1/src/models/components/databasessloptions.ts b/swov1/src/models/components/databasessloptions.ts new file mode 100644 index 0000000..c38acdb --- /dev/null +++ b/swov1/src/models/components/databasessloptions.ts @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * SSL mode such as require, verify-ca, verify-full as applicable + */ +export const DatabaseSslOptionsSslMode = { + Require: "require", + VerifyCa: "verify-ca", + VerifyFull: "verify-full", +} as const; +/** + * SSL mode such as require, verify-ca, verify-full as applicable + */ +export type DatabaseSslOptionsSslMode = ClosedEnum< + typeof DatabaseSslOptionsSslMode +>; + +export type DatabaseSslOptions = { + /** + * SSL mode such as require, verify-ca, verify-full as applicable + */ + sslMode?: DatabaseSslOptionsSslMode | undefined; + /** + * CA file path + */ + sslCAPath?: string | undefined; + /** + * SSL key file path + */ + sslKeyPath?: string | undefined; + /** + * SSL cert file path + */ + sslCertPath?: string | undefined; +}; + +/** @internal */ +export const DatabaseSslOptionsSslMode$inboundSchema: z.ZodNativeEnum< + typeof DatabaseSslOptionsSslMode +> = z.nativeEnum(DatabaseSslOptionsSslMode); + +/** @internal */ +export const DatabaseSslOptionsSslMode$outboundSchema: z.ZodNativeEnum< + typeof DatabaseSslOptionsSslMode +> = DatabaseSslOptionsSslMode$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseSslOptionsSslMode$ { + /** @deprecated use `DatabaseSslOptionsSslMode$inboundSchema` instead. */ + export const inboundSchema = DatabaseSslOptionsSslMode$inboundSchema; + /** @deprecated use `DatabaseSslOptionsSslMode$outboundSchema` instead. */ + export const outboundSchema = DatabaseSslOptionsSslMode$outboundSchema; +} + +/** @internal */ +export const DatabaseSslOptions$inboundSchema: z.ZodType< + DatabaseSslOptions, + z.ZodTypeDef, + unknown +> = z.object({ + sslMode: DatabaseSslOptionsSslMode$inboundSchema.default("require"), + sslCAPath: z.string().default(""), + sslKeyPath: z.string().default(""), + sslCertPath: z.string().default(""), +}); + +/** @internal */ +export type DatabaseSslOptions$Outbound = { + sslMode: string; + sslCAPath: string; + sslKeyPath: string; + sslCertPath: string; +}; + +/** @internal */ +export const DatabaseSslOptions$outboundSchema: z.ZodType< + DatabaseSslOptions$Outbound, + z.ZodTypeDef, + DatabaseSslOptions +> = z.object({ + sslMode: DatabaseSslOptionsSslMode$outboundSchema.default("require"), + sslCAPath: z.string().default(""), + sslKeyPath: z.string().default(""), + sslCertPath: z.string().default(""), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseSslOptions$ { + /** @deprecated use `DatabaseSslOptions$inboundSchema` instead. */ + export const inboundSchema = DatabaseSslOptions$inboundSchema; + /** @deprecated use `DatabaseSslOptions$outboundSchema` instead. */ + export const outboundSchema = DatabaseSslOptions$outboundSchema; + /** @deprecated use `DatabaseSslOptions$Outbound` instead. */ + export type Outbound = DatabaseSslOptions$Outbound; +} + +export function databaseSslOptionsToJSON( + databaseSslOptions: DatabaseSslOptions, +): string { + return JSON.stringify( + DatabaseSslOptions$outboundSchema.parse(databaseSslOptions), + ); +} + +export function databaseSslOptionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DatabaseSslOptions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatabaseSslOptions' from JSON`, + ); +} diff --git a/swov1/src/models/components/databasessloptionsupdate.ts b/swov1/src/models/components/databasessloptionsupdate.ts new file mode 100644 index 0000000..9b88bf0 --- /dev/null +++ b/swov1/src/models/components/databasessloptionsupdate.ts @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * SSL mode such as require, verify-ca, verify-full as applicable + */ +export const DatabaseSslOptionsUpdateSslMode = { + Require: "require", + VerifyCa: "verify-ca", + VerifyFull: "verify-full", +} as const; +/** + * SSL mode such as require, verify-ca, verify-full as applicable + */ +export type DatabaseSslOptionsUpdateSslMode = ClosedEnum< + typeof DatabaseSslOptionsUpdateSslMode +>; + +export type DatabaseSslOptionsUpdate = { + /** + * SSL mode such as require, verify-ca, verify-full as applicable + */ + sslMode?: DatabaseSslOptionsUpdateSslMode | undefined; + /** + * CA file path + */ + sslCAPath?: string | undefined; + /** + * SSL key file path + */ + sslKeyPath?: string | undefined; + /** + * SSL cert file path + */ + sslCertPath?: string | undefined; +}; + +/** @internal */ +export const DatabaseSslOptionsUpdateSslMode$inboundSchema: z.ZodNativeEnum< + typeof DatabaseSslOptionsUpdateSslMode +> = z.nativeEnum(DatabaseSslOptionsUpdateSslMode); + +/** @internal */ +export const DatabaseSslOptionsUpdateSslMode$outboundSchema: z.ZodNativeEnum< + typeof DatabaseSslOptionsUpdateSslMode +> = DatabaseSslOptionsUpdateSslMode$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseSslOptionsUpdateSslMode$ { + /** @deprecated use `DatabaseSslOptionsUpdateSslMode$inboundSchema` instead. */ + export const inboundSchema = DatabaseSslOptionsUpdateSslMode$inboundSchema; + /** @deprecated use `DatabaseSslOptionsUpdateSslMode$outboundSchema` instead. */ + export const outboundSchema = DatabaseSslOptionsUpdateSslMode$outboundSchema; +} + +/** @internal */ +export const DatabaseSslOptionsUpdate$inboundSchema: z.ZodType< + DatabaseSslOptionsUpdate, + z.ZodTypeDef, + unknown +> = z.object({ + sslMode: DatabaseSslOptionsUpdateSslMode$inboundSchema.default("require"), + sslCAPath: z.string().default(""), + sslKeyPath: z.string().default(""), + sslCertPath: z.string().default(""), +}); + +/** @internal */ +export type DatabaseSslOptionsUpdate$Outbound = { + sslMode: string; + sslCAPath: string; + sslKeyPath: string; + sslCertPath: string; +}; + +/** @internal */ +export const DatabaseSslOptionsUpdate$outboundSchema: z.ZodType< + DatabaseSslOptionsUpdate$Outbound, + z.ZodTypeDef, + DatabaseSslOptionsUpdate +> = z.object({ + sslMode: DatabaseSslOptionsUpdateSslMode$outboundSchema.default("require"), + sslCAPath: z.string().default(""), + sslKeyPath: z.string().default(""), + sslCertPath: z.string().default(""), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DatabaseSslOptionsUpdate$ { + /** @deprecated use `DatabaseSslOptionsUpdate$inboundSchema` instead. */ + export const inboundSchema = DatabaseSslOptionsUpdate$inboundSchema; + /** @deprecated use `DatabaseSslOptionsUpdate$outboundSchema` instead. */ + export const outboundSchema = DatabaseSslOptionsUpdate$outboundSchema; + /** @deprecated use `DatabaseSslOptionsUpdate$Outbound` instead. */ + export type Outbound = DatabaseSslOptionsUpdate$Outbound; +} + +export function databaseSslOptionsUpdateToJSON( + databaseSslOptionsUpdate: DatabaseSslOptionsUpdate, +): string { + return JSON.stringify( + DatabaseSslOptionsUpdate$outboundSchema.parse(databaseSslOptionsUpdate), + ); +} + +export function databaseSslOptionsUpdateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DatabaseSslOptionsUpdate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatabaseSslOptionsUpdate' from JSON`, + ); +} diff --git a/swov1/src/models/components/geturiresponse.ts b/swov1/src/models/components/geturiresponse.ts new file mode 100644 index 0000000..41e575e --- /dev/null +++ b/swov1/src/models/components/geturiresponse.ts @@ -0,0 +1,190 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Tag, + Tag$inboundSchema, + Tag$Outbound, + Tag$outboundSchema, +} from "./tag.js"; +import { + UriAvailabilityCheckSettings, + UriAvailabilityCheckSettings$inboundSchema, + UriAvailabilityCheckSettings$Outbound, + UriAvailabilityCheckSettings$outboundSchema, +} from "./uriavailabilitychecksettings.js"; + +export const GetUriResponseStatus = { + Up: "up", + Down: "down", + Paused: "paused", + Maintenance: "maintenance", + Unknown: "unknown", +} as const; +export type GetUriResponseStatus = ClosedEnum; + +export type GetUriResponse = { + id: string; + type: string; + status: GetUriResponseStatus; + /** + * Name of the URI, which must be unique within the organization. + * + * @remarks + * The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. + */ + name: string; + /** + * IP/domain address of the URI. + */ + ipOrDomain: string; + /** + * Availability tests configuration for the URI. + */ + availabilityCheckSettings: UriAvailabilityCheckSettings; + /** + * Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. + */ + tags?: Array | undefined; + /** + * Time when the last outage started. + */ + lastOutageStartTime?: Date | null | undefined; + /** + * Time when the last outage ended. + */ + lastOutageEndTime?: Date | null | undefined; + /** + * Time when the last test was performed. + */ + lastTestTime?: Date | null | undefined; + /** + * Last time when a synthetic test failed. + */ + lastErrorTime?: Date | null | undefined; + /** + * Response time from the last synthetic check in milliseconds. + */ + lastResponseTime?: number | null | undefined; +}; + +/** @internal */ +export const GetUriResponseStatus$inboundSchema: z.ZodNativeEnum< + typeof GetUriResponseStatus +> = z.nativeEnum(GetUriResponseStatus); + +/** @internal */ +export const GetUriResponseStatus$outboundSchema: z.ZodNativeEnum< + typeof GetUriResponseStatus +> = GetUriResponseStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetUriResponseStatus$ { + /** @deprecated use `GetUriResponseStatus$inboundSchema` instead. */ + export const inboundSchema = GetUriResponseStatus$inboundSchema; + /** @deprecated use `GetUriResponseStatus$outboundSchema` instead. */ + export const outboundSchema = GetUriResponseStatus$outboundSchema; +} + +/** @internal */ +export const GetUriResponse$inboundSchema: z.ZodType< + GetUriResponse, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + type: z.string(), + status: GetUriResponseStatus$inboundSchema, + name: z.string(), + ipOrDomain: z.string(), + availabilityCheckSettings: UriAvailabilityCheckSettings$inboundSchema, + tags: z.array(Tag$inboundSchema).optional(), + lastOutageStartTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastOutageEndTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastTestTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastErrorTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastResponseTime: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type GetUriResponse$Outbound = { + id: string; + type: string; + status: string; + name: string; + ipOrDomain: string; + availabilityCheckSettings: UriAvailabilityCheckSettings$Outbound; + tags?: Array | undefined; + lastOutageStartTime?: string | null | undefined; + lastOutageEndTime?: string | null | undefined; + lastTestTime?: string | null | undefined; + lastErrorTime?: string | null | undefined; + lastResponseTime?: number | null | undefined; +}; + +/** @internal */ +export const GetUriResponse$outboundSchema: z.ZodType< + GetUriResponse$Outbound, + z.ZodTypeDef, + GetUriResponse +> = z.object({ + id: z.string(), + type: z.string(), + status: GetUriResponseStatus$outboundSchema, + name: z.string(), + ipOrDomain: z.string(), + availabilityCheckSettings: UriAvailabilityCheckSettings$outboundSchema, + tags: z.array(Tag$outboundSchema).optional(), + lastOutageStartTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastOutageEndTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastTestTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), + lastErrorTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastResponseTime: 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 GetUriResponse$ { + /** @deprecated use `GetUriResponse$inboundSchema` instead. */ + export const inboundSchema = GetUriResponse$inboundSchema; + /** @deprecated use `GetUriResponse$outboundSchema` instead. */ + export const outboundSchema = GetUriResponse$outboundSchema; + /** @deprecated use `GetUriResponse$Outbound` instead. */ + export type Outbound = GetUriResponse$Outbound; +} + +export function getUriResponseToJSON(getUriResponse: GetUriResponse): string { + return JSON.stringify(GetUriResponse$outboundSchema.parse(getUriResponse)); +} + +export function getUriResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetUriResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetUriResponse' from JSON`, + ); +} diff --git a/swov1/src/models/components/getwebsiteresponse.ts b/swov1/src/models/components/getwebsiteresponse.ts new file mode 100644 index 0000000..277683a --- /dev/null +++ b/swov1/src/models/components/getwebsiteresponse.ts @@ -0,0 +1,988 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + CustomHeaders, + CustomHeaders$inboundSchema, + CustomHeaders$Outbound, + CustomHeaders$outboundSchema, +} from "./customheaders.js"; +import { + ProbePlatform, + ProbePlatform$inboundSchema, + ProbePlatform$outboundSchema, +} from "./probeplatform.js"; +import { + Tag, + Tag$inboundSchema, + Tag$Outbound, + Tag$outboundSchema, +} from "./tag.js"; +import { + TestFrom, + TestFrom$inboundSchema, + TestFrom$Outbound, + TestFrom$outboundSchema, +} from "./testfrom.js"; +import { + WebsiteProtocol, + WebsiteProtocol$inboundSchema, + WebsiteProtocol$outboundSchema, +} from "./websiteprotocol.js"; + +export const GetWebsiteResponseStatus = { + Up: "up", + Down: "down", + Paused: "paused", + Maintenance: "maintenance", + Unknown: "unknown", +} as const; +export type GetWebsiteResponseStatus = ClosedEnum< + typeof GetWebsiteResponseStatus +>; + +/** + * Defines which monitoring features are enabled for a website. + */ +export type MonitoringOptions = { + /** + * True if the availability monitoring is active. + */ + isAvailabilityActive: boolean; + /** + * True if the real user monitoring (RUM) is active. + */ + isRumActive: boolean; +}; + +/** + * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. + */ +export type GetWebsiteResponsePlatformOptions = { + /** + * Cloud platforms hosting synthetic probes. + */ + probePlatforms: Array; + /** + * Use this field to configure whether availability tests should be performed from all selected + * + * @remarks + * platforms or one randomly selected platform. It has no effect if you provided only one platform + * in the `probePlatforms` field. + * + * If set to true, a separate test is made from each of the selected platforms. + * + * If set to false, only one of the selected platforms is chosen every time. + * + * If omitted, the previous setting will stay in effect. If there is no previous setting, the value + * will default to false. + */ + testFromAll?: boolean | undefined; +}; + +/** + * How many locations must report a failure for an entity to be considered down. + */ +export const GetWebsiteResponseFailingTestLocations = { + All: "all", + Any: "any", +} as const; +/** + * How many locations must report a failure for an entity to be considered down. + */ +export type GetWebsiteResponseFailingTestLocations = ClosedEnum< + typeof GetWebsiteResponseFailingTestLocations +>; + +/** + * Default conditions when the entity is considered down. + * + * @remarks + * If omitted or set to null, organization configuration will be used for this entity. + */ +export type GetWebsiteResponseOutageConfiguration = { + /** + * How many locations must report a failure for an entity to be considered down. + */ + failingTestLocations: GetWebsiteResponseFailingTestLocations; + /** + * Number of consecutive failing tests for an entity to be considered down. + */ + consecutiveForDown: number; +}; + +/** + * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + */ +export const GetWebsiteResponseOperator = { + Contains: "CONTAINS", + DoesNotContain: "DOES_NOT_CONTAIN", +} as const; +/** + * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + */ +export type GetWebsiteResponseOperator = ClosedEnum< + typeof GetWebsiteResponseOperator +>; + +/** + * Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. + * + * @remarks + * If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. + * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. + * If omitted or set to null, the string checking functionality will be disabled. + */ +export type GetWebsiteResponseCheckForString = { + /** + * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + */ + operator: GetWebsiteResponseOperator; + /** + * The string that which will be searched in the page source code. + */ + value: string; +}; + +/** + * Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. + * + * @remarks + * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. + */ +export type GetWebsiteResponseSsl = { + /** + * Whether SSL monitoring is enabled for the website. + * + * @remarks + * If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later. + * If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. + */ + enabled?: boolean | null | undefined; + /** + * Number of days before the expiration date an SSL certificate will be considered 'expiring.' + */ + daysPriorToExpiration?: number | null | undefined; + /** + * Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate). + * + * @remarks + * This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain. + * This option does not affect any other certificate validity checks besides expiration. + * If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. + */ + ignoreIntermediateCertificates?: boolean | null | undefined; +}; + +/** + * Use this field to configure availability tests for the website. + * + * @remarks + * You are required to configure at least availability monitoring or real user monitoring to be able to create website. + */ +export type GetWebsiteResponseAvailabilityCheckSettings = { + /** + * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. + */ + platformOptions?: GetWebsiteResponsePlatformOptions | null | undefined; + /** + * Configure locations of the synthetic availability test probes. + * + * @remarks + * Acceptable values depend on the selected type and actual values of existing probes. + */ + testFrom: TestFrom; + /** + * Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. + */ + testIntervalInSeconds: number; + /** + * Default conditions when the entity is considered down. + * + * @remarks + * If omitted or set to null, organization configuration will be used for this entity. + */ + outageConfiguration?: + | GetWebsiteResponseOutageConfiguration + | null + | undefined; + /** + * Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. + * + * @remarks + * If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. + * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. + * If omitted or set to null, the string checking functionality will be disabled. + */ + checkForString?: GetWebsiteResponseCheckForString | null | undefined; + /** + * Configure which protocols need availability tests to be performed. At least one protocol must be provided. + */ + protocols: Array; + /** + * Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. + * + * @remarks + * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. + */ + ssl?: GetWebsiteResponseSsl | null | undefined; + /** + * Configure custom request headers to be sent with each availability test. It is possible to provide multiple headers with the same name. + * + * @remarks + * If omitted, set to null or set to an empty array, no custom headers will be sent. + */ + customHeaders?: Array | null | undefined; + /** + * Allow insecure SSL renegotiation which introduces a security risk in the communication process. + * + * @remarks + * Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel. + * Available only with HTTPS check. + * If omitted or set to null, insecure SSL renegotiation won't be allowed. + */ + allowInsecureRenegotiation?: boolean | undefined; + /** + * Configure data that will be sent as POST request body by the synthetic probe. + * + * @remarks + * If omitted or set to null/empty string, the probe will send the usual GET requests. + */ + postData?: string | null | undefined; +}; + +/** + * Use this field to configure real user monitoring (RUM) for the website. + * + * @remarks + * You are required to configure at least availability monitoring or real user monitoring to be able to create website. + */ +export type GetWebsiteResponseRum = { + apdexTimeInSeconds?: number | undefined; + snippet?: string | undefined; + spa: boolean; +}; + +export type GetWebsiteResponse = { + id: string; + type: string; + status: GetWebsiteResponseStatus; + /** + * Name of the website, which must be unique within the organization. + * + * @remarks + * The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. + */ + name: string; + /** + * URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). + */ + url: string; + /** + * Defines which monitoring features are enabled for a website. + */ + monitoringOptions: MonitoringOptions; + /** + * Use this field to configure availability tests for the website. + * + * @remarks + * You are required to configure at least availability monitoring or real user monitoring to be able to create website. + */ + availabilityCheckSettings?: + | GetWebsiteResponseAvailabilityCheckSettings + | null + | undefined; + /** + * Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. + */ + tags?: Array | undefined; + /** + * Use this field to configure real user monitoring (RUM) for the website. + * + * @remarks + * You are required to configure at least availability monitoring or real user monitoring to be able to create website. + */ + rum?: GetWebsiteResponseRum | undefined; + /** + * Time when the last outage started. + */ + lastOutageStartTime?: Date | null | undefined; + /** + * Time when the last outage ended. + */ + lastOutageEndTime?: Date | null | undefined; + /** + * Time when the last test was performed. + */ + lastTestTime?: Date | null | undefined; + /** + * Last time when a synthetic test failed. + */ + lastErrorTime?: Date | null | undefined; + /** + * Response time from the last synthetic check in milliseconds. + */ + lastResponseTime?: number | null | undefined; + /** + * Timestamp for when the next on-demand check could be executed. If at '0', it means you can execute it anytime. + */ + nextOnDemandAvailabilityTime?: number | undefined; +}; + +/** @internal */ +export const GetWebsiteResponseStatus$inboundSchema: z.ZodNativeEnum< + typeof GetWebsiteResponseStatus +> = z.nativeEnum(GetWebsiteResponseStatus); + +/** @internal */ +export const GetWebsiteResponseStatus$outboundSchema: z.ZodNativeEnum< + typeof GetWebsiteResponseStatus +> = GetWebsiteResponseStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetWebsiteResponseStatus$ { + /** @deprecated use `GetWebsiteResponseStatus$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponseStatus$inboundSchema; + /** @deprecated use `GetWebsiteResponseStatus$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponseStatus$outboundSchema; +} + +/** @internal */ +export const MonitoringOptions$inboundSchema: z.ZodType< + MonitoringOptions, + z.ZodTypeDef, + unknown +> = z.object({ + isAvailabilityActive: z.boolean(), + isRumActive: z.boolean(), +}); + +/** @internal */ +export type MonitoringOptions$Outbound = { + isAvailabilityActive: boolean; + isRumActive: boolean; +}; + +/** @internal */ +export const MonitoringOptions$outboundSchema: z.ZodType< + MonitoringOptions$Outbound, + z.ZodTypeDef, + MonitoringOptions +> = z.object({ + isAvailabilityActive: z.boolean(), + isRumActive: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MonitoringOptions$ { + /** @deprecated use `MonitoringOptions$inboundSchema` instead. */ + export const inboundSchema = MonitoringOptions$inboundSchema; + /** @deprecated use `MonitoringOptions$outboundSchema` instead. */ + export const outboundSchema = MonitoringOptions$outboundSchema; + /** @deprecated use `MonitoringOptions$Outbound` instead. */ + export type Outbound = MonitoringOptions$Outbound; +} + +export function monitoringOptionsToJSON( + monitoringOptions: MonitoringOptions, +): string { + return JSON.stringify( + MonitoringOptions$outboundSchema.parse(monitoringOptions), + ); +} + +export function monitoringOptionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MonitoringOptions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MonitoringOptions' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponsePlatformOptions$inboundSchema: z.ZodType< + GetWebsiteResponsePlatformOptions, + z.ZodTypeDef, + unknown +> = z.object({ + probePlatforms: z.array(ProbePlatform$inboundSchema), + testFromAll: z.boolean().optional(), +}); + +/** @internal */ +export type GetWebsiteResponsePlatformOptions$Outbound = { + probePlatforms: Array; + testFromAll?: boolean | undefined; +}; + +/** @internal */ +export const GetWebsiteResponsePlatformOptions$outboundSchema: z.ZodType< + GetWebsiteResponsePlatformOptions$Outbound, + z.ZodTypeDef, + GetWebsiteResponsePlatformOptions +> = z.object({ + probePlatforms: z.array(ProbePlatform$outboundSchema), + testFromAll: 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 GetWebsiteResponsePlatformOptions$ { + /** @deprecated use `GetWebsiteResponsePlatformOptions$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponsePlatformOptions$inboundSchema; + /** @deprecated use `GetWebsiteResponsePlatformOptions$outboundSchema` instead. */ + export const outboundSchema = + GetWebsiteResponsePlatformOptions$outboundSchema; + /** @deprecated use `GetWebsiteResponsePlatformOptions$Outbound` instead. */ + export type Outbound = GetWebsiteResponsePlatformOptions$Outbound; +} + +export function getWebsiteResponsePlatformOptionsToJSON( + getWebsiteResponsePlatformOptions: GetWebsiteResponsePlatformOptions, +): string { + return JSON.stringify( + GetWebsiteResponsePlatformOptions$outboundSchema.parse( + getWebsiteResponsePlatformOptions, + ), + ); +} + +export function getWebsiteResponsePlatformOptionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetWebsiteResponsePlatformOptions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponsePlatformOptions' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponseFailingTestLocations$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + GetWebsiteResponseFailingTestLocations, + ); + +/** @internal */ +export const GetWebsiteResponseFailingTestLocations$outboundSchema: + z.ZodNativeEnum = + GetWebsiteResponseFailingTestLocations$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetWebsiteResponseFailingTestLocations$ { + /** @deprecated use `GetWebsiteResponseFailingTestLocations$inboundSchema` instead. */ + export const inboundSchema = + GetWebsiteResponseFailingTestLocations$inboundSchema; + /** @deprecated use `GetWebsiteResponseFailingTestLocations$outboundSchema` instead. */ + export const outboundSchema = + GetWebsiteResponseFailingTestLocations$outboundSchema; +} + +/** @internal */ +export const GetWebsiteResponseOutageConfiguration$inboundSchema: z.ZodType< + GetWebsiteResponseOutageConfiguration, + z.ZodTypeDef, + unknown +> = z.object({ + failingTestLocations: GetWebsiteResponseFailingTestLocations$inboundSchema, + consecutiveForDown: z.number().int(), +}); + +/** @internal */ +export type GetWebsiteResponseOutageConfiguration$Outbound = { + failingTestLocations: string; + consecutiveForDown: number; +}; + +/** @internal */ +export const GetWebsiteResponseOutageConfiguration$outboundSchema: z.ZodType< + GetWebsiteResponseOutageConfiguration$Outbound, + z.ZodTypeDef, + GetWebsiteResponseOutageConfiguration +> = z.object({ + failingTestLocations: GetWebsiteResponseFailingTestLocations$outboundSchema, + consecutiveForDown: 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 GetWebsiteResponseOutageConfiguration$ { + /** @deprecated use `GetWebsiteResponseOutageConfiguration$inboundSchema` instead. */ + export const inboundSchema = + GetWebsiteResponseOutageConfiguration$inboundSchema; + /** @deprecated use `GetWebsiteResponseOutageConfiguration$outboundSchema` instead. */ + export const outboundSchema = + GetWebsiteResponseOutageConfiguration$outboundSchema; + /** @deprecated use `GetWebsiteResponseOutageConfiguration$Outbound` instead. */ + export type Outbound = GetWebsiteResponseOutageConfiguration$Outbound; +} + +export function getWebsiteResponseOutageConfigurationToJSON( + getWebsiteResponseOutageConfiguration: GetWebsiteResponseOutageConfiguration, +): string { + return JSON.stringify( + GetWebsiteResponseOutageConfiguration$outboundSchema.parse( + getWebsiteResponseOutageConfiguration, + ), + ); +} + +export function getWebsiteResponseOutageConfigurationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetWebsiteResponseOutageConfiguration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponseOutageConfiguration' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponseOperator$inboundSchema: z.ZodNativeEnum< + typeof GetWebsiteResponseOperator +> = z.nativeEnum(GetWebsiteResponseOperator); + +/** @internal */ +export const GetWebsiteResponseOperator$outboundSchema: z.ZodNativeEnum< + typeof GetWebsiteResponseOperator +> = GetWebsiteResponseOperator$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetWebsiteResponseOperator$ { + /** @deprecated use `GetWebsiteResponseOperator$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponseOperator$inboundSchema; + /** @deprecated use `GetWebsiteResponseOperator$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponseOperator$outboundSchema; +} + +/** @internal */ +export const GetWebsiteResponseCheckForString$inboundSchema: z.ZodType< + GetWebsiteResponseCheckForString, + z.ZodTypeDef, + unknown +> = z.object({ + operator: GetWebsiteResponseOperator$inboundSchema, + value: z.string(), +}); + +/** @internal */ +export type GetWebsiteResponseCheckForString$Outbound = { + operator: string; + value: string; +}; + +/** @internal */ +export const GetWebsiteResponseCheckForString$outboundSchema: z.ZodType< + GetWebsiteResponseCheckForString$Outbound, + z.ZodTypeDef, + GetWebsiteResponseCheckForString +> = z.object({ + operator: GetWebsiteResponseOperator$outboundSchema, + value: 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 GetWebsiteResponseCheckForString$ { + /** @deprecated use `GetWebsiteResponseCheckForString$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponseCheckForString$inboundSchema; + /** @deprecated use `GetWebsiteResponseCheckForString$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponseCheckForString$outboundSchema; + /** @deprecated use `GetWebsiteResponseCheckForString$Outbound` instead. */ + export type Outbound = GetWebsiteResponseCheckForString$Outbound; +} + +export function getWebsiteResponseCheckForStringToJSON( + getWebsiteResponseCheckForString: GetWebsiteResponseCheckForString, +): string { + return JSON.stringify( + GetWebsiteResponseCheckForString$outboundSchema.parse( + getWebsiteResponseCheckForString, + ), + ); +} + +export function getWebsiteResponseCheckForStringFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetWebsiteResponseCheckForString$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponseCheckForString' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponseSsl$inboundSchema: z.ZodType< + GetWebsiteResponseSsl, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.nullable(z.boolean()).optional(), + daysPriorToExpiration: z.nullable(z.number().int()).optional(), + ignoreIntermediateCertificates: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type GetWebsiteResponseSsl$Outbound = { + enabled?: boolean | null | undefined; + daysPriorToExpiration?: number | null | undefined; + ignoreIntermediateCertificates?: boolean | null | undefined; +}; + +/** @internal */ +export const GetWebsiteResponseSsl$outboundSchema: z.ZodType< + GetWebsiteResponseSsl$Outbound, + z.ZodTypeDef, + GetWebsiteResponseSsl +> = z.object({ + enabled: z.nullable(z.boolean()).optional(), + daysPriorToExpiration: z.nullable(z.number().int()).optional(), + ignoreIntermediateCertificates: 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 GetWebsiteResponseSsl$ { + /** @deprecated use `GetWebsiteResponseSsl$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponseSsl$inboundSchema; + /** @deprecated use `GetWebsiteResponseSsl$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponseSsl$outboundSchema; + /** @deprecated use `GetWebsiteResponseSsl$Outbound` instead. */ + export type Outbound = GetWebsiteResponseSsl$Outbound; +} + +export function getWebsiteResponseSslToJSON( + getWebsiteResponseSsl: GetWebsiteResponseSsl, +): string { + return JSON.stringify( + GetWebsiteResponseSsl$outboundSchema.parse(getWebsiteResponseSsl), + ); +} + +export function getWebsiteResponseSslFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetWebsiteResponseSsl$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponseSsl' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponseAvailabilityCheckSettings$inboundSchema: + z.ZodType< + GetWebsiteResponseAvailabilityCheckSettings, + z.ZodTypeDef, + unknown + > = z.object({ + platformOptions: z.nullable( + z.lazy(() => GetWebsiteResponsePlatformOptions$inboundSchema), + ).optional(), + testFrom: TestFrom$inboundSchema, + testIntervalInSeconds: z.number(), + outageConfiguration: z.nullable( + z.lazy(() => GetWebsiteResponseOutageConfiguration$inboundSchema), + ).optional(), + checkForString: z.nullable( + z.lazy(() => GetWebsiteResponseCheckForString$inboundSchema), + ).optional(), + protocols: z.array(WebsiteProtocol$inboundSchema), + ssl: z.nullable(z.lazy(() => GetWebsiteResponseSsl$inboundSchema)) + .optional(), + customHeaders: z.nullable(z.array(CustomHeaders$inboundSchema)).optional(), + allowInsecureRenegotiation: z.boolean().optional(), + postData: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type GetWebsiteResponseAvailabilityCheckSettings$Outbound = { + platformOptions?: + | GetWebsiteResponsePlatformOptions$Outbound + | null + | undefined; + testFrom: TestFrom$Outbound; + testIntervalInSeconds: number; + outageConfiguration?: + | GetWebsiteResponseOutageConfiguration$Outbound + | null + | undefined; + checkForString?: GetWebsiteResponseCheckForString$Outbound | null | undefined; + protocols: Array; + ssl?: GetWebsiteResponseSsl$Outbound | null | undefined; + customHeaders?: Array | null | undefined; + allowInsecureRenegotiation?: boolean | undefined; + postData?: string | null | undefined; +}; + +/** @internal */ +export const GetWebsiteResponseAvailabilityCheckSettings$outboundSchema: + z.ZodType< + GetWebsiteResponseAvailabilityCheckSettings$Outbound, + z.ZodTypeDef, + GetWebsiteResponseAvailabilityCheckSettings + > = z.object({ + platformOptions: z.nullable( + z.lazy(() => GetWebsiteResponsePlatformOptions$outboundSchema), + ).optional(), + testFrom: TestFrom$outboundSchema, + testIntervalInSeconds: z.number(), + outageConfiguration: z.nullable( + z.lazy(() => GetWebsiteResponseOutageConfiguration$outboundSchema), + ).optional(), + checkForString: z.nullable( + z.lazy(() => GetWebsiteResponseCheckForString$outboundSchema), + ).optional(), + protocols: z.array(WebsiteProtocol$outboundSchema), + ssl: z.nullable(z.lazy(() => GetWebsiteResponseSsl$outboundSchema)) + .optional(), + customHeaders: z.nullable(z.array(CustomHeaders$outboundSchema)).optional(), + allowInsecureRenegotiation: z.boolean().optional(), + postData: 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 GetWebsiteResponseAvailabilityCheckSettings$ { + /** @deprecated use `GetWebsiteResponseAvailabilityCheckSettings$inboundSchema` instead. */ + export const inboundSchema = + GetWebsiteResponseAvailabilityCheckSettings$inboundSchema; + /** @deprecated use `GetWebsiteResponseAvailabilityCheckSettings$outboundSchema` instead. */ + export const outboundSchema = + GetWebsiteResponseAvailabilityCheckSettings$outboundSchema; + /** @deprecated use `GetWebsiteResponseAvailabilityCheckSettings$Outbound` instead. */ + export type Outbound = GetWebsiteResponseAvailabilityCheckSettings$Outbound; +} + +export function getWebsiteResponseAvailabilityCheckSettingsToJSON( + getWebsiteResponseAvailabilityCheckSettings: + GetWebsiteResponseAvailabilityCheckSettings, +): string { + return JSON.stringify( + GetWebsiteResponseAvailabilityCheckSettings$outboundSchema.parse( + getWebsiteResponseAvailabilityCheckSettings, + ), + ); +} + +export function getWebsiteResponseAvailabilityCheckSettingsFromJSON( + jsonString: string, +): SafeParseResult< + GetWebsiteResponseAvailabilityCheckSettings, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetWebsiteResponseAvailabilityCheckSettings$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'GetWebsiteResponseAvailabilityCheckSettings' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponseRum$inboundSchema: z.ZodType< + GetWebsiteResponseRum, + z.ZodTypeDef, + unknown +> = z.object({ + apdexTimeInSeconds: z.number().int().optional(), + snippet: z.string().optional(), + spa: z.boolean(), +}); + +/** @internal */ +export type GetWebsiteResponseRum$Outbound = { + apdexTimeInSeconds?: number | undefined; + snippet?: string | undefined; + spa: boolean; +}; + +/** @internal */ +export const GetWebsiteResponseRum$outboundSchema: z.ZodType< + GetWebsiteResponseRum$Outbound, + z.ZodTypeDef, + GetWebsiteResponseRum +> = z.object({ + apdexTimeInSeconds: z.number().int().optional(), + snippet: z.string().optional(), + spa: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetWebsiteResponseRum$ { + /** @deprecated use `GetWebsiteResponseRum$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponseRum$inboundSchema; + /** @deprecated use `GetWebsiteResponseRum$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponseRum$outboundSchema; + /** @deprecated use `GetWebsiteResponseRum$Outbound` instead. */ + export type Outbound = GetWebsiteResponseRum$Outbound; +} + +export function getWebsiteResponseRumToJSON( + getWebsiteResponseRum: GetWebsiteResponseRum, +): string { + return JSON.stringify( + GetWebsiteResponseRum$outboundSchema.parse(getWebsiteResponseRum), + ); +} + +export function getWebsiteResponseRumFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetWebsiteResponseRum$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponseRum' from JSON`, + ); +} + +/** @internal */ +export const GetWebsiteResponse$inboundSchema: z.ZodType< + GetWebsiteResponse, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + type: z.string(), + status: GetWebsiteResponseStatus$inboundSchema, + name: z.string(), + url: z.string(), + monitoringOptions: z.lazy(() => MonitoringOptions$inboundSchema), + availabilityCheckSettings: z.nullable( + z.lazy(() => GetWebsiteResponseAvailabilityCheckSettings$inboundSchema), + ).optional(), + tags: z.array(Tag$inboundSchema).optional(), + rum: z.lazy(() => GetWebsiteResponseRum$inboundSchema).optional(), + lastOutageStartTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastOutageEndTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastTestTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastErrorTime: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + lastResponseTime: z.nullable(z.number().int()).optional(), + nextOnDemandAvailabilityTime: z.number().int().optional(), +}); + +/** @internal */ +export type GetWebsiteResponse$Outbound = { + id: string; + type: string; + status: string; + name: string; + url: string; + monitoringOptions: MonitoringOptions$Outbound; + availabilityCheckSettings?: + | GetWebsiteResponseAvailabilityCheckSettings$Outbound + | null + | undefined; + tags?: Array | undefined; + rum?: GetWebsiteResponseRum$Outbound | undefined; + lastOutageStartTime?: string | null | undefined; + lastOutageEndTime?: string | null | undefined; + lastTestTime?: string | null | undefined; + lastErrorTime?: string | null | undefined; + lastResponseTime?: number | null | undefined; + nextOnDemandAvailabilityTime?: number | undefined; +}; + +/** @internal */ +export const GetWebsiteResponse$outboundSchema: z.ZodType< + GetWebsiteResponse$Outbound, + z.ZodTypeDef, + GetWebsiteResponse +> = z.object({ + id: z.string(), + type: z.string(), + status: GetWebsiteResponseStatus$outboundSchema, + name: z.string(), + url: z.string(), + monitoringOptions: z.lazy(() => MonitoringOptions$outboundSchema), + availabilityCheckSettings: z.nullable( + z.lazy(() => GetWebsiteResponseAvailabilityCheckSettings$outboundSchema), + ).optional(), + tags: z.array(Tag$outboundSchema).optional(), + rum: z.lazy(() => GetWebsiteResponseRum$outboundSchema).optional(), + lastOutageStartTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastOutageEndTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastTestTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), + lastErrorTime: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastResponseTime: z.nullable(z.number().int()).optional(), + nextOnDemandAvailabilityTime: 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 GetWebsiteResponse$ { + /** @deprecated use `GetWebsiteResponse$inboundSchema` instead. */ + export const inboundSchema = GetWebsiteResponse$inboundSchema; + /** @deprecated use `GetWebsiteResponse$outboundSchema` instead. */ + export const outboundSchema = GetWebsiteResponse$outboundSchema; + /** @deprecated use `GetWebsiteResponse$Outbound` instead. */ + export type Outbound = GetWebsiteResponse$Outbound; +} + +export function getWebsiteResponseToJSON( + getWebsiteResponse: GetWebsiteResponse, +): string { + return JSON.stringify( + GetWebsiteResponse$outboundSchema.parse(getWebsiteResponse), + ); +} + +export function getWebsiteResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetWebsiteResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetWebsiteResponse' from JSON`, + ); +} diff --git a/swov1/src/models/components/index.ts b/swov1/src/models/components/index.ts index d206d3d..e12d0ad 100644 --- a/swov1/src/models/components/index.ts +++ b/swov1/src/models/components/index.ts @@ -5,25 +5,32 @@ export * from "./activateawsintegrationrequest.js"; export * from "./awsorganisationalunitrequest.js"; export * from "./changeevent.js"; -export * from "./checkforstringoperator.js"; export * from "./commonkeyvaluepair.js"; export * from "./commonlink.js"; export * from "./commonmetricinfo.js"; export * from "./commonpageinfo.js"; export * from "./compositemetric.js"; export * from "./createtokenrequest.js"; +export * from "./createtokenresponse.js"; export * from "./customheaders.js"; export * from "./databaseauthmethod.js"; export * from "./databaseconnectionoptions.js"; +export * from "./databaseconnectionoptionsupdate.js"; export * from "./databasecredentialspublickeyresponse.js"; +export * from "./databasemetricscapturemethod.js"; export * from "./databasepluginconfig.js"; export * from "./databasepluginconfigresponse.js"; export * from "./databasepluginstatus.js"; export * from "./databasepluginstatusresponse.js"; +export * from "./databasessloptions.js"; +export * from "./databasessloptionsupdate.js"; export * from "./databasetype.js"; export * from "./entity.js"; export * from "./entityid.js"; export * from "./entityinput.js"; +export * from "./geturiresponse.js"; +export * from "./getwebsiteresponse.js"; +export * from "./listprobesresponse.js"; export * from "./logsarchive.js"; export * from "./logsevent.js"; export * from "./metricmeasurementsrequest.js"; @@ -37,7 +44,6 @@ export * from "./observedatabaserequest.js"; export * from "./organisationalunit.js"; export * from "./outageconfiguration.js"; export * from "./probe.js"; -export * from "./probelocationtype.js"; export * from "./probeplatform.js"; export * from "./security.js"; export * from "./tag.js"; @@ -47,6 +53,7 @@ export * from "./updateawsintegrationresponse.js"; export * from "./updatecompositemetric.js"; export * from "./updatedatabaserequest.js"; export * from "./uri.js"; +export * from "./uriavailabilitychecksettings.js"; export * from "./uriavailabilitychecksettingsinput.js"; export * from "./website.js"; export * from "./websiteprotocol.js"; diff --git a/swov1/src/models/operations/listprobes.ts b/swov1/src/models/components/listprobesresponse.ts similarity index 87% rename from swov1/src/models/operations/listprobes.ts rename to swov1/src/models/components/listprobesresponse.ts index e905b13..ab6f323 100644 --- a/swov1/src/models/operations/listprobes.ts +++ b/swov1/src/models/components/listprobesresponse.ts @@ -5,17 +5,19 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Probe, + Probe$inboundSchema, + Probe$Outbound, + Probe$outboundSchema, +} from "./probe.js"; -/** - * The request has succeeded. - */ export type ListProbesResponse = { /** * Synthetic probes used to perform availability tests. */ - probes: Array; + probes: Array; }; /** @internal */ @@ -24,12 +26,12 @@ export const ListProbesResponse$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - probes: z.array(components.Probe$inboundSchema), + probes: z.array(Probe$inboundSchema), }); /** @internal */ export type ListProbesResponse$Outbound = { - probes: Array; + probes: Array; }; /** @internal */ @@ -38,7 +40,7 @@ export const ListProbesResponse$outboundSchema: z.ZodType< z.ZodTypeDef, ListProbesResponse > = z.object({ - probes: z.array(components.Probe$outboundSchema), + probes: z.array(Probe$outboundSchema), }); /** diff --git a/swov1/src/models/components/observedatabaserequest.ts b/swov1/src/models/components/observedatabaserequest.ts index 601cacf..c9db32c 100644 --- a/swov1/src/models/components/observedatabaserequest.ts +++ b/swov1/src/models/components/observedatabaserequest.ts @@ -4,7 +4,6 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -24,33 +23,24 @@ import { DatabaseConnectionOptions$Outbound, DatabaseConnectionOptions$outboundSchema, } from "./databaseconnectionoptions.js"; +import { + DatabaseMetricsCaptureMethod, + DatabaseMetricsCaptureMethod$inboundSchema, + DatabaseMetricsCaptureMethod$outboundSchema, +} from "./databasemetricscapturemethod.js"; import { DatabaseType, DatabaseType$inboundSchema, DatabaseType$outboundSchema, } from "./databasetype.js"; -/** - * Method for capturing metrics from database server: sniff/profiler/slow-log/poll, ignored for SqlServer and Redis - */ -export const CaptureMethod = { - Sniffer: "sniffer", - Poll: "poll", - Profiler: "profiler", - SlowLog: "slow-log", -} as const; -/** - * Method for capturing metrics from database server: sniff/profiler/slow-log/poll, ignored for SqlServer and Redis - */ -export type CaptureMethod = ClosedEnum; - export type ObserveDatabaseRequest = { /** * Name for the observed database entity */ name: string; /** - * Swo Agent ID wehre the plugins for observing database server should run + * Swo Agent ID where the plugin(s) for observing database server should run */ agentId: string; /** @@ -62,13 +52,18 @@ export type ObserveDatabaseRequest = { */ authMethod: DatabaseAuthMethod; /** - * Method for capturing metrics from database server: sniff/profiler/slow-log/poll, ignored for SqlServer and Redis + * Method for capturing metrics from database server: sniffer/poll/profiler/slow-log, ignored for SqlServer and Redis + * + * @remarks + * Sniffer is supported for mysql, mongo, redis and pgsql. + * Poll is supported for mysql, mssql, pgsql. + * profiler and slow-log are supported for mongo. */ - captureMethod?: CaptureMethod | null | undefined; + captureMethod?: DatabaseMetricsCaptureMethod | undefined; /** - * Optional advanced configuration options for plugins, e.g. disable-sampling + * Optional advanced configuration options for plugins, e.g. disable-sampling set to true */ - configOptions: Array | null; + configOptions?: Array | undefined; /** * Options specifying how plugins connect to database server */ @@ -76,30 +71,9 @@ export type ObserveDatabaseRequest = { /** * Tags for observed database entity */ - tags: Array | null; + tags?: Array | undefined; }; -/** @internal */ -export const CaptureMethod$inboundSchema: z.ZodNativeEnum< - typeof CaptureMethod -> = z.nativeEnum(CaptureMethod); - -/** @internal */ -export const CaptureMethod$outboundSchema: z.ZodNativeEnum< - typeof CaptureMethod -> = CaptureMethod$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CaptureMethod$ { - /** @deprecated use `CaptureMethod$inboundSchema` instead. */ - export const inboundSchema = CaptureMethod$inboundSchema; - /** @deprecated use `CaptureMethod$outboundSchema` instead. */ - export const outboundSchema = CaptureMethod$outboundSchema; -} - /** @internal */ export const ObserveDatabaseRequest$inboundSchema: z.ZodType< ObserveDatabaseRequest, @@ -110,10 +84,10 @@ export const ObserveDatabaseRequest$inboundSchema: z.ZodType< agentId: z.string(), dbType: DatabaseType$inboundSchema, authMethod: DatabaseAuthMethod$inboundSchema, - captureMethod: z.nullable(CaptureMethod$inboundSchema).default(null), - configOptions: z.nullable(z.array(CommonKeyValuePair$inboundSchema)), + captureMethod: DatabaseMetricsCaptureMethod$inboundSchema.optional(), + configOptions: z.array(CommonKeyValuePair$inboundSchema).optional(), dbConnOptions: DatabaseConnectionOptions$inboundSchema, - tags: z.nullable(z.array(CommonKeyValuePair$inboundSchema)), + tags: z.array(CommonKeyValuePair$inboundSchema).optional(), }); /** @internal */ @@ -122,10 +96,10 @@ export type ObserveDatabaseRequest$Outbound = { agentId: string; dbType: string; authMethod: string; - captureMethod: string | null; - configOptions: Array | null; + captureMethod?: string | undefined; + configOptions?: Array | undefined; dbConnOptions: DatabaseConnectionOptions$Outbound; - tags: Array | null; + tags?: Array | undefined; }; /** @internal */ @@ -138,10 +112,10 @@ export const ObserveDatabaseRequest$outboundSchema: z.ZodType< agentId: z.string(), dbType: DatabaseType$outboundSchema, authMethod: DatabaseAuthMethod$outboundSchema, - captureMethod: z.nullable(CaptureMethod$outboundSchema).default(null), - configOptions: z.nullable(z.array(CommonKeyValuePair$outboundSchema)), + captureMethod: DatabaseMetricsCaptureMethod$outboundSchema.optional(), + configOptions: z.array(CommonKeyValuePair$outboundSchema).optional(), dbConnOptions: DatabaseConnectionOptions$outboundSchema, - tags: z.nullable(z.array(CommonKeyValuePair$outboundSchema)), + tags: z.array(CommonKeyValuePair$outboundSchema).optional(), }); /** diff --git a/swov1/src/models/components/probelocationtype.ts b/swov1/src/models/components/probelocationtype.ts deleted file mode 100644 index 43024a0..0000000 --- a/swov1/src/models/components/probelocationtype.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../../types/enums.js"; - -export const ProbeLocationType = { - Region: "REGION", - Country: "COUNTRY", - City: "CITY", -} as const; -export type ProbeLocationType = ClosedEnum; - -/** @internal */ -export const ProbeLocationType$inboundSchema: z.ZodNativeEnum< - typeof ProbeLocationType -> = z.nativeEnum(ProbeLocationType); - -/** @internal */ -export const ProbeLocationType$outboundSchema: z.ZodNativeEnum< - typeof ProbeLocationType -> = ProbeLocationType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProbeLocationType$ { - /** @deprecated use `ProbeLocationType$inboundSchema` instead. */ - export const inboundSchema = ProbeLocationType$inboundSchema; - /** @deprecated use `ProbeLocationType$outboundSchema` instead. */ - export const outboundSchema = ProbeLocationType$outboundSchema; -} diff --git a/swov1/src/models/components/testfrom.ts b/swov1/src/models/components/testfrom.ts index 4496bbf..227f271 100644 --- a/swov1/src/models/components/testfrom.ts +++ b/swov1/src/models/components/testfrom.ts @@ -4,32 +4,60 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ProbeLocationType, - ProbeLocationType$inboundSchema, - ProbeLocationType$outboundSchema, -} from "./probelocationtype.js"; + +/** + * Specificity for location of synthetic probes to be used for availability tests. + */ +export const TestFromType = { + Region: "REGION", + Country: "COUNTRY", + City: "CITY", +} as const; +/** + * Specificity for location of synthetic probes to be used for availability tests. + */ +export type TestFromType = ClosedEnum; export type TestFrom = { /** * Specificity for location of synthetic probes to be used for availability tests. */ - type: ProbeLocationType; + type: TestFromType; /** * A list of probe location values of the selected type. At least one value matching an existing probe must be provided. */ values: Array; }; +/** @internal */ +export const TestFromType$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(TestFromType); + +/** @internal */ +export const TestFromType$outboundSchema: z.ZodNativeEnum = + TestFromType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TestFromType$ { + /** @deprecated use `TestFromType$inboundSchema` instead. */ + export const inboundSchema = TestFromType$inboundSchema; + /** @deprecated use `TestFromType$outboundSchema` instead. */ + export const outboundSchema = TestFromType$outboundSchema; +} + /** @internal */ export const TestFrom$inboundSchema: z.ZodType< TestFrom, z.ZodTypeDef, unknown > = z.object({ - type: ProbeLocationType$inboundSchema, + type: TestFromType$inboundSchema, values: z.array(z.string()), }); @@ -45,7 +73,7 @@ export const TestFrom$outboundSchema: z.ZodType< z.ZodTypeDef, TestFrom > = z.object({ - type: ProbeLocationType$outboundSchema, + type: TestFromType$outboundSchema, values: z.array(z.string()), }); diff --git a/swov1/src/models/components/updatedatabaserequest.ts b/swov1/src/models/components/updatedatabaserequest.ts index de845c6..2b218cc 100644 --- a/swov1/src/models/components/updatedatabaserequest.ts +++ b/swov1/src/models/components/updatedatabaserequest.ts @@ -4,7 +4,6 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { @@ -13,77 +12,12 @@ import { CommonKeyValuePair$Outbound, CommonKeyValuePair$outboundSchema, } from "./commonkeyvaluepair.js"; - -/** - * SSL mode such as require, verify-ca, verify-full as applicable - */ -export const UpdateDatabaseRequestSslMode = { - Require: "require", - VerfifyCa: "verfify-ca", - VerifyFull: "verify-full", -} as const; -/** - * SSL mode such as require, verify-ca, verify-full as applicable - */ -export type UpdateDatabaseRequestSslMode = ClosedEnum< - typeof UpdateDatabaseRequestSslMode ->; - -/** - * SSL connection options, when sslEnabled is true - */ -export type UpdateDatabaseRequestSslOptions = { - /** - * SSL mode such as require, verify-ca, verify-full as applicable - */ - sslMode?: UpdateDatabaseRequestSslMode | undefined; - /** - * CA file path - */ - sslCAPath?: string | undefined; - /** - * SSL key file path - */ - sslKeyPath?: string | undefined; - /** - * SSL cert file path - */ - sslCertPath?: string | undefined; -}; - -/** - * Options specifying how plugins connect to database server, authentication method change is not supported - */ -export type DbConnOptions = { - /** - * Database server host - */ - host?: string | undefined; - /** - * Database server port - */ - port?: string | null | undefined; - /** - * Encrypted credentials for connecting to database server when using basic auth method (username, password) - */ - encryptedCredentials?: string | undefined; - /** - * Username for connecting to database server needed only for auth methods other than basic auth - */ - user?: string | undefined; - /** - * Enable ssl when agent connects to database server - */ - sslEnabled?: boolean | undefined; - /** - * SSL connection options, when sslEnabled is true - */ - sslOptions?: UpdateDatabaseRequestSslOptions | null | undefined; - /** - * Cloud region in case of database managed by cloud provider, required for IAM authentication - */ - cloudRegion?: string | undefined; -}; +import { + DatabaseConnectionOptionsUpdate, + DatabaseConnectionOptionsUpdate$inboundSchema, + DatabaseConnectionOptionsUpdate$Outbound, + DatabaseConnectionOptionsUpdate$outboundSchema, +} from "./databaseconnectionoptionsupdate.js"; export type UpdateDatabaseRequest = { /** @@ -91,177 +25,23 @@ export type UpdateDatabaseRequest = { */ name?: string | undefined; /** - * Optional advanced configuration options for plugins, e.g. disable-sampling + * Optional advanced configuration options for plugins, e.g. disable-sampling set to true */ - configOptions?: Array | null | undefined; + configOptions?: Array | undefined; /** * Options specifying how plugins connect to database server, authentication method change is not supported */ - dbConnOptions?: DbConnOptions | null | undefined; + dbConnOptions?: DatabaseConnectionOptionsUpdate | undefined; /** * Tags for observed database entity */ - tags?: Array | null | undefined; -}; - -/** @internal */ -export const UpdateDatabaseRequestSslMode$inboundSchema: z.ZodNativeEnum< - typeof UpdateDatabaseRequestSslMode -> = z.nativeEnum(UpdateDatabaseRequestSslMode); - -/** @internal */ -export const UpdateDatabaseRequestSslMode$outboundSchema: z.ZodNativeEnum< - typeof UpdateDatabaseRequestSslMode -> = UpdateDatabaseRequestSslMode$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateDatabaseRequestSslMode$ { - /** @deprecated use `UpdateDatabaseRequestSslMode$inboundSchema` instead. */ - export const inboundSchema = UpdateDatabaseRequestSslMode$inboundSchema; - /** @deprecated use `UpdateDatabaseRequestSslMode$outboundSchema` instead. */ - export const outboundSchema = UpdateDatabaseRequestSslMode$outboundSchema; -} - -/** @internal */ -export const UpdateDatabaseRequestSslOptions$inboundSchema: z.ZodType< - UpdateDatabaseRequestSslOptions, - z.ZodTypeDef, - unknown -> = z.object({ - sslMode: UpdateDatabaseRequestSslMode$inboundSchema.default("require"), - sslCAPath: z.string().default(""), - sslKeyPath: z.string().default(""), - sslCertPath: z.string().default(""), -}); - -/** @internal */ -export type UpdateDatabaseRequestSslOptions$Outbound = { - sslMode: string; - sslCAPath: string; - sslKeyPath: string; - sslCertPath: string; -}; - -/** @internal */ -export const UpdateDatabaseRequestSslOptions$outboundSchema: z.ZodType< - UpdateDatabaseRequestSslOptions$Outbound, - z.ZodTypeDef, - UpdateDatabaseRequestSslOptions -> = z.object({ - sslMode: UpdateDatabaseRequestSslMode$outboundSchema.default("require"), - sslCAPath: z.string().default(""), - sslKeyPath: z.string().default(""), - sslCertPath: z.string().default(""), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateDatabaseRequestSslOptions$ { - /** @deprecated use `UpdateDatabaseRequestSslOptions$inboundSchema` instead. */ - export const inboundSchema = UpdateDatabaseRequestSslOptions$inboundSchema; - /** @deprecated use `UpdateDatabaseRequestSslOptions$outboundSchema` instead. */ - export const outboundSchema = UpdateDatabaseRequestSslOptions$outboundSchema; - /** @deprecated use `UpdateDatabaseRequestSslOptions$Outbound` instead. */ - export type Outbound = UpdateDatabaseRequestSslOptions$Outbound; -} - -export function updateDatabaseRequestSslOptionsToJSON( - updateDatabaseRequestSslOptions: UpdateDatabaseRequestSslOptions, -): string { - return JSON.stringify( - UpdateDatabaseRequestSslOptions$outboundSchema.parse( - updateDatabaseRequestSslOptions, - ), - ); -} - -export function updateDatabaseRequestSslOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateDatabaseRequestSslOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateDatabaseRequestSslOptions' from JSON`, - ); -} - -/** @internal */ -export const DbConnOptions$inboundSchema: z.ZodType< - DbConnOptions, - z.ZodTypeDef, - unknown -> = z.object({ - host: z.string().optional(), - port: z.nullable(z.string()).optional(), - encryptedCredentials: z.string().default(""), - user: z.string().default(""), - sslEnabled: z.boolean().default(false), - sslOptions: z.nullable( - z.lazy(() => UpdateDatabaseRequestSslOptions$inboundSchema), - ).optional(), - cloudRegion: z.string().default(""), -}); - -/** @internal */ -export type DbConnOptions$Outbound = { - host?: string | undefined; - port?: string | null | undefined; - encryptedCredentials: string; - user: string; - sslEnabled: boolean; - sslOptions?: UpdateDatabaseRequestSslOptions$Outbound | null | undefined; - cloudRegion: string; + tags?: Array | undefined; + /** + * Host entity/entities where database server is deployed on + */ + deployedOn?: Array | undefined; }; -/** @internal */ -export const DbConnOptions$outboundSchema: z.ZodType< - DbConnOptions$Outbound, - z.ZodTypeDef, - DbConnOptions -> = z.object({ - host: z.string().optional(), - port: z.nullable(z.string()).optional(), - encryptedCredentials: z.string().default(""), - user: z.string().default(""), - sslEnabled: z.boolean().default(false), - sslOptions: z.nullable( - z.lazy(() => UpdateDatabaseRequestSslOptions$outboundSchema), - ).optional(), - cloudRegion: z.string().default(""), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DbConnOptions$ { - /** @deprecated use `DbConnOptions$inboundSchema` instead. */ - export const inboundSchema = DbConnOptions$inboundSchema; - /** @deprecated use `DbConnOptions$outboundSchema` instead. */ - export const outboundSchema = DbConnOptions$outboundSchema; - /** @deprecated use `DbConnOptions$Outbound` instead. */ - export type Outbound = DbConnOptions$Outbound; -} - -export function dbConnOptionsToJSON(dbConnOptions: DbConnOptions): string { - return JSON.stringify(DbConnOptions$outboundSchema.parse(dbConnOptions)); -} - -export function dbConnOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DbConnOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DbConnOptions' from JSON`, - ); -} - /** @internal */ export const UpdateDatabaseRequest$inboundSchema: z.ZodType< UpdateDatabaseRequest, @@ -269,19 +49,19 @@ export const UpdateDatabaseRequest$inboundSchema: z.ZodType< unknown > = z.object({ name: z.string().default(""), - configOptions: z.nullable(z.array(CommonKeyValuePair$inboundSchema)) - .optional(), - dbConnOptions: z.nullable(z.lazy(() => DbConnOptions$inboundSchema)) - .optional(), - tags: z.nullable(z.array(CommonKeyValuePair$inboundSchema)).optional(), + configOptions: z.array(CommonKeyValuePair$inboundSchema).optional(), + dbConnOptions: DatabaseConnectionOptionsUpdate$inboundSchema.optional(), + tags: z.array(CommonKeyValuePair$inboundSchema).optional(), + deployedOn: z.array(z.string()).optional(), }); /** @internal */ export type UpdateDatabaseRequest$Outbound = { name: string; - configOptions?: Array | null | undefined; - dbConnOptions?: DbConnOptions$Outbound | null | undefined; - tags?: Array | null | undefined; + configOptions?: Array | undefined; + dbConnOptions?: DatabaseConnectionOptionsUpdate$Outbound | undefined; + tags?: Array | undefined; + deployedOn?: Array | undefined; }; /** @internal */ @@ -291,11 +71,10 @@ export const UpdateDatabaseRequest$outboundSchema: z.ZodType< UpdateDatabaseRequest > = z.object({ name: z.string().default(""), - configOptions: z.nullable(z.array(CommonKeyValuePair$outboundSchema)) - .optional(), - dbConnOptions: z.nullable(z.lazy(() => DbConnOptions$outboundSchema)) - .optional(), - tags: z.nullable(z.array(CommonKeyValuePair$outboundSchema)).optional(), + configOptions: z.array(CommonKeyValuePair$outboundSchema).optional(), + dbConnOptions: DatabaseConnectionOptionsUpdate$outboundSchema.optional(), + tags: z.array(CommonKeyValuePair$outboundSchema).optional(), + deployedOn: z.array(z.string()).optional(), }); /** diff --git a/swov1/src/models/components/uriavailabilitychecksettings.ts b/swov1/src/models/components/uriavailabilitychecksettings.ts new file mode 100644 index 0000000..0c89dcb --- /dev/null +++ b/swov1/src/models/components/uriavailabilitychecksettings.ts @@ -0,0 +1,582 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ProbePlatform, + ProbePlatform$inboundSchema, + ProbePlatform$outboundSchema, +} from "./probeplatform.js"; +import { + TestFrom, + TestFrom$inboundSchema, + TestFrom$Outbound, + TestFrom$outboundSchema, +} from "./testfrom.js"; + +/** + * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. + */ +export type UriAvailabilityCheckSettingsPlatformOptions = { + /** + * Cloud platforms hosting synthetic probes. + */ + probePlatforms: Array; + /** + * Use this field to configure whether availability tests should be performed from all selected + * + * @remarks + * platforms or one randomly selected platform. It has no effect if you provided only one platform + * in the `probePlatforms` field. + * + * If set to true, a separate test is made from each of the selected platforms. + * + * If set to false, only one of the selected platforms is chosen every time. + * + * If omitted, the previous setting will stay in effect. If there is no previous setting, the value + * will default to false. + */ + testFromAll?: boolean | undefined; +}; + +/** + * How many locations must report a failure for an entity to be considered down. + */ +export const UriAvailabilityCheckSettingsFailingTestLocations = { + All: "all", + Any: "any", +} as const; +/** + * How many locations must report a failure for an entity to be considered down. + */ +export type UriAvailabilityCheckSettingsFailingTestLocations = ClosedEnum< + typeof UriAvailabilityCheckSettingsFailingTestLocations +>; + +/** + * Default conditions when the entity is considered down. + * + * @remarks + * If omitted or set to null, organization configuration will be used for this entity. + */ +export type UriAvailabilityCheckSettingsOutageConfiguration = { + /** + * How many locations must report a failure for an entity to be considered down. + */ + failingTestLocations: UriAvailabilityCheckSettingsFailingTestLocations; + /** + * Number of consecutive failing tests for an entity to be considered down. + */ + consecutiveForDown: number; +}; + +/** + * Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ +export type UriAvailabilityCheckSettingsPing = { + /** + * Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ + enabled: boolean; +}; + +/** + * Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ +export type UriAvailabilityCheckSettingsTcp = { + /** + * Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ + enabled: boolean; + /** + * Port number to be used in TCP tests. + */ + port: number; + /** + * Use this field to specify a string to send in the body of a TCP request. + */ + stringToSend?: string | null | undefined; + /** + * Use this field to specify a string to search for in the body of a TCP response. + */ + stringToExpect?: string | null | undefined; +}; + +/** + * Protocol used to test availability of the URI. + */ +export const Protocol = { + Ping: "PING", + Tcp: "TCP", +} as const; +/** + * Protocol used to test availability of the URI. + */ +export type Protocol = ClosedEnum; + +export type UriAvailabilityCheckSettings = { + /** + * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. + */ + platformOptions?: + | UriAvailabilityCheckSettingsPlatformOptions + | null + | undefined; + /** + * Configure locations of the synthetic availability test probes. + * + * @remarks + * Acceptable values depend on the selected type and actual values of existing probes. + */ + testFrom: TestFrom; + /** + * Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. + */ + testIntervalInSeconds: number; + /** + * Default conditions when the entity is considered down. + * + * @remarks + * If omitted or set to null, organization configuration will be used for this entity. + */ + outageConfiguration?: + | UriAvailabilityCheckSettingsOutageConfiguration + | null + | undefined; + /** + * Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ + ping?: UriAvailabilityCheckSettingsPing | null | undefined; + /** + * Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. + * + * @remarks + * One test type (ping or TCP) must be enabled for a URI. + */ + tcp?: UriAvailabilityCheckSettingsTcp | null | undefined; + /** + * Protocol used to test availability of the URI. + */ + protocol: Protocol; +}; + +/** @internal */ +export const UriAvailabilityCheckSettingsPlatformOptions$inboundSchema: + z.ZodType< + UriAvailabilityCheckSettingsPlatformOptions, + z.ZodTypeDef, + unknown + > = z.object({ + probePlatforms: z.array(ProbePlatform$inboundSchema), + testFromAll: z.boolean().optional(), + }); + +/** @internal */ +export type UriAvailabilityCheckSettingsPlatformOptions$Outbound = { + probePlatforms: Array; + testFromAll?: boolean | undefined; +}; + +/** @internal */ +export const UriAvailabilityCheckSettingsPlatformOptions$outboundSchema: + z.ZodType< + UriAvailabilityCheckSettingsPlatformOptions$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsPlatformOptions + > = z.object({ + probePlatforms: z.array(ProbePlatform$outboundSchema), + testFromAll: 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 UriAvailabilityCheckSettingsPlatformOptions$ { + /** @deprecated use `UriAvailabilityCheckSettingsPlatformOptions$inboundSchema` instead. */ + export const inboundSchema = + UriAvailabilityCheckSettingsPlatformOptions$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsPlatformOptions$outboundSchema` instead. */ + export const outboundSchema = + UriAvailabilityCheckSettingsPlatformOptions$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsPlatformOptions$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettingsPlatformOptions$Outbound; +} + +export function uriAvailabilityCheckSettingsPlatformOptionsToJSON( + uriAvailabilityCheckSettingsPlatformOptions: + UriAvailabilityCheckSettingsPlatformOptions, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsPlatformOptions$outboundSchema.parse( + uriAvailabilityCheckSettingsPlatformOptions, + ), + ); +} + +export function uriAvailabilityCheckSettingsPlatformOptionsFromJSON( + jsonString: string, +): SafeParseResult< + UriAvailabilityCheckSettingsPlatformOptions, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UriAvailabilityCheckSettingsPlatformOptions$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UriAvailabilityCheckSettingsPlatformOptions' from JSON`, + ); +} + +/** @internal */ +export const UriAvailabilityCheckSettingsFailingTestLocations$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UriAvailabilityCheckSettingsFailingTestLocations); + +/** @internal */ +export const UriAvailabilityCheckSettingsFailingTestLocations$outboundSchema: + z.ZodNativeEnum = + UriAvailabilityCheckSettingsFailingTestLocations$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UriAvailabilityCheckSettingsFailingTestLocations$ { + /** @deprecated use `UriAvailabilityCheckSettingsFailingTestLocations$inboundSchema` instead. */ + export const inboundSchema = + UriAvailabilityCheckSettingsFailingTestLocations$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsFailingTestLocations$outboundSchema` instead. */ + export const outboundSchema = + UriAvailabilityCheckSettingsFailingTestLocations$outboundSchema; +} + +/** @internal */ +export const UriAvailabilityCheckSettingsOutageConfiguration$inboundSchema: + z.ZodType< + UriAvailabilityCheckSettingsOutageConfiguration, + z.ZodTypeDef, + unknown + > = z.object({ + failingTestLocations: + UriAvailabilityCheckSettingsFailingTestLocations$inboundSchema, + consecutiveForDown: z.number().int(), + }); + +/** @internal */ +export type UriAvailabilityCheckSettingsOutageConfiguration$Outbound = { + failingTestLocations: string; + consecutiveForDown: number; +}; + +/** @internal */ +export const UriAvailabilityCheckSettingsOutageConfiguration$outboundSchema: + z.ZodType< + UriAvailabilityCheckSettingsOutageConfiguration$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsOutageConfiguration + > = z.object({ + failingTestLocations: + UriAvailabilityCheckSettingsFailingTestLocations$outboundSchema, + consecutiveForDown: 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 UriAvailabilityCheckSettingsOutageConfiguration$ { + /** @deprecated use `UriAvailabilityCheckSettingsOutageConfiguration$inboundSchema` instead. */ + export const inboundSchema = + UriAvailabilityCheckSettingsOutageConfiguration$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsOutageConfiguration$outboundSchema` instead. */ + export const outboundSchema = + UriAvailabilityCheckSettingsOutageConfiguration$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsOutageConfiguration$Outbound` instead. */ + export type Outbound = + UriAvailabilityCheckSettingsOutageConfiguration$Outbound; +} + +export function uriAvailabilityCheckSettingsOutageConfigurationToJSON( + uriAvailabilityCheckSettingsOutageConfiguration: + UriAvailabilityCheckSettingsOutageConfiguration, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsOutageConfiguration$outboundSchema.parse( + uriAvailabilityCheckSettingsOutageConfiguration, + ), + ); +} + +export function uriAvailabilityCheckSettingsOutageConfigurationFromJSON( + jsonString: string, +): SafeParseResult< + UriAvailabilityCheckSettingsOutageConfiguration, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UriAvailabilityCheckSettingsOutageConfiguration$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UriAvailabilityCheckSettingsOutageConfiguration' from JSON`, + ); +} + +/** @internal */ +export const UriAvailabilityCheckSettingsPing$inboundSchema: z.ZodType< + UriAvailabilityCheckSettingsPing, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.boolean(), +}); + +/** @internal */ +export type UriAvailabilityCheckSettingsPing$Outbound = { + enabled: boolean; +}; + +/** @internal */ +export const UriAvailabilityCheckSettingsPing$outboundSchema: z.ZodType< + UriAvailabilityCheckSettingsPing$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsPing +> = z.object({ + enabled: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UriAvailabilityCheckSettingsPing$ { + /** @deprecated use `UriAvailabilityCheckSettingsPing$inboundSchema` instead. */ + export const inboundSchema = UriAvailabilityCheckSettingsPing$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsPing$outboundSchema` instead. */ + export const outboundSchema = UriAvailabilityCheckSettingsPing$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsPing$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettingsPing$Outbound; +} + +export function uriAvailabilityCheckSettingsPingToJSON( + uriAvailabilityCheckSettingsPing: UriAvailabilityCheckSettingsPing, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsPing$outboundSchema.parse( + uriAvailabilityCheckSettingsPing, + ), + ); +} + +export function uriAvailabilityCheckSettingsPingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UriAvailabilityCheckSettingsPing$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UriAvailabilityCheckSettingsPing' from JSON`, + ); +} + +/** @internal */ +export const UriAvailabilityCheckSettingsTcp$inboundSchema: z.ZodType< + UriAvailabilityCheckSettingsTcp, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.boolean(), + port: z.number().int(), + stringToSend: z.nullable(z.string()).optional(), + stringToExpect: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UriAvailabilityCheckSettingsTcp$Outbound = { + enabled: boolean; + port: number; + stringToSend?: string | null | undefined; + stringToExpect?: string | null | undefined; +}; + +/** @internal */ +export const UriAvailabilityCheckSettingsTcp$outboundSchema: z.ZodType< + UriAvailabilityCheckSettingsTcp$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsTcp +> = z.object({ + enabled: z.boolean(), + port: z.number().int(), + stringToSend: z.nullable(z.string()).optional(), + stringToExpect: 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 UriAvailabilityCheckSettingsTcp$ { + /** @deprecated use `UriAvailabilityCheckSettingsTcp$inboundSchema` instead. */ + export const inboundSchema = UriAvailabilityCheckSettingsTcp$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsTcp$outboundSchema` instead. */ + export const outboundSchema = UriAvailabilityCheckSettingsTcp$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsTcp$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettingsTcp$Outbound; +} + +export function uriAvailabilityCheckSettingsTcpToJSON( + uriAvailabilityCheckSettingsTcp: UriAvailabilityCheckSettingsTcp, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsTcp$outboundSchema.parse( + uriAvailabilityCheckSettingsTcp, + ), + ); +} + +export function uriAvailabilityCheckSettingsTcpFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UriAvailabilityCheckSettingsTcp$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UriAvailabilityCheckSettingsTcp' from JSON`, + ); +} + +/** @internal */ +export const Protocol$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Protocol); + +/** @internal */ +export const Protocol$outboundSchema: z.ZodNativeEnum = + Protocol$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Protocol$ { + /** @deprecated use `Protocol$inboundSchema` instead. */ + export const inboundSchema = Protocol$inboundSchema; + /** @deprecated use `Protocol$outboundSchema` instead. */ + export const outboundSchema = Protocol$outboundSchema; +} + +/** @internal */ +export const UriAvailabilityCheckSettings$inboundSchema: z.ZodType< + UriAvailabilityCheckSettings, + z.ZodTypeDef, + unknown +> = z.object({ + platformOptions: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsPlatformOptions$inboundSchema), + ).optional(), + testFrom: TestFrom$inboundSchema, + testIntervalInSeconds: z.number(), + outageConfiguration: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsOutageConfiguration$inboundSchema), + ).optional(), + ping: z.nullable(z.lazy(() => UriAvailabilityCheckSettingsPing$inboundSchema)) + .optional(), + tcp: z.nullable(z.lazy(() => UriAvailabilityCheckSettingsTcp$inboundSchema)) + .optional(), + protocol: Protocol$inboundSchema, +}); + +/** @internal */ +export type UriAvailabilityCheckSettings$Outbound = { + platformOptions?: + | UriAvailabilityCheckSettingsPlatformOptions$Outbound + | null + | undefined; + testFrom: TestFrom$Outbound; + testIntervalInSeconds: number; + outageConfiguration?: + | UriAvailabilityCheckSettingsOutageConfiguration$Outbound + | null + | undefined; + ping?: UriAvailabilityCheckSettingsPing$Outbound | null | undefined; + tcp?: UriAvailabilityCheckSettingsTcp$Outbound | null | undefined; + protocol: string; +}; + +/** @internal */ +export const UriAvailabilityCheckSettings$outboundSchema: z.ZodType< + UriAvailabilityCheckSettings$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettings +> = z.object({ + platformOptions: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsPlatformOptions$outboundSchema), + ).optional(), + testFrom: TestFrom$outboundSchema, + testIntervalInSeconds: z.number(), + outageConfiguration: z.nullable( + z.lazy(() => + UriAvailabilityCheckSettingsOutageConfiguration$outboundSchema + ), + ).optional(), + ping: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsPing$outboundSchema), + ).optional(), + tcp: z.nullable(z.lazy(() => UriAvailabilityCheckSettingsTcp$outboundSchema)) + .optional(), + protocol: Protocol$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UriAvailabilityCheckSettings$ { + /** @deprecated use `UriAvailabilityCheckSettings$inboundSchema` instead. */ + export const inboundSchema = UriAvailabilityCheckSettings$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettings$outboundSchema` instead. */ + export const outboundSchema = UriAvailabilityCheckSettings$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettings$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettings$Outbound; +} + +export function uriAvailabilityCheckSettingsToJSON( + uriAvailabilityCheckSettings: UriAvailabilityCheckSettings, +): string { + return JSON.stringify( + UriAvailabilityCheckSettings$outboundSchema.parse( + uriAvailabilityCheckSettings, + ), + ); +} + +export function uriAvailabilityCheckSettingsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UriAvailabilityCheckSettings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UriAvailabilityCheckSettings' from JSON`, + ); +} diff --git a/swov1/src/models/components/uriavailabilitychecksettingsinput.ts b/swov1/src/models/components/uriavailabilitychecksettingsinput.ts index e7f3629..482a16e 100644 --- a/swov1/src/models/components/uriavailabilitychecksettingsinput.ts +++ b/swov1/src/models/components/uriavailabilitychecksettingsinput.ts @@ -81,7 +81,7 @@ export type UriAvailabilityCheckSettingsInputOutageConfiguration = { * @remarks * One test type (ping or TCP) must be enabled for a URI. */ -export type Ping = { +export type UriAvailabilityCheckSettingsInputPing = { /** * Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled. * @@ -97,7 +97,7 @@ export type Ping = { * @remarks * One test type (ping or TCP) must be enabled for a URI. */ -export type Tcp = { +export type UriAvailabilityCheckSettingsInputTcp = { /** * Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled. * @@ -154,14 +154,14 @@ export type UriAvailabilityCheckSettingsInput = { * @remarks * One test type (ping or TCP) must be enabled for a URI. */ - ping?: Ping | null | undefined; + ping?: UriAvailabilityCheckSettingsInputPing | null | undefined; /** * Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. * * @remarks * One test type (ping or TCP) must be enabled for a URI. */ - tcp?: Tcp | null | undefined; + tcp?: UriAvailabilityCheckSettingsInputTcp | null | undefined; }; /** @internal */ @@ -334,60 +334,78 @@ export function uriAvailabilityCheckSettingsInputOutageConfigurationFromJSON( } /** @internal */ -export const Ping$inboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - }); +export const UriAvailabilityCheckSettingsInputPing$inboundSchema: z.ZodType< + UriAvailabilityCheckSettingsInputPing, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.boolean(), +}); /** @internal */ -export type Ping$Outbound = { +export type UriAvailabilityCheckSettingsInputPing$Outbound = { enabled: boolean; }; /** @internal */ -export const Ping$outboundSchema: z.ZodType = - z.object({ - enabled: z.boolean(), - }); +export const UriAvailabilityCheckSettingsInputPing$outboundSchema: z.ZodType< + UriAvailabilityCheckSettingsInputPing$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsInputPing +> = z.object({ + enabled: z.boolean(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Ping$ { - /** @deprecated use `Ping$inboundSchema` instead. */ - export const inboundSchema = Ping$inboundSchema; - /** @deprecated use `Ping$outboundSchema` instead. */ - export const outboundSchema = Ping$outboundSchema; - /** @deprecated use `Ping$Outbound` instead. */ - export type Outbound = Ping$Outbound; +export namespace UriAvailabilityCheckSettingsInputPing$ { + /** @deprecated use `UriAvailabilityCheckSettingsInputPing$inboundSchema` instead. */ + export const inboundSchema = + UriAvailabilityCheckSettingsInputPing$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsInputPing$outboundSchema` instead. */ + export const outboundSchema = + UriAvailabilityCheckSettingsInputPing$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsInputPing$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettingsInputPing$Outbound; } -export function pingToJSON(ping: Ping): string { - return JSON.stringify(Ping$outboundSchema.parse(ping)); +export function uriAvailabilityCheckSettingsInputPingToJSON( + uriAvailabilityCheckSettingsInputPing: UriAvailabilityCheckSettingsInputPing, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsInputPing$outboundSchema.parse( + uriAvailabilityCheckSettingsInputPing, + ), + ); } -export function pingFromJSON( +export function uriAvailabilityCheckSettingsInputPingFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Ping$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ping' from JSON`, + (x) => + UriAvailabilityCheckSettingsInputPing$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UriAvailabilityCheckSettingsInputPing' from JSON`, ); } /** @internal */ -export const Tcp$inboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - port: z.number().int(), - stringToSend: z.nullable(z.string()).optional(), - stringToExpect: z.nullable(z.string()).optional(), - }); +export const UriAvailabilityCheckSettingsInputTcp$inboundSchema: z.ZodType< + UriAvailabilityCheckSettingsInputTcp, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.boolean(), + port: z.number().int(), + stringToSend: z.nullable(z.string()).optional(), + stringToExpect: z.nullable(z.string()).optional(), +}); /** @internal */ -export type Tcp$Outbound = { +export type UriAvailabilityCheckSettingsInputTcp$Outbound = { enabled: boolean; port: number; stringToSend?: string | null | undefined; @@ -395,38 +413,50 @@ export type Tcp$Outbound = { }; /** @internal */ -export const Tcp$outboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - port: z.number().int(), - stringToSend: z.nullable(z.string()).optional(), - stringToExpect: z.nullable(z.string()).optional(), - }); +export const UriAvailabilityCheckSettingsInputTcp$outboundSchema: z.ZodType< + UriAvailabilityCheckSettingsInputTcp$Outbound, + z.ZodTypeDef, + UriAvailabilityCheckSettingsInputTcp +> = z.object({ + enabled: z.boolean(), + port: z.number().int(), + stringToSend: z.nullable(z.string()).optional(), + stringToExpect: 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 Tcp$ { - /** @deprecated use `Tcp$inboundSchema` instead. */ - export const inboundSchema = Tcp$inboundSchema; - /** @deprecated use `Tcp$outboundSchema` instead. */ - export const outboundSchema = Tcp$outboundSchema; - /** @deprecated use `Tcp$Outbound` instead. */ - export type Outbound = Tcp$Outbound; +export namespace UriAvailabilityCheckSettingsInputTcp$ { + /** @deprecated use `UriAvailabilityCheckSettingsInputTcp$inboundSchema` instead. */ + export const inboundSchema = + UriAvailabilityCheckSettingsInputTcp$inboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsInputTcp$outboundSchema` instead. */ + export const outboundSchema = + UriAvailabilityCheckSettingsInputTcp$outboundSchema; + /** @deprecated use `UriAvailabilityCheckSettingsInputTcp$Outbound` instead. */ + export type Outbound = UriAvailabilityCheckSettingsInputTcp$Outbound; } -export function tcpToJSON(tcp: Tcp): string { - return JSON.stringify(Tcp$outboundSchema.parse(tcp)); +export function uriAvailabilityCheckSettingsInputTcpToJSON( + uriAvailabilityCheckSettingsInputTcp: UriAvailabilityCheckSettingsInputTcp, +): string { + return JSON.stringify( + UriAvailabilityCheckSettingsInputTcp$outboundSchema.parse( + uriAvailabilityCheckSettingsInputTcp, + ), + ); } -export function tcpFromJSON( +export function uriAvailabilityCheckSettingsInputTcpFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Tcp$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Tcp' from JSON`, + (x) => + UriAvailabilityCheckSettingsInputTcp$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UriAvailabilityCheckSettingsInputTcp' from JSON`, ); } @@ -448,8 +478,12 @@ export const UriAvailabilityCheckSettingsInput$inboundSchema: z.ZodType< UriAvailabilityCheckSettingsInputOutageConfiguration$inboundSchema ), ).optional(), - ping: z.nullable(z.lazy(() => Ping$inboundSchema)).optional(), - tcp: z.nullable(z.lazy(() => Tcp$inboundSchema)).optional(), + ping: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsInputPing$inboundSchema), + ).optional(), + tcp: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsInputTcp$inboundSchema), + ).optional(), }); /** @internal */ @@ -464,8 +498,8 @@ export type UriAvailabilityCheckSettingsInput$Outbound = { | UriAvailabilityCheckSettingsInputOutageConfiguration$Outbound | null | undefined; - ping?: Ping$Outbound | null | undefined; - tcp?: Tcp$Outbound | null | undefined; + ping?: UriAvailabilityCheckSettingsInputPing$Outbound | null | undefined; + tcp?: UriAvailabilityCheckSettingsInputTcp$Outbound | null | undefined; }; /** @internal */ @@ -486,8 +520,12 @@ export const UriAvailabilityCheckSettingsInput$outboundSchema: z.ZodType< UriAvailabilityCheckSettingsInputOutageConfiguration$outboundSchema ), ).optional(), - ping: z.nullable(z.lazy(() => Ping$outboundSchema)).optional(), - tcp: z.nullable(z.lazy(() => Tcp$outboundSchema)).optional(), + ping: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsInputPing$outboundSchema), + ).optional(), + tcp: z.nullable( + z.lazy(() => UriAvailabilityCheckSettingsInputTcp$outboundSchema), + ).optional(), }); /** diff --git a/swov1/src/models/components/website.ts b/swov1/src/models/components/website.ts index fded67e..f23be7e 100644 --- a/swov1/src/models/components/website.ts +++ b/swov1/src/models/components/website.ts @@ -7,11 +7,6 @@ import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - CheckForStringOperator, - CheckForStringOperator$inboundSchema, - CheckForStringOperator$outboundSchema, -} from "./checkforstringoperator.js"; import { CustomHeaders, CustomHeaders$inboundSchema, @@ -97,6 +92,18 @@ export type WebsiteOutageConfiguration = { consecutiveForDown: number; }; +/** + * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + */ +export const WebsiteOperator = { + Contains: "CONTAINS", + DoesNotContain: "DOES_NOT_CONTAIN", +} as const; +/** + * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). + */ +export type WebsiteOperator = ClosedEnum; + /** * Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. * @@ -105,11 +112,11 @@ export type WebsiteOutageConfiguration = { * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. * If omitted or set to null, the string checking functionality will be disabled. */ -export type CheckForString = { +export type WebsiteCheckForString = { /** * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). */ - operator: CheckForStringOperator; + operator: WebsiteOperator; /** * The string that which will be searched in the page source code. */ @@ -122,7 +129,7 @@ export type CheckForString = { * @remarks * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. */ -export type Ssl = { +export type WebsiteSsl = { /** * Whether SSL monitoring is enabled for the website. * @@ -149,7 +156,7 @@ export type Ssl = { /** * Use this field to configure availability tests for the website. */ -export type AvailabilityCheckSettings = { +export type WebsiteAvailabilityCheckSettings = { /** * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. */ @@ -180,7 +187,7 @@ export type AvailabilityCheckSettings = { * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. * If omitted or set to null, the string checking functionality will be disabled. */ - checkForString?: CheckForString | null | undefined; + checkForString?: WebsiteCheckForString | null | undefined; /** * Configure which protocols need availability tests to be performed. At least one protocol must be provided. */ @@ -191,7 +198,7 @@ export type AvailabilityCheckSettings = { * @remarks * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. */ - ssl?: Ssl | null | undefined; + ssl?: WebsiteSsl | null | undefined; /** * Configure custom request headers to be sent with each availability test. It is possible to provide multiple headers with the same name. * @@ -223,7 +230,7 @@ export type AvailabilityCheckSettings = { * @remarks * You are required to configure at least availability monitoring or real user monitoring to be able to create website. */ -export type Rum = { +export type WebsiteRum = { apdexTimeInSeconds?: number | undefined; spa: boolean; }; @@ -240,7 +247,10 @@ export type Website = { /** * Use this field to configure availability tests for the website. */ - availabilityCheckSettings?: AvailabilityCheckSettings | null | undefined; + availabilityCheckSettings?: + | WebsiteAvailabilityCheckSettings + | null + | undefined; /** * Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. */ @@ -251,7 +261,7 @@ export type Website = { * @remarks * You are required to configure at least availability monitoring or real user monitoring to be able to create website. */ - rum?: Rum | undefined; + rum?: WebsiteRum | undefined; }; /** @internal */ @@ -390,28 +400,49 @@ export function websiteOutageConfigurationFromJSON( } /** @internal */ -export const CheckForString$inboundSchema: z.ZodType< - CheckForString, +export const WebsiteOperator$inboundSchema: z.ZodNativeEnum< + typeof WebsiteOperator +> = z.nativeEnum(WebsiteOperator); + +/** @internal */ +export const WebsiteOperator$outboundSchema: z.ZodNativeEnum< + typeof WebsiteOperator +> = WebsiteOperator$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace WebsiteOperator$ { + /** @deprecated use `WebsiteOperator$inboundSchema` instead. */ + export const inboundSchema = WebsiteOperator$inboundSchema; + /** @deprecated use `WebsiteOperator$outboundSchema` instead. */ + export const outboundSchema = WebsiteOperator$outboundSchema; +} + +/** @internal */ +export const WebsiteCheckForString$inboundSchema: z.ZodType< + WebsiteCheckForString, z.ZodTypeDef, unknown > = z.object({ - operator: CheckForStringOperator$inboundSchema, + operator: WebsiteOperator$inboundSchema, value: z.string(), }); /** @internal */ -export type CheckForString$Outbound = { +export type WebsiteCheckForString$Outbound = { operator: string; value: string; }; /** @internal */ -export const CheckForString$outboundSchema: z.ZodType< - CheckForString$Outbound, +export const WebsiteCheckForString$outboundSchema: z.ZodType< + WebsiteCheckForString$Outbound, z.ZodTypeDef, - CheckForString + WebsiteCheckForString > = z.object({ - operator: CheckForStringOperator$outboundSchema, + operator: WebsiteOperator$outboundSchema, value: z.string(), }); @@ -419,82 +450,92 @@ export const CheckForString$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CheckForString$ { - /** @deprecated use `CheckForString$inboundSchema` instead. */ - export const inboundSchema = CheckForString$inboundSchema; - /** @deprecated use `CheckForString$outboundSchema` instead. */ - export const outboundSchema = CheckForString$outboundSchema; - /** @deprecated use `CheckForString$Outbound` instead. */ - export type Outbound = CheckForString$Outbound; +export namespace WebsiteCheckForString$ { + /** @deprecated use `WebsiteCheckForString$inboundSchema` instead. */ + export const inboundSchema = WebsiteCheckForString$inboundSchema; + /** @deprecated use `WebsiteCheckForString$outboundSchema` instead. */ + export const outboundSchema = WebsiteCheckForString$outboundSchema; + /** @deprecated use `WebsiteCheckForString$Outbound` instead. */ + export type Outbound = WebsiteCheckForString$Outbound; } -export function checkForStringToJSON(checkForString: CheckForString): string { - return JSON.stringify(CheckForString$outboundSchema.parse(checkForString)); +export function websiteCheckForStringToJSON( + websiteCheckForString: WebsiteCheckForString, +): string { + return JSON.stringify( + WebsiteCheckForString$outboundSchema.parse(websiteCheckForString), + ); } -export function checkForStringFromJSON( +export function websiteCheckForStringFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => CheckForString$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForString' from JSON`, + (x) => WebsiteCheckForString$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebsiteCheckForString' from JSON`, ); } /** @internal */ -export const Ssl$inboundSchema: z.ZodType = z - .object({ - enabled: z.nullable(z.boolean()).optional(), - daysPriorToExpiration: z.nullable(z.number().int()).optional(), - ignoreIntermediateCertificates: z.nullable(z.boolean()).optional(), - }); +export const WebsiteSsl$inboundSchema: z.ZodType< + WebsiteSsl, + z.ZodTypeDef, + unknown +> = z.object({ + enabled: z.nullable(z.boolean()).optional(), + daysPriorToExpiration: z.nullable(z.number().int()).optional(), + ignoreIntermediateCertificates: z.nullable(z.boolean()).optional(), +}); /** @internal */ -export type Ssl$Outbound = { +export type WebsiteSsl$Outbound = { enabled?: boolean | null | undefined; daysPriorToExpiration?: number | null | undefined; ignoreIntermediateCertificates?: boolean | null | undefined; }; /** @internal */ -export const Ssl$outboundSchema: z.ZodType = z - .object({ - enabled: z.nullable(z.boolean()).optional(), - daysPriorToExpiration: z.nullable(z.number().int()).optional(), - ignoreIntermediateCertificates: z.nullable(z.boolean()).optional(), - }); +export const WebsiteSsl$outboundSchema: z.ZodType< + WebsiteSsl$Outbound, + z.ZodTypeDef, + WebsiteSsl +> = z.object({ + enabled: z.nullable(z.boolean()).optional(), + daysPriorToExpiration: z.nullable(z.number().int()).optional(), + ignoreIntermediateCertificates: 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 Ssl$ { - /** @deprecated use `Ssl$inboundSchema` instead. */ - export const inboundSchema = Ssl$inboundSchema; - /** @deprecated use `Ssl$outboundSchema` instead. */ - export const outboundSchema = Ssl$outboundSchema; - /** @deprecated use `Ssl$Outbound` instead. */ - export type Outbound = Ssl$Outbound; +export namespace WebsiteSsl$ { + /** @deprecated use `WebsiteSsl$inboundSchema` instead. */ + export const inboundSchema = WebsiteSsl$inboundSchema; + /** @deprecated use `WebsiteSsl$outboundSchema` instead. */ + export const outboundSchema = WebsiteSsl$outboundSchema; + /** @deprecated use `WebsiteSsl$Outbound` instead. */ + export type Outbound = WebsiteSsl$Outbound; } -export function sslToJSON(ssl: Ssl): string { - return JSON.stringify(Ssl$outboundSchema.parse(ssl)); +export function websiteSslToJSON(websiteSsl: WebsiteSsl): string { + return JSON.stringify(WebsiteSsl$outboundSchema.parse(websiteSsl)); } -export function sslFromJSON( +export function websiteSslFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Ssl$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ssl' from JSON`, + (x) => WebsiteSsl$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebsiteSsl' from JSON`, ); } /** @internal */ -export const AvailabilityCheckSettings$inboundSchema: z.ZodType< - AvailabilityCheckSettings, +export const WebsiteAvailabilityCheckSettings$inboundSchema: z.ZodType< + WebsiteAvailabilityCheckSettings, z.ZodTypeDef, unknown > = z.object({ @@ -506,34 +547,34 @@ export const AvailabilityCheckSettings$inboundSchema: z.ZodType< outageConfiguration: z.nullable( z.lazy(() => WebsiteOutageConfiguration$inboundSchema), ).optional(), - checkForString: z.nullable(z.lazy(() => CheckForString$inboundSchema)) + checkForString: z.nullable(z.lazy(() => WebsiteCheckForString$inboundSchema)) .optional(), protocols: z.array(WebsiteProtocol$inboundSchema), - ssl: z.nullable(z.lazy(() => Ssl$inboundSchema)).optional(), + ssl: z.nullable(z.lazy(() => WebsiteSsl$inboundSchema)).optional(), customHeaders: z.nullable(z.array(CustomHeaders$inboundSchema)).optional(), allowInsecureRenegotiation: z.boolean().optional(), postData: z.nullable(z.string()).optional(), }); /** @internal */ -export type AvailabilityCheckSettings$Outbound = { +export type WebsiteAvailabilityCheckSettings$Outbound = { platformOptions?: WebsitePlatformOptions$Outbound | null | undefined; testFrom: TestFrom$Outbound; testIntervalInSeconds: number; outageConfiguration?: WebsiteOutageConfiguration$Outbound | null | undefined; - checkForString?: CheckForString$Outbound | null | undefined; + checkForString?: WebsiteCheckForString$Outbound | null | undefined; protocols: Array; - ssl?: Ssl$Outbound | null | undefined; + ssl?: WebsiteSsl$Outbound | null | undefined; customHeaders?: Array | null | undefined; allowInsecureRenegotiation?: boolean | undefined; postData?: string | null | undefined; }; /** @internal */ -export const AvailabilityCheckSettings$outboundSchema: z.ZodType< - AvailabilityCheckSettings$Outbound, +export const WebsiteAvailabilityCheckSettings$outboundSchema: z.ZodType< + WebsiteAvailabilityCheckSettings$Outbound, z.ZodTypeDef, - AvailabilityCheckSettings + WebsiteAvailabilityCheckSettings > = z.object({ platformOptions: z.nullable( z.lazy(() => WebsitePlatformOptions$outboundSchema), @@ -543,10 +584,10 @@ export const AvailabilityCheckSettings$outboundSchema: z.ZodType< outageConfiguration: z.nullable( z.lazy(() => WebsiteOutageConfiguration$outboundSchema), ).optional(), - checkForString: z.nullable(z.lazy(() => CheckForString$outboundSchema)) + checkForString: z.nullable(z.lazy(() => WebsiteCheckForString$outboundSchema)) .optional(), protocols: z.array(WebsiteProtocol$outboundSchema), - ssl: z.nullable(z.lazy(() => Ssl$outboundSchema)).optional(), + ssl: z.nullable(z.lazy(() => WebsiteSsl$outboundSchema)).optional(), customHeaders: z.nullable(z.array(CustomHeaders$outboundSchema)).optional(), allowInsecureRenegotiation: z.boolean().optional(), postData: z.nullable(z.string()).optional(), @@ -556,77 +597,85 @@ export const AvailabilityCheckSettings$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace AvailabilityCheckSettings$ { - /** @deprecated use `AvailabilityCheckSettings$inboundSchema` instead. */ - export const inboundSchema = AvailabilityCheckSettings$inboundSchema; - /** @deprecated use `AvailabilityCheckSettings$outboundSchema` instead. */ - export const outboundSchema = AvailabilityCheckSettings$outboundSchema; - /** @deprecated use `AvailabilityCheckSettings$Outbound` instead. */ - export type Outbound = AvailabilityCheckSettings$Outbound; +export namespace WebsiteAvailabilityCheckSettings$ { + /** @deprecated use `WebsiteAvailabilityCheckSettings$inboundSchema` instead. */ + export const inboundSchema = WebsiteAvailabilityCheckSettings$inboundSchema; + /** @deprecated use `WebsiteAvailabilityCheckSettings$outboundSchema` instead. */ + export const outboundSchema = WebsiteAvailabilityCheckSettings$outboundSchema; + /** @deprecated use `WebsiteAvailabilityCheckSettings$Outbound` instead. */ + export type Outbound = WebsiteAvailabilityCheckSettings$Outbound; } -export function availabilityCheckSettingsToJSON( - availabilityCheckSettings: AvailabilityCheckSettings, +export function websiteAvailabilityCheckSettingsToJSON( + websiteAvailabilityCheckSettings: WebsiteAvailabilityCheckSettings, ): string { return JSON.stringify( - AvailabilityCheckSettings$outboundSchema.parse(availabilityCheckSettings), + WebsiteAvailabilityCheckSettings$outboundSchema.parse( + websiteAvailabilityCheckSettings, + ), ); } -export function availabilityCheckSettingsFromJSON( +export function websiteAvailabilityCheckSettingsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AvailabilityCheckSettings$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AvailabilityCheckSettings' from JSON`, + (x) => WebsiteAvailabilityCheckSettings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebsiteAvailabilityCheckSettings' from JSON`, ); } /** @internal */ -export const Rum$inboundSchema: z.ZodType = z - .object({ - apdexTimeInSeconds: z.number().int().optional(), - spa: z.boolean(), - }); +export const WebsiteRum$inboundSchema: z.ZodType< + WebsiteRum, + z.ZodTypeDef, + unknown +> = z.object({ + apdexTimeInSeconds: z.number().int().optional(), + spa: z.boolean(), +}); /** @internal */ -export type Rum$Outbound = { +export type WebsiteRum$Outbound = { apdexTimeInSeconds?: number | undefined; spa: boolean; }; /** @internal */ -export const Rum$outboundSchema: z.ZodType = z - .object({ - apdexTimeInSeconds: z.number().int().optional(), - spa: z.boolean(), - }); +export const WebsiteRum$outboundSchema: z.ZodType< + WebsiteRum$Outbound, + z.ZodTypeDef, + WebsiteRum +> = z.object({ + apdexTimeInSeconds: z.number().int().optional(), + spa: z.boolean(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Rum$ { - /** @deprecated use `Rum$inboundSchema` instead. */ - export const inboundSchema = Rum$inboundSchema; - /** @deprecated use `Rum$outboundSchema` instead. */ - export const outboundSchema = Rum$outboundSchema; - /** @deprecated use `Rum$Outbound` instead. */ - export type Outbound = Rum$Outbound; +export namespace WebsiteRum$ { + /** @deprecated use `WebsiteRum$inboundSchema` instead. */ + export const inboundSchema = WebsiteRum$inboundSchema; + /** @deprecated use `WebsiteRum$outboundSchema` instead. */ + export const outboundSchema = WebsiteRum$outboundSchema; + /** @deprecated use `WebsiteRum$Outbound` instead. */ + export type Outbound = WebsiteRum$Outbound; } -export function rumToJSON(rum: Rum): string { - return JSON.stringify(Rum$outboundSchema.parse(rum)); +export function websiteRumToJSON(websiteRum: WebsiteRum): string { + return JSON.stringify(WebsiteRum$outboundSchema.parse(websiteRum)); } -export function rumFromJSON( +export function websiteRumFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Rum$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Rum' from JSON`, + (x) => WebsiteRum$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebsiteRum' from JSON`, ); } @@ -636,10 +685,10 @@ export const Website$inboundSchema: z.ZodType = name: z.string(), url: z.string(), availabilityCheckSettings: z.nullable( - z.lazy(() => AvailabilityCheckSettings$inboundSchema), + z.lazy(() => WebsiteAvailabilityCheckSettings$inboundSchema), ).optional(), tags: z.array(Tag$inboundSchema).optional(), - rum: z.lazy(() => Rum$inboundSchema).optional(), + rum: z.lazy(() => WebsiteRum$inboundSchema).optional(), }); /** @internal */ @@ -647,11 +696,11 @@ export type Website$Outbound = { name: string; url: string; availabilityCheckSettings?: - | AvailabilityCheckSettings$Outbound + | WebsiteAvailabilityCheckSettings$Outbound | null | undefined; tags?: Array | undefined; - rum?: Rum$Outbound | undefined; + rum?: WebsiteRum$Outbound | undefined; }; /** @internal */ @@ -663,10 +712,10 @@ export const Website$outboundSchema: z.ZodType< name: z.string(), url: z.string(), availabilityCheckSettings: z.nullable( - z.lazy(() => AvailabilityCheckSettings$outboundSchema), + z.lazy(() => WebsiteAvailabilityCheckSettings$outboundSchema), ).optional(), tags: z.array(Tag$outboundSchema).optional(), - rum: z.lazy(() => Rum$outboundSchema).optional(), + rum: z.lazy(() => WebsiteRum$outboundSchema).optional(), }); /** diff --git a/swov1/src/models/errors/activateawsintegration.ts b/swov1/src/models/errors/activateawsintegration.ts index 756f5e0..06e76a0 100644 --- a/swov1/src/models/errors/activateawsintegration.ts +++ b/swov1/src/models/errors/activateawsintegration.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Server error */ export type ActivateAwsIntegrationInternalServerErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Server error */ -export class ActivateAwsIntegrationInternalServerError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ActivateAwsIntegrationInternalServerError extends SwoError { /** The original data that was passed to this error instance. */ data$: ActivateAwsIntegrationInternalServerErrorData; - constructor(err: ActivateAwsIntegrationInternalServerErrorData) { + constructor( + err: ActivateAwsIntegrationInternalServerErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ActivateAwsIntegrationInternalServerError"; } } @@ -50,40 +40,29 @@ export class ActivateAwsIntegrationInternalServerError extends Error { * The server cannot find the requested resource. */ export type ActivateAwsIntegrationNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class ActivateAwsIntegrationNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ActivateAwsIntegrationNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: ActivateAwsIntegrationNotFoundErrorData; - constructor(err: ActivateAwsIntegrationNotFoundErrorData) { + constructor( + err: ActivateAwsIntegrationNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ActivateAwsIntegrationNotFoundError"; } } @@ -92,40 +71,29 @@ export class ActivateAwsIntegrationNotFoundError extends Error { * Access is unauthorized. */ export type ActivateAwsIntegrationUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class ActivateAwsIntegrationUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ActivateAwsIntegrationUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: ActivateAwsIntegrationUnauthorizedErrorData; - constructor(err: ActivateAwsIntegrationUnauthorizedErrorData) { + constructor( + err: ActivateAwsIntegrationUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ActivateAwsIntegrationUnauthorizedError"; } } @@ -134,38 +102,37 @@ export class ActivateAwsIntegrationUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type ActivateAwsIntegrationBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class ActivateAwsIntegrationBadRequestError extends Error { +export class ActivateAwsIntegrationBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: ActivateAwsIntegrationBadRequestErrorData; - constructor(err: ActivateAwsIntegrationBadRequestErrorData) { + constructor( + err: ActivateAwsIntegrationBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "ActivateAwsIntegrationBadRequestError"; @@ -178,19 +145,22 @@ export const ActivateAwsIntegrationInternalServerError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ActivateAwsIntegrationInternalServerError(v); + return new ActivateAwsIntegrationInternalServerError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ActivateAwsIntegrationInternalServerError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -202,9 +172,7 @@ export const ActivateAwsIntegrationInternalServerError$outboundSchema: > = z.instanceof(ActivateAwsIntegrationInternalServerError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -228,19 +196,22 @@ export const ActivateAwsIntegrationNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ActivateAwsIntegrationNotFoundError(v); + return new ActivateAwsIntegrationNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ActivateAwsIntegrationNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -251,9 +222,7 @@ export const ActivateAwsIntegrationNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(ActivateAwsIntegrationNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -277,19 +246,22 @@ export const ActivateAwsIntegrationUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ActivateAwsIntegrationUnauthorizedError(v); + return new ActivateAwsIntegrationUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ActivateAwsIntegrationUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -300,9 +272,7 @@ export const ActivateAwsIntegrationUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(ActivateAwsIntegrationUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -326,17 +296,22 @@ export const ActivateAwsIntegrationBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ActivateAwsIntegrationBadRequestError(v); + return new ActivateAwsIntegrationBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ActivateAwsIntegrationBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -349,7 +324,6 @@ export const ActivateAwsIntegrationBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(ActivateAwsIntegrationBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/apierror.ts b/swov1/src/models/errors/apierror.ts index 3a04a1c..93509c3 100644 --- a/swov1/src/models/errors/apierror.ts +++ b/swov1/src/models/errors/apierror.ts @@ -2,26 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export class APIError extends Error { - public readonly statusCode: number; - public readonly contentType: string; +import { SwoError } from "./swoerror.js"; +/** The fallback error class if no more specific error class is matched */ +export class APIError extends SwoError { constructor( message: string, - public readonly rawResponse: Response, - public readonly body: string = "", + httpMeta: { + response: Response; + request: Request; + 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; - + if (message) { + message += `: `; + } + message += `Status ${httpMeta.response.status}`; + const contentType = httpMeta.response.headers.get("content-type") || `""`; + if (contentType !== "application/json") { + message += ` Content-Type ${ + contentType.includes(" ") ? `"${contentType}"` : contentType + }`; + } + const body = httpMeta.body || `""`; + message += body.length > 100 ? "\n" : " "; + message += `Body ${body}`; + message = message.trim(); + super(message, httpMeta); this.name = "APIError"; } } diff --git a/swov1/src/models/errors/createcompositemetric.ts b/swov1/src/models/errors/createcompositemetric.ts index 049e40d..7e1d817 100644 --- a/swov1/src/models/errors/createcompositemetric.ts +++ b/swov1/src/models/errors/createcompositemetric.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Access is forbidden. */ export type CreateCompositeMetricForbiddenErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is forbidden. */ -export class CreateCompositeMetricForbiddenError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class CreateCompositeMetricForbiddenError extends SwoError { /** The original data that was passed to this error instance. */ data$: CreateCompositeMetricForbiddenErrorData; - constructor(err: CreateCompositeMetricForbiddenErrorData) { + constructor( + err: CreateCompositeMetricForbiddenErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "CreateCompositeMetricForbiddenError"; } } @@ -50,38 +40,37 @@ export class CreateCompositeMetricForbiddenError extends Error { * The server could not understand the request due to invalid syntax. */ export type CreateCompositeMetricBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class CreateCompositeMetricBadRequestError extends Error { +export class CreateCompositeMetricBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: CreateCompositeMetricBadRequestErrorData; - constructor(err: CreateCompositeMetricBadRequestErrorData) { + constructor( + err: CreateCompositeMetricBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "CreateCompositeMetricBadRequestError"; @@ -94,19 +83,22 @@ export const CreateCompositeMetricForbiddenError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateCompositeMetricForbiddenError(v); + return new CreateCompositeMetricForbiddenError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateCompositeMetricForbiddenError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const CreateCompositeMetricForbiddenError$outboundSchema: z.ZodType< > = z.instanceof(CreateCompositeMetricForbiddenError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -143,17 +133,22 @@ export const CreateCompositeMetricBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateCompositeMetricBadRequestError(v); + return new CreateCompositeMetricBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateCompositeMetricBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -166,7 +161,6 @@ export const CreateCompositeMetricBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(CreateCompositeMetricBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/createorgstructure.ts b/swov1/src/models/errors/createorgstructure.ts index ae321e3..9c751eb 100644 --- a/swov1/src/models/errors/createorgstructure.ts +++ b/swov1/src/models/errors/createorgstructure.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Server error */ export type CreateOrgStructureInternalServerErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Server error */ -export class CreateOrgStructureInternalServerError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class CreateOrgStructureInternalServerError extends SwoError { /** The original data that was passed to this error instance. */ data$: CreateOrgStructureInternalServerErrorData; - constructor(err: CreateOrgStructureInternalServerErrorData) { + constructor( + err: CreateOrgStructureInternalServerErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "CreateOrgStructureInternalServerError"; } } @@ -50,40 +40,29 @@ export class CreateOrgStructureInternalServerError extends Error { * The server cannot find the requested resource. */ export type CreateOrgStructureNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class CreateOrgStructureNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class CreateOrgStructureNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: CreateOrgStructureNotFoundErrorData; - constructor(err: CreateOrgStructureNotFoundErrorData) { + constructor( + err: CreateOrgStructureNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "CreateOrgStructureNotFoundError"; } } @@ -92,40 +71,29 @@ export class CreateOrgStructureNotFoundError extends Error { * Access is unauthorized. */ export type CreateOrgStructureUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class CreateOrgStructureUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class CreateOrgStructureUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: CreateOrgStructureUnauthorizedErrorData; - constructor(err: CreateOrgStructureUnauthorizedErrorData) { + constructor( + err: CreateOrgStructureUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "CreateOrgStructureUnauthorizedError"; } } @@ -134,38 +102,37 @@ export class CreateOrgStructureUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type CreateOrgStructureBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class CreateOrgStructureBadRequestError extends Error { +export class CreateOrgStructureBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: CreateOrgStructureBadRequestErrorData; - constructor(err: CreateOrgStructureBadRequestErrorData) { + constructor( + err: CreateOrgStructureBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "CreateOrgStructureBadRequestError"; @@ -178,19 +145,22 @@ export const CreateOrgStructureInternalServerError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateOrgStructureInternalServerError(v); + return new CreateOrgStructureInternalServerError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateOrgStructureInternalServerError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -201,9 +171,7 @@ export const CreateOrgStructureInternalServerError$outboundSchema: z.ZodType< > = z.instanceof(CreateOrgStructureInternalServerError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -227,19 +195,22 @@ export const CreateOrgStructureNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateOrgStructureNotFoundError(v); + return new CreateOrgStructureNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateOrgStructureNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -250,9 +221,7 @@ export const CreateOrgStructureNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(CreateOrgStructureNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -274,19 +243,22 @@ export const CreateOrgStructureUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateOrgStructureUnauthorizedError(v); + return new CreateOrgStructureUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateOrgStructureUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -297,9 +269,7 @@ export const CreateOrgStructureUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(CreateOrgStructureUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -323,17 +293,22 @@ export const CreateOrgStructureBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateOrgStructureBadRequestError(v); + return new CreateOrgStructureBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateOrgStructureBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -346,7 +321,6 @@ export const CreateOrgStructureBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(CreateOrgStructureBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/createuri.ts b/swov1/src/models/errors/createuri.ts index 0c59561..ee06d91 100644 --- a/swov1/src/models/errors/createuri.ts +++ b/swov1/src/models/errors/createuri.ts @@ -3,43 +3,43 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server could not understand the request due to invalid syntax. */ export type CreateUriBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class CreateUriBadRequestError extends Error { +export class CreateUriBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: CreateUriBadRequestErrorData; - constructor(err: CreateUriBadRequestErrorData) { + constructor( + err: CreateUriBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "CreateUriBadRequestError"; @@ -52,17 +52,22 @@ export const CreateUriBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateUriBadRequestError(v); + return new CreateUriBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateUriBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -75,7 +80,6 @@ export const CreateUriBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(CreateUriBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/createwebsite.ts b/swov1/src/models/errors/createwebsite.ts index a0b9b20..afe938c 100644 --- a/swov1/src/models/errors/createwebsite.ts +++ b/swov1/src/models/errors/createwebsite.ts @@ -3,43 +3,43 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server could not understand the request due to invalid syntax. */ export type CreateWebsiteBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class CreateWebsiteBadRequestError extends Error { +export class CreateWebsiteBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: CreateWebsiteBadRequestErrorData; - constructor(err: CreateWebsiteBadRequestErrorData) { + constructor( + err: CreateWebsiteBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "CreateWebsiteBadRequestError"; @@ -52,17 +52,22 @@ export const CreateWebsiteBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new CreateWebsiteBadRequestError(v); + return new CreateWebsiteBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type CreateWebsiteBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -75,7 +80,6 @@ export const CreateWebsiteBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(CreateWebsiteBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/deletecompositemetric.ts b/swov1/src/models/errors/deletecompositemetric.ts index b9e949b..8f3e64f 100644 --- a/swov1/src/models/errors/deletecompositemetric.ts +++ b/swov1/src/models/errors/deletecompositemetric.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type DeleteCompositeMetricNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class DeleteCompositeMetricNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class DeleteCompositeMetricNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: DeleteCompositeMetricNotFoundErrorData; - constructor(err: DeleteCompositeMetricNotFoundErrorData) { + constructor( + err: DeleteCompositeMetricNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "DeleteCompositeMetricNotFoundError"; } } @@ -50,40 +40,29 @@ export class DeleteCompositeMetricNotFoundError extends Error { * Access is forbidden. */ export type DeleteCompositeMetricForbiddenErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is forbidden. */ -export class DeleteCompositeMetricForbiddenError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class DeleteCompositeMetricForbiddenError extends SwoError { /** The original data that was passed to this error instance. */ data$: DeleteCompositeMetricForbiddenErrorData; - constructor(err: DeleteCompositeMetricForbiddenErrorData) { + constructor( + err: DeleteCompositeMetricForbiddenErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "DeleteCompositeMetricForbiddenError"; } } @@ -94,19 +73,22 @@ export const DeleteCompositeMetricNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteCompositeMetricNotFoundError(v); + return new DeleteCompositeMetricNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteCompositeMetricNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +99,7 @@ export const DeleteCompositeMetricNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(DeleteCompositeMetricNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -142,19 +122,22 @@ export const DeleteCompositeMetricForbiddenError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteCompositeMetricForbiddenError(v); + return new DeleteCompositeMetricForbiddenError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteCompositeMetricForbiddenError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -165,9 +148,7 @@ export const DeleteCompositeMetricForbiddenError$outboundSchema: z.ZodType< > = z.instanceof(DeleteCompositeMetricForbiddenError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/deletedatabase.ts b/swov1/src/models/errors/deletedatabase.ts index 0ef54b1..6dacde9 100644 --- a/swov1/src/models/errors/deletedatabase.ts +++ b/swov1/src/models/errors/deletedatabase.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type DeleteDatabaseNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class DeleteDatabaseNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class DeleteDatabaseNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: DeleteDatabaseNotFoundErrorData; - constructor(err: DeleteDatabaseNotFoundErrorData) { + constructor( + err: DeleteDatabaseNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "DeleteDatabaseNotFoundError"; } } @@ -50,38 +40,37 @@ export class DeleteDatabaseNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type DeleteDatabaseBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class DeleteDatabaseBadRequestError extends Error { +export class DeleteDatabaseBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: DeleteDatabaseBadRequestErrorData; - constructor(err: DeleteDatabaseBadRequestErrorData) { + constructor( + err: DeleteDatabaseBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "DeleteDatabaseBadRequestError"; @@ -94,19 +83,22 @@ export const DeleteDatabaseNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteDatabaseNotFoundError(v); + return new DeleteDatabaseNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteDatabaseNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const DeleteDatabaseNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(DeleteDatabaseNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const DeleteDatabaseBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteDatabaseBadRequestError(v); + return new DeleteDatabaseBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteDatabaseBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const DeleteDatabaseBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(DeleteDatabaseBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/deleteuri.ts b/swov1/src/models/errors/deleteuri.ts index d1b3a87..36fa7d2 100644 --- a/swov1/src/models/errors/deleteuri.ts +++ b/swov1/src/models/errors/deleteuri.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type DeleteUriNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class DeleteUriNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class DeleteUriNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: DeleteUriNotFoundErrorData; - constructor(err: DeleteUriNotFoundErrorData) { + constructor( + err: DeleteUriNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "DeleteUriNotFoundError"; } } @@ -52,19 +42,22 @@ export const DeleteUriNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteUriNotFoundError(v); + return new DeleteUriNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteUriNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const DeleteUriNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(DeleteUriNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/deletewebsite.ts b/swov1/src/models/errors/deletewebsite.ts index 7f92d4e..f3f4ddc 100644 --- a/swov1/src/models/errors/deletewebsite.ts +++ b/swov1/src/models/errors/deletewebsite.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type DeleteWebsiteNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class DeleteWebsiteNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class DeleteWebsiteNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: DeleteWebsiteNotFoundErrorData; - constructor(err: DeleteWebsiteNotFoundErrorData) { + constructor( + err: DeleteWebsiteNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "DeleteWebsiteNotFoundError"; } } @@ -52,19 +42,22 @@ export const DeleteWebsiteNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new DeleteWebsiteNotFoundError(v); + return new DeleteWebsiteNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type DeleteWebsiteNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const DeleteWebsiteNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(DeleteWebsiteNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/getentitybyid.ts b/swov1/src/models/errors/getentitybyid.ts index 1b91757..678f6e4 100644 --- a/swov1/src/models/errors/getentitybyid.ts +++ b/swov1/src/models/errors/getentitybyid.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetEntityByIdNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetEntityByIdNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetEntityByIdNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetEntityByIdNotFoundErrorData; - constructor(err: GetEntityByIdNotFoundErrorData) { + constructor( + err: GetEntityByIdNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetEntityByIdNotFoundError"; } } @@ -50,40 +40,29 @@ export class GetEntityByIdNotFoundError extends Error { * Access is unauthorized. */ export type GetEntityByIdUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class GetEntityByIdUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetEntityByIdUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetEntityByIdUnauthorizedErrorData; - constructor(err: GetEntityByIdUnauthorizedErrorData) { + constructor( + err: GetEntityByIdUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetEntityByIdUnauthorizedError"; } } @@ -92,38 +71,37 @@ export class GetEntityByIdUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type GetEntityByIdBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class GetEntityByIdBadRequestError extends Error { +export class GetEntityByIdBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetEntityByIdBadRequestErrorData; - constructor(err: GetEntityByIdBadRequestErrorData) { + constructor( + err: GetEntityByIdBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "GetEntityByIdBadRequestError"; @@ -136,19 +114,22 @@ export const GetEntityByIdNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetEntityByIdNotFoundError(v); + return new GetEntityByIdNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetEntityByIdNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -159,9 +140,7 @@ export const GetEntityByIdNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetEntityByIdNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -183,19 +162,22 @@ export const GetEntityByIdUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetEntityByIdUnauthorizedError(v); + return new GetEntityByIdUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetEntityByIdUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -206,9 +188,7 @@ export const GetEntityByIdUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(GetEntityByIdUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -230,17 +210,22 @@ export const GetEntityByIdBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetEntityByIdBadRequestError(v); + return new GetEntityByIdBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetEntityByIdBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -253,7 +238,6 @@ export const GetEntityByIdBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(GetEntityByIdBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/getmetricbyname.ts b/swov1/src/models/errors/getmetricbyname.ts index 6ea43cd..069938b 100644 --- a/swov1/src/models/errors/getmetricbyname.ts +++ b/swov1/src/models/errors/getmetricbyname.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetMetricByNameNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetMetricByNameNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetMetricByNameNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetMetricByNameNotFoundErrorData; - constructor(err: GetMetricByNameNotFoundErrorData) { + constructor( + err: GetMetricByNameNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetMetricByNameNotFoundError"; } } @@ -52,19 +42,22 @@ export const GetMetricByNameNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetMetricByNameNotFoundError(v); + return new GetMetricByNameNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetMetricByNameNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const GetMetricByNameNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetMetricByNameNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/getpluginconfig.ts b/swov1/src/models/errors/getpluginconfig.ts index 8715866..90cfa10 100644 --- a/swov1/src/models/errors/getpluginconfig.ts +++ b/swov1/src/models/errors/getpluginconfig.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetPluginConfigNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetPluginConfigNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetPluginConfigNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetPluginConfigNotFoundErrorData; - constructor(err: GetPluginConfigNotFoundErrorData) { + constructor( + err: GetPluginConfigNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetPluginConfigNotFoundError"; } } @@ -50,38 +40,37 @@ export class GetPluginConfigNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type GetPluginConfigBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class GetPluginConfigBadRequestError extends Error { +export class GetPluginConfigBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetPluginConfigBadRequestErrorData; - constructor(err: GetPluginConfigBadRequestErrorData) { + constructor( + err: GetPluginConfigBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "GetPluginConfigBadRequestError"; @@ -94,19 +83,22 @@ export const GetPluginConfigNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPluginConfigNotFoundError(v); + return new GetPluginConfigNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPluginConfigNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const GetPluginConfigNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetPluginConfigNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const GetPluginConfigBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPluginConfigBadRequestError(v); + return new GetPluginConfigBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPluginConfigBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const GetPluginConfigBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(GetPluginConfigBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/getplugins.ts b/swov1/src/models/errors/getplugins.ts index f99543b..2afc6fd 100644 --- a/swov1/src/models/errors/getplugins.ts +++ b/swov1/src/models/errors/getplugins.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetPluginsNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetPluginsNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetPluginsNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetPluginsNotFoundErrorData; - constructor(err: GetPluginsNotFoundErrorData) { + constructor( + err: GetPluginsNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetPluginsNotFoundError"; } } @@ -50,38 +40,37 @@ export class GetPluginsNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type GetPluginsBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class GetPluginsBadRequestError extends Error { +export class GetPluginsBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetPluginsBadRequestErrorData; - constructor(err: GetPluginsBadRequestErrorData) { + constructor( + err: GetPluginsBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "GetPluginsBadRequestError"; @@ -94,19 +83,22 @@ export const GetPluginsNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPluginsNotFoundError(v); + return new GetPluginsNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPluginsNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const GetPluginsNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetPluginsNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const GetPluginsBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPluginsBadRequestError(v); + return new GetPluginsBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPluginsBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const GetPluginsBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(GetPluginsBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/getpublickey.ts b/swov1/src/models/errors/getpublickey.ts index 165783a..6e58769 100644 --- a/swov1/src/models/errors/getpublickey.ts +++ b/swov1/src/models/errors/getpublickey.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetPublicKeyNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetPublicKeyNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetPublicKeyNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetPublicKeyNotFoundErrorData; - constructor(err: GetPublicKeyNotFoundErrorData) { + constructor( + err: GetPublicKeyNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetPublicKeyNotFoundError"; } } @@ -50,38 +40,37 @@ export class GetPublicKeyNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type GetPublicKeyBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class GetPublicKeyBadRequestError extends Error { +export class GetPublicKeyBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: GetPublicKeyBadRequestErrorData; - constructor(err: GetPublicKeyBadRequestErrorData) { + constructor( + err: GetPublicKeyBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "GetPublicKeyBadRequestError"; @@ -94,19 +83,22 @@ export const GetPublicKeyNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPublicKeyNotFoundError(v); + return new GetPublicKeyNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPublicKeyNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const GetPublicKeyNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetPublicKeyNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const GetPublicKeyBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetPublicKeyBadRequestError(v); + return new GetPublicKeyBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetPublicKeyBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const GetPublicKeyBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(GetPublicKeyBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/geturi.ts b/swov1/src/models/errors/geturi.ts index 8b91504..c776223 100644 --- a/swov1/src/models/errors/geturi.ts +++ b/swov1/src/models/errors/geturi.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetUriNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetUriNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetUriNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetUriNotFoundErrorData; - constructor(err: GetUriNotFoundErrorData) { + constructor( + err: GetUriNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetUriNotFoundError"; } } @@ -52,19 +42,22 @@ export const GetUriNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetUriNotFoundError(v); + return new GetUriNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetUriNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const GetUriNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetUriNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/getwebsite.ts b/swov1/src/models/errors/getwebsite.ts index 8fdeb7c..cb0c2a8 100644 --- a/swov1/src/models/errors/getwebsite.ts +++ b/swov1/src/models/errors/getwebsite.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type GetWebsiteNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class GetWebsiteNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class GetWebsiteNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: GetWebsiteNotFoundErrorData; - constructor(err: GetWebsiteNotFoundErrorData) { + constructor( + err: GetWebsiteNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "GetWebsiteNotFoundError"; } } @@ -52,19 +42,22 @@ export const GetWebsiteNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new GetWebsiteNotFoundError(v); + return new GetWebsiteNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type GetWebsiteNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const GetWebsiteNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(GetWebsiteNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/index.ts b/swov1/src/models/errors/index.ts index 3944e72..ed1a87a 100644 --- a/swov1/src/models/errors/index.ts +++ b/swov1/src/models/errors/index.ts @@ -31,6 +31,7 @@ export * from "./observedatabase.js"; export * from "./pauseurimonitoring.js"; export * from "./pausewebsitemonitoring.js"; export * from "./pluginoperation.js"; +export * from "./responsevalidationerror.js"; export * from "./sdkvalidationerror.js"; export * from "./unpauseurimonitoring.js"; export * from "./unpausewebsitemonitoring.js"; diff --git a/swov1/src/models/errors/listentities.ts b/swov1/src/models/errors/listentities.ts index 90de126..b5257cf 100644 --- a/swov1/src/models/errors/listentities.ts +++ b/swov1/src/models/errors/listentities.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Access is unauthorized. */ export type ListEntitiesUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class ListEntitiesUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListEntitiesUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListEntitiesUnauthorizedErrorData; - constructor(err: ListEntitiesUnauthorizedErrorData) { + constructor( + err: ListEntitiesUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListEntitiesUnauthorizedError"; } } @@ -50,38 +40,37 @@ export class ListEntitiesUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type ListEntitiesBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class ListEntitiesBadRequestError extends Error { +export class ListEntitiesBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: ListEntitiesBadRequestErrorData; - constructor(err: ListEntitiesBadRequestErrorData) { + constructor( + err: ListEntitiesBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "ListEntitiesBadRequestError"; @@ -94,19 +83,22 @@ export const ListEntitiesUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListEntitiesUnauthorizedError(v); + return new ListEntitiesUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListEntitiesUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const ListEntitiesUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(ListEntitiesUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const ListEntitiesBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListEntitiesBadRequestError(v); + return new ListEntitiesBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListEntitiesBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const ListEntitiesBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(ListEntitiesBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/listmetricattributes.ts b/swov1/src/models/errors/listmetricattributes.ts index c98d117..daf0333 100644 --- a/swov1/src/models/errors/listmetricattributes.ts +++ b/swov1/src/models/errors/listmetricattributes.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type ListMetricAttributesNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class ListMetricAttributesNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListMetricAttributesNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListMetricAttributesNotFoundErrorData; - constructor(err: ListMetricAttributesNotFoundErrorData) { + constructor( + err: ListMetricAttributesNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListMetricAttributesNotFoundError"; } } @@ -52,19 +42,22 @@ export const ListMetricAttributesNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListMetricAttributesNotFoundError(v); + return new ListMetricAttributesNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListMetricAttributesNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const ListMetricAttributesNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(ListMetricAttributesNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/listmetricattributevalues.ts b/swov1/src/models/errors/listmetricattributevalues.ts index 520ece4..3146ab2 100644 --- a/swov1/src/models/errors/listmetricattributevalues.ts +++ b/swov1/src/models/errors/listmetricattributevalues.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type ListMetricAttributeValuesNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class ListMetricAttributeValuesNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListMetricAttributeValuesNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListMetricAttributeValuesNotFoundErrorData; - constructor(err: ListMetricAttributeValuesNotFoundErrorData) { + constructor( + err: ListMetricAttributeValuesNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListMetricAttributeValuesNotFoundError"; } } @@ -52,19 +42,22 @@ export const ListMetricAttributeValuesNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListMetricAttributeValuesNotFoundError(v); + return new ListMetricAttributeValuesNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListMetricAttributeValuesNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const ListMetricAttributeValuesNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(ListMetricAttributeValuesNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/listmetricmeasurements.ts b/swov1/src/models/errors/listmetricmeasurements.ts index cda59b5..d0a1ffb 100644 --- a/swov1/src/models/errors/listmetricmeasurements.ts +++ b/swov1/src/models/errors/listmetricmeasurements.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type ListMetricMeasurementsNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class ListMetricMeasurementsNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListMetricMeasurementsNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListMetricMeasurementsNotFoundErrorData; - constructor(err: ListMetricMeasurementsNotFoundErrorData) { + constructor( + err: ListMetricMeasurementsNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListMetricMeasurementsNotFoundError"; } } @@ -52,19 +42,22 @@ export const ListMetricMeasurementsNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListMetricMeasurementsNotFoundError(v); + return new ListMetricMeasurementsNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListMetricMeasurementsNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const ListMetricMeasurementsNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(ListMetricMeasurementsNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/listmetricsforentitytype.ts b/swov1/src/models/errors/listmetricsforentitytype.ts index 6b822fa..e499979 100644 --- a/swov1/src/models/errors/listmetricsforentitytype.ts +++ b/swov1/src/models/errors/listmetricsforentitytype.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type ListMetricsForEntityTypeNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class ListMetricsForEntityTypeNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListMetricsForEntityTypeNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListMetricsForEntityTypeNotFoundErrorData; - constructor(err: ListMetricsForEntityTypeNotFoundErrorData) { + constructor( + err: ListMetricsForEntityTypeNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListMetricsForEntityTypeNotFoundError"; } } @@ -52,19 +42,22 @@ export const ListMetricsForEntityTypeNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListMetricsForEntityTypeNotFoundError(v); + return new ListMetricsForEntityTypeNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListMetricsForEntityTypeNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const ListMetricsForEntityTypeNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(ListMetricsForEntityTypeNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/listmultimetricmeasurements.ts b/swov1/src/models/errors/listmultimetricmeasurements.ts index 8c97769..8cf524f 100644 --- a/swov1/src/models/errors/listmultimetricmeasurements.ts +++ b/swov1/src/models/errors/listmultimetricmeasurements.ts @@ -3,43 +3,43 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server could not understand the request due to invalid syntax. */ export type ListMultiMetricMeasurementsBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class ListMultiMetricMeasurementsBadRequestError extends Error { +export class ListMultiMetricMeasurementsBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: ListMultiMetricMeasurementsBadRequestErrorData; - constructor(err: ListMultiMetricMeasurementsBadRequestErrorData) { + constructor( + err: ListMultiMetricMeasurementsBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "ListMultiMetricMeasurementsBadRequestError"; @@ -50,17 +50,22 @@ export class ListMultiMetricMeasurementsBadRequestError extends Error { export const ListMultiMetricMeasurementsBadRequestError$inboundSchema: z.ZodType = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListMultiMetricMeasurementsBadRequestError(v); + return new ListMultiMetricMeasurementsBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListMultiMetricMeasurementsBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -74,7 +79,6 @@ export const ListMultiMetricMeasurementsBadRequestError$outboundSchema: > = z.instanceof(ListMultiMetricMeasurementsBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/listprobes.ts b/swov1/src/models/errors/listprobes.ts index 2de9737..14222ed 100644 --- a/swov1/src/models/errors/listprobes.ts +++ b/swov1/src/models/errors/listprobes.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Server error */ export type ListProbesInternalServerErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Server error */ -export class ListProbesInternalServerError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ListProbesInternalServerError extends SwoError { /** The original data that was passed to this error instance. */ data$: ListProbesInternalServerErrorData; - constructor(err: ListProbesInternalServerErrorData) { + constructor( + err: ListProbesInternalServerErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ListProbesInternalServerError"; } } @@ -52,19 +42,22 @@ export const ListProbesInternalServerError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ListProbesInternalServerError(v); + return new ListProbesInternalServerError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ListProbesInternalServerError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const ListProbesInternalServerError$outboundSchema: z.ZodType< > = z.instanceof(ListProbesInternalServerError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/observedatabase.ts b/swov1/src/models/errors/observedatabase.ts index b45c380..e4b803f 100644 --- a/swov1/src/models/errors/observedatabase.ts +++ b/swov1/src/models/errors/observedatabase.ts @@ -3,43 +3,43 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server could not understand the request due to invalid syntax. */ export type ObserveDatabaseBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class ObserveDatabaseBadRequestError extends Error { +export class ObserveDatabaseBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: ObserveDatabaseBadRequestErrorData; - constructor(err: ObserveDatabaseBadRequestErrorData) { + constructor( + err: ObserveDatabaseBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "ObserveDatabaseBadRequestError"; @@ -52,17 +52,22 @@ export const ObserveDatabaseBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ObserveDatabaseBadRequestError(v); + return new ObserveDatabaseBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ObserveDatabaseBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -75,7 +80,6 @@ export const ObserveDatabaseBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(ObserveDatabaseBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/pauseurimonitoring.ts b/swov1/src/models/errors/pauseurimonitoring.ts index 137cb18..40e3b7c 100644 --- a/swov1/src/models/errors/pauseurimonitoring.ts +++ b/swov1/src/models/errors/pauseurimonitoring.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type PauseUriMonitoringNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class PauseUriMonitoringNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class PauseUriMonitoringNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: PauseUriMonitoringNotFoundErrorData; - constructor(err: PauseUriMonitoringNotFoundErrorData) { + constructor( + err: PauseUriMonitoringNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "PauseUriMonitoringNotFoundError"; } } @@ -52,19 +42,22 @@ export const PauseUriMonitoringNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new PauseUriMonitoringNotFoundError(v); + return new PauseUriMonitoringNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type PauseUriMonitoringNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const PauseUriMonitoringNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(PauseUriMonitoringNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/pausewebsitemonitoring.ts b/swov1/src/models/errors/pausewebsitemonitoring.ts index c209a15..d6b2c09 100644 --- a/swov1/src/models/errors/pausewebsitemonitoring.ts +++ b/swov1/src/models/errors/pausewebsitemonitoring.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type PauseWebsiteMonitoringNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class PauseWebsiteMonitoringNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class PauseWebsiteMonitoringNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: PauseWebsiteMonitoringNotFoundErrorData; - constructor(err: PauseWebsiteMonitoringNotFoundErrorData) { + constructor( + err: PauseWebsiteMonitoringNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "PauseWebsiteMonitoringNotFoundError"; } } @@ -52,19 +42,22 @@ export const PauseWebsiteMonitoringNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new PauseWebsiteMonitoringNotFoundError(v); + return new PauseWebsiteMonitoringNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type PauseWebsiteMonitoringNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const PauseWebsiteMonitoringNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(PauseWebsiteMonitoringNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/pluginoperation.ts b/swov1/src/models/errors/pluginoperation.ts index 1c53e87..01ed2c1 100644 --- a/swov1/src/models/errors/pluginoperation.ts +++ b/swov1/src/models/errors/pluginoperation.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type PluginOperationNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class PluginOperationNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class PluginOperationNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: PluginOperationNotFoundErrorData; - constructor(err: PluginOperationNotFoundErrorData) { + constructor( + err: PluginOperationNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "PluginOperationNotFoundError"; } } @@ -50,38 +40,37 @@ export class PluginOperationNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type PluginOperationBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class PluginOperationBadRequestError extends Error { +export class PluginOperationBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: PluginOperationBadRequestErrorData; - constructor(err: PluginOperationBadRequestErrorData) { + constructor( + err: PluginOperationBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "PluginOperationBadRequestError"; @@ -94,19 +83,22 @@ export const PluginOperationNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new PluginOperationNotFoundError(v); + return new PluginOperationNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type PluginOperationNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const PluginOperationNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(PluginOperationNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const PluginOperationBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new PluginOperationBadRequestError(v); + return new PluginOperationBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type PluginOperationBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const PluginOperationBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(PluginOperationBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/responsevalidationerror.ts b/swov1/src/models/errors/responsevalidationerror.ts new file mode 100644 index 0000000..1b3b7ac --- /dev/null +++ b/swov1/src/models/errors/responsevalidationerror.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { formatZodError } from "./sdkvalidationerror.js"; +import { SwoError } from "./swoerror.js"; + +export class ResponseValidationError extends SwoError { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor( + message: string, + extra: { + response: Response; + request: Request; + body: string; + cause: unknown; + rawValue: unknown; + rawMessage: unknown; + }, + ) { + super(message, extra); + this.name = "ResponseValidationError"; + this.cause = extra.cause; + this.rawValue = extra.rawValue; + this.rawMessage = extra.rawMessage; + } + + /** + * 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(); + } + } +} diff --git a/swov1/src/models/errors/sdkvalidationerror.ts b/swov1/src/models/errors/sdkvalidationerror.ts index 16929b9..37face8 100644 --- a/swov1/src/models/errors/sdkvalidationerror.ts +++ b/swov1/src/models/errors/sdkvalidationerror.ts @@ -15,6 +15,18 @@ export class SDKValidationError extends Error { */ public readonly rawMessage: unknown; + // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError` + static override [Symbol.hasInstance]( + instance: unknown, + ): instance is SDKValidationError { + if (!(instance instanceof Error)) return false; + if (!("rawValue" in instance)) return false; + if (!("rawMessage" in instance)) return false; + if (!("pretty" in instance)) return false; + if (typeof instance.pretty !== "function") return false; + return true; + } + constructor(message: string, cause: unknown, rawValue: unknown) { super(`${message}: ${cause}`); this.name = "SDKValidationError"; diff --git a/swov1/src/models/errors/swoerror.ts b/swov1/src/models/errors/swoerror.ts new file mode 100644 index 0000000..a16fdbb --- /dev/null +++ b/swov1/src/models/errors/swoerror.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** The base class for all HTTP error responses */ +export class SwoError extends Error { + /** HTTP status code */ + public readonly statusCode: number; + /** HTTP body */ + public readonly body: string; + /** HTTP headers */ + public readonly headers: Headers; + /** HTTP content type */ + public readonly contentType: string; + /** Raw response */ + public readonly rawResponse: Response; + + constructor( + message: string, + httpMeta: { + response: Response; + request: Request; + body: string; + }, + ) { + super(message); + this.statusCode = httpMeta.response.status; + this.body = httpMeta.body; + this.headers = httpMeta.response.headers; + this.contentType = httpMeta.response.headers.get("content-type") || ""; + this.rawResponse = httpMeta.response; + + this.name = "SwoError"; + } +} diff --git a/swov1/src/models/errors/unpauseurimonitoring.ts b/swov1/src/models/errors/unpauseurimonitoring.ts index da45e52..90e6078 100644 --- a/swov1/src/models/errors/unpauseurimonitoring.ts +++ b/swov1/src/models/errors/unpauseurimonitoring.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UnpauseUriMonitoringNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UnpauseUriMonitoringNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UnpauseUriMonitoringNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UnpauseUriMonitoringNotFoundErrorData; - constructor(err: UnpauseUriMonitoringNotFoundErrorData) { + constructor( + err: UnpauseUriMonitoringNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UnpauseUriMonitoringNotFoundError"; } } @@ -52,19 +42,22 @@ export const UnpauseUriMonitoringNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UnpauseUriMonitoringNotFoundError(v); + return new UnpauseUriMonitoringNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UnpauseUriMonitoringNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const UnpauseUriMonitoringNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UnpauseUriMonitoringNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/unpausewebsitemonitoring.ts b/swov1/src/models/errors/unpausewebsitemonitoring.ts index a9c2a2e..61cc351 100644 --- a/swov1/src/models/errors/unpausewebsitemonitoring.ts +++ b/swov1/src/models/errors/unpausewebsitemonitoring.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UnpauseWebsiteMonitoringNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UnpauseWebsiteMonitoringNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UnpauseWebsiteMonitoringNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UnpauseWebsiteMonitoringNotFoundErrorData; - constructor(err: UnpauseWebsiteMonitoringNotFoundErrorData) { + constructor( + err: UnpauseWebsiteMonitoringNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UnpauseWebsiteMonitoringNotFoundError"; } } @@ -52,19 +42,22 @@ export const UnpauseWebsiteMonitoringNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UnpauseWebsiteMonitoringNotFoundError(v); + return new UnpauseWebsiteMonitoringNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UnpauseWebsiteMonitoringNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -75,9 +68,7 @@ export const UnpauseWebsiteMonitoringNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UnpauseWebsiteMonitoringNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** diff --git a/swov1/src/models/errors/updateawsintegration.ts b/swov1/src/models/errors/updateawsintegration.ts index 80fba37..837c14b 100644 --- a/swov1/src/models/errors/updateawsintegration.ts +++ b/swov1/src/models/errors/updateawsintegration.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Server error */ export type UpdateAwsIntegrationInternalServerErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Server error */ -export class UpdateAwsIntegrationInternalServerError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateAwsIntegrationInternalServerError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateAwsIntegrationInternalServerErrorData; - constructor(err: UpdateAwsIntegrationInternalServerErrorData) { + constructor( + err: UpdateAwsIntegrationInternalServerErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateAwsIntegrationInternalServerError"; } } @@ -50,40 +40,29 @@ export class UpdateAwsIntegrationInternalServerError extends Error { * Access is unauthorized. */ export type UpdateAwsIntegrationUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class UpdateAwsIntegrationUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateAwsIntegrationUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateAwsIntegrationUnauthorizedErrorData; - constructor(err: UpdateAwsIntegrationUnauthorizedErrorData) { + constructor( + err: UpdateAwsIntegrationUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateAwsIntegrationUnauthorizedError"; } } @@ -92,38 +71,37 @@ export class UpdateAwsIntegrationUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateAwsIntegrationBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateAwsIntegrationBadRequestError extends Error { +export class UpdateAwsIntegrationBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateAwsIntegrationBadRequestErrorData; - constructor(err: UpdateAwsIntegrationBadRequestErrorData) { + constructor( + err: UpdateAwsIntegrationBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateAwsIntegrationBadRequestError"; @@ -136,19 +114,22 @@ export const UpdateAwsIntegrationInternalServerError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateAwsIntegrationInternalServerError(v); + return new UpdateAwsIntegrationInternalServerError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateAwsIntegrationInternalServerError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -159,9 +140,7 @@ export const UpdateAwsIntegrationInternalServerError$outboundSchema: z.ZodType< > = z.instanceof(UpdateAwsIntegrationInternalServerError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -185,19 +164,22 @@ export const UpdateAwsIntegrationUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateAwsIntegrationUnauthorizedError(v); + return new UpdateAwsIntegrationUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateAwsIntegrationUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -208,9 +190,7 @@ export const UpdateAwsIntegrationUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(UpdateAwsIntegrationUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -234,17 +214,22 @@ export const UpdateAwsIntegrationBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateAwsIntegrationBadRequestError(v); + return new UpdateAwsIntegrationBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateAwsIntegrationBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -257,7 +242,6 @@ export const UpdateAwsIntegrationBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateAwsIntegrationBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/updatecompositemetric.ts b/swov1/src/models/errors/updatecompositemetric.ts index fa262ff..26cf22d 100644 --- a/swov1/src/models/errors/updatecompositemetric.ts +++ b/swov1/src/models/errors/updatecompositemetric.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UpdateCompositeMetricNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UpdateCompositeMetricNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateCompositeMetricNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateCompositeMetricNotFoundErrorData; - constructor(err: UpdateCompositeMetricNotFoundErrorData) { + constructor( + err: UpdateCompositeMetricNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateCompositeMetricNotFoundError"; } } @@ -50,40 +40,29 @@ export class UpdateCompositeMetricNotFoundError extends Error { * Access is forbidden. */ export type UpdateCompositeMetricForbiddenErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is forbidden. */ -export class UpdateCompositeMetricForbiddenError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateCompositeMetricForbiddenError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateCompositeMetricForbiddenErrorData; - constructor(err: UpdateCompositeMetricForbiddenErrorData) { + constructor( + err: UpdateCompositeMetricForbiddenErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateCompositeMetricForbiddenError"; } } @@ -92,38 +71,37 @@ export class UpdateCompositeMetricForbiddenError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateCompositeMetricBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateCompositeMetricBadRequestError extends Error { +export class UpdateCompositeMetricBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateCompositeMetricBadRequestErrorData; - constructor(err: UpdateCompositeMetricBadRequestErrorData) { + constructor( + err: UpdateCompositeMetricBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateCompositeMetricBadRequestError"; @@ -136,19 +114,22 @@ export const UpdateCompositeMetricNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateCompositeMetricNotFoundError(v); + return new UpdateCompositeMetricNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateCompositeMetricNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -159,9 +140,7 @@ export const UpdateCompositeMetricNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UpdateCompositeMetricNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -184,19 +163,22 @@ export const UpdateCompositeMetricForbiddenError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateCompositeMetricForbiddenError(v); + return new UpdateCompositeMetricForbiddenError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateCompositeMetricForbiddenError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -207,9 +189,7 @@ export const UpdateCompositeMetricForbiddenError$outboundSchema: z.ZodType< > = z.instanceof(UpdateCompositeMetricForbiddenError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -233,17 +213,22 @@ export const UpdateCompositeMetricBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateCompositeMetricBadRequestError(v); + return new UpdateCompositeMetricBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateCompositeMetricBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -256,7 +241,6 @@ export const UpdateCompositeMetricBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateCompositeMetricBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/updatedatabase.ts b/swov1/src/models/errors/updatedatabase.ts index e1ae7ad..4f856c6 100644 --- a/swov1/src/models/errors/updatedatabase.ts +++ b/swov1/src/models/errors/updatedatabase.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UpdateDatabaseNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UpdateDatabaseNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateDatabaseNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateDatabaseNotFoundErrorData; - constructor(err: UpdateDatabaseNotFoundErrorData) { + constructor( + err: UpdateDatabaseNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateDatabaseNotFoundError"; } } @@ -50,38 +40,37 @@ export class UpdateDatabaseNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateDatabaseBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateDatabaseBadRequestError extends Error { +export class UpdateDatabaseBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateDatabaseBadRequestErrorData; - constructor(err: UpdateDatabaseBadRequestErrorData) { + constructor( + err: UpdateDatabaseBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateDatabaseBadRequestError"; @@ -94,19 +83,22 @@ export const UpdateDatabaseNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateDatabaseNotFoundError(v); + return new UpdateDatabaseNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateDatabaseNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const UpdateDatabaseNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UpdateDatabaseNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const UpdateDatabaseBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateDatabaseBadRequestError(v); + return new UpdateDatabaseBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateDatabaseBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const UpdateDatabaseBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateDatabaseBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/updateentitybyid.ts b/swov1/src/models/errors/updateentitybyid.ts index 82e6caf..7ca6dea 100644 --- a/swov1/src/models/errors/updateentitybyid.ts +++ b/swov1/src/models/errors/updateentitybyid.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UpdateEntityByIdNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UpdateEntityByIdNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateEntityByIdNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateEntityByIdNotFoundErrorData; - constructor(err: UpdateEntityByIdNotFoundErrorData) { + constructor( + err: UpdateEntityByIdNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateEntityByIdNotFoundError"; } } @@ -50,40 +40,29 @@ export class UpdateEntityByIdNotFoundError extends Error { * Access is unauthorized. */ export type UpdateEntityByIdUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class UpdateEntityByIdUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateEntityByIdUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateEntityByIdUnauthorizedErrorData; - constructor(err: UpdateEntityByIdUnauthorizedErrorData) { + constructor( + err: UpdateEntityByIdUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateEntityByIdUnauthorizedError"; } } @@ -92,38 +71,37 @@ export class UpdateEntityByIdUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateEntityByIdBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateEntityByIdBadRequestError extends Error { +export class UpdateEntityByIdBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateEntityByIdBadRequestErrorData; - constructor(err: UpdateEntityByIdBadRequestErrorData) { + constructor( + err: UpdateEntityByIdBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateEntityByIdBadRequestError"; @@ -136,19 +114,22 @@ export const UpdateEntityByIdNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateEntityByIdNotFoundError(v); + return new UpdateEntityByIdNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateEntityByIdNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -159,9 +140,7 @@ export const UpdateEntityByIdNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UpdateEntityByIdNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -183,19 +162,22 @@ export const UpdateEntityByIdUnauthorizedError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateEntityByIdUnauthorizedError(v); + return new UpdateEntityByIdUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateEntityByIdUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -206,9 +188,7 @@ export const UpdateEntityByIdUnauthorizedError$outboundSchema: z.ZodType< > = z.instanceof(UpdateEntityByIdUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -231,17 +211,22 @@ export const UpdateEntityByIdBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateEntityByIdBadRequestError(v); + return new UpdateEntityByIdBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateEntityByIdBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -254,7 +239,6 @@ export const UpdateEntityByIdBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateEntityByIdBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/updateuri.ts b/swov1/src/models/errors/updateuri.ts index d6a7dbf..5d8162d 100644 --- a/swov1/src/models/errors/updateuri.ts +++ b/swov1/src/models/errors/updateuri.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UpdateUriNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UpdateUriNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateUriNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateUriNotFoundErrorData; - constructor(err: UpdateUriNotFoundErrorData) { + constructor( + err: UpdateUriNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateUriNotFoundError"; } } @@ -50,38 +40,37 @@ export class UpdateUriNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateUriBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateUriBadRequestError extends Error { +export class UpdateUriBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateUriBadRequestErrorData; - constructor(err: UpdateUriBadRequestErrorData) { + constructor( + err: UpdateUriBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateUriBadRequestError"; @@ -94,19 +83,22 @@ export const UpdateUriNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateUriNotFoundError(v); + return new UpdateUriNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateUriNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const UpdateUriNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UpdateUriNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const UpdateUriBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateUriBadRequestError(v); + return new UpdateUriBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateUriBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const UpdateUriBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateUriBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/updatewebsite.ts b/swov1/src/models/errors/updatewebsite.ts index 2fe65aa..478ab2a 100644 --- a/swov1/src/models/errors/updatewebsite.ts +++ b/swov1/src/models/errors/updatewebsite.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * The server cannot find the requested resource. */ export type UpdateWebsiteNotFoundErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * The server cannot find the requested resource. */ -export class UpdateWebsiteNotFoundError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class UpdateWebsiteNotFoundError extends SwoError { /** The original data that was passed to this error instance. */ data$: UpdateWebsiteNotFoundErrorData; - constructor(err: UpdateWebsiteNotFoundErrorData) { + constructor( + err: UpdateWebsiteNotFoundErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "UpdateWebsiteNotFoundError"; } } @@ -50,38 +40,37 @@ export class UpdateWebsiteNotFoundError extends Error { * The server could not understand the request due to invalid syntax. */ export type UpdateWebsiteBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class UpdateWebsiteBadRequestError extends Error { +export class UpdateWebsiteBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: UpdateWebsiteBadRequestErrorData; - constructor(err: UpdateWebsiteBadRequestErrorData) { + constructor( + err: UpdateWebsiteBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "UpdateWebsiteBadRequestError"; @@ -94,19 +83,22 @@ export const UpdateWebsiteNotFoundError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateWebsiteNotFoundError(v); + return new UpdateWebsiteNotFoundError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateWebsiteNotFoundError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -117,9 +109,7 @@ export const UpdateWebsiteNotFoundError$outboundSchema: z.ZodType< > = z.instanceof(UpdateWebsiteNotFoundError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -141,17 +131,22 @@ export const UpdateWebsiteBadRequestError$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new UpdateWebsiteBadRequestError(v); + return new UpdateWebsiteBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type UpdateWebsiteBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -164,7 +159,6 @@ export const UpdateWebsiteBadRequestError$outboundSchema: z.ZodType< > = z.instanceof(UpdateWebsiteBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/errors/validatemgmtaccountonboarding.ts b/swov1/src/models/errors/validatemgmtaccountonboarding.ts index 1d486c4..2d90e7a 100644 --- a/swov1/src/models/errors/validatemgmtaccountonboarding.ts +++ b/swov1/src/models/errors/validatemgmtaccountonboarding.ts @@ -3,45 +3,35 @@ */ import * as z from "zod"; +import { SwoError } from "./swoerror.js"; /** * Server error */ export type ValidateMgmtAccountOnboardingInternalServerErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Server error */ -export class ValidateMgmtAccountOnboardingInternalServerError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ValidateMgmtAccountOnboardingInternalServerError extends SwoError { /** The original data that was passed to this error instance. */ data$: ValidateMgmtAccountOnboardingInternalServerErrorData; - constructor(err: ValidateMgmtAccountOnboardingInternalServerErrorData) { + constructor( + err: ValidateMgmtAccountOnboardingInternalServerErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ValidateMgmtAccountOnboardingInternalServerError"; } } @@ -50,40 +40,29 @@ export class ValidateMgmtAccountOnboardingInternalServerError extends Error { * Access is unauthorized. */ export type ValidateMgmtAccountOnboardingUnauthorizedErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; - target?: string | undefined; }; /** * Access is unauthorized. */ -export class ValidateMgmtAccountOnboardingUnauthorizedError extends Error { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; - target?: string | undefined; - +export class ValidateMgmtAccountOnboardingUnauthorizedError extends SwoError { /** The original data that was passed to this error instance. */ data$: ValidateMgmtAccountOnboardingUnauthorizedErrorData; - constructor(err: ValidateMgmtAccountOnboardingUnauthorizedErrorData) { + constructor( + err: ValidateMgmtAccountOnboardingUnauthorizedErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - this.code = err.code; - if (err.target != null) this.target = err.target; - this.name = "ValidateMgmtAccountOnboardingUnauthorizedError"; } } @@ -92,38 +71,37 @@ export class ValidateMgmtAccountOnboardingUnauthorizedError extends Error { * The server could not understand the request due to invalid syntax. */ export type ValidateMgmtAccountOnboardingBadRequestErrorData = { - /** - * HTTP status code as defined in RFC 2817 - */ - code: number; /** * Supporting description of the error */ message: string; + /** + * Indicates the invalid field + */ target?: string | undefined; }; /** * The server could not understand the request due to invalid syntax. */ -export class ValidateMgmtAccountOnboardingBadRequestError extends Error { +export class ValidateMgmtAccountOnboardingBadRequestError extends SwoError { /** - * HTTP status code as defined in RFC 2817 + * Indicates the invalid field */ - code: number; target?: string | undefined; /** The original data that was passed to this error instance. */ data$: ValidateMgmtAccountOnboardingBadRequestErrorData; - constructor(err: ValidateMgmtAccountOnboardingBadRequestErrorData) { + constructor( + err: ValidateMgmtAccountOnboardingBadRequestErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - this.code = err.code; if (err.target != null) this.target = err.target; this.name = "ValidateMgmtAccountOnboardingBadRequestError"; @@ -137,19 +115,22 @@ export const ValidateMgmtAccountOnboardingInternalServerError$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ValidateMgmtAccountOnboardingInternalServerError(v); + return new ValidateMgmtAccountOnboardingInternalServerError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ValidateMgmtAccountOnboardingInternalServerError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -161,9 +142,7 @@ export const ValidateMgmtAccountOnboardingInternalServerError$outboundSchema: > = z.instanceof(ValidateMgmtAccountOnboardingInternalServerError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -189,19 +168,22 @@ export const ValidateMgmtAccountOnboardingUnauthorizedError$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ValidateMgmtAccountOnboardingUnauthorizedError(v); + return new ValidateMgmtAccountOnboardingUnauthorizedError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ValidateMgmtAccountOnboardingUnauthorizedError$Outbound = { - code: number; message: string; - target?: string | undefined; }; /** @internal */ @@ -213,9 +195,7 @@ export const ValidateMgmtAccountOnboardingUnauthorizedError$outboundSchema: > = z.instanceof(ValidateMgmtAccountOnboardingUnauthorizedError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), - target: z.string().optional(), })); /** @@ -241,17 +221,22 @@ export const ValidateMgmtAccountOnboardingBadRequestError$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ValidateMgmtAccountOnboardingBadRequestError(v); + return new ValidateMgmtAccountOnboardingBadRequestError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); /** @internal */ export type ValidateMgmtAccountOnboardingBadRequestError$Outbound = { - code: number; message: string; target?: string | undefined; }; @@ -265,7 +250,6 @@ export const ValidateMgmtAccountOnboardingBadRequestError$outboundSchema: > = z.instanceof(ValidateMgmtAccountOnboardingBadRequestError) .transform(v => v.data$) .pipe(z.object({ - code: z.number().int(), message: z.string(), target: z.string().optional(), })); diff --git a/swov1/src/models/operations/geturi.ts b/swov1/src/models/operations/geturi.ts index 0fc3cde..a9ba901 100644 --- a/swov1/src/models/operations/geturi.ts +++ b/swov1/src/models/operations/geturi.ts @@ -4,230 +4,13 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetUriRequest = { entityId: string; }; -export const GetUriStatus = { - Up: "up", - Down: "down", - Paused: "paused", - Maintenance: "maintenance", - Unknown: "unknown", -} as const; -export type GetUriStatus = ClosedEnum; - -/** - * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. - */ -export type GetUriPlatformOptions = { - /** - * Cloud platforms hosting synthetic probes. - */ - probePlatforms: Array; - /** - * Use this field to configure whether availability tests should be performed from all selected - * - * @remarks - * platforms or one randomly selected platform. It has no effect if you provided only one platform - * in the `probePlatforms` field. - * - * If set to true, a separate test is made from each of the selected platforms. - * - * If set to false, only one of the selected platforms is chosen every time. - * - * If omitted, the previous setting will stay in effect. If there is no previous setting, the value - * will default to false. - */ - testFromAll?: boolean | undefined; -}; - -/** - * How many locations must report a failure for an entity to be considered down. - */ -export const GetUriFailingTestLocations = { - All: "all", - Any: "any", -} as const; -/** - * How many locations must report a failure for an entity to be considered down. - */ -export type GetUriFailingTestLocations = ClosedEnum< - typeof GetUriFailingTestLocations ->; - -/** - * Default conditions when the entity is considered down. - * - * @remarks - * If omitted or set to null, organization configuration will be used for this entity. - */ -export type GetUriOutageConfiguration = { - /** - * How many locations must report a failure for an entity to be considered down. - */ - failingTestLocations: GetUriFailingTestLocations; - /** - * Number of consecutive failing tests for an entity to be considered down. - */ - consecutiveForDown: number; -}; - -/** - * Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ -export type Ping = { - /** - * Use this field to configure ping tests for the URI. If omitted or set to false, ping tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ - enabled: boolean; -}; - -/** - * Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ -export type Tcp = { - /** - * Use this field to configure TCP tests for the URI. If omitted or set to false, TCP tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ - enabled: boolean; - /** - * Port number to be used in TCP tests. - */ - port: number; - /** - * Use this field to specify a string to send in the body of a TCP request. - */ - stringToSend?: string | null | undefined; - /** - * Use this field to specify a string to search for in the body of a TCP response. - */ - stringToExpect?: string | null | undefined; -}; - -/** - * Protocol used to test availability of the URI. - */ -export const Protocol = { - Ping: "PING", - Tcp: "TCP", -} as const; -/** - * Protocol used to test availability of the URI. - */ -export type Protocol = ClosedEnum; - -/** - * Availability tests configuration for the URI. - */ -export type GetUriAvailabilityCheckSettings = { - /** - * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. - */ - platformOptions?: GetUriPlatformOptions | null | undefined; - /** - * Configure locations of the synthetic availability test probes. - * - * @remarks - * Acceptable values depend on the selected type and actual values of existing probes. - */ - testFrom: components.TestFrom; - /** - * Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. - */ - testIntervalInSeconds: number; - /** - * Default conditions when the entity is considered down. - * - * @remarks - * If omitted or set to null, organization configuration will be used for this entity. - */ - outageConfiguration?: GetUriOutageConfiguration | null | undefined; - /** - * Use this field to configure ping tests for the URI. If omitted or set to null, ping tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ - ping?: Ping | null | undefined; - /** - * Use this field to configure TCP tests for the URI. If omitted or set to null, TCP tests will be disabled. - * - * @remarks - * One test type (ping or TCP) must be enabled for a URI. - */ - tcp?: Tcp | null | undefined; - /** - * Protocol used to test availability of the URI. - */ - protocol: Protocol; -}; - -/** - * The request has succeeded. - */ -export type GetUriResponse = { - id: string; - type: string; - status: GetUriStatus; - /** - * Name of the URI, which must be unique within the organization. - * - * @remarks - * The name must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. - */ - name: string; - /** - * IP/domain address of the URI. - */ - ipOrDomain: string; - /** - * Availability tests configuration for the URI. - */ - availabilityCheckSettings: GetUriAvailabilityCheckSettings; - /** - * Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. - */ - tags?: Array | undefined; - /** - * Time when the last outage started. - */ - lastOutageStartTime?: Date | null | undefined; - /** - * Time when the last outage ended. - */ - lastOutageEndTime?: Date | null | undefined; - /** - * Time when the last test was performed. - */ - lastTestTime?: Date | null | undefined; - /** - * Last time when a synthetic test failed. - */ - lastErrorTime?: Date | null | undefined; - /** - * Response time from the last synthetic check in milliseconds. - */ - lastResponseTime?: number | null | undefined; -}; - /** @internal */ export const GetUriRequest$inboundSchema: z.ZodType< GetUriRequest, @@ -277,452 +60,3 @@ export function getUriRequestFromJSON( `Failed to parse 'GetUriRequest' from JSON`, ); } - -/** @internal */ -export const GetUriStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(GetUriStatus); - -/** @internal */ -export const GetUriStatus$outboundSchema: z.ZodNativeEnum = - GetUriStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUriStatus$ { - /** @deprecated use `GetUriStatus$inboundSchema` instead. */ - export const inboundSchema = GetUriStatus$inboundSchema; - /** @deprecated use `GetUriStatus$outboundSchema` instead. */ - export const outboundSchema = GetUriStatus$outboundSchema; -} - -/** @internal */ -export const GetUriPlatformOptions$inboundSchema: z.ZodType< - GetUriPlatformOptions, - z.ZodTypeDef, - unknown -> = z.object({ - probePlatforms: z.array(components.ProbePlatform$inboundSchema), - testFromAll: z.boolean().optional(), -}); - -/** @internal */ -export type GetUriPlatformOptions$Outbound = { - probePlatforms: Array; - testFromAll?: boolean | undefined; -}; - -/** @internal */ -export const GetUriPlatformOptions$outboundSchema: z.ZodType< - GetUriPlatformOptions$Outbound, - z.ZodTypeDef, - GetUriPlatformOptions -> = z.object({ - probePlatforms: z.array(components.ProbePlatform$outboundSchema), - testFromAll: 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 GetUriPlatformOptions$ { - /** @deprecated use `GetUriPlatformOptions$inboundSchema` instead. */ - export const inboundSchema = GetUriPlatformOptions$inboundSchema; - /** @deprecated use `GetUriPlatformOptions$outboundSchema` instead. */ - export const outboundSchema = GetUriPlatformOptions$outboundSchema; - /** @deprecated use `GetUriPlatformOptions$Outbound` instead. */ - export type Outbound = GetUriPlatformOptions$Outbound; -} - -export function getUriPlatformOptionsToJSON( - getUriPlatformOptions: GetUriPlatformOptions, -): string { - return JSON.stringify( - GetUriPlatformOptions$outboundSchema.parse(getUriPlatformOptions), - ); -} - -export function getUriPlatformOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUriPlatformOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUriPlatformOptions' from JSON`, - ); -} - -/** @internal */ -export const GetUriFailingTestLocations$inboundSchema: z.ZodNativeEnum< - typeof GetUriFailingTestLocations -> = z.nativeEnum(GetUriFailingTestLocations); - -/** @internal */ -export const GetUriFailingTestLocations$outboundSchema: z.ZodNativeEnum< - typeof GetUriFailingTestLocations -> = GetUriFailingTestLocations$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUriFailingTestLocations$ { - /** @deprecated use `GetUriFailingTestLocations$inboundSchema` instead. */ - export const inboundSchema = GetUriFailingTestLocations$inboundSchema; - /** @deprecated use `GetUriFailingTestLocations$outboundSchema` instead. */ - export const outboundSchema = GetUriFailingTestLocations$outboundSchema; -} - -/** @internal */ -export const GetUriOutageConfiguration$inboundSchema: z.ZodType< - GetUriOutageConfiguration, - z.ZodTypeDef, - unknown -> = z.object({ - failingTestLocations: GetUriFailingTestLocations$inboundSchema, - consecutiveForDown: z.number().int(), -}); - -/** @internal */ -export type GetUriOutageConfiguration$Outbound = { - failingTestLocations: string; - consecutiveForDown: number; -}; - -/** @internal */ -export const GetUriOutageConfiguration$outboundSchema: z.ZodType< - GetUriOutageConfiguration$Outbound, - z.ZodTypeDef, - GetUriOutageConfiguration -> = z.object({ - failingTestLocations: GetUriFailingTestLocations$outboundSchema, - consecutiveForDown: 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 GetUriOutageConfiguration$ { - /** @deprecated use `GetUriOutageConfiguration$inboundSchema` instead. */ - export const inboundSchema = GetUriOutageConfiguration$inboundSchema; - /** @deprecated use `GetUriOutageConfiguration$outboundSchema` instead. */ - export const outboundSchema = GetUriOutageConfiguration$outboundSchema; - /** @deprecated use `GetUriOutageConfiguration$Outbound` instead. */ - export type Outbound = GetUriOutageConfiguration$Outbound; -} - -export function getUriOutageConfigurationToJSON( - getUriOutageConfiguration: GetUriOutageConfiguration, -): string { - return JSON.stringify( - GetUriOutageConfiguration$outboundSchema.parse(getUriOutageConfiguration), - ); -} - -export function getUriOutageConfigurationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUriOutageConfiguration$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUriOutageConfiguration' from JSON`, - ); -} - -/** @internal */ -export const Ping$inboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - }); - -/** @internal */ -export type Ping$Outbound = { - enabled: boolean; -}; - -/** @internal */ -export const Ping$outboundSchema: z.ZodType = - z.object({ - enabled: z.boolean(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Ping$ { - /** @deprecated use `Ping$inboundSchema` instead. */ - export const inboundSchema = Ping$inboundSchema; - /** @deprecated use `Ping$outboundSchema` instead. */ - export const outboundSchema = Ping$outboundSchema; - /** @deprecated use `Ping$Outbound` instead. */ - export type Outbound = Ping$Outbound; -} - -export function pingToJSON(ping: Ping): string { - return JSON.stringify(Ping$outboundSchema.parse(ping)); -} - -export function pingFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Ping$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ping' from JSON`, - ); -} - -/** @internal */ -export const Tcp$inboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - port: z.number().int(), - stringToSend: z.nullable(z.string()).optional(), - stringToExpect: z.nullable(z.string()).optional(), - }); - -/** @internal */ -export type Tcp$Outbound = { - enabled: boolean; - port: number; - stringToSend?: string | null | undefined; - stringToExpect?: string | null | undefined; -}; - -/** @internal */ -export const Tcp$outboundSchema: z.ZodType = z - .object({ - enabled: z.boolean(), - port: z.number().int(), - stringToSend: z.nullable(z.string()).optional(), - stringToExpect: 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 Tcp$ { - /** @deprecated use `Tcp$inboundSchema` instead. */ - export const inboundSchema = Tcp$inboundSchema; - /** @deprecated use `Tcp$outboundSchema` instead. */ - export const outboundSchema = Tcp$outboundSchema; - /** @deprecated use `Tcp$Outbound` instead. */ - export type Outbound = Tcp$Outbound; -} - -export function tcpToJSON(tcp: Tcp): string { - return JSON.stringify(Tcp$outboundSchema.parse(tcp)); -} - -export function tcpFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Tcp$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Tcp' from JSON`, - ); -} - -/** @internal */ -export const Protocol$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Protocol); - -/** @internal */ -export const Protocol$outboundSchema: z.ZodNativeEnum = - Protocol$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Protocol$ { - /** @deprecated use `Protocol$inboundSchema` instead. */ - export const inboundSchema = Protocol$inboundSchema; - /** @deprecated use `Protocol$outboundSchema` instead. */ - export const outboundSchema = Protocol$outboundSchema; -} - -/** @internal */ -export const GetUriAvailabilityCheckSettings$inboundSchema: z.ZodType< - GetUriAvailabilityCheckSettings, - z.ZodTypeDef, - unknown -> = z.object({ - platformOptions: z.nullable(z.lazy(() => GetUriPlatformOptions$inboundSchema)) - .optional(), - testFrom: components.TestFrom$inboundSchema, - testIntervalInSeconds: z.number(), - outageConfiguration: z.nullable( - z.lazy(() => GetUriOutageConfiguration$inboundSchema), - ).optional(), - ping: z.nullable(z.lazy(() => Ping$inboundSchema)).optional(), - tcp: z.nullable(z.lazy(() => Tcp$inboundSchema)).optional(), - protocol: Protocol$inboundSchema, -}); - -/** @internal */ -export type GetUriAvailabilityCheckSettings$Outbound = { - platformOptions?: GetUriPlatformOptions$Outbound | null | undefined; - testFrom: components.TestFrom$Outbound; - testIntervalInSeconds: number; - outageConfiguration?: GetUriOutageConfiguration$Outbound | null | undefined; - ping?: Ping$Outbound | null | undefined; - tcp?: Tcp$Outbound | null | undefined; - protocol: string; -}; - -/** @internal */ -export const GetUriAvailabilityCheckSettings$outboundSchema: z.ZodType< - GetUriAvailabilityCheckSettings$Outbound, - z.ZodTypeDef, - GetUriAvailabilityCheckSettings -> = z.object({ - platformOptions: z.nullable( - z.lazy(() => GetUriPlatformOptions$outboundSchema), - ).optional(), - testFrom: components.TestFrom$outboundSchema, - testIntervalInSeconds: z.number(), - outageConfiguration: z.nullable( - z.lazy(() => GetUriOutageConfiguration$outboundSchema), - ).optional(), - ping: z.nullable(z.lazy(() => Ping$outboundSchema)).optional(), - tcp: z.nullable(z.lazy(() => Tcp$outboundSchema)).optional(), - protocol: Protocol$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUriAvailabilityCheckSettings$ { - /** @deprecated use `GetUriAvailabilityCheckSettings$inboundSchema` instead. */ - export const inboundSchema = GetUriAvailabilityCheckSettings$inboundSchema; - /** @deprecated use `GetUriAvailabilityCheckSettings$outboundSchema` instead. */ - export const outboundSchema = GetUriAvailabilityCheckSettings$outboundSchema; - /** @deprecated use `GetUriAvailabilityCheckSettings$Outbound` instead. */ - export type Outbound = GetUriAvailabilityCheckSettings$Outbound; -} - -export function getUriAvailabilityCheckSettingsToJSON( - getUriAvailabilityCheckSettings: GetUriAvailabilityCheckSettings, -): string { - return JSON.stringify( - GetUriAvailabilityCheckSettings$outboundSchema.parse( - getUriAvailabilityCheckSettings, - ), - ); -} - -export function getUriAvailabilityCheckSettingsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUriAvailabilityCheckSettings$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUriAvailabilityCheckSettings' from JSON`, - ); -} - -/** @internal */ -export const GetUriResponse$inboundSchema: z.ZodType< - GetUriResponse, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: z.string(), - status: GetUriStatus$inboundSchema, - name: z.string(), - ipOrDomain: z.string(), - availabilityCheckSettings: z.lazy(() => - GetUriAvailabilityCheckSettings$inboundSchema - ), - tags: z.array(components.Tag$inboundSchema).optional(), - lastOutageStartTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastOutageEndTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastTestTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastErrorTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastResponseTime: z.nullable(z.number().int()).optional(), -}); - -/** @internal */ -export type GetUriResponse$Outbound = { - id: string; - type: string; - status: string; - name: string; - ipOrDomain: string; - availabilityCheckSettings: GetUriAvailabilityCheckSettings$Outbound; - tags?: Array | undefined; - lastOutageStartTime?: string | null | undefined; - lastOutageEndTime?: string | null | undefined; - lastTestTime?: string | null | undefined; - lastErrorTime?: string | null | undefined; - lastResponseTime?: number | null | undefined; -}; - -/** @internal */ -export const GetUriResponse$outboundSchema: z.ZodType< - GetUriResponse$Outbound, - z.ZodTypeDef, - GetUriResponse -> = z.object({ - id: z.string(), - type: z.string(), - status: GetUriStatus$outboundSchema, - name: z.string(), - ipOrDomain: z.string(), - availabilityCheckSettings: z.lazy(() => - GetUriAvailabilityCheckSettings$outboundSchema - ), - tags: z.array(components.Tag$outboundSchema).optional(), - lastOutageStartTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastOutageEndTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastTestTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), - lastErrorTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastResponseTime: 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 GetUriResponse$ { - /** @deprecated use `GetUriResponse$inboundSchema` instead. */ - export const inboundSchema = GetUriResponse$inboundSchema; - /** @deprecated use `GetUriResponse$outboundSchema` instead. */ - export const outboundSchema = GetUriResponse$outboundSchema; - /** @deprecated use `GetUriResponse$Outbound` instead. */ - export type Outbound = GetUriResponse$Outbound; -} - -export function getUriResponseToJSON(getUriResponse: GetUriResponse): string { - return JSON.stringify(GetUriResponse$outboundSchema.parse(getUriResponse)); -} - -export function getUriResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUriResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUriResponse' from JSON`, - ); -} diff --git a/swov1/src/models/operations/getwebsite.ts b/swov1/src/models/operations/getwebsite.ts index f2c5727..9f77859 100644 --- a/swov1/src/models/operations/getwebsite.ts +++ b/swov1/src/models/operations/getwebsite.ts @@ -4,298 +4,13 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetWebsiteRequest = { entityId: string; }; -export const GetWebsiteStatus = { - Up: "up", - Down: "down", - Paused: "paused", - Maintenance: "maintenance", - Unknown: "unknown", -} as const; -export type GetWebsiteStatus = ClosedEnum; - -/** - * Defines which monitoring features are enabled for a website. - */ -export type MonitoringOptions = { - /** - * True if the availability monitoring is active. - */ - isAvailabilityActive: boolean; - /** - * True if the real user monitoring (RUM) is active. - */ - isRumActive: boolean; -}; - -/** - * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. - */ -export type GetWebsitePlatformOptions = { - /** - * Cloud platforms hosting synthetic probes. - */ - probePlatforms: Array; - /** - * Use this field to configure whether availability tests should be performed from all selected - * - * @remarks - * platforms or one randomly selected platform. It has no effect if you provided only one platform - * in the `probePlatforms` field. - * - * If set to true, a separate test is made from each of the selected platforms. - * - * If set to false, only one of the selected platforms is chosen every time. - * - * If omitted, the previous setting will stay in effect. If there is no previous setting, the value - * will default to false. - */ - testFromAll?: boolean | undefined; -}; - -/** - * How many locations must report a failure for an entity to be considered down. - */ -export const GetWebsiteFailingTestLocations = { - All: "all", - Any: "any", -} as const; -/** - * How many locations must report a failure for an entity to be considered down. - */ -export type GetWebsiteFailingTestLocations = ClosedEnum< - typeof GetWebsiteFailingTestLocations ->; - -/** - * Default conditions when the entity is considered down. - * - * @remarks - * If omitted or set to null, organization configuration will be used for this entity. - */ -export type GetWebsiteOutageConfiguration = { - /** - * How many locations must report a failure for an entity to be considered down. - */ - failingTestLocations: GetWebsiteFailingTestLocations; - /** - * Number of consecutive failing tests for an entity to be considered down. - */ - consecutiveForDown: number; -}; - -/** - * Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. - * - * @remarks - * If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. - * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. - * If omitted or set to null, the string checking functionality will be disabled. - */ -export type CheckForString = { - /** - * Defines whether the check should pass only when the string is present on the page (CONTAINS) or only when it is absent (DOES_NOT_CONTAIN). - */ - operator: components.CheckForStringOperator; - /** - * The string that which will be searched in the page source code. - */ - value: string; -}; - -/** - * Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. - * - * @remarks - * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. - */ -export type Ssl = { - /** - * Whether SSL monitoring is enabled for the website. - * - * @remarks - * If set to false, SSL monitoring will be disabled, but the other settings will be remembered in case you re-enable it later. - * If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. - */ - enabled?: boolean | null | undefined; - /** - * Number of days before the expiration date an SSL certificate will be considered 'expiring.' - */ - daysPriorToExpiration?: number | null | undefined; - /** - * Use this option to limit the certificate expiration check to only the first certificate in the chain (normally the host certificate). - * - * @remarks - * This way you will not be warned about impending expiration of intermediate or root Certification Authority certificates in the chain. - * This option does not affect any other certificate validity checks besides expiration. - * If omitted, the previous setting will stay in effect. If there is no previous setting, the value will default to false. - */ - ignoreIntermediateCertificates?: boolean | null | undefined; -}; - -/** - * Use this field to configure availability tests for the website. - * - * @remarks - * You are required to configure at least availability monitoring or real user monitoring to be able to create website. - */ -export type GetWebsiteAvailabilityCheckSettings = { - /** - * Configure cloud platforms of the synthetic availability test probes. If omitted or set to null, no particular cloud platform will be enforced. - */ - platformOptions?: GetWebsitePlatformOptions | null | undefined; - /** - * Configure locations of the synthetic availability test probes. - * - * @remarks - * Acceptable values depend on the selected type and actual values of existing probes. - */ - testFrom: components.TestFrom; - /** - * Configure how often availability tests should be performed. Provide a number of seconds that is one of 60, 300, 600, 900, 1800, 3600, 7200, 14400. - */ - testIntervalInSeconds: number; - /** - * Default conditions when the entity is considered down. - * - * @remarks - * If omitted or set to null, organization configuration will be used for this entity. - */ - outageConfiguration?: GetWebsiteOutageConfiguration | null | undefined; - /** - * Use this field to configure whether availability tests should check for presence or absence of a particular string on a page. - * - * @remarks - * If the operator is DOES_NOT_CONTAIN and the value is found on the page, the availability test will fail. - * Likewise, if the operator is CONTAINS and the value is not found on the page, the availability test will fail. - * If omitted or set to null, the string checking functionality will be disabled. - */ - checkForString?: CheckForString | null | undefined; - /** - * Configure which protocols need availability tests to be performed. At least one protocol must be provided. - */ - protocols: Array; - /** - * Configure monitoring of SSL/TLS certificates validity. This option is relevant for HTTPS protocol only. - * - * @remarks - * If omitted or set to null, SSL monitoring will be disabled and its previous configuration discarded. - */ - ssl?: Ssl | null | undefined; - /** - * Configure custom request headers to be sent with each availability test. It is possible to provide multiple headers with the same name. - * - * @remarks - * If omitted, set to null or set to an empty array, no custom headers will be sent. - */ - customHeaders?: Array | null | undefined; - /** - * Allow insecure SSL renegotiation which introduces a security risk in the communication process. - * - * @remarks - * Checking this option could lead to exposing credentials to unauthorized entities and the possibility of unauthorized access, interception, or manipulation of sensitive data, compromising the integrity and security of the communication channel. - * Available only with HTTPS check. - * If omitted or set to null, insecure SSL renegotiation won't be allowed. - */ - allowInsecureRenegotiation?: boolean | undefined; - /** - * Configure data that will be sent as POST request body by the synthetic probe. - * - * @remarks - * If omitted or set to null/empty string, the probe will send the usual GET requests. - */ - postData?: string | null | undefined; -}; - -/** - * Use this field to configure real user monitoring (RUM) for the website. - * - * @remarks - * You are required to configure at least availability monitoring or real user monitoring to be able to create website. - */ -export type Rum = { - apdexTimeInSeconds?: number | undefined; - snippet?: string | undefined; - spa: boolean; -}; - -/** - * The request has succeeded. - */ -export type GetWebsiteResponse = { - id: string; - type: string; - status: GetWebsiteStatus; - /** - * Name of the website, which must be unique within the organization. - * - * @remarks - * The website must also not contain any control characters, any white space other than space (U+0020), or any consecutive, leading or trailing spaces. - */ - name: string; - /** - * URL of the website. Must be a valid URL with no leading or trailing white space. Must not contain invalid port number (>65535). - */ - url: string; - /** - * Defines which monitoring features are enabled for a website. - */ - monitoringOptions: MonitoringOptions; - /** - * Use this field to configure availability tests for the website. - * - * @remarks - * You are required to configure at least availability monitoring or real user monitoring to be able to create website. - */ - availabilityCheckSettings?: - | GetWebsiteAvailabilityCheckSettings - | null - | undefined; - /** - * Entity tags. Tag is a key-value pair, where there may be only single tag value for the same key. - */ - tags?: Array | undefined; - /** - * Use this field to configure real user monitoring (RUM) for the website. - * - * @remarks - * You are required to configure at least availability monitoring or real user monitoring to be able to create website. - */ - rum?: Rum | undefined; - /** - * Time when the last outage started. - */ - lastOutageStartTime?: Date | null | undefined; - /** - * Time when the last outage ended. - */ - lastOutageEndTime?: Date | null | undefined; - /** - * Time when the last test was performed. - */ - lastTestTime?: Date | null | undefined; - /** - * Last time when a synthetic test failed. - */ - lastErrorTime?: Date | null | undefined; - /** - * Response time from the last synthetic check in milliseconds. - */ - lastResponseTime?: number | null | undefined; - /** - * Timestamp for when the next on-demand check could be executed. If at '0', it means you can execute it anytime. - */ - nextOnDemandAvailabilityTime?: number | undefined; -}; - /** @internal */ export const GetWebsiteRequest$inboundSchema: z.ZodType< GetWebsiteRequest, @@ -349,586 +64,3 @@ export function getWebsiteRequestFromJSON( `Failed to parse 'GetWebsiteRequest' from JSON`, ); } - -/** @internal */ -export const GetWebsiteStatus$inboundSchema: z.ZodNativeEnum< - typeof GetWebsiteStatus -> = z.nativeEnum(GetWebsiteStatus); - -/** @internal */ -export const GetWebsiteStatus$outboundSchema: z.ZodNativeEnum< - typeof GetWebsiteStatus -> = GetWebsiteStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetWebsiteStatus$ { - /** @deprecated use `GetWebsiteStatus$inboundSchema` instead. */ - export const inboundSchema = GetWebsiteStatus$inboundSchema; - /** @deprecated use `GetWebsiteStatus$outboundSchema` instead. */ - export const outboundSchema = GetWebsiteStatus$outboundSchema; -} - -/** @internal */ -export const MonitoringOptions$inboundSchema: z.ZodType< - MonitoringOptions, - z.ZodTypeDef, - unknown -> = z.object({ - isAvailabilityActive: z.boolean(), - isRumActive: z.boolean(), -}); - -/** @internal */ -export type MonitoringOptions$Outbound = { - isAvailabilityActive: boolean; - isRumActive: boolean; -}; - -/** @internal */ -export const MonitoringOptions$outboundSchema: z.ZodType< - MonitoringOptions$Outbound, - z.ZodTypeDef, - MonitoringOptions -> = z.object({ - isAvailabilityActive: z.boolean(), - isRumActive: z.boolean(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MonitoringOptions$ { - /** @deprecated use `MonitoringOptions$inboundSchema` instead. */ - export const inboundSchema = MonitoringOptions$inboundSchema; - /** @deprecated use `MonitoringOptions$outboundSchema` instead. */ - export const outboundSchema = MonitoringOptions$outboundSchema; - /** @deprecated use `MonitoringOptions$Outbound` instead. */ - export type Outbound = MonitoringOptions$Outbound; -} - -export function monitoringOptionsToJSON( - monitoringOptions: MonitoringOptions, -): string { - return JSON.stringify( - MonitoringOptions$outboundSchema.parse(monitoringOptions), - ); -} - -export function monitoringOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MonitoringOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MonitoringOptions' from JSON`, - ); -} - -/** @internal */ -export const GetWebsitePlatformOptions$inboundSchema: z.ZodType< - GetWebsitePlatformOptions, - z.ZodTypeDef, - unknown -> = z.object({ - probePlatforms: z.array(components.ProbePlatform$inboundSchema), - testFromAll: z.boolean().optional(), -}); - -/** @internal */ -export type GetWebsitePlatformOptions$Outbound = { - probePlatforms: Array; - testFromAll?: boolean | undefined; -}; - -/** @internal */ -export const GetWebsitePlatformOptions$outboundSchema: z.ZodType< - GetWebsitePlatformOptions$Outbound, - z.ZodTypeDef, - GetWebsitePlatformOptions -> = z.object({ - probePlatforms: z.array(components.ProbePlatform$outboundSchema), - testFromAll: 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 GetWebsitePlatformOptions$ { - /** @deprecated use `GetWebsitePlatformOptions$inboundSchema` instead. */ - export const inboundSchema = GetWebsitePlatformOptions$inboundSchema; - /** @deprecated use `GetWebsitePlatformOptions$outboundSchema` instead. */ - export const outboundSchema = GetWebsitePlatformOptions$outboundSchema; - /** @deprecated use `GetWebsitePlatformOptions$Outbound` instead. */ - export type Outbound = GetWebsitePlatformOptions$Outbound; -} - -export function getWebsitePlatformOptionsToJSON( - getWebsitePlatformOptions: GetWebsitePlatformOptions, -): string { - return JSON.stringify( - GetWebsitePlatformOptions$outboundSchema.parse(getWebsitePlatformOptions), - ); -} - -export function getWebsitePlatformOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetWebsitePlatformOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWebsitePlatformOptions' from JSON`, - ); -} - -/** @internal */ -export const GetWebsiteFailingTestLocations$inboundSchema: z.ZodNativeEnum< - typeof GetWebsiteFailingTestLocations -> = z.nativeEnum(GetWebsiteFailingTestLocations); - -/** @internal */ -export const GetWebsiteFailingTestLocations$outboundSchema: z.ZodNativeEnum< - typeof GetWebsiteFailingTestLocations -> = GetWebsiteFailingTestLocations$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetWebsiteFailingTestLocations$ { - /** @deprecated use `GetWebsiteFailingTestLocations$inboundSchema` instead. */ - export const inboundSchema = GetWebsiteFailingTestLocations$inboundSchema; - /** @deprecated use `GetWebsiteFailingTestLocations$outboundSchema` instead. */ - export const outboundSchema = GetWebsiteFailingTestLocations$outboundSchema; -} - -/** @internal */ -export const GetWebsiteOutageConfiguration$inboundSchema: z.ZodType< - GetWebsiteOutageConfiguration, - z.ZodTypeDef, - unknown -> = z.object({ - failingTestLocations: GetWebsiteFailingTestLocations$inboundSchema, - consecutiveForDown: z.number().int(), -}); - -/** @internal */ -export type GetWebsiteOutageConfiguration$Outbound = { - failingTestLocations: string; - consecutiveForDown: number; -}; - -/** @internal */ -export const GetWebsiteOutageConfiguration$outboundSchema: z.ZodType< - GetWebsiteOutageConfiguration$Outbound, - z.ZodTypeDef, - GetWebsiteOutageConfiguration -> = z.object({ - failingTestLocations: GetWebsiteFailingTestLocations$outboundSchema, - consecutiveForDown: 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 GetWebsiteOutageConfiguration$ { - /** @deprecated use `GetWebsiteOutageConfiguration$inboundSchema` instead. */ - export const inboundSchema = GetWebsiteOutageConfiguration$inboundSchema; - /** @deprecated use `GetWebsiteOutageConfiguration$outboundSchema` instead. */ - export const outboundSchema = GetWebsiteOutageConfiguration$outboundSchema; - /** @deprecated use `GetWebsiteOutageConfiguration$Outbound` instead. */ - export type Outbound = GetWebsiteOutageConfiguration$Outbound; -} - -export function getWebsiteOutageConfigurationToJSON( - getWebsiteOutageConfiguration: GetWebsiteOutageConfiguration, -): string { - return JSON.stringify( - GetWebsiteOutageConfiguration$outboundSchema.parse( - getWebsiteOutageConfiguration, - ), - ); -} - -export function getWebsiteOutageConfigurationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetWebsiteOutageConfiguration$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWebsiteOutageConfiguration' from JSON`, - ); -} - -/** @internal */ -export const CheckForString$inboundSchema: z.ZodType< - CheckForString, - z.ZodTypeDef, - unknown -> = z.object({ - operator: components.CheckForStringOperator$inboundSchema, - value: z.string(), -}); - -/** @internal */ -export type CheckForString$Outbound = { - operator: string; - value: string; -}; - -/** @internal */ -export const CheckForString$outboundSchema: z.ZodType< - CheckForString$Outbound, - z.ZodTypeDef, - CheckForString -> = z.object({ - operator: components.CheckForStringOperator$outboundSchema, - value: 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 CheckForString$ { - /** @deprecated use `CheckForString$inboundSchema` instead. */ - export const inboundSchema = CheckForString$inboundSchema; - /** @deprecated use `CheckForString$outboundSchema` instead. */ - export const outboundSchema = CheckForString$outboundSchema; - /** @deprecated use `CheckForString$Outbound` instead. */ - export type Outbound = CheckForString$Outbound; -} - -export function checkForStringToJSON(checkForString: CheckForString): string { - return JSON.stringify(CheckForString$outboundSchema.parse(checkForString)); -} - -export function checkForStringFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CheckForString$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CheckForString' from JSON`, - ); -} - -/** @internal */ -export const Ssl$inboundSchema: z.ZodType = z - .object({ - enabled: z.nullable(z.boolean()).optional(), - daysPriorToExpiration: z.nullable(z.number().int()).optional(), - ignoreIntermediateCertificates: z.nullable(z.boolean()).optional(), - }); - -/** @internal */ -export type Ssl$Outbound = { - enabled?: boolean | null | undefined; - daysPriorToExpiration?: number | null | undefined; - ignoreIntermediateCertificates?: boolean | null | undefined; -}; - -/** @internal */ -export const Ssl$outboundSchema: z.ZodType = z - .object({ - enabled: z.nullable(z.boolean()).optional(), - daysPriorToExpiration: z.nullable(z.number().int()).optional(), - ignoreIntermediateCertificates: 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 Ssl$ { - /** @deprecated use `Ssl$inboundSchema` instead. */ - export const inboundSchema = Ssl$inboundSchema; - /** @deprecated use `Ssl$outboundSchema` instead. */ - export const outboundSchema = Ssl$outboundSchema; - /** @deprecated use `Ssl$Outbound` instead. */ - export type Outbound = Ssl$Outbound; -} - -export function sslToJSON(ssl: Ssl): string { - return JSON.stringify(Ssl$outboundSchema.parse(ssl)); -} - -export function sslFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Ssl$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ssl' from JSON`, - ); -} - -/** @internal */ -export const GetWebsiteAvailabilityCheckSettings$inboundSchema: z.ZodType< - GetWebsiteAvailabilityCheckSettings, - z.ZodTypeDef, - unknown -> = z.object({ - platformOptions: z.nullable( - z.lazy(() => GetWebsitePlatformOptions$inboundSchema), - ).optional(), - testFrom: components.TestFrom$inboundSchema, - testIntervalInSeconds: z.number(), - outageConfiguration: z.nullable( - z.lazy(() => GetWebsiteOutageConfiguration$inboundSchema), - ).optional(), - checkForString: z.nullable(z.lazy(() => CheckForString$inboundSchema)) - .optional(), - protocols: z.array(components.WebsiteProtocol$inboundSchema), - ssl: z.nullable(z.lazy(() => Ssl$inboundSchema)).optional(), - customHeaders: z.nullable(z.array(components.CustomHeaders$inboundSchema)) - .optional(), - allowInsecureRenegotiation: z.boolean().optional(), - postData: z.nullable(z.string()).optional(), -}); - -/** @internal */ -export type GetWebsiteAvailabilityCheckSettings$Outbound = { - platformOptions?: GetWebsitePlatformOptions$Outbound | null | undefined; - testFrom: components.TestFrom$Outbound; - testIntervalInSeconds: number; - outageConfiguration?: - | GetWebsiteOutageConfiguration$Outbound - | null - | undefined; - checkForString?: CheckForString$Outbound | null | undefined; - protocols: Array; - ssl?: Ssl$Outbound | null | undefined; - customHeaders?: Array | null | undefined; - allowInsecureRenegotiation?: boolean | undefined; - postData?: string | null | undefined; -}; - -/** @internal */ -export const GetWebsiteAvailabilityCheckSettings$outboundSchema: z.ZodType< - GetWebsiteAvailabilityCheckSettings$Outbound, - z.ZodTypeDef, - GetWebsiteAvailabilityCheckSettings -> = z.object({ - platformOptions: z.nullable( - z.lazy(() => GetWebsitePlatformOptions$outboundSchema), - ).optional(), - testFrom: components.TestFrom$outboundSchema, - testIntervalInSeconds: z.number(), - outageConfiguration: z.nullable( - z.lazy(() => GetWebsiteOutageConfiguration$outboundSchema), - ).optional(), - checkForString: z.nullable(z.lazy(() => CheckForString$outboundSchema)) - .optional(), - protocols: z.array(components.WebsiteProtocol$outboundSchema), - ssl: z.nullable(z.lazy(() => Ssl$outboundSchema)).optional(), - customHeaders: z.nullable(z.array(components.CustomHeaders$outboundSchema)) - .optional(), - allowInsecureRenegotiation: z.boolean().optional(), - postData: 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 GetWebsiteAvailabilityCheckSettings$ { - /** @deprecated use `GetWebsiteAvailabilityCheckSettings$inboundSchema` instead. */ - export const inboundSchema = - GetWebsiteAvailabilityCheckSettings$inboundSchema; - /** @deprecated use `GetWebsiteAvailabilityCheckSettings$outboundSchema` instead. */ - export const outboundSchema = - GetWebsiteAvailabilityCheckSettings$outboundSchema; - /** @deprecated use `GetWebsiteAvailabilityCheckSettings$Outbound` instead. */ - export type Outbound = GetWebsiteAvailabilityCheckSettings$Outbound; -} - -export function getWebsiteAvailabilityCheckSettingsToJSON( - getWebsiteAvailabilityCheckSettings: GetWebsiteAvailabilityCheckSettings, -): string { - return JSON.stringify( - GetWebsiteAvailabilityCheckSettings$outboundSchema.parse( - getWebsiteAvailabilityCheckSettings, - ), - ); -} - -export function getWebsiteAvailabilityCheckSettingsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetWebsiteAvailabilityCheckSettings$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWebsiteAvailabilityCheckSettings' from JSON`, - ); -} - -/** @internal */ -export const Rum$inboundSchema: z.ZodType = z - .object({ - apdexTimeInSeconds: z.number().int().optional(), - snippet: z.string().optional(), - spa: z.boolean(), - }); - -/** @internal */ -export type Rum$Outbound = { - apdexTimeInSeconds?: number | undefined; - snippet?: string | undefined; - spa: boolean; -}; - -/** @internal */ -export const Rum$outboundSchema: z.ZodType = z - .object({ - apdexTimeInSeconds: z.number().int().optional(), - snippet: z.string().optional(), - spa: z.boolean(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Rum$ { - /** @deprecated use `Rum$inboundSchema` instead. */ - export const inboundSchema = Rum$inboundSchema; - /** @deprecated use `Rum$outboundSchema` instead. */ - export const outboundSchema = Rum$outboundSchema; - /** @deprecated use `Rum$Outbound` instead. */ - export type Outbound = Rum$Outbound; -} - -export function rumToJSON(rum: Rum): string { - return JSON.stringify(Rum$outboundSchema.parse(rum)); -} - -export function rumFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Rum$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Rum' from JSON`, - ); -} - -/** @internal */ -export const GetWebsiteResponse$inboundSchema: z.ZodType< - GetWebsiteResponse, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: z.string(), - status: GetWebsiteStatus$inboundSchema, - name: z.string(), - url: z.string(), - monitoringOptions: z.lazy(() => MonitoringOptions$inboundSchema), - availabilityCheckSettings: z.nullable( - z.lazy(() => GetWebsiteAvailabilityCheckSettings$inboundSchema), - ).optional(), - tags: z.array(components.Tag$inboundSchema).optional(), - rum: z.lazy(() => Rum$inboundSchema).optional(), - lastOutageStartTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastOutageEndTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastTestTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastErrorTime: z.nullable( - z.string().datetime({ offset: true }).transform(v => new Date(v)), - ).optional(), - lastResponseTime: z.nullable(z.number().int()).optional(), - nextOnDemandAvailabilityTime: z.number().int().optional(), -}); - -/** @internal */ -export type GetWebsiteResponse$Outbound = { - id: string; - type: string; - status: string; - name: string; - url: string; - monitoringOptions: MonitoringOptions$Outbound; - availabilityCheckSettings?: - | GetWebsiteAvailabilityCheckSettings$Outbound - | null - | undefined; - tags?: Array | undefined; - rum?: Rum$Outbound | undefined; - lastOutageStartTime?: string | null | undefined; - lastOutageEndTime?: string | null | undefined; - lastTestTime?: string | null | undefined; - lastErrorTime?: string | null | undefined; - lastResponseTime?: number | null | undefined; - nextOnDemandAvailabilityTime?: number | undefined; -}; - -/** @internal */ -export const GetWebsiteResponse$outboundSchema: z.ZodType< - GetWebsiteResponse$Outbound, - z.ZodTypeDef, - GetWebsiteResponse -> = z.object({ - id: z.string(), - type: z.string(), - status: GetWebsiteStatus$outboundSchema, - name: z.string(), - url: z.string(), - monitoringOptions: z.lazy(() => MonitoringOptions$outboundSchema), - availabilityCheckSettings: z.nullable( - z.lazy(() => GetWebsiteAvailabilityCheckSettings$outboundSchema), - ).optional(), - tags: z.array(components.Tag$outboundSchema).optional(), - rum: z.lazy(() => Rum$outboundSchema).optional(), - lastOutageStartTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastOutageEndTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastTestTime: z.nullable(z.date().transform(v => v.toISOString())).optional(), - lastErrorTime: z.nullable(z.date().transform(v => v.toISOString())) - .optional(), - lastResponseTime: z.nullable(z.number().int()).optional(), - nextOnDemandAvailabilityTime: 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 GetWebsiteResponse$ { - /** @deprecated use `GetWebsiteResponse$inboundSchema` instead. */ - export const inboundSchema = GetWebsiteResponse$inboundSchema; - /** @deprecated use `GetWebsiteResponse$outboundSchema` instead. */ - export const outboundSchema = GetWebsiteResponse$outboundSchema; - /** @deprecated use `GetWebsiteResponse$Outbound` instead. */ - export type Outbound = GetWebsiteResponse$Outbound; -} - -export function getWebsiteResponseToJSON( - getWebsiteResponse: GetWebsiteResponse, -): string { - return JSON.stringify( - GetWebsiteResponse$outboundSchema.parse(getWebsiteResponse), - ); -} - -export function getWebsiteResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetWebsiteResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetWebsiteResponse' from JSON`, - ); -} diff --git a/swov1/src/models/operations/index.ts b/swov1/src/models/operations/index.ts index 33d19e4..6c6f865 100644 --- a/swov1/src/models/operations/index.ts +++ b/swov1/src/models/operations/index.ts @@ -3,7 +3,6 @@ */ export * from "./createchangeevent.js"; -export * from "./createtoken.js"; export * from "./deletecompositemetric.js"; export * from "./deletedatabase.js"; export * from "./deleteuri.js"; @@ -23,7 +22,6 @@ export * from "./listmetricmeasurements.js"; export * from "./listmetrics.js"; export * from "./listmetricsforentitytype.js"; export * from "./listmultimetricmeasurements.js"; -export * from "./listprobes.js"; export * from "./observedatabase.js"; export * from "./pauseurimonitoring.js"; export * from "./pausewebsitemonitoring.js"; diff --git a/swov1/src/sdk/dem.ts b/swov1/src/sdk/dem.ts index 5ac15ca..24f6da7 100644 --- a/swov1/src/sdk/dem.ts +++ b/swov1/src/sdk/dem.ts @@ -28,7 +28,7 @@ export class Dem extends ClientSDK { */ async listProbes( options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(demListProbes( this, options, @@ -81,7 +81,7 @@ export class Dem extends ClientSDK { async getUri( request: operations.GetUriRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(demGetUri( this, request, @@ -165,7 +165,7 @@ export class Dem extends ClientSDK { async getWebsite( request: operations.GetWebsiteRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(demGetWebsite( this, request, diff --git a/swov1/src/sdk/tokens.ts b/swov1/src/sdk/tokens.ts index 59fae61..effa004 100644 --- a/swov1/src/sdk/tokens.ts +++ b/swov1/src/sdk/tokens.ts @@ -5,7 +5,6 @@ import { tokensCreateToken } from "../funcs/tokensCreateToken.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Tokens extends ClientSDK { @@ -15,7 +14,7 @@ export class Tokens extends ClientSDK { async createToken( request: components.CreateTokenRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(tokensCreateToken( this, request, diff --git a/swov1/src/types/constdatetime.ts b/swov1/src/types/constdatetime.ts index c0a4409..eeff4dd 100644 --- a/swov1/src/types/constdatetime.ts +++ b/swov1/src/types/constdatetime.ts @@ -11,5 +11,5 @@ export function constDateTime( return ( typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() ); - }, `Value must be equivelant to ${val}`); + }, `Value must be equivalent to ${val}`); }