@dynatrace-sdk/client-classic-environment-v2 4.2.1 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +1898 -547
- package/cjs/index.js +1232 -219
- package/dynatrace-metadata.json +2 -2
- package/esm/index.js +1173 -160
- package/package.json +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/apis/credential-vault-api.d.ts +24 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/extensions-2-0-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/logs-api.d.ts +3 -0
- package/types/packages/client/classic-environment-v2/src/lib/apis/metrics-api.d.ts +45 -0
- package/types/packages/client/classic-environment-v2/src/lib/apis/monitored-entities-api.d.ts +11 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/rum-manual-insertion-tags-api.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/apis/settings-objects-api.d.ts +8 -3
- package/types/packages/client/classic-environment-v2/src/lib/apis/settings-schemas-api.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/apis/synthetic-locations-nodes-and-configuration-api.d.ts +83 -11
- package/types/packages/client/classic-environment-v2/src/lib/apis/synthetic-network-availability-monitors-api.d.ts +13 -11
- package/types/packages/client/classic-environment-v2/src/lib/models/active-gate-module-attributes.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/aggregated-log-aggregation-result.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/asset-info-dto-type.d.ts +1 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/asset-info-dto.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/authentication-dto-input-type.d.ts +12 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/authentication-dto-type.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/authentication-dto.d.ts +24 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/availability-evidence.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/aws-key-based-credentials-dto.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/aws-role-based-credentials.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/base-wait-condition-dto-type.d.ts +18 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/base-wait-condition-dto.d.ts +15 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/browser-permissions-dto.d.ts +21 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/certificate-credentials.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/chromium-startup-flags-dto-autoplay-policy.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/chromium-startup-flags-dto-disable-features.d.ts +6 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/chromium-startup-flags-dto.d.ts +42 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/client-certificate-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/complex-constraint.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/constraint.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/cookie-step-dto.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/credentials-details-list.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/custom-device-creation-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/cyber-ark-allowed-location-dto.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/cyber-ark-username-password.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/deletion-constraint.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto-origin.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto-performance-metric.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enablement-dto.d.ts +17 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enriched-management-zone-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/enriched-tag-dto.d.ts +32 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/entity-from-relationships.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/entity-to-relationships.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/entity.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/event-evidence.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/event-ingest-event-type.d.ts +2 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/event-ingest-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/event-ingest.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/execute-actions-dto-actions.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/extension-feature-sets-details.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/extension-upload-response-dto-feature-sets-details.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/filtered-requests-dto-mode.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/filtered-requests-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/framework-options-dto.d.ts +37 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/hashicorp-approle.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/history-modification-info.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/ignored-error-codes-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/index.d.ts +67 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/interaction-step-dto.d.ts +25 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/item-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/java-script-agent-settings-dto.d.ts +44 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/java-script-step-dto.d.ts +20 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/key-performance-metrics-load-action-kpm.d.ts +17 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/key-performance-metrics-xhr-action-kpm.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/key-performance-metrics.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/key-strokes-step-dto.d.ts +34 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/keystrokes-input-dto-type.d.ts +12 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/keystrokes-input-dto.d.ts +12 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/locator-dto-type.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/locator-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/log-message-json.d.ts +5 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/log-record-additional-columns.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/maintenance-window-evidence.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/metric-evidence.d.ts +5 -5
- package/types/packages/client/classic-environment-v2/src/lib/models/metric-series-dimension-map.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/monitor-property-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/monitored-entity-state-param.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/monitored-states.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/navigate-step-dto.d.ts +30 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/network-throttling-dto.d.ts +21 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/network-zone.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/node-collection-element.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/node.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/plain-authentication-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/plain-keystrokes-input-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/private-synthetic-location-fips-mode.d.ts +15 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/private-synthetic-location-node-names.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/private-synthetic-location.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/property-definition-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/proxy-dto.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/public-certificate-credentials.d.ts +3 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/public-synthetic-location.d.ts +5 -5
- package/types/packages/client/classic-environment-v2/src/lib/models/remediation-items-bulk-update-delete-dto-updates.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/request-filter-dto-type.d.ts +12 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/request-filter-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/request-header-options-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/revision-diff.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-enums.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-maturity.d.ts +16 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-table-columns.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto-types.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-definition-rest-dto.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-stub-maturity.d.ts +16 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-stub.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/schema-type-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/secure-authentication-dto.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/secure-keystrokes-input-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/security-problem-event-reason.d.ts +3 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/security-problem-event.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/select-option-step-dto.d.ts +26 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/selection-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/service-impact.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/snmpv3-credentials.d.ts +2 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/store-log-query-structure.d.ts +7 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-configuration-dto.d.ts +90 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-request-type.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-request.d.ts +70 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-response-type.d.ts +9 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-response.d.ts +82 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-step-dto-type.d.ts +22 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-browser-monitor-step-dto.d.ts +25 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-constraint-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-cookie-dto.d.ts +21 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-outage-handling-settings-dto-origin.d.ts +11 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-outage-handling-settings-dto.d.ts +4 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-performance-threshold-dto-type.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-performance-threshold-dto.d.ts +6 -6
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-monitor-primary-grail-tag-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-request-type.d.ts +2 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-request.d.ts +6 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-response-type.d.ts +1 -2
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-response.d.ts +8 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-multi-protocol-monitor-step-dto-properties.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-batch-status-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-execution-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-execution-request-metadata.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-execution.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-on-demand-triggering-problem-details.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-private-location-update.d.ts +12 -3
- package/types/packages/client/classic-environment-v2/src/lib/models/synthetic-public-location-update.d.ts +1 -1
- package/types/packages/client/classic-environment-v2/src/lib/models/target-dto.d.ts +14 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/test-device-dto.d.ts +25 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/time-wait-condition-dto.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/timeout-settings-dto.d.ts +13 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/transactional-evidence.d.ts +4 -4
- package/types/packages/client/classic-environment-v2/src/lib/models/validation-rule-dto-type.d.ts +10 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/validation-rule-dto.d.ts +26 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/validation-wait-condition-dto.d.ts +15 -0
- package/types/packages/client/classic-environment-v2/src/lib/models/visually-complete-options-dto.d.ts +25 -0
- package/types/packages/http-client/src/index.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/abort-controller.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/abort-signal.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/apply-content-type-header.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/base-error.d.ts +0 -5
- package/types/packages/http-client/src/lib/platform/binary.d.ts +0 -13
- package/types/packages/http-client/src/lib/platform/data-type-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/platform/decode-form-data.d.ts +0 -48
- package/types/packages/http-client/src/lib/platform/decode-response-body.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/default-status-validator.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/encode-request-body.d.ts +0 -2
- package/types/packages/http-client/src/lib/platform/http-client-abort-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-request-error.d.ts +0 -7
- package/types/packages/http-client/src/lib/platform/http-client-response-error-serializer.d.ts +0 -3
- package/types/packages/http-client/src/lib/platform/http-client-response-error.d.ts +0 -11
- package/types/packages/http-client/src/lib/platform/http-client-response.d.ts +0 -10
- package/types/packages/http-client/src/lib/platform/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/platform/index.d.ts +0 -12
- package/types/packages/http-client/src/lib/platform/oauth-http-client.d.ts +0 -41
- package/types/packages/http-client/src/lib/platform/unsupported-operation-error.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/abort-controller.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/abort-signal.d.ts +0 -18
- package/types/packages/http-client/src/lib/types/base-error.d.ts +0 -4
- package/types/packages/http-client/src/lib/types/binary.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/data-type-error.d.ts +0 -14
- package/types/packages/http-client/src/lib/types/data-types.d.ts +0 -36
- package/types/packages/http-client/src/lib/types/form-data-request-body.d.ts +0 -83
- package/types/packages/http-client/src/lib/types/form-data-response-body.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/headers.d.ts +0 -6
- package/types/packages/http-client/src/lib/types/http-client-abort-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-network-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-error.d.ts +0 -15
- package/types/packages/http-client/src/lib/types/http-client-request-options.d.ts +0 -42
- package/types/packages/http-client/src/lib/types/http-client-response-error.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/http-client-response.d.ts +0 -33
- package/types/packages/http-client/src/lib/types/http-client.d.ts +0 -24
- package/types/packages/http-client/src/lib/types/index.d.ts +0 -20
- package/types/packages/http-client/src/lib/types/request-body-types.d.ts +0 -26
- package/types/packages/http-client/src/lib/types/response-body-types.d.ts +0 -46
- package/types/packages/http-client/src/lib/types/status-validator.d.ts +0 -7
- package/types/packages/http-client/src/lib/types/unsupported-operation-error.d.ts +0 -14
- package/types/packages/platform/error-handlers/src/index.d.ts +0 -2
- package/types/packages/platform/error-handlers/src/lib/add-global-error-serializer.d.ts +0 -13
- package/types/packages/platform/error-handlers/src/lib/types/common-serialized-error.d.ts +0 -13
- package/types/packages/platform/error-handlers/src/lib/types/dt-runtime-error-handlers.d.ts +0 -5
- package/types/packages/platform/error-handlers/src/lib/types/error-type.d.ts +0 -9
- package/types/packages/platform/error-handlers/src/lib/types/global-dt-runtime-with-error-handlers.d.ts +0 -7
- package/types/packages/platform/error-handlers/src/lib/types/global-error-serializer.d.ts +0 -10
- package/types/packages/platform/error-handlers/src/lib/types/http-serialized-error.d.ts +0 -16
- package/types/packages/platform/error-handlers/src/lib/types/index.d.ts +0 -6
- package/types/packages/platform/error-handlers/src/lib/types/serialized-error.d.ts +0 -10
- package/types/packages/platform/shared/index.d.ts +0 -1
- package/types/packages/platform/shared/utils/get-global-with-dt-runtime.d.ts +0 -1
- package/types/packages/shared-errors/src/api-client-error.d.ts +0 -23
- package/types/packages/shared-errors/src/api-gateway-error.d.ts +0 -37
- package/types/packages/shared-errors/src/client-request-error.d.ts +0 -39
- package/types/packages/shared-errors/src/index.d.ts +0 -5
- package/types/packages/shared-errors/src/invalid-response-error.d.ts +0 -26
- package/types/packages/shared-errors/src/types.d.ts +0 -88
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { RequestBodyTypes } from './request-body-types';
|
|
2
|
-
import { HttpClientRequestOptions } from './http-client-request-options';
|
|
3
|
-
import { HttpClientResponse } from './http-client-response';
|
|
4
|
-
/**
|
|
5
|
-
* The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
|
|
6
|
-
* It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
|
|
7
|
-
*
|
|
8
|
-
* Currently, only the requests to the Platform Services and the Serverless Functions are supported.
|
|
9
|
-
*/
|
|
10
|
-
export interface HttpClient {
|
|
11
|
-
/**
|
|
12
|
-
* Sends an http request as configured by the `options`.
|
|
13
|
-
* Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
|
|
14
|
-
* when one of the following situations happen:
|
|
15
|
-
* - `DataTypeError` - request body does not conform to the specified request body type,
|
|
16
|
-
* - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
|
|
17
|
-
* - `HttpClientResponseError` - response status is considered invalid by the status validator,
|
|
18
|
-
* - `HttpClientAbortError` - request was aborted.
|
|
19
|
-
*
|
|
20
|
-
* @param options Options used to configure the request.
|
|
21
|
-
* @return Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
|
|
22
|
-
*/
|
|
23
|
-
send<T extends keyof RequestBodyTypes = 'json'>(options: HttpClientRequestOptions<T>): Promise<HttpClientResponse>;
|
|
24
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from './base-error';
|
|
2
|
-
export * from './http-client-request-error';
|
|
3
|
-
export * from './unsupported-operation-error';
|
|
4
|
-
export * from './status-validator';
|
|
5
|
-
export * from './response-body-types';
|
|
6
|
-
export * from './http-client';
|
|
7
|
-
export * from './http-client-response';
|
|
8
|
-
export * from './data-types';
|
|
9
|
-
export * from './http-client-request-options';
|
|
10
|
-
export * from './http-client-abort-error';
|
|
11
|
-
export * from './abort-controller';
|
|
12
|
-
export * from './form-data-response-body';
|
|
13
|
-
export * from './abort-signal';
|
|
14
|
-
export * from './http-client-response-error';
|
|
15
|
-
export * from './form-data-request-body';
|
|
16
|
-
export * from './binary';
|
|
17
|
-
export * from './headers';
|
|
18
|
-
export * from './request-body-types';
|
|
19
|
-
export * from './data-type-error';
|
|
20
|
-
export * from './http-client-network-error';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { FormDataRequestBody } from './form-data-request-body';
|
|
4
|
-
import type * as stream from 'stream';
|
|
5
|
-
import { Binary } from './binary';
|
|
6
|
-
/**
|
|
7
|
-
* Mapping between the request body type names and types.
|
|
8
|
-
*/
|
|
9
|
-
export type RequestBodyTypes = {
|
|
10
|
-
/**
|
|
11
|
-
* A text request body type.
|
|
12
|
-
*/
|
|
13
|
-
text: string;
|
|
14
|
-
/**
|
|
15
|
-
* A JSON request body type.
|
|
16
|
-
*/
|
|
17
|
-
json: any;
|
|
18
|
-
/**
|
|
19
|
-
* A multipart/form-data request body type.
|
|
20
|
-
*/
|
|
21
|
-
'form-data': FormDataRequestBody;
|
|
22
|
-
/**
|
|
23
|
-
* A binary request body type.
|
|
24
|
-
*/
|
|
25
|
-
binary: Binary | ArrayBuffer | Blob | ReadableStream | Buffer | stream.Readable;
|
|
26
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type * as stream from 'stream';
|
|
4
|
-
import { FormDataResponseBody } from './form-data-response-body';
|
|
5
|
-
import { Binary } from './binary';
|
|
6
|
-
/**
|
|
7
|
-
* Mapping between the response body type names and types.
|
|
8
|
-
*/
|
|
9
|
-
export type ResponseBodyTypes = {
|
|
10
|
-
/**
|
|
11
|
-
* A text response body type.
|
|
12
|
-
*/
|
|
13
|
-
text: Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* A JSON response body type.
|
|
16
|
-
*/
|
|
17
|
-
json: Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* A binary body type.
|
|
20
|
-
*/
|
|
21
|
-
binary: Promise<Binary>;
|
|
22
|
-
/**
|
|
23
|
-
* A multipart/form-data body type.
|
|
24
|
-
*/
|
|
25
|
-
'form-data': Promise<FormDataResponseBody>;
|
|
26
|
-
/**
|
|
27
|
-
* An ArrayBuffer response body type.
|
|
28
|
-
*/
|
|
29
|
-
'array-buffer': Promise<ArrayBuffer>;
|
|
30
|
-
/**
|
|
31
|
-
* A Blob response body type. Browser only.
|
|
32
|
-
*/
|
|
33
|
-
blob: Promise<Blob>;
|
|
34
|
-
/**
|
|
35
|
-
* A ReadableStream response body type. Browser only.
|
|
36
|
-
*/
|
|
37
|
-
'readable-stream': ReadableStream<Uint8Array>;
|
|
38
|
-
/**
|
|
39
|
-
* A Buffer response body type. Node only.
|
|
40
|
-
*/
|
|
41
|
-
buffer: Promise<Buffer>;
|
|
42
|
-
/**
|
|
43
|
-
* A Stream response body type. Node only.
|
|
44
|
-
*/
|
|
45
|
-
stream: stream.Readable;
|
|
46
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a function used to validate the response status code.
|
|
3
|
-
* If `true` is returned, the status is considered valid (request succeeded), otherwise it's considered invalid (request failed).
|
|
4
|
-
*/
|
|
5
|
-
export interface StatusValidator {
|
|
6
|
-
(status: number): boolean;
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a situation when the requested operation is not supported.
|
|
3
|
-
*/
|
|
4
|
-
import { BaseError } from './base-error';
|
|
5
|
-
export interface UnsupportedOperationError extends BaseError {
|
|
6
|
-
/**
|
|
7
|
-
* The error name.
|
|
8
|
-
*/
|
|
9
|
-
readonly name: 'UnsupportedOperationError';
|
|
10
|
-
/**
|
|
11
|
-
* The error root cause.
|
|
12
|
-
*/
|
|
13
|
-
readonly cause?: any;
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GlobalErrorSerializer } from './types/global-error-serializer';
|
|
2
|
-
/**
|
|
3
|
-
* Registers a global error serializer for handling uncatched errors.
|
|
4
|
-
*
|
|
5
|
-
* @param {GlobalErrorSerializer} serializer Asynchronous function which serializes error if it match the condition
|
|
6
|
-
*/
|
|
7
|
-
export declare function addGlobalErrorSerializer(serializer: GlobalErrorSerializer): void;
|
|
8
|
-
/**
|
|
9
|
-
* Checks if global error serializer is supported.
|
|
10
|
-
*
|
|
11
|
-
* @return {boolean} information if global error serializer is supported on current environment.
|
|
12
|
-
*/
|
|
13
|
-
export declare function isGlobalErrorSerializerSupported(): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ErrorType } from './error-type';
|
|
2
|
-
/**
|
|
3
|
-
* Common serialized JS Error
|
|
4
|
-
*/
|
|
5
|
-
export interface CommonSerializedError {
|
|
6
|
-
name: string;
|
|
7
|
-
message: string;
|
|
8
|
-
stack?: string;
|
|
9
|
-
type: ErrorType.COMMON;
|
|
10
|
-
errorRef?: string;
|
|
11
|
-
cause?: any;
|
|
12
|
-
details?: any;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SerializedError } from './serialized-error';
|
|
2
|
-
/**
|
|
3
|
-
* Custom error serializing function.
|
|
4
|
-
* Should check the received error and, when the error matches, return a serialized error with the specified error type.
|
|
5
|
-
* Otherwise, nothing should be returned so that the error can be handled further.
|
|
6
|
-
*
|
|
7
|
-
* @param {any} error Error to be serialized
|
|
8
|
-
* @returns {TypedError | undefined} Serialized error or nothing
|
|
9
|
-
*/
|
|
10
|
-
export type GlobalErrorSerializer = (error: any) => Promise<SerializedError | undefined>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ErrorType } from './error-type';
|
|
2
|
-
/**
|
|
3
|
-
* Serialized http exception with response status
|
|
4
|
-
*/
|
|
5
|
-
export interface HttpSerializedError {
|
|
6
|
-
name: string;
|
|
7
|
-
message: string;
|
|
8
|
-
stack?: string;
|
|
9
|
-
type: ErrorType.HTTP;
|
|
10
|
-
status: number;
|
|
11
|
-
/** @deprecated */
|
|
12
|
-
body?: unknown;
|
|
13
|
-
errorRef?: string;
|
|
14
|
-
cause?: any;
|
|
15
|
-
details?: any;
|
|
16
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CommonSerializedError } from './common-serialized-error';
|
|
2
|
-
import { HttpSerializedError } from './http-serialized-error';
|
|
3
|
-
/**
|
|
4
|
-
* Serialized error object contains error type
|
|
5
|
-
*
|
|
6
|
-
* @property {ErrorType} type error type
|
|
7
|
-
*/
|
|
8
|
-
export type SerializedError = (HttpSerializedError | CommonSerializedError) & {
|
|
9
|
-
traceId?: string;
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils/get-global-with-dt-runtime';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getGlobalWithDtRuntime: <T extends typeof globalThis>() => T;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ErrorType } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Base error for all client SDKs. All other errors extend this class.
|
|
4
|
-
*/
|
|
5
|
-
export declare class ApiClientError extends Error {
|
|
6
|
-
readonly cause?: any;
|
|
7
|
-
readonly isApiClientError = true;
|
|
8
|
-
errorType: ErrorType;
|
|
9
|
-
constructor(name: string, message?: string, cause?: any);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* ApiClientError type guard function.
|
|
13
|
-
* Does a structural check of the passed object.
|
|
14
|
-
* @example
|
|
15
|
-
* try {
|
|
16
|
-
* doSomething();
|
|
17
|
-
* } catch (e: unknown) {
|
|
18
|
-
* if(isApiClientError(e)) {
|
|
19
|
-
* handleTheError();
|
|
20
|
-
* }
|
|
21
|
-
* }
|
|
22
|
-
*/
|
|
23
|
-
export declare function isApiClientError(e: any): e is ApiClientError;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { HttpClientResponse } from '@dynatrace-sdk/http-client';
|
|
2
|
-
import { ClientRequestError } from './client-request-error';
|
|
3
|
-
import { CommonApiError, CommonErrorDetails, ErrorResponseBody } from './types';
|
|
4
|
-
export type ApiGatewayErrorResponseBody = ErrorResponseBody<CommonApiError<ApiGatewayErrorDetails> & {
|
|
5
|
-
retryAfterSeconds?: number;
|
|
6
|
-
}>;
|
|
7
|
-
/**
|
|
8
|
-
* Reference for *ApiGatewayError* details object. Contains information about received API Getaway error.
|
|
9
|
-
* */
|
|
10
|
-
export interface ApiGatewayErrorDetails extends CommonErrorDetails {
|
|
11
|
-
errorCodeProperties?: {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Dedicated error response class for errors thrown by API Gateway.
|
|
17
|
-
* Autogenerated SDK Clients have built-in handler for API Gateway errors that throws this error.
|
|
18
|
-
*/
|
|
19
|
-
export declare class ApiGatewayError extends ClientRequestError<ApiGatewayErrorResponseBody> {
|
|
20
|
-
readonly isApiGatewayError = true;
|
|
21
|
-
readonly code: number;
|
|
22
|
-
readonly retryAfterSeconds: number | undefined;
|
|
23
|
-
constructor(response: HttpClientResponse, body: ApiGatewayErrorResponseBody);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* APIGatewayError type guard function.
|
|
27
|
-
* Does a structural check of the passed object.
|
|
28
|
-
* @example
|
|
29
|
-
* try {
|
|
30
|
-
* doSomething();
|
|
31
|
-
* } catch (e: unknown) {
|
|
32
|
-
* if(isApiClientError(e)) {
|
|
33
|
-
* handleTheError();
|
|
34
|
-
* }
|
|
35
|
-
* }
|
|
36
|
-
*/
|
|
37
|
-
export declare function isApiGatewayError(e: any): e is ApiGatewayError;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { HttpClientResponse } from '@dynatrace-sdk/http-client';
|
|
2
|
-
import { ApiClientError } from './api-client-error';
|
|
3
|
-
import { ErrorResponseBody } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Generic error class for service errors, used to handle both expected and unexpected service-level errors.
|
|
6
|
-
* @example Handling unexpected error response, received by the SDK Client
|
|
7
|
-
* const responseValue = await response.body('json');
|
|
8
|
-
*
|
|
9
|
-
* throw new ClientRequestError(
|
|
10
|
-
* `${response.status}`,
|
|
11
|
-
* response,
|
|
12
|
-
* responseValue,
|
|
13
|
-
* getErrorMessage(
|
|
14
|
-
* responseValue,
|
|
15
|
-
* `Unexpected api response: code=${response.status} body="${responseValue}"`,
|
|
16
|
-
* ),
|
|
17
|
-
* e,
|
|
18
|
-
* );
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
export declare class ClientRequestError<DTO = ErrorResponseBody> extends ApiClientError {
|
|
22
|
-
readonly isClientRequestError = true;
|
|
23
|
-
body: DTO;
|
|
24
|
-
response: HttpClientResponse;
|
|
25
|
-
constructor(name: string, response: HttpClientResponse, body: DTO, message?: string, cause?: any);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* ClientRequestError type guard function.
|
|
29
|
-
* Does a structural check of the passed object.
|
|
30
|
-
* @example
|
|
31
|
-
* try {
|
|
32
|
-
* doSomething();
|
|
33
|
-
* } catch (e: unknown) {
|
|
34
|
-
* if(isClientRequestError(e)) {
|
|
35
|
-
* handleTheError();
|
|
36
|
-
* }
|
|
37
|
-
* }
|
|
38
|
-
*/
|
|
39
|
-
export declare function isClientRequestError<T = ErrorResponseBody>(e: any): e is ClientRequestError<T>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ApiClientError } from './api-client-error';
|
|
2
|
-
/**
|
|
3
|
-
* Dedicated error class for errors related to response serialization.
|
|
4
|
-
* Thrown when received service response can't be deserialized.
|
|
5
|
-
**/
|
|
6
|
-
export declare class InvalidResponseError extends ApiClientError {
|
|
7
|
-
readonly isInvalidResponseError = true;
|
|
8
|
-
responseBody: any;
|
|
9
|
-
expectedType?: string;
|
|
10
|
-
nestedError?: Error;
|
|
11
|
-
response: any;
|
|
12
|
-
constructor(name: string, nestedError: Error | any | undefined, body: any, expectedType?: string, message?: string, response?: any);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* InvalidResponseError type guard function.
|
|
16
|
-
* Does a structural check of the passed object.
|
|
17
|
-
* @example
|
|
18
|
-
* try {
|
|
19
|
-
* doSomething();
|
|
20
|
-
* } catch (e: unknown) {
|
|
21
|
-
* if (isInvalidResponseError(e)) {
|
|
22
|
-
* throw e;
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
*/
|
|
26
|
-
export declare function isInvalidResponseError(e: any): e is InvalidResponseError;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/** @ignore*/
|
|
2
|
-
export declare enum ErrorType {
|
|
3
|
-
COMMON = "JS Error",
|
|
4
|
-
HTTP = "Http Error"
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Basic error envelope, that enforces all error to have mandatory "error" property.
|
|
8
|
-
* */
|
|
9
|
-
export interface ErrorResponseBody<T = CommonApiError> {
|
|
10
|
-
/**
|
|
11
|
-
* *error* object must have two mandatory fields (*code, message*) and may have two additional fields (*help, details*):
|
|
12
|
-
* refer to the *CommonApiError* for more details.
|
|
13
|
-
* */
|
|
14
|
-
error: T;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Common API error structure, established by Dynatrace API guidelines.
|
|
18
|
-
* */
|
|
19
|
-
export interface CommonApiError<T extends CommonErrorDetails & Record<string, any> = CommonErrorDetails & Record<string, any>> {
|
|
20
|
-
/** The error code should be set to the HTTP error code by default.<br>
|
|
21
|
-
* The error code may be set to an API-specific error code which must be properly documented.*/
|
|
22
|
-
code: number;
|
|
23
|
-
/** The error message should be short and precise, it should not contain details.*/
|
|
24
|
-
message: string;
|
|
25
|
-
/**
|
|
26
|
-
* An additional help field may be added which must be a URL to further information on how to deal with the error.<br>
|
|
27
|
-
* This may be some detailed error documentation page or a link to the Dynatrace support system, etc.
|
|
28
|
-
* */
|
|
29
|
-
help?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Additional details about the error may be added in a details field.
|
|
32
|
-
* Refer to *CommonErrorDetails*
|
|
33
|
-
* */
|
|
34
|
-
details?: T;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* *CommonApiError* details object reference. Contains common API error information.
|
|
38
|
-
* This object is used to convey additional information about the error like e.g., which query parameter exactly violated a precondition. <br>
|
|
39
|
-
* Details may contain any fields to further describe the error
|
|
40
|
-
* */
|
|
41
|
-
export interface CommonErrorDetails {
|
|
42
|
-
/**
|
|
43
|
-
* UUID string that represents a reference of the error into e.g., the log file of the service.
|
|
44
|
-
* */
|
|
45
|
-
errorRef?: string;
|
|
46
|
-
/**
|
|
47
|
-
* String containing a 32-character hex integer value that is used for tracing.
|
|
48
|
-
* */
|
|
49
|
-
traceId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* String value representing a more detailed error information than the http response code alone.
|
|
52
|
-
* Must be a single word in CamelCase, and all possible values must be documented.
|
|
53
|
-
* */
|
|
54
|
-
errorCode?: string;
|
|
55
|
-
/**
|
|
56
|
-
* An array of *ConstraintViolation* object, refer to ConstraintViolation object reference for more details.
|
|
57
|
-
* */
|
|
58
|
-
constraintViolations?: ConstraintViolation[];
|
|
59
|
-
/**
|
|
60
|
-
* Must be an array of strings containing a complete list of missing IAM scopes necessary to successfully execute the request.
|
|
61
|
-
* Should be set if the API returns a 403 - Forbidden response in case of missing OAuth scopes.
|
|
62
|
-
* */
|
|
63
|
-
missingScopes?: string[];
|
|
64
|
-
/**
|
|
65
|
-
* Must be an array of strings containing a complete list of missing IAM permissions necessary to successfully execute the request.
|
|
66
|
-
* Should be set if the API returns a 403 - Forbidden response in case of missing OAuth user permissions.
|
|
67
|
-
* */
|
|
68
|
-
missingPermissions?: string[];
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Contains information about an input parameter (path, query or request body)
|
|
72
|
-
* that violated some validation rule of the service API and caused the warning.<br>
|
|
73
|
-
* May contain additional fields further describing the warning.
|
|
74
|
-
* */
|
|
75
|
-
export interface ConstraintViolation extends Record<string, string | undefined> {
|
|
76
|
-
/**
|
|
77
|
-
* Mandatory field message describing the warning.
|
|
78
|
-
* */
|
|
79
|
-
message: string;
|
|
80
|
-
/**
|
|
81
|
-
* Describes the general location of the violating parameter (query parameter, request body, etc.)
|
|
82
|
-
*/
|
|
83
|
-
parameterLocation?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Refers to the violating parameter within the parameterLocation.
|
|
86
|
-
*/
|
|
87
|
-
path?: string;
|
|
88
|
-
}
|