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ourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@dynatrace-sdk/client-document@1.24.2/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * @license\n * Copyright 2023-2025 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// packages/client/document/src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  ApiClientError: () => import_shared_errors8.ApiClientError,\n  ApiGatewayError: () => import_shared_errors8.ApiGatewayError,\n  BadRequest: () => BadRequest,\n  ClaimingOwnedShareNotAllowed: () => ClaimingOwnedShareNotAllowed,\n  ClientRequestError: () => import_shared_errors8.ClientRequestError,\n  Conflict: () => Conflict,\n  DirectSharesClient: () => DirectSharesClient,\n  DocumentAlreadyLocked: () => DocumentAlreadyLocked,\n  DocumentLockingClient: () => DocumentLockingClient,\n  DocumentNotFound: () => DocumentNotFound,\n  DocumentOrSnapshotNotFound: () => DocumentOrSnapshotNotFound,\n  DocumentTooLarge: () => DocumentTooLarge,\n  DocumentsClient: () => DocumentsClient,\n  EnvironmentSharesClient: () => EnvironmentSharesClient,\n  ErrorEnvelopeError: () => ErrorEnvelopeError,\n  Forbidden: () => Forbidden,\n  InsufficientStorage: () => InsufficientStorage,\n  InternalServerError: () => InternalServerError,\n  InvalidResponseError: () => import_shared_errors8.InvalidResponseError,\n  LockedDocumentsLimitReached: () => LockedDocumentsLimitReached,\n  ServiceUnavailable: () => ServiceUnavailable,\n  ShareAlreadyExists: () => ShareAlreadyExists,\n  ShareNotFound: () => ShareNotFound,\n  SnapshotCreationRateLimitExceeded: () => SnapshotCreationRateLimitExceeded,\n  SnapshotNotFound: () => SnapshotNotFound,\n  TrashClient: () => TrashClient,\n  TrashedDocumentNotFound: () => TrashedDocumentNotFound,\n  Unauthorized: () => Unauthorized,\n  directSharesClient: () => directSharesClient,\n  documentLockingClient: () => documentLockingClient,\n  documentsClient: () => documentsClient,\n  environmentSharesClient: () => environmentSharesClient,\n  isApiClientError: () => import_shared_errors8.isApiClientError,\n  isApiGatewayError: () => import_shared_errors8.isApiGatewayError,\n  isBadRequest: () => isBadRequest,\n  isClaimingOwnedShareNotAllowed: () => isClaimingOwnedShareNotAllowed,\n  isClientRequestError: () => import_shared_errors8.isClientRequestError,\n  isConflict: () => isConflict,\n  isDocumentAlreadyLocked: () => isDocumentAlreadyLocked,\n  isDocumentNotFound: () => isDocumentNotFound,\n  isDocumentOrSnapshotNotFound: () => isDocumentOrSnapshotNotFound,\n  isDocumentTooLarge: () => isDocumentTooLarge,\n  isErrorEnvelopeError: () => isErrorEnvelopeError,\n  isForbidden: () => isForbidden,\n  isInsufficientStorage: () => isInsufficientStorage,\n  isInternalServerError: () => isInternalServerError,\n  isInvalidResponseError: () => import_shared_errors8.isInvalidResponseError,\n  isLockedDocumentsLimitReached: () => isLockedDocumentsLimitReached,\n  isServiceUnavailable: () => isServiceUnavailable,\n  isShareAlreadyExists: () => isShareAlreadyExists,\n  isShareNotFound: () => isShareNotFound,\n  isSnapshotCreationRateLimitExceeded: () => isSnapshotCreationRateLimitExceeded,\n  isSnapshotNotFound: () => isSnapshotNotFound,\n  isTrashedDocumentNotFound: () => isTrashedDocumentNotFound,\n  isUnauthorized: () => isUnauthorized,\n  trashClient: () => trashClient\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// packages/client/document/src/lib/apis/direct-shares-api.ts\nvar import_http_client = require(\"@dynatrace-sdk/http-client\");\nvar import_shared_errors3 = require(\"@dynatrace-sdk/shared-errors\");\n\n// packages/client/document/src/lib/error-envelopes/api-gateway-errors-handler.ts\nvar import_shared_errors = require(\"@dynatrace-sdk/shared-errors\");\nasync function apiGatewayErrorsHandler(response) {\n  if (response.headers?.[\"dynatrace-response-source\"] === \"API Gateway\") {\n    const responseBody = await response.body(\"json\");\n    throw new import_shared_errors.ApiGatewayError(response, responseBody);\n  }\n}\n\n// packages/client/document/src/lib/error-envelopes/get-error-message.ts\nfunction serializeData(data) {\n  try {\n    return JSON.stringify(data);\n  } catch (e) {\n    return String(data);\n  }\n}\nfunction getMessagesFromErrorDetails(details) {\n  const messages = [];\n  Object.entries(details).forEach(([name, data]) => {\n    if (!data)\n      return;\n    const serializedData = serializeData(data);\n    switch (name) {\n      case \"missingScopes\":\n        messages.push(`Missing scopes: ${serializedData}`);\n        break;\n      default:\n        messages.push(`${name}: ${serializedData}`);\n    }\n  }, []);\n  return messages;\n}\nfunction getErrorMessage(errorBody, defaultMessage) {\n  const error = errorBody;\n  const msg = error?.error?.message || defaultMessage;\n  const details = error?.error?.details || {};\n  return [msg, ...getMessagesFromErrorDetails(details)].join(\". \");\n}\n\n// packages/client/document/src/lib/error-envelopes/error-envelope-error.ts\nvar import_shared_errors2 = require(\"@dynatrace-sdk/shared-errors\");\nvar ErrorEnvelopeError = class extends import_shared_errors2.ClientRequestError {\n  isErrorEnvelopeError = true;\n};\nfunction isErrorEnvelopeError(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/bad-request.ts\nvar BadRequest = class extends ErrorEnvelopeError {\n  isBadRequest = true;\n  name = \"BadRequest\";\n};\nfunction isBadRequest(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isBadRequest === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/document-not-found.ts\nvar DocumentNotFound = class extends ErrorEnvelopeError {\n  isDocumentNotFound = true;\n  name = \"DocumentNotFound\";\n};\nfunction isDocumentNotFound(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isDocumentNotFound === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/forbidden.ts\nvar Forbidden = class extends ErrorEnvelopeError {\n  isForbidden = true;\n  name = \"Forbidden\";\n};\nfunction isForbidden(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isForbidden === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/internal-server-error.ts\nvar InternalServerError = class extends ErrorEnvelopeError {\n  isInternalServerError = true;\n  name = \"InternalServerError\";\n};\nfunction isInternalServerError(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isInternalServerError === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/service-unavailable.ts\nvar ServiceUnavailable = class extends ErrorEnvelopeError {\n  isServiceUnavailable = true;\n  name = \"ServiceUnavailable\";\n};\nfunction isServiceUnavailable(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isServiceUnavailable === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/share-already-exists.ts\nvar ShareAlreadyExists = class extends ErrorEnvelopeError {\n  isShareAlreadyExists = true;\n  name = \"ShareAlreadyExists\";\n};\nfunction isShareAlreadyExists(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isShareAlreadyExists === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/share-not-found.ts\nvar ShareNotFound = class extends ErrorEnvelopeError {\n  isShareNotFound = true;\n  name = \"ShareNotFound\";\n};\nfunction isShareNotFound(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isShareNotFound === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/unauthorized.ts\nvar Unauthorized = class extends ErrorEnvelopeError {\n  isUnauthorized = true;\n  name = \"Unauthorized\";\n};\nfunction isUnauthorized(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isUnauthorized === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/utils/transformations.ts\nvar defaultRuleConfig = {\n  force: false,\n  datetime: false\n};\nfunction mergeKeys(key1, key2) {\n  if (!key1)\n    return key2;\n  if (!key2)\n    return key1;\n  return `${key1}.${key2}`;\n}\nfunction matchKey(key, keys) {\n  const match = keys.find((k) => {\n    const ruleKey = Array.isArray(k) ? k[0] : k;\n    if (key === ruleKey) {\n      return true;\n    }\n    if (!key || !ruleKey) {\n      return false;\n    }\n    const [keyParts, ruleKeyParts] = [key.split(\".\"), ruleKey.split(\".\")];\n    const [keyPartsReversed, ruleKeyPartsReversed] = [[...keyParts].reverse(), [...ruleKeyParts].reverse()];\n    let wildcard = false;\n    let matchResult = true;\n    keyParts.forEach((keyPart, idx) => {\n      if (keyPart !== ruleKeyParts[idx] && !wildcard) {\n        if (ruleKeyParts[idx] === \"**\") {\n          wildcard = true;\n        } else if (ruleKeyParts[idx] === \"*\") {\n          wildcard = true;\n        } else {\n          matchResult = false;\n        }\n      }\n    });\n    wildcard = false;\n    keyPartsReversed.forEach((keyPart, idx) => {\n      if (keyPart !== ruleKeyPartsReversed[idx] && !wildcard) {\n        if (ruleKeyPartsReversed[idx] === \"**\") {\n          wildcard = true;\n        } else if (ruleKeyPartsReversed[idx] === \"*\") {\n          wildcard = true;\n        } else {\n          matchResult = false;\n        }\n      }\n    });\n    return matchResult;\n  });\n  if (match) {\n    return Array.isArray(match) ? match : [match, defaultRuleConfig];\n  }\n  return null;\n}\nvar potentialMatchForRoot = (pattern, key) => pattern.startsWith(key) || pattern.startsWith(\"*\") || pattern.startsWith(\"**\");\nvar potentialMatch = (pattern, key) => pattern.startsWith(key) || pattern.includes(\"*\") || pattern.includes(\"**\");\nfunction partialMatch(key, keyPatterns) {\n  if (key.includes(\".\")) {\n    const keyParts = key.split(\".\");\n    let currentKey = \"\";\n    return !!keyParts.find((keyPart) => {\n      currentKey = mergeKeys(currentKey, keyPart);\n      const isRoot = !currentKey.includes(\".\");\n      if (isRoot) {\n        return !!keyPatterns.find((k) => potentialMatchForRoot(k, currentKey));\n      }\n      return !!keyPatterns.find((k) => potentialMatch(k, currentKey));\n    });\n  }\n  return !!keyPatterns.find((k) => potentialMatchForRoot(k, key));\n}\nvar dateTimePattern = /^((?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))(Z|[+-]\\d{2}:\\d{2})?)$/i;\nfunction isDateLike(value) {\n  if (typeof value === \"string\") {\n    return dateTimePattern.test(value);\n  }\n  return false;\n}\nfunction transformValue(value, rules, direction) {\n  const { force, datetime } = rules;\n  if (direction === \"to\") {\n    return force || isDateLike(value) ? new Date(value) : value;\n  }\n  if (value instanceof Date) {\n    const iso = value.toISOString();\n    return datetime ? iso : iso.split(\"T\")[0];\n  }\n  return value;\n}\nfunction walk(obj, direction, keyPatterns, flatKeyPatterns, currentKey = \"\") {\n  if (keyPatterns.length <= 0) {\n    return obj;\n  }\n  if (!partialMatch(currentKey, flatKeyPatterns)) {\n    return obj;\n  }\n  if (Array.isArray(obj)) {\n    obj.forEach((item, idx) => {\n      if (typeof item === \"object\" && item !== null) {\n        walk(item, direction, keyPatterns, flatKeyPatterns, currentKey);\n      } else {\n        const match = matchKey(currentKey, keyPatterns);\n        if (match) {\n          obj[idx] = transformValue(obj[idx], match[1], direction);\n        }\n      }\n    });\n  }\n  if (typeof obj === \"object\" && obj !== null && !Array.isArray(obj)) {\n    for (const key of Object.keys(obj)) {\n      const mergedKey = mergeKeys(currentKey, key);\n      const match = matchKey(mergedKey, keyPatterns);\n      if (match) {\n        obj[key] = transformValue(obj[key], match[1], direction);\n      }\n      walk(obj[key], direction, keyPatterns, flatKeyPatterns, mergedKey);\n    }\n  }\n  return obj;\n}\nfunction flattenKeys(keys) {\n  return keys.map((k) => Array.isArray(k) ? k[0] : k);\n}\nfunction transform(direction, object, keys) {\n  const flatKeys = flattenKeys(keys);\n  return walk(object, direction, keys, flatKeys);\n}\nfunction transformRequest(object, keys) {\n  return transform(\"from\", object, keys);\n}\nfunction transformResponse(object, keys) {\n  return transform(\"to\", object, keys);\n}\nfunction transformToFormData(value, fields) {\n  return fields.map((field) => transformToFormDataField(value[field.key], field)).filter((field) => Boolean(field));\n}\nfunction transformToFormDataField(value, field) {\n  if (!field.required && value === void 0) {\n    return null;\n  }\n  return { name: field.key, type: field.type, value: field.type === \"text\" ? String(value) : value };\n}\nfunction transformFromFormData(formData, fields) {\n  return Object.fromEntries(\n    formData.map(({ name, value }) => [\n      name,\n      fields[name]?.type === \"json\" ? transformResponse(\n        JSON.parse(value),\n        fields[name].transformations\n      ) : value\n    ])\n  );\n}\n\n// packages/client/document/src/lib/utils/url-helpers.ts\nvar encodeQueryParam = (key, value) => {\n  const encodedKey = encodeURIComponent(key);\n  return `${encodedKey}=${encodeURIComponent(typeof value === \"number\" ? value : String(value))}`;\n};\nvar addExplodedArrayQueryParam = (query, key) => {\n  const arrayValue = query[key];\n  return arrayValue.map((value) => encodeQueryParam(key, value)).join(\"&\");\n};\nvar addNonExplodedArrayQueryParams = (query, key) => {\n  const encodedKey = encodeURIComponent(key);\n  const encodedParamsList = query[key].map((value) => encodeURIComponent(typeof value === \"number\" ? value : String(value))).join(\",\");\n  return `${encodedKey}=${encodedParamsList}`;\n};\nvar addQueryParam = (query, key) => encodeQueryParam(key, query[key]);\nvar arrayQueryParams = (query, key, explode) => {\n  return explode ? addExplodedArrayQueryParam(query, key) : addNonExplodedArrayQueryParams(query, key);\n};\nvar toQueryString = (rawQuery, flags = {}) => {\n  const query = rawQuery || {};\n  const keys = Object.keys(query).filter((key) => typeof query[key] !== \"undefined\");\n  const queryString = keys.map(\n    (key) => Array.isArray(query[key]) ? arrayQueryParams(query, key, flags.explode?.hasOwnProperty(key) ? flags.explode[key] : true) : addQueryParam(query, key)\n  ).join(\"&\");\n  return queryString ? `?${queryString}` : \"\";\n};\n\n// packages/client/document/src/lib/apis/direct-shares-api.ts\nvar DirectSharesClient = class {\n  httpClient;\n  shouldTransformDates = true;\n  /**\n   * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a DirectSharesClient. Custom http client should implement {HttpClient} interface.\n   * @param {ApiClientOptions} [options] - Optional configuration for SDK Client.\n   * @example\n   * const directSharesClientNodeJs = new DirectSharesClient(yourCustomImplementation);\n   */\n  constructor(httpClientImplementation, options) {\n    this.httpClient = httpClientImplementation;\n    this.shouldTransformDates = options?.transformDates ?? true;\n  }\n  /**\n   * List your direct-shares.\n   *\n   * **Required scope:** document:direct-shares:read<br/><br/>List all shares of your documents.\n   *\n   * If you are only concerned with a specific document's shares, or a specific share, you can use the `filter` parameter to narrow down the result set. This does *not* circumvent the restriction of being able to only get shares of *your own* documents. If you attempt to retrieve shares of another user's document, the result set will be empty.\n   *\n   * *Note, that at the moment we offer a naive pagination, and therefore interim mutations can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<DirectShareList>} A list of your direct-shares.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await directSharesClient.listDirectShares();\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async listDirectShares(config = {}) {\n    if (!config) {\n      throw new import_shared_errors3.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filter: config.filter,\n      \"page-key\": config.pageKey,\n      page: config.page,\n      \"page-size\": config.pageSize\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors3.InvalidResponseError(\n          `DirectSharesClient.listDirectShares:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e) || (0, import_shared_errors3.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.listDirectShares:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.listDirectShares:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.listDirectShares:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.listDirectShares:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.listDirectShares:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Create a direct-share for one of your own documents.\n   *\n   * **Required scope:** document:direct-shares:write<br/><br/>Create a direct-share for a document owned by you. The share can be used to grant access to a specific set of users and/or groups, via [addRecipients](#/Direct%20Shares/addUserShareRecipients)\n   *\n   * You can optionally add users and/or groups which will directly be registered as recipients of the share. The users and groups are specified via their sso-ids. The maximum number of recipients is 1000.\n   *\n   * The validity of the SSO-users and SSO-groups is not verified. It's technically possible, albeit pointless, to add non-existing users and groups.\n   *\n   * The share can be created with either `read` or `read-write` access.\n   *\n   * A document can have maximally one direct-share per access type, therefore it's not possible to create multiple `read`-shares or multiple `read-write`-shares for a single document.\n   *\n   * This means, that you can create one `read`-share for a document, and this single `read`-share can be used to give read-access to an arbitrary number of users (and/or groups). The same applies to a `read-write`-share.\n   *\n   * @returns {Promise<DirectShare>} A new share for the specified document has been created.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await directSharesClient.createDirectShare({\n   *   body: {\n   *     documentId: \"...\",\n   *     access: \"...\",\n   *     recipients: [\n   *       {\n   *         id: \"441664f0-23c9-40ef-b344-18c02c23d789\",\n   *         type: \"group\",\n   *       },\n   *     ],\n   *   },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {ShareAlreadyExists} Share creation failed - a share with the specified permission already exists for the document.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async createDirectShare(config) {\n    if (!config) {\n      throw new import_shared_errors3.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [201].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors3.InvalidResponseError(\n          `DirectSharesClient.createDirectShare:201`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e) || (0, import_shared_errors3.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareAlreadyExists(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Share creation failed - a share with the specified permission already exists for the document.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ShareAlreadyExists) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.createDirectShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Retrieve one of your direct-shares.\n   *\n   * **Required scope:** document:direct-shares:read<br/><br/>Retrieve a direct-share via its id.\n   *\n   * Only the share's owner is permitted to do this.\n   *\n   * @returns {Promise<DirectShare>} A direct-share.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await directSharesClient.getDirectShare({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getDirectShare(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares/${config.id}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors3.InvalidResponseError(\n          `DirectSharesClient.getDirectShare:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e) || (0, import_shared_errors3.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Delete one of your direct-shares.\n   *\n   * **Required scope:** document:direct-shares:delete<br/><br/>Delete the share. This will *not* delete the share's document.\n   *\n   * You can only delete shares of your own documents.\n   *\n   * This operation effectively revokes the access of all of the share's recipients.\n   *\n   * Be aware that deleting a share does not necessarily prevent a user from accessing a document, as the user might still have access via another share (of the same document). E.g., if a user has 'read' and 'read-write' access (via one 'read' and another 'read-write' share), and the 'read' share gets deleted, access is still granted to the user via the other 'read-write' share.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await directSharesClient.deleteDirectShare({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async deleteDirectShare(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares/${config.id}`,\n        method: \"DELETE\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.deleteDirectShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.deleteDirectShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.deleteDirectShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.deleteDirectShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.deleteDirectShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * List the recipients of one of your direct-shares.\n   *\n   * **Required scope:** document:direct-shares:read<br/><br/>Retrieve a share's recipients. If there are groups among the recipieints, the groups always appear before the users.\n   *\n   * Only share's owner is permitted to do this.\n   *\n   * @returns {Promise<DirectShareRecipientList>} A list of recipients of the direct-share.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await directSharesClient.getDirectShareRecipients({\n   *     id: \"...\",\n   *   });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getDirectShareRecipients(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares/${config.id}/recipients`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors3.InvalidResponseError(\n          `DirectSharesClient.getDirectShareRecipients:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e) || (0, import_shared_errors3.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShareRecipients:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShareRecipients:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShareRecipients:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShareRecipients:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.getDirectShareRecipients:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Add recipients to the share.\n   *\n   * **Required scope:** document:direct-shares:write<br/><br/>Add one or multiple SSO-users and/or SSO-groups to this share. The affected users immediately gain access to the document.\n   *\n   * Only share's owner is permitted to do this. The maximum number of recipients is 1000.\n   *\n   * The validity of the SSO-users and SSO-groups is not verified. It's technically possible, albeit pointless, to add non-existing users and groups.\n   *\n   * Already added users or groups are ignored.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await directSharesClient.addDirectShareRecipients({\n   *     id: \"...\",\n   *     body: {\n   *       recipients: [\n   *         {\n   *           id: \"441664f0-23c9-40ef-b344-18c02c23d789\",\n   *           type: \"group\",\n   *         },\n   *       ],\n   *     },\n   *   });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async addDirectShareRecipients(config) {\n    if (!config) {\n      throw new import_shared_errors3.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares/${config.id}/recipients/add`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.addDirectShareRecipients:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Remove recipients from the share.\n   *\n   * **Required scope:** document:direct-shares:write<br/><br/>Remove one or multiple recipients from the share. The affected users immediately lose access to the document.\n   *\n   * Only share's owner is permitted to do this. The maximum number of recipients is 1000.\n   *\n   * Non-existing users or groups are ignored.\n   *\n   * @example <caption>Code example</caption>\n   * import { directSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await directSharesClient.removeDirectShareRecipients({\n   *     id: \"...\",\n   *     body: { ids: [\"...\"] },\n   *   });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async removeDirectShareRecipients(config) {\n    if (!config) {\n      throw new import_shared_errors3.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/direct-shares/${config.id}/recipients/remove`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors3.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors3.InvalidResponseError(\n              `DirectSharesClient.removeDirectShareRecipients:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors3.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors3.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors3.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n};\nvar directSharesClient = /* @__PURE__ */ new DirectSharesClient(import_http_client.httpClient);\n\n// packages/client/document/src/lib/apis/document-locking-api.ts\nvar import_http_client2 = require(\"@dynatrace-sdk/http-client\");\nvar import_shared_errors4 = require(\"@dynatrace-sdk/shared-errors\");\n\n// packages/client/document/src/lib/error-envelopes/responses/document-already-locked.ts\nvar DocumentAlreadyLocked = class extends ErrorEnvelopeError {\n  isDocumentAlreadyLocked = true;\n  name = \"DocumentAlreadyLocked\";\n};\nfunction isDocumentAlreadyLocked(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isDocumentAlreadyLocked === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/locked-documents-limit-reached.ts\nvar LockedDocumentsLimitReached = class extends ErrorEnvelopeError {\n  isLockedDocumentsLimitReached = true;\n  name = \"LockedDocumentsLimitReached\";\n};\nfunction isLockedDocumentsLimitReached(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isLockedDocumentsLimitReached === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/apis/document-locking-api.ts\nvar DocumentLockingClient = class {\n  httpClient;\n  shouldTransformDates = true;\n  /**\n   * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a DocumentLockingClient. Custom http client should implement {HttpClient} interface.\n   * @param {ApiClientOptions} [options] - Optional configuration for SDK Client.\n   * @example\n   * const documentLockingClientNodeJs = new DocumentLockingClient(yourCustomImplementation);\n   */\n  constructor(httpClientImplementation, options) {\n    this.httpClient = httpClientImplementation;\n    this.shouldTransformDates = options?.transformDates ?? true;\n  }\n  /**\n   * Inspect whether the document is locked.\n   *\n   * **Required scope:** document:documents:read<br/><br/>Inspect whether the document is locked.\n   *\n   * This provides the information about whether the document is locked and the user that currently owns the lock.\n   *\n   * @returns {Promise<DocumentLockDetails>} Lock details for a document.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentLockingClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentLockingClient.inspectLock({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async inspectLock(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}:inspect-lock`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors4.InvalidResponseError(\n          `DocumentLockingClient.inspectLock:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client2.isHttpClientAbortError)(e) || (0, import_shared_errors4.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client2.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors4.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.inspectLock:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors4.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors4.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors4.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Acquire the lock on the document.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Acquire the lock on the document. A user can lock a maximum of five documents at any given time. Once the lock is acquired by the user, other users cannot make any updates to the document.\n   *\n   * The user acquiring the lock can optionally specify the duration for which the lock can be attained. However, the specified duration must not exceed the maximum allowed duration of 15 minutes. If not specified, the lock is acquired for 10 minutes.\n   *\n   * If the user who has currently locked the document attempts to acquire the lock for the same document again, the duration of the lock gets extended by the specified duration or by a default duration of 10 minutes, if not specified.\n   *\n   * The other users would not be allowed to acquire the lock on an already locked document.\n   *\n   * @returns {Promise<AcquireLockResult>} The lock has been acquired by the user.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentLockingClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentLockingClient.acquireLock({\n   *   id: \"...\",\n   *   body: { documentVersion: 10 },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {DocumentAlreadyLocked} Lock acquisition failed as the document is already locked.\n   * @throws {LockedDocumentsLimitReached} Lock acquisition failed as number of locked documents reached or exceeded the allowed limit.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async acquireLock(config) {\n    if (!config) {\n      throw new import_shared_errors4.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}:acquire-lock`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [[\"lockedUntil\", { datetime: true }]]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors4.InvalidResponseError(\n          `DocumentLockingClient.acquireLock:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client2.isHttpClientAbortError)(e) || (0, import_shared_errors4.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client2.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors4.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentAlreadyLocked(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Lock acquisition failed as the document is already locked.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentAlreadyLocked) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 429: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new LockedDocumentsLimitReached(\n              `429`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Lock acquisition failed as number of locked documents reached or exceeded the allowed limit.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof LockedDocumentsLimitReached) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:429`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.acquireLock:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors4.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors4.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors4.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Release the lock on the document.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Release the lock on the document.\n   * The lock on the document can be released only by the user who owns it.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentLockingClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentLockingClient.releaseLock({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async releaseLock(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}:release-lock`,\n        method: \"POST\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client2.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client2.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors4.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors4.InvalidResponseError(\n              `DocumentLockingClient.releaseLock:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors4.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors4.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors4.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n};\nvar documentLockingClient = /* @__PURE__ */ new DocumentLockingClient(import_http_client2.httpClient);\n\n// packages/client/document/src/lib/apis/documents-api.ts\nvar import_http_client3 = require(\"@dynatrace-sdk/http-client\");\nvar import_shared_errors5 = require(\"@dynatrace-sdk/shared-errors\");\n\n// packages/client/document/src/lib/error-envelopes/responses/conflict.ts\nvar Conflict = class extends ErrorEnvelopeError {\n  isConflict = true;\n  name = \"Conflict\";\n};\nfunction isConflict(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isConflict === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/document-or-snapshot-not-found.ts\nvar DocumentOrSnapshotNotFound = class extends ErrorEnvelopeError {\n  isDocumentOrSnapshotNotFound = true;\n  name = \"DocumentOrSnapshotNotFound\";\n};\nfunction isDocumentOrSnapshotNotFound(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isDocumentOrSnapshotNotFound === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/document-too-large.ts\nvar DocumentTooLarge = class extends ErrorEnvelopeError {\n  isDocumentTooLarge = true;\n  name = \"DocumentTooLarge\";\n};\nfunction isDocumentTooLarge(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isDocumentTooLarge === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/insufficient-storage.ts\nvar InsufficientStorage = class extends ErrorEnvelopeError {\n  isInsufficientStorage = true;\n  name = \"InsufficientStorage\";\n};\nfunction isInsufficientStorage(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isInsufficientStorage === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/snapshot-creation-rate-limit-exceeded.ts\nvar SnapshotCreationRateLimitExceeded = class extends ErrorEnvelopeError {\n  isSnapshotCreationRateLimitExceeded = true;\n  name = \"SnapshotCreationRateLimitExceeded\";\n};\nfunction isSnapshotCreationRateLimitExceeded(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isSnapshotCreationRateLimitExceeded === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/error-envelopes/responses/snapshot-not-found.ts\nvar SnapshotNotFound = class extends ErrorEnvelopeError {\n  isSnapshotNotFound = true;\n  name = \"SnapshotNotFound\";\n};\nfunction isSnapshotNotFound(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isSnapshotNotFound === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/apis/documents-api.ts\nvar DocumentsClient = class {\n  httpClient;\n  shouldTransformDates = true;\n  /**\n   * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a DocumentsClient. Custom http client should implement {HttpClient} interface.\n   * @param {ApiClientOptions} [options] - Optional configuration for SDK Client.\n   * @example\n   * const documentsClientNodeJs = new DocumentsClient(yourCustomImplementation);\n   */\n  constructor(httpClientImplementation, options) {\n    this.httpClient = httpClientImplementation;\n    this.shouldTransformDates = options?.transformDates ?? true;\n  }\n  /**\n   * List all documents accessible to you.\n   *\n   * **Required scope:** document:documents:read<br/><br/>List the metadata of all documents accessible to you.\n   *\n   *\n   * This includes your own documents, as well as other users' documents which have been shared with you.\n   *\n   *\n   * *Note, that at the moment we offer a naive pagination, and therefore interim document mutations and/or an\n   * insufficient sort clause, if provided, can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<DocumentList>} A list of metadata objects of documents which are accessible to you.\n   *\n   * Note, that this includes your own documents as well as other users' documents which are shared with you.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.listDocuments();\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async listDocuments(config = {}) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filter: config.filter,\n      sort: config.sort,\n      \"page-key\": config.pageKey,\n      page: config.page,\n      \"page-size\": config.pageSize,\n      \"admin-access\": config.adminAccess,\n      \"add-fields\": config.addFields\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"documents.modificationInfo.createdTime\", { datetime: true }],\n          [\"documents.modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"documents.userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.listDocuments:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listDocuments:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listDocuments:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listDocuments:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listDocuments:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listDocuments:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Create a new document.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Create a new document which is then owned by you (the user specified by the provided Authorization header). The document is not accessible to other users.\n   *\n   * The document's `name` and `type` must be provided. These two properties can later be used for filtering purposes, when [listing accessible documents](#/Documents/listDocuments).\n   *\n   * Be aware, that the `type` is not the same as the Content-Type of the document, but instead adds user-defined semantics of which the document-store is entirely agnostic.\n   *\n   * The content size must not exceed **50 MB**.\n   *\n   * @returns {Promise<DocumentMetaData>} A new document has been created.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.createDocument({\n   *   body: { name: \"...\", type: \"...\", content: \"...\" },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentTooLarge} Maximum content size exceeded.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InsufficientStorage} The storage quota or maximum number of documents has been exceeded.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async createDocument(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = transformToFormData(\n      this.shouldTransformDates ? transformRequest(config.body, []) : config.body,\n      [\n        { key: \"name\", type: \"text\", required: true },\n        { key: \"type\", type: \"text\", required: true },\n        { key: \"description\", type: \"text\", required: false },\n        { key: \"content\", type: \"binary\", required: true },\n        { key: \"externalId\", type: \"text\", required: false }\n      ]\n    );\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents`,\n        method: \"POST\",\n        requestBodyType: \"form-data\",\n        body: encodedBody,\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [201].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"modificationInfo.createdTime\", { datetime: true }],\n          [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.createDocument:201`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 413: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentTooLarge(\n              `413`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Maximum content size exceeded.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentTooLarge) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:413`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 507: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InsufficientStorage(\n              `507`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"The storage quota or maximum number of documents has been exceeded.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InsufficientStorage) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.createDocument:507`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Retrieve metadata and content.\n   *\n   * **Required scope:** document:documents:read<br/><br/>Return metadata and content in one multipart response.\n   *\n   * If the `snapshot-version` param is provided, the metadata and content of the specified snapshot gets returned instead. This requires write-access to the document.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * @returns {Promise<GetDocumentResponse>} Metadata and content in a multipart response.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.getDocument({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentOrSnapshotNotFound} Document or snapshot not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getDocument(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filename: config.filename,\n      \"snapshot-version\": config.snapshotVersion,\n      \"admin-access\": config.adminAccess,\n      \"add-fields\": config.addFields\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"multipart/form-data, application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"form-data\");\n      try {\n        return transformFromFormData(responseValue, {\n          metadata: {\n            type: \"json\",\n            transformations: [\n              [\"modificationInfo.createdTime\", { datetime: true }],\n              [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n              [\"userContext.lastAccessedTime\", { datetime: true }]\n            ]\n          },\n          content: { type: \"binary\" }\n        });\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.getDocument:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentOrSnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document or snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentOrSnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Delete the document\n   *\n   * **Required scope:** document:documents:delete<br/><br/>Move the document into the trash. It is no longer accessible until it's restored from the trash.\n   *\n   * [Optimistic locking](https://dt-url.net/platform-services-locking) is enforced via the `optimistic-locking-version` parameter.\n   *\n   * You must own the document in order to delete it.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.deleteDocument({\n   *   id: \"...\",\n   *   optimisticLockingVersion: \"...\",\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {Conflict} Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async deleteDocument(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      \"optimistic-locking-version\": config.optimisticLockingVersion,\n      \"admin-access\": config.adminAccess\n    });\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}${query}`,\n        method: \"DELETE\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Conflict(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Conflict) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Update metadata and content. Optionally, create a snapshot.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Update metadata and/or the content of the document.\n   *\n   * Name, type and content must be non-empty, but are optional. At least one of them must be provided.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * As part of this operation, you can optionally create a snapshot of the updated document.\n   * In that case, if the document has more than 50 snapshots, its oldest snapshot gets automatically deleted.\n   * It's not possible to create more than 5 snapshots per 60 seconds, per document.\n   *\n   * @returns {Promise<UpdateDocumentMetadata>} Result of updating metadata & content. Contains document metadata and snapshot metadata.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.updateDocument({\n   *   id: \"...\",\n   *   optimisticLockingVersion: \"...\",\n   *   body: {},\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {SnapshotCreationRateLimitExceeded} Too many snapshots have been created for this document in the recent time. Try again later.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async updateDocument(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = transformToFormData(\n      this.shouldTransformDates ? transformRequest(config.body, []) : config.body,\n      [\n        { key: \"name\", type: \"text\", required: false },\n        { key: \"type\", type: \"text\", required: false },\n        { key: \"description\", type: \"text\", required: false },\n        { key: \"content\", type: \"binary\", required: false },\n        { key: \"snapshotDescription\", type: \"text\", required: false },\n        { key: \"isPrivate\", type: \"text\", required: false }\n      ]\n    );\n    const query = toQueryString({\n      \"optimistic-locking-version\": config.optimisticLockingVersion,\n      \"create-snapshot\": config.createSnapshot\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}${query}`,\n        method: \"PATCH\",\n        requestBodyType: \"form-data\",\n        body: encodedBody,\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"documentMetadata.modificationInfo.createdTime\", { datetime: true }],\n          [\"documentMetadata.modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"documentMetadata.userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.updateDocument:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 429: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new SnapshotCreationRateLimitExceeded(\n              `429`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Too many snapshots have been created for this document in the recent time. Try again later.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof SnapshotCreationRateLimitExceeded) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:429`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Retrieve document metadata.\n   *\n   * **Required scope:** document:documents:read<br/><br/>Retrieve a document's metadata.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * If the `snapshot-version` param is provided, the metadata of the specified snapshot gets returned instead. This requires write-access to the document.\n   *\n   * This endpoint supports external ids.\n   *\n   * @returns {Promise<DocumentMetaData>} Metadata of document\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.getDocumentMetadata({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentOrSnapshotNotFound} Document or snapshot not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getDocumentMetadata(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      \"snapshot-version\": config.snapshotVersion,\n      \"admin-access\": config.adminAccess,\n      \"add-fields\": config.addFields\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/metadata${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"modificationInfo.createdTime\", { datetime: true }],\n          [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.getDocumentMetadata:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocumentMetadata:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocumentMetadata:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentOrSnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document or snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentOrSnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocumentMetadata:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocumentMetadata:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getDocumentMetadata:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Update document metadata\n   *\n   * **Required scope:** document:documents:write<br/><br/>Partially update a document's user-defined metadata. At least one property must be updated, otherwise the operation fails.\n   *\n   * The document's content is not affected by this operation.\n   *\n   * [Optimistic locking](https://dt-url.net/platform-services-locking) is enforced via the `optimistic-locking-version` parameter.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * @returns {Promise<DocumentMetaData>} The document has been updated. The updated metadata is returned.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.updateDocumentMetadata({\n   *   id: \"...\",\n   *   optimisticLockingVersion: \"...\",\n   *   body: {},\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {Conflict} Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async updateDocumentMetadata(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = transformToFormData(\n      this.shouldTransformDates ? transformRequest(config.body, []) : config.body,\n      [\n        { key: \"name\", type: \"text\", required: false },\n        { key: \"type\", type: \"text\", required: false }\n      ]\n    );\n    const query = toQueryString({ \"optimistic-locking-version\": config.optimisticLockingVersion });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/metadata${query}`,\n        method: \"PATCH\",\n        requestBodyType: \"form-data\",\n        body: encodedBody,\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"modificationInfo.createdTime\", { datetime: true }],\n          [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.updateDocumentMetadata:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Conflict(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Conflict) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentMetadata:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Download document content\n   *\n   * **Required scope:** document:documents:read<br/><br/>Download latest document content.\n   *\n   * If the `snapshot-version` param is provided, the content of the specified snapshot gets returned instead. This requires write-access to the document.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * The response's `Content-Type` header has the same value that has been used during the upload.\n   *\n   * @returns {Promise<Binary>} Content of the document\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.downloadDocumentContent({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentOrSnapshotNotFound} Document or snapshot not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async downloadDocumentContent(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filename: config.filename,\n      \"snapshot-version\": config.snapshotVersion,\n      \"admin-access\": config.adminAccess\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/content${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"*/*, application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"binary\");\n      try {\n        return responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.downloadDocumentContent:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.downloadDocumentContent:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.downloadDocumentContent:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentOrSnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document or snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentOrSnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.downloadDocumentContent:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.downloadDocumentContent:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.downloadDocumentContent:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Update document content\n   *\n   * **Required scope:** document:documents:write<br/><br/>Update a document's content, by completely replacing it.\n   *\n   * The document must be accessible to you - therefore, you must either own it or you have received access through sharing.\n   *\n   * [Optimistic locking](https://dt-url.net/platform-services-locking) is enforced via the `optimistic-locking-version` parameter.\n   *\n   * The content size must be greater than 0 and must not exceed `50 MB`.\n   *\n   * The `Content-Type` header must be set for the multipart part; it will be used as the (new) content type of the document. Illegal (non-mime-type) content types result in a `400 - Bad Request` error.\n   *\n   * The `Content-Disposition` header must be set for the multipart part;\n   *\n   * @returns {Promise<DocumentMetaData>} Document content successfully updated\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.updateDocumentContent({\n   *   id: \"...\",\n   *   optimisticLockingVersion: \"...\",\n   *   body: { content: \"...\" },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {Conflict} Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InsufficientStorage} The storage quota or maximum number of documents has been exceeded.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async updateDocumentContent(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = transformToFormData(\n      this.shouldTransformDates ? transformRequest(config.body, []) : config.body,\n      [{ key: \"content\", type: \"binary\", required: true }]\n    );\n    const query = toQueryString({ \"optimistic-locking-version\": config.optimisticLockingVersion });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/content${query}`,\n        method: \"PUT\",\n        requestBodyType: \"form-data\",\n        body: encodedBody,\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"modificationInfo.createdTime\", { datetime: true }],\n          [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.updateDocumentContent:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Conflict(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Conflict) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 507: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InsufficientStorage(\n              `507`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"The storage quota or maximum number of documents has been exceeded.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InsufficientStorage) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.updateDocumentContent:507`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * List all snapshots of the document\n   *\n   * **Required scope:** document:documents:read<br/><br/>Returns metadata of all snapshots of the document, in descending order of the snapshot's creation date. Requires write-access to the document.\n   *\n   * You can apply pagination via the `pageKey` and `pageSize` parameters.\n   *\n   * *Note, that at the moment we offer a naive pagination, and therefore interim mutations can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<SnapshotList>} A list of snapshots of the document.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.listSnapshots({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async listSnapshots(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({ \"page-key\": config.pageKey, page: config.page, \"page-size\": config.pageSize });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/snapshots${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [[\"snapshots.modificationInfo.createdTime\", { datetime: true }]]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.listSnapshots:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listSnapshots:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listSnapshots:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listSnapshots:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listSnapshots:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.listSnapshots:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Retrieve snapshot metadata.\n   *\n   * **Required scope:** document:documents:read<br/><br/>Retrieve snapshot metadata. Requires write-access to the document.\n   *\n   * This does not return data of the snapshotted document, instead it returns data about the snapshot itself.\n   *\n   * @returns {Promise<SnapshotMetadata>} Metadata of a specific snapshot.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.getSnapshotMetadata({\n   *   id: \"...\",\n   *   snapshotVersion: 10,\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {SnapshotNotFound} Snapshot not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getSnapshotMetadata(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/snapshots/${config.snapshotVersion}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [[\"modificationInfo.createdTime\", { datetime: true }]]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.getSnapshotMetadata:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getSnapshotMetadata:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getSnapshotMetadata:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new SnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof SnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getSnapshotMetadata:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getSnapshotMetadata:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.getSnapshotMetadata:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Delete the snapshot.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Irrevocably delete the snapshot. Only the document owner may do this.\n   *\n   * This operation does not affect the current state of the document.\n   *\n   * Instead, it prevents that the document may ever be restored to the state it had when the snapshot was created.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.deleteSnapshot({\n   *   id: \"...\",\n   *   snapshotVersion: 10,\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {SnapshotNotFound} Snapshot not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async deleteSnapshot(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/snapshots/${config.snapshotVersion}`,\n        method: \"DELETE\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteSnapshot:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteSnapshot:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new SnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof SnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteSnapshot:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteSnapshot:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.deleteSnapshot:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Restore the snapshot.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Reset the document to the state it had when the snapshot was created. Requires write-access to the document.\n   *\n   * If no snapshot of the current document state exists, then a new snapshot is created\n   * before restoring the selected snapshot.\n   * If the document has more than 50 snapshots, its oldest snapshot gets automatically deleted.\n   *\n   * This operation only changes the document's content. It doesn't change ownership or access/sharing data.\n   *\n   * @returns {Promise<RestoreDocumentResult>} Document has been restored. New snapshot has been created.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.restoreSnapshot({\n   *   id: \"...\",\n   *   snapshotVersion: 10,\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentOrSnapshotNotFound} Document or snapshot not found.\n   * @throws {Conflict} Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async restoreSnapshot(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}/snapshots/${config.snapshotVersion}:restore`,\n        method: \"POST\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"documentMetadata.modificationInfo.createdTime\", { datetime: true }],\n          [\"documentMetadata.modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"documentMetadata.userContext.lastAccessedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.restoreSnapshot:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentOrSnapshotNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document or snapshot not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentOrSnapshotNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Conflict(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Optimistic locking failed, or the document is actively locked by another user, or some other conflict.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Conflict) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.restoreSnapshot:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Transfers ownership of the document to a new owner.\n   *\n   * **Required scope:** document:documents:write<br/><br/>Transfers ownership of the document to a new owner. The previous owner loses access to the document. This operation can only be performed by the document owner.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.transferDocumentOwner({\n   *   id: \"...\",\n   *   body: { newOwnerId: \"...\" },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async transferDocumentOwner(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    const query = toQueryString({ \"admin-access\": config.adminAccess });\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/documents/${config.id}:transfer-owner${query}`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.transferDocumentOwner:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.transferDocumentOwner:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.transferDocumentOwner:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.transferDocumentOwner:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.transferDocumentOwner:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Bulk-delete multiple documents\n   *\n   * **Required scope:** document:documents:delete<br/><br/>Move the documents with the given IDs into the trash. They are no longer accessible until they're restored from the trash.\n   *\n   * @returns {Promise<BulkDeleteResponse>} Result of the bulk operation for the individual objects.\n   *\n   * @example <caption>Code example</caption>\n   * import { documentsClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await documentsClient.bulkDeleteDocument({\n   *   body: { ids: [\"...\"] },\n   * });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async bulkDeleteDocument(config) {\n    if (!config) {\n      throw new import_shared_errors5.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/documents:delete`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors5.InvalidResponseError(\n          `DocumentsClient.bulkDeleteDocument:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client3.isHttpClientAbortError)(e) || (0, import_shared_errors5.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client3.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors5.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.bulkDeleteDocument:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.bulkDeleteDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.bulkDeleteDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors5.InvalidResponseError(\n              `DocumentsClient.bulkDeleteDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors5.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors5.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors5.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n};\nvar documentsClient = /* @__PURE__ */ new DocumentsClient(import_http_client3.httpClient);\n\n// packages/client/document/src/lib/apis/environment-shares-api.ts\nvar import_http_client4 = require(\"@dynatrace-sdk/http-client\");\nvar import_shared_errors6 = require(\"@dynatrace-sdk/shared-errors\");\n\n// packages/client/document/src/lib/error-envelopes/responses/claiming-owned-share-not-allowed.ts\nvar ClaimingOwnedShareNotAllowed = class extends ErrorEnvelopeError {\n  isClaimingOwnedShareNotAllowed = true;\n  name = \"ClaimingOwnedShareNotAllowed\";\n};\nfunction isClaimingOwnedShareNotAllowed(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isClaimingOwnedShareNotAllowed === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/apis/environment-shares-api.ts\nvar EnvironmentSharesClient = class {\n  httpClient;\n  shouldTransformDates = true;\n  /**\n   * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a EnvironmentSharesClient. Custom http client should implement {HttpClient} interface.\n   * @param {ApiClientOptions} [options] - Optional configuration for SDK Client.\n   * @example\n   * const environmentSharesClientNodeJs = new EnvironmentSharesClient(yourCustomImplementation);\n   */\n  constructor(httpClientImplementation, options) {\n    this.httpClient = httpClientImplementation;\n    this.shouldTransformDates = options?.transformDates ?? true;\n  }\n  /**\n   * List your environment-shares.\n   *\n   * **Required scope:** document:environment-shares:read<br/><br/>List all environment-shares of your own documents.\n   *\n   * If you are only concerned with a specific document's environment-shares, or a specific share, you can use the `filter` parameter to narrow down the result set. Note, that this does *not* circumvent the restriction of being able to only get environment-shares of *your own* documents. If you attempt to retrieve environment-shares of another user's document, the result set will be empty.\n   *\n   * Furthermore, you can apply pagination via the `pageKey`, `page` and `pageSize` parameters.\n   *\n   * *Note, that at the moment we offer a naive pagination, and therefore interim mutations can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<EnvironmentShareList>} A list of your environment-shares.\n   * If the list was paginated (see `pageKey`, `page` and `pageSize`), and there are more environment-shares available, you will find a non-empty `nextPageKey` which can be used for a follow-up query. The `totalCount` property will let you know the number of all matching environment-shares, as if no pagination would have been applied.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.listEnvironmentShares();\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async listEnvironmentShares(config = {}) {\n    if (!config) {\n      throw new import_shared_errors6.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filter: config.filter,\n      \"page-key\": config.pageKey,\n      page: config.page,\n      \"page-size\": config.pageSize\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors6.InvalidResponseError(\n          `EnvironmentSharesClient.listEnvironmentShares:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e) || (0, import_shared_errors6.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.listEnvironmentShares:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.listEnvironmentShares:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.listEnvironmentShares:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.listEnvironmentShares:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.listEnvironmentShares:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Create an environment-share for one of your own documents.\n   *\n   * **Required scope:** document:environment-shares:write<br/><br/>Create a document share, which can be used to give one or multiple other users access to this document.\n   *\n   * This is only possible if you are the owner of the document.\n   *\n   * A share can be created with either `read` or `read-write` access.\n   *\n   * A document can have maximally one share per access type, therefore it's not possible to create multiple read-shares or multiple 'read-write'-shares for a single document.\n   *\n   * This means, that you can create one read-share for a document, and this single read-share can be used to give read-access to an arbitrary number of users. The same applies to a 'read-write'-share.\n   *\n   * Creating a share does *not* automatically allow users to access the document - only those users who explicitly [claim the share](#/Environment%20Shares/claimEnvironmentShare) gain access to the document.\n   *\n   * Revoking access from users can be done by [deleting the share](#/Environment%20Shares/deleteEnvironmentShare).\n   *\n   * @returns {Promise<EnvironmentShare>} A new share for the specified document has been created.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.createEnvironmentShare({\n   *     body: { documentId: \"...\", access: \"...\" },\n   *   });\n   *\n   * @throws {BadRequest} Malformed request or invalid parameters.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {DocumentNotFound} Document not found.\n   * @throws {ShareAlreadyExists} Share creation failed - a share with the specified permission already exists for the document.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async createEnvironmentShare(config) {\n    if (!config) {\n      throw new import_shared_errors6.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const encodedBody = this.shouldTransformDates ? transformRequest(config.body, []) : config.body;\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares`,\n        method: \"POST\",\n        requestBodyType: \"json\",\n        body: encodedBody,\n        headers: {\n          \"Content-Type\": \"application/json\",\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [201].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors6.InvalidResponseError(\n          `EnvironmentSharesClient.createEnvironmentShare:201`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e) || (0, import_shared_errors6.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new BadRequest(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Malformed request or invalid parameters.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof BadRequest) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new DocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof DocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 409: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareAlreadyExists(\n              `409`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Share creation failed - a share with the specified permission already exists for the document.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ShareAlreadyExists) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:409`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.createEnvironmentShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Retrieve one of your environment-shares.\n   *\n   * **Required scope:** document:environment-shares:read<br/><br/>Retrieve a share via its id.\n   *\n   * Only the share's owner is permitted to do this.\n   *\n   * @returns {Promise<EnvironmentShare>} An environment-share.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.getEnvironmentShare({\n   *     id: \"...\",\n   *   });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getEnvironmentShare(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares/${config.id}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors6.InvalidResponseError(\n          `EnvironmentSharesClient.getEnvironmentShare:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e) || (0, import_shared_errors6.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Delete one of your environment-shares.\n   *\n   * **Required scope:** document:environment-shares:delete<br/><br/>Delete the share. This will *not* delete the share's document.\n   *\n   * Only the share's owner is permitted to do this.\n   *\n   * This operation effectively revokes the access which has been granted to *all users* which have claimed this share. This is the only way to revoke access to your document from other users. It's not possible to revoke access of individual users.\n   *\n   * Be aware that deleting a share does not necessarily prevent a user from accessing a document, as the user might still have access via another share (of the same document). E.g., if a user has read- and readwrite-access (via one read-share and another readwrite-share), and the read-share gets deleted, access is still granted to the user via the readwrite-share.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.deleteEnvironmentShare({\n   *     id: \"...\",\n   *   });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async deleteEnvironmentShare(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares/${config.id}`,\n        method: \"DELETE\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.deleteEnvironmentShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.deleteEnvironmentShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.deleteEnvironmentShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.deleteEnvironmentShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.deleteEnvironmentShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Claim another user's environment-share.\n   *\n   * **Required scope:** document:environment-shares:claim<br/><br/>Claim this environment-share, therefore gaining access to the share's document. From thereafter, the document will be accessible to you with the specific permissions defined by the share. You can then access the document as usual, via the same endpoints which you would use to access your own documents.\n   *\n   * Claiming your own shares is not possible. You can only claim shares of documents belonging to other users *of the same environment*.\n   *\n   * Once you have claimed access to a document, you can not revoke that access again.\n   *\n   * The document's owner can revoke your access by deleting the share. This will effectively revoke the access you have been granted by claiming this share.\n   *\n   * You can claim multiple shares of the same document, and each share will grant you different permissions.\n   *\n   * Claiming the same share multiple times does not have any effect.\n   *\n   * @returns {Promise<EnvironmentShareClaimResult>} You have successfully claimed this share and can now access the document with the granted permissions.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.claimEnvironmentShare({\n   *     id: \"...\",\n   *   });\n   *\n   * @throws {ClaimingOwnedShareNotAllowed} A user can't claim one of their own shares.\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async claimEnvironmentShare(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares/${config.id}/claim`,\n        method: \"PUT\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors6.InvalidResponseError(\n          `EnvironmentSharesClient.claimEnvironmentShare:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e) || (0, import_shared_errors6.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 400: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ClaimingOwnedShareNotAllowed(\n              `400`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"A user can't claim one of their own shares.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ClaimingOwnedShareNotAllowed) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:400`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.claimEnvironmentShare:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * List the claimers of one of your environment-shares.\n   *\n   * **Required scope:** document:environment-shares:read<br/><br/>\n   * Retrieve a share's claimers.\n   *\n   * Only the share's owner is permitted to do this.\n   *\n   * You can control the result's pagination via the `pageKey`, `page` and `pageSize` parameters.\n   *\n   * *Note, that at the moment we offer a naive pagination, and therefore interim document mutations and/or an\n   * insufficient sort clause, if provided, can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<EnvironmentShareClaimerList>} A list of users who have claimed the environment-share.\n   *\n   * @example <caption>Code example</caption>\n   * import { environmentSharesClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data =\n   *   await environmentSharesClient.getEnvironmentShareClaimers(\n   *     { id: \"...\" },\n   *   );\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {ShareNotFound} Share not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async getEnvironmentShareClaimers(config) {\n    if (!config) {\n      throw new import_shared_errors6.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({ \"page-key\": config.pageKey, page: config.page, \"page-size\": config.pageSize });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/environment-shares/${config.id}/claimers${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors6.InvalidResponseError(\n          `EnvironmentSharesClient.getEnvironmentShareClaimers:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client4.isHttpClientAbortError)(e) || (0, import_shared_errors6.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client4.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors6.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShareClaimers:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShareClaimers:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ShareNotFound(`404`, response, errorBody, getErrorMessage(errorBody, \"Share not found.\"), e);\n          } catch (err) {\n            if (err instanceof ShareNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShareClaimers:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShareClaimers:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors6.InvalidResponseError(\n              `EnvironmentSharesClient.getEnvironmentShareClaimers:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors6.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors6.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors6.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n};\nvar environmentSharesClient = /* @__PURE__ */ new EnvironmentSharesClient(import_http_client4.httpClient);\n\n// packages/client/document/src/lib/apis/trash-api.ts\nvar import_http_client5 = require(\"@dynatrace-sdk/http-client\");\nvar import_shared_errors7 = require(\"@dynatrace-sdk/shared-errors\");\n\n// packages/client/document/src/lib/error-envelopes/responses/trashed-document-not-found.ts\nvar TrashedDocumentNotFound = class extends ErrorEnvelopeError {\n  isTrashedDocumentNotFound = true;\n  name = \"TrashedDocumentNotFound\";\n};\nfunction isTrashedDocumentNotFound(e) {\n  return e?.isApiClientError === true && e?.isClientRequestError === true && e?.isErrorEnvelopeError === true && e?.isTrashedDocumentNotFound === true && e instanceof Error;\n}\n\n// packages/client/document/src/lib/apis/trash-api.ts\nvar TrashClient = class {\n  httpClient;\n  shouldTransformDates = true;\n  /**\n   * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a TrashClient. Custom http client should implement {HttpClient} interface.\n   * @param {ApiClientOptions} [options] - Optional configuration for SDK Client.\n   * @example\n   * const trashClientNodeJs = new TrashClient(yourCustomImplementation);\n   */\n  constructor(httpClientImplementation, options) {\n    this.httpClient = httpClientImplementation;\n    this.shouldTransformDates = options?.transformDates ?? true;\n  }\n  /**\n   * List your deleted documents.\n   *\n   * **Required scope:** document:trash.documents:read<br/><br/>Lists all documents, owned by you, which currently reside in the trash.\n   *\n   * Note that documents in the trash are irreversibly deleted after 30 days.\n   *\n   * *Note that at the moment we offer a naive pagination, and therefore interim document mutations and/or an\n   *     insufficient sort clause, if provided, can lead to result inconsistencies (such as duplicates, missing entries).*\n   *\n   * @returns {Promise<TrashDocumentList>} A list of documents in the trash.\n   *\n   * @example <caption>Code example</caption>\n   * import { trashClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await trashClient.listTrashedDocuments();\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async listTrashedDocuments(config = {}) {\n    if (!config) {\n      throw new import_shared_errors7.ApiClientError(\"API client error\", \"API client call is missing mandatory config parameter\");\n    }\n    const query = toQueryString({\n      filter: config.filter,\n      \"page-key\": config.pageKey,\n      page: config.page,\n      \"page-size\": config.pageSize\n    });\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/trash/documents${query}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [[\"documents.deletionInfo.deletedTime\", { datetime: true }]]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors7.InvalidResponseError(\n          `TrashClient.listTrashedDocuments:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client5.isHttpClientAbortError)(e) || (0, import_shared_errors7.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client5.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors7.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.listTrashedDocuments:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.listTrashedDocuments:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.listTrashedDocuments:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.listTrashedDocuments:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors7.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors7.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors7.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Inspect the deleted document.\n   *\n   * **Required scope:** document:trash.documents:read<br/><br/>Inspect the deleted document's metadata.\n   * Only the document owner is permitted to do this.\n   *\n   * @returns {Promise<TrashDocument>} Metadata of a deleted document.\n   *\n   * @example <caption>Code example</caption>\n   * import { trashClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await trashClient.inspectTrashedDocument({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {TrashedDocumentNotFound} Trashed document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async inspectTrashedDocument(config) {\n    try {\n      const response = await this.httpClient.send({\n        url: `/platform/document/v1/trash/documents/${config.id}`,\n        method: \"GET\",\n        headers: {\n          Accept: \"application/json\"\n        },\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [200].includes(status);\n        }\n      });\n      const responseValue = await response.body(\"json\");\n      try {\n        return this.shouldTransformDates ? transformResponse(responseValue, [\n          [\"modificationInfo.createdTime\", { datetime: true }],\n          [\"modificationInfo.lastModifiedTime\", { datetime: true }],\n          [\"deletionInfo.deletedTime\", { datetime: true }]\n        ]) : responseValue;\n      } catch (err) {\n        throw new import_shared_errors7.InvalidResponseError(\n          `TrashClient.inspectTrashedDocument:200`,\n          err,\n          responseValue,\n          void 0,\n          void 0,\n          response\n        );\n      }\n    } catch (e) {\n      if ((0, import_http_client5.isHttpClientAbortError)(e) || (0, import_shared_errors7.isInvalidResponseError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client5.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors7.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.inspectTrashedDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.inspectTrashedDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new TrashedDocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Trashed document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof TrashedDocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.inspectTrashedDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.inspectTrashedDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.inspectTrashedDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors7.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors7.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors7.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Irreversibly destroy the document.\n   *\n   * **Required scope:** document:trash.documents:delete<br/><br/>This operation irreversibly destroys the document.\n   * Only the document owner is permitted to do this.\n   *\n   * @example <caption>Code example</caption>\n   * import { trashClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await trashClient.deleteTrashedDocument({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {TrashedDocumentNotFound} Trashed document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async deleteTrashedDocument(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/trash/documents/${config.id}`,\n        method: \"DELETE\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client5.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client5.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors7.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.deleteTrashedDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.deleteTrashedDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new TrashedDocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Trashed document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof TrashedDocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.deleteTrashedDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.deleteTrashedDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.deleteTrashedDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors7.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors7.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors7.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n  /**\n   * Restore the deleted document.\n   *\n   * **Required scope:** document:trash.documents:restore<br/><br/>This operation restores the document from the trash.\n   * All users who had access before the deletion regain their access to the document.\n   * Only the document owner is permitted to do this.\n   *\n   * @example <caption>Code example</caption>\n   * import { trashClient } from \"@dynatrace-sdk/client-document\";\n   *\n   * const data = await trashClient.restoreTrashedDocument({\n   *   id: \"...\",\n   * });\n   *\n   * @throws {Unauthorized} API token or tenant missing or corrupt.\n   * @throws {Forbidden} Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\n   * @throws {TrashedDocumentNotFound} Trashed document not found.\n   * @throws {InternalServerError} There is a problem in the backend.\n   * @throws {ServiceUnavailable} There is a temporary problem in the backend.\n   * @throws {InvalidResponseError}\n   * @throws {ApiClientError}\n   * @throws {ClientRequestError}\n   */\n  async restoreTrashedDocument(config) {\n    try {\n      await this.httpClient.send({\n        url: `/platform/document/v1/trash/documents/${config.id}/restore`,\n        method: \"POST\",\n        abortSignal: config instanceof EventTarget ? config : config.abortSignal,\n        statusValidator: (status) => {\n          return [204].includes(status);\n        }\n      });\n      return;\n    } catch (e) {\n      if ((0, import_http_client5.isHttpClientAbortError)(e)) {\n        throw e;\n      }\n      if (!(0, import_http_client5.isHttpClientResponseError)(e)) {\n        throw new import_shared_errors7.ApiClientError(\"UnexpectedError\", \"Unexpected error\", e);\n      }\n      const response = e.response;\n      await apiGatewayErrorsHandler(response);\n      switch (response.status) {\n        case 401: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Unauthorized(\n              `401`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"API token or tenant missing or corrupt.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Unauthorized) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.restoreTrashedDocument:401`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 403: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new Forbidden(\n              `403`,\n              response,\n              errorBody,\n              getErrorMessage(\n                errorBody,\n                \"Access forbidden. This usually happens because the user lacks the permission to access the specific endpoint, or because the target entity is not accessible to the user.\"\n              ),\n              e\n            );\n          } catch (err) {\n            if (err instanceof Forbidden) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.restoreTrashedDocument:403`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 404: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new TrashedDocumentNotFound(\n              `404`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"Trashed document not found.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof TrashedDocumentNotFound) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.restoreTrashedDocument:404`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 500: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new InternalServerError(\n              `500`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof InternalServerError) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.restoreTrashedDocument:500`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        case 503: {\n          const responseValue = await response.body(\"json\");\n          try {\n            const errorBody = this.shouldTransformDates ? transformResponse(responseValue, []) : responseValue;\n            throw new ServiceUnavailable(\n              `503`,\n              response,\n              errorBody,\n              getErrorMessage(errorBody, \"There is a temporary problem in the backend.\"),\n              e\n            );\n          } catch (err) {\n            if (err instanceof ServiceUnavailable) {\n              throw err;\n            }\n            throw new import_shared_errors7.InvalidResponseError(\n              `TrashClient.restoreTrashedDocument:503`,\n              err,\n              responseValue,\n              \"ErrorEnvelope\",\n              void 0,\n              response\n            );\n          }\n        }\n        default: {\n          try {\n            const responseValue = await response.body(\"json\");\n            throw new import_shared_errors7.ClientRequestError(\n              `${response.status}`,\n              response,\n              responseValue,\n              getErrorMessage(\n                responseValue,\n                `Unexpected api response: code=${response.status} body=\"${responseValue}\"`\n              ),\n              e\n            );\n          } catch (error) {\n            if (error instanceof import_shared_errors7.ClientRequestError) {\n              throw error;\n            }\n            const responseValue = await response.body(\"text\").catch(() => \"\");\n            throw new import_shared_errors7.InvalidResponseError(\n              `${response.status}`,\n              error,\n              responseValue,\n              \"json\",\n              \"Unexpected api response\",\n              response\n            );\n          }\n        }\n      }\n    }\n  }\n};\nvar trashClient = /* @__PURE__ */ new TrashClient(import_http_client5.httpClient);\n\n// packages/client/document/src/lib/error-envelopes/index.ts\nvar import_shared_errors8 = require(\"@dynatrace-sdk/shared-errors\");\n"]}