{"version":3,"file":"clearMessages.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/clearMessages.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { defaultStorage } from '@aws-amplify/core';\nimport { PINPOINT_KEY_PREFIX, STORAGE_KEY_SUFFIX } from '../utils';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Clear locally cached messages.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown if In App messaging hasn't been initialized.\n * @returns A promise that will resolve when the operation is complete.\n * @example\n * ```ts\n * // Clear locally cached messages.\n * await clearMessages();\n *\n * ```\n */\nexport async function clearMessages() {\n    assertIsInitialized();\n    const key = `${PINPOINT_KEY_PREFIX}${STORAGE_KEY_SUFFIX}`;\n    await defaultStorage.removeItem(key);\n}\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,aAAa,GAAG;AACtC,IAAI,mBAAmB,EAAE;AACzB,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,CAAC;AAC7D,IAAI,MAAM,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC;AACxC;;;;"}