UNPKG

wickr-bedrock-bot

Version:

AWS Wickr's own Bedrock Bot

1,404 lines (1,383 loc) 91.7 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var index_exports = {}; __export(index_exports, { AddPermissionCommand: () => AddPermissionCommand, BatchEntryIdsNotDistinct: () => BatchEntryIdsNotDistinct, BatchRequestTooLong: () => BatchRequestTooLong, CancelMessageMoveTaskCommand: () => CancelMessageMoveTaskCommand, ChangeMessageVisibilityBatchCommand: () => ChangeMessageVisibilityBatchCommand, ChangeMessageVisibilityCommand: () => ChangeMessageVisibilityCommand, CreateQueueCommand: () => CreateQueueCommand, DeleteMessageBatchCommand: () => DeleteMessageBatchCommand, DeleteMessageCommand: () => DeleteMessageCommand, DeleteQueueCommand: () => DeleteQueueCommand, EmptyBatchRequest: () => EmptyBatchRequest, GetQueueAttributesCommand: () => GetQueueAttributesCommand, GetQueueUrlCommand: () => GetQueueUrlCommand, InvalidAddress: () => InvalidAddress, InvalidAttributeName: () => InvalidAttributeName, InvalidAttributeValue: () => InvalidAttributeValue, InvalidBatchEntryId: () => InvalidBatchEntryId, InvalidIdFormat: () => InvalidIdFormat, InvalidMessageContents: () => InvalidMessageContents, InvalidSecurity: () => InvalidSecurity, KmsAccessDenied: () => KmsAccessDenied, KmsDisabled: () => KmsDisabled, KmsInvalidKeyUsage: () => KmsInvalidKeyUsage, KmsInvalidState: () => KmsInvalidState, KmsNotFound: () => KmsNotFound, KmsOptInRequired: () => KmsOptInRequired, KmsThrottled: () => KmsThrottled, ListDeadLetterSourceQueuesCommand: () => ListDeadLetterSourceQueuesCommand, ListMessageMoveTasksCommand: () => ListMessageMoveTasksCommand, ListQueueTagsCommand: () => ListQueueTagsCommand, ListQueuesCommand: () => ListQueuesCommand, MessageNotInflight: () => MessageNotInflight, MessageSystemAttributeName: () => MessageSystemAttributeName, MessageSystemAttributeNameForSends: () => MessageSystemAttributeNameForSends, OverLimit: () => OverLimit, PurgeQueueCommand: () => PurgeQueueCommand, PurgeQueueInProgress: () => PurgeQueueInProgress, QueueAttributeName: () => QueueAttributeName, QueueDeletedRecently: () => QueueDeletedRecently, QueueDoesNotExist: () => QueueDoesNotExist, QueueNameExists: () => QueueNameExists, ReceiptHandleIsInvalid: () => ReceiptHandleIsInvalid, ReceiveMessageCommand: () => ReceiveMessageCommand, RemovePermissionCommand: () => RemovePermissionCommand, RequestThrottled: () => RequestThrottled, ResourceNotFoundException: () => ResourceNotFoundException, SQS: () => SQS, SQSClient: () => SQSClient, SQSServiceException: () => SQSServiceException, SendMessageBatchCommand: () => SendMessageBatchCommand, SendMessageCommand: () => SendMessageCommand, SetQueueAttributesCommand: () => SetQueueAttributesCommand, StartMessageMoveTaskCommand: () => StartMessageMoveTaskCommand, TagQueueCommand: () => TagQueueCommand, TooManyEntriesInBatchRequest: () => TooManyEntriesInBatchRequest, UnsupportedOperation: () => UnsupportedOperation, UntagQueueCommand: () => UntagQueueCommand, __Client: () => import_smithy_client.Client, paginateListDeadLetterSourceQueues: () => paginateListDeadLetterSourceQueues, paginateListQueues: () => paginateListQueues }); module.exports = __toCommonJS(index_exports); // src/SQSClient.ts var import_middleware_host_header = require("@aws-sdk/middleware-host-header"); var import_middleware_logger = require("@aws-sdk/middleware-logger"); var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection"); var import_middleware_sdk_sqs = require("@aws-sdk/middleware-sdk-sqs"); var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent"); var import_config_resolver = require("@smithy/config-resolver"); var import_core = require("@smithy/core"); var import_middleware_content_length = require("@smithy/middleware-content-length"); var import_middleware_endpoint = require("@smithy/middleware-endpoint"); var import_middleware_retry = require("@smithy/middleware-retry"); var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider"); // src/endpoint/EndpointParameters.ts var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { return Object.assign(options, { useDualstackEndpoint: options.useDualstackEndpoint ?? false, useFipsEndpoint: options.useFipsEndpoint ?? false, defaultSigningName: "sqs" }); }, "resolveClientEndpointParameters"); var commonParams = { UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, Endpoint: { type: "builtInParams", name: "endpoint" }, Region: { type: "builtInParams", name: "region" }, UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } }; // src/SQSClient.ts var import_runtimeConfig = require("././runtimeConfig"); // src/runtimeExtensions.ts var import_region_config_resolver = require("@aws-sdk/region-config-resolver"); var import_protocol_http = require("@smithy/protocol-http"); var import_smithy_client = require("@smithy/smithy-client"); // src/auth/httpAuthExtensionConfiguration.ts var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; let _credentials = runtimeConfig.credentials; return { setHttpAuthScheme(httpAuthScheme) { const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); if (index === -1) { _httpAuthSchemes.push(httpAuthScheme); } else { _httpAuthSchemes.splice(index, 1, httpAuthScheme); } }, httpAuthSchemes() { return _httpAuthSchemes; }, setHttpAuthSchemeProvider(httpAuthSchemeProvider) { _httpAuthSchemeProvider = httpAuthSchemeProvider; }, httpAuthSchemeProvider() { return _httpAuthSchemeProvider; }, setCredentials(credentials) { _credentials = credentials; }, credentials() { return _credentials; } }; }, "getHttpAuthExtensionConfiguration"); var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { return { httpAuthSchemes: config.httpAuthSchemes(), httpAuthSchemeProvider: config.httpAuthSchemeProvider(), credentials: config.credentials() }; }, "resolveHttpAuthRuntimeConfig"); // src/runtimeExtensions.ts var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { const extensionConfiguration = Object.assign( (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig) ); extensions.forEach((extension) => extension.configure(extensionConfiguration)); return Object.assign( runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration) ); }, "resolveRuntimeExtensions"); // src/SQSClient.ts var SQSClient = class extends import_smithy_client.Client { static { __name(this, "SQSClient"); } /** * The resolved configuration of SQSClient class. This is resolved and normalized from the {@link SQSClientConfig | constructor configuration interface}. */ config; constructor(...[configuration]) { const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); super(_config_0); this.initConfig = _config_0; const _config_1 = resolveClientEndpointParameters(_config_0); const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1); const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2); const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3); const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5); const _config_7 = (0, import_middleware_sdk_sqs.resolveQueueUrlConfig)(_config_6); const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7); const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []); this.config = _config_9; this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_sdk_sqs.getQueueUrlPlugin)(this.config)); this.middlewareStack.use( (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSQSHttpAuthSchemeParametersProvider, identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials }), "identityProviderConfigProvider") }) ); this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); } /** * Destroy underlying resources, like sockets. It's usually not necessary to do this. * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. * Otherwise, sockets might stay open for quite a long time before the server terminates them. */ destroy() { super.destroy(); } }; // src/SQS.ts // src/commands/AddPermissionCommand.ts var import_middleware_serde = require("@smithy/middleware-serde"); // src/protocols/Aws_json1_0.ts var import_core2 = require("@aws-sdk/core"); // src/models/SQSServiceException.ts var SQSServiceException = class _SQSServiceException extends import_smithy_client.ServiceException { static { __name(this, "SQSServiceException"); } /** * @internal */ constructor(options) { super(options); Object.setPrototypeOf(this, _SQSServiceException.prototype); } }; // src/models/models_0.ts var InvalidAddress = class _InvalidAddress extends SQSServiceException { static { __name(this, "InvalidAddress"); } name = "InvalidAddress"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidAddress", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidAddress.prototype); } }; var InvalidSecurity = class _InvalidSecurity extends SQSServiceException { static { __name(this, "InvalidSecurity"); } name = "InvalidSecurity"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidSecurity", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidSecurity.prototype); } }; var OverLimit = class _OverLimit extends SQSServiceException { static { __name(this, "OverLimit"); } name = "OverLimit"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "OverLimit", $fault: "client", ...opts }); Object.setPrototypeOf(this, _OverLimit.prototype); } }; var QueueDoesNotExist = class _QueueDoesNotExist extends SQSServiceException { static { __name(this, "QueueDoesNotExist"); } name = "QueueDoesNotExist"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "QueueDoesNotExist", $fault: "client", ...opts }); Object.setPrototypeOf(this, _QueueDoesNotExist.prototype); } }; var RequestThrottled = class _RequestThrottled extends SQSServiceException { static { __name(this, "RequestThrottled"); } name = "RequestThrottled"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "RequestThrottled", $fault: "client", ...opts }); Object.setPrototypeOf(this, _RequestThrottled.prototype); } }; var UnsupportedOperation = class _UnsupportedOperation extends SQSServiceException { static { __name(this, "UnsupportedOperation"); } name = "UnsupportedOperation"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "UnsupportedOperation", $fault: "client", ...opts }); Object.setPrototypeOf(this, _UnsupportedOperation.prototype); } }; var ResourceNotFoundException = class _ResourceNotFoundException extends SQSServiceException { static { __name(this, "ResourceNotFoundException"); } name = "ResourceNotFoundException"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "ResourceNotFoundException", $fault: "client", ...opts }); Object.setPrototypeOf(this, _ResourceNotFoundException.prototype); } }; var MessageNotInflight = class _MessageNotInflight extends SQSServiceException { static { __name(this, "MessageNotInflight"); } name = "MessageNotInflight"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "MessageNotInflight", $fault: "client", ...opts }); Object.setPrototypeOf(this, _MessageNotInflight.prototype); } }; var ReceiptHandleIsInvalid = class _ReceiptHandleIsInvalid extends SQSServiceException { static { __name(this, "ReceiptHandleIsInvalid"); } name = "ReceiptHandleIsInvalid"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "ReceiptHandleIsInvalid", $fault: "client", ...opts }); Object.setPrototypeOf(this, _ReceiptHandleIsInvalid.prototype); } }; var BatchEntryIdsNotDistinct = class _BatchEntryIdsNotDistinct extends SQSServiceException { static { __name(this, "BatchEntryIdsNotDistinct"); } name = "BatchEntryIdsNotDistinct"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "BatchEntryIdsNotDistinct", $fault: "client", ...opts }); Object.setPrototypeOf(this, _BatchEntryIdsNotDistinct.prototype); } }; var EmptyBatchRequest = class _EmptyBatchRequest extends SQSServiceException { static { __name(this, "EmptyBatchRequest"); } name = "EmptyBatchRequest"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "EmptyBatchRequest", $fault: "client", ...opts }); Object.setPrototypeOf(this, _EmptyBatchRequest.prototype); } }; var InvalidBatchEntryId = class _InvalidBatchEntryId extends SQSServiceException { static { __name(this, "InvalidBatchEntryId"); } name = "InvalidBatchEntryId"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidBatchEntryId", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidBatchEntryId.prototype); } }; var TooManyEntriesInBatchRequest = class _TooManyEntriesInBatchRequest extends SQSServiceException { static { __name(this, "TooManyEntriesInBatchRequest"); } name = "TooManyEntriesInBatchRequest"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "TooManyEntriesInBatchRequest", $fault: "client", ...opts }); Object.setPrototypeOf(this, _TooManyEntriesInBatchRequest.prototype); } }; var QueueAttributeName = { All: "All", ApproximateNumberOfMessages: "ApproximateNumberOfMessages", ApproximateNumberOfMessagesDelayed: "ApproximateNumberOfMessagesDelayed", ApproximateNumberOfMessagesNotVisible: "ApproximateNumberOfMessagesNotVisible", ContentBasedDeduplication: "ContentBasedDeduplication", CreatedTimestamp: "CreatedTimestamp", DeduplicationScope: "DeduplicationScope", DelaySeconds: "DelaySeconds", FifoQueue: "FifoQueue", FifoThroughputLimit: "FifoThroughputLimit", KmsDataKeyReusePeriodSeconds: "KmsDataKeyReusePeriodSeconds", KmsMasterKeyId: "KmsMasterKeyId", LastModifiedTimestamp: "LastModifiedTimestamp", MaximumMessageSize: "MaximumMessageSize", MessageRetentionPeriod: "MessageRetentionPeriod", Policy: "Policy", QueueArn: "QueueArn", ReceiveMessageWaitTimeSeconds: "ReceiveMessageWaitTimeSeconds", RedriveAllowPolicy: "RedriveAllowPolicy", RedrivePolicy: "RedrivePolicy", SqsManagedSseEnabled: "SqsManagedSseEnabled", VisibilityTimeout: "VisibilityTimeout" }; var InvalidAttributeName = class _InvalidAttributeName extends SQSServiceException { static { __name(this, "InvalidAttributeName"); } name = "InvalidAttributeName"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidAttributeName", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidAttributeName.prototype); } }; var InvalidAttributeValue = class _InvalidAttributeValue extends SQSServiceException { static { __name(this, "InvalidAttributeValue"); } name = "InvalidAttributeValue"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidAttributeValue", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidAttributeValue.prototype); } }; var QueueDeletedRecently = class _QueueDeletedRecently extends SQSServiceException { static { __name(this, "QueueDeletedRecently"); } name = "QueueDeletedRecently"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "QueueDeletedRecently", $fault: "client", ...opts }); Object.setPrototypeOf(this, _QueueDeletedRecently.prototype); } }; var QueueNameExists = class _QueueNameExists extends SQSServiceException { static { __name(this, "QueueNameExists"); } name = "QueueNameExists"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "QueueNameExists", $fault: "client", ...opts }); Object.setPrototypeOf(this, _QueueNameExists.prototype); } }; var InvalidIdFormat = class _InvalidIdFormat extends SQSServiceException { static { __name(this, "InvalidIdFormat"); } name = "InvalidIdFormat"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidIdFormat", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidIdFormat.prototype); } }; var PurgeQueueInProgress = class _PurgeQueueInProgress extends SQSServiceException { static { __name(this, "PurgeQueueInProgress"); } name = "PurgeQueueInProgress"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "PurgeQueueInProgress", $fault: "client", ...opts }); Object.setPrototypeOf(this, _PurgeQueueInProgress.prototype); } }; var KmsAccessDenied = class _KmsAccessDenied extends SQSServiceException { static { __name(this, "KmsAccessDenied"); } name = "KmsAccessDenied"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsAccessDenied", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsAccessDenied.prototype); } }; var KmsDisabled = class _KmsDisabled extends SQSServiceException { static { __name(this, "KmsDisabled"); } name = "KmsDisabled"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsDisabled", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsDisabled.prototype); } }; var KmsInvalidKeyUsage = class _KmsInvalidKeyUsage extends SQSServiceException { static { __name(this, "KmsInvalidKeyUsage"); } name = "KmsInvalidKeyUsage"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsInvalidKeyUsage", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsInvalidKeyUsage.prototype); } }; var KmsInvalidState = class _KmsInvalidState extends SQSServiceException { static { __name(this, "KmsInvalidState"); } name = "KmsInvalidState"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsInvalidState", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsInvalidState.prototype); } }; var KmsNotFound = class _KmsNotFound extends SQSServiceException { static { __name(this, "KmsNotFound"); } name = "KmsNotFound"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsNotFound", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsNotFound.prototype); } }; var KmsOptInRequired = class _KmsOptInRequired extends SQSServiceException { static { __name(this, "KmsOptInRequired"); } name = "KmsOptInRequired"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsOptInRequired", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsOptInRequired.prototype); } }; var KmsThrottled = class _KmsThrottled extends SQSServiceException { static { __name(this, "KmsThrottled"); } name = "KmsThrottled"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "KmsThrottled", $fault: "client", ...opts }); Object.setPrototypeOf(this, _KmsThrottled.prototype); } }; var MessageSystemAttributeName = { AWSTraceHeader: "AWSTraceHeader", All: "All", ApproximateFirstReceiveTimestamp: "ApproximateFirstReceiveTimestamp", ApproximateReceiveCount: "ApproximateReceiveCount", DeadLetterQueueSourceArn: "DeadLetterQueueSourceArn", MessageDeduplicationId: "MessageDeduplicationId", MessageGroupId: "MessageGroupId", SenderId: "SenderId", SentTimestamp: "SentTimestamp", SequenceNumber: "SequenceNumber" }; var InvalidMessageContents = class _InvalidMessageContents extends SQSServiceException { static { __name(this, "InvalidMessageContents"); } name = "InvalidMessageContents"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "InvalidMessageContents", $fault: "client", ...opts }); Object.setPrototypeOf(this, _InvalidMessageContents.prototype); } }; var MessageSystemAttributeNameForSends = { AWSTraceHeader: "AWSTraceHeader" }; var BatchRequestTooLong = class _BatchRequestTooLong extends SQSServiceException { static { __name(this, "BatchRequestTooLong"); } name = "BatchRequestTooLong"; $fault = "client"; /** * @internal */ constructor(opts) { super({ name: "BatchRequestTooLong", $fault: "client", ...opts }); Object.setPrototypeOf(this, _BatchRequestTooLong.prototype); } }; // src/protocols/Aws_json1_0.ts var se_AddPermissionCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("AddPermission"); let body; body = JSON.stringify(se_AddPermissionRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_AddPermissionCommand"); var se_CancelMessageMoveTaskCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("CancelMessageMoveTask"); let body; body = JSON.stringify(se_CancelMessageMoveTaskRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_CancelMessageMoveTaskCommand"); var se_ChangeMessageVisibilityCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ChangeMessageVisibility"); let body; body = JSON.stringify(se_ChangeMessageVisibilityRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ChangeMessageVisibilityCommand"); var se_ChangeMessageVisibilityBatchCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ChangeMessageVisibilityBatch"); let body; body = JSON.stringify(se_ChangeMessageVisibilityBatchRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ChangeMessageVisibilityBatchCommand"); var se_CreateQueueCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("CreateQueue"); let body; body = JSON.stringify(se_CreateQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_CreateQueueCommand"); var se_DeleteMessageCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("DeleteMessage"); let body; body = JSON.stringify(se_DeleteMessageRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_DeleteMessageCommand"); var se_DeleteMessageBatchCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("DeleteMessageBatch"); let body; body = JSON.stringify(se_DeleteMessageBatchRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_DeleteMessageBatchCommand"); var se_DeleteQueueCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("DeleteQueue"); let body; body = JSON.stringify(se_DeleteQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_DeleteQueueCommand"); var se_GetQueueAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("GetQueueAttributes"); let body; body = JSON.stringify(se_GetQueueAttributesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_GetQueueAttributesCommand"); var se_GetQueueUrlCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("GetQueueUrl"); let body; body = JSON.stringify(se_GetQueueUrlRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_GetQueueUrlCommand"); var se_ListDeadLetterSourceQueuesCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ListDeadLetterSourceQueues"); let body; body = JSON.stringify(se_ListDeadLetterSourceQueuesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ListDeadLetterSourceQueuesCommand"); var se_ListMessageMoveTasksCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ListMessageMoveTasks"); let body; body = JSON.stringify(se_ListMessageMoveTasksRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ListMessageMoveTasksCommand"); var se_ListQueuesCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ListQueues"); let body; body = JSON.stringify(se_ListQueuesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ListQueuesCommand"); var se_ListQueueTagsCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ListQueueTags"); let body; body = JSON.stringify(se_ListQueueTagsRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ListQueueTagsCommand"); var se_PurgeQueueCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("PurgeQueue"); let body; body = JSON.stringify(se_PurgeQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_PurgeQueueCommand"); var se_ReceiveMessageCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("ReceiveMessage"); let body; body = JSON.stringify(se_ReceiveMessageRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_ReceiveMessageCommand"); var se_RemovePermissionCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("RemovePermission"); let body; body = JSON.stringify(se_RemovePermissionRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_RemovePermissionCommand"); var se_SendMessageCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("SendMessage"); let body; body = JSON.stringify(se_SendMessageRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_SendMessageCommand"); var se_SendMessageBatchCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("SendMessageBatch"); let body; body = JSON.stringify(se_SendMessageBatchRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_SendMessageBatchCommand"); var se_SetQueueAttributesCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("SetQueueAttributes"); let body; body = JSON.stringify(se_SetQueueAttributesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_SetQueueAttributesCommand"); var se_StartMessageMoveTaskCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("StartMessageMoveTask"); let body; body = JSON.stringify(se_StartMessageMoveTaskRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_StartMessageMoveTaskCommand"); var se_TagQueueCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("TagQueue"); let body; body = JSON.stringify(se_TagQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_TagQueueCommand"); var se_UntagQueueCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = sharedHeaders("UntagQueue"); let body; body = JSON.stringify(se_UntagQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", void 0, body); }, "se_UntagQueueCommand"); var de_AddPermissionCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_AddPermissionCommand"); var de_CancelMessageMoveTaskCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_CancelMessageMoveTaskCommand"); var de_ChangeMessageVisibilityCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_ChangeMessageVisibilityCommand"); var de_ChangeMessageVisibilityBatchCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ChangeMessageVisibilityBatchCommand"); var de_CreateQueueCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_CreateQueueCommand"); var de_DeleteMessageCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_DeleteMessageCommand"); var de_DeleteMessageBatchCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_DeleteMessageBatchCommand"); var de_DeleteQueueCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_DeleteQueueCommand"); var de_GetQueueAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_GetQueueAttributesCommand"); var de_GetQueueUrlCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_GetQueueUrlCommand"); var de_ListDeadLetterSourceQueuesCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ListDeadLetterSourceQueuesCommand"); var de_ListMessageMoveTasksCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ListMessageMoveTasksCommand"); var de_ListQueuesCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ListQueuesCommand"); var de_ListQueueTagsCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ListQueueTagsCommand"); var de_PurgeQueueCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_PurgeQueueCommand"); var de_ReceiveMessageCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = de_ReceiveMessageResult(data, context); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_ReceiveMessageCommand"); var de_RemovePermissionCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_RemovePermissionCommand"); var de_SendMessageCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_SendMessageCommand"); var de_SendMessageBatchCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_SendMessageBatchCommand"); var de_SetQueueAttributesCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_SetQueueAttributesCommand"); var de_StartMessageMoveTaskCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } const data = await (0, import_core2.parseJsonBody)(output.body, context); let contents = {}; contents = (0, import_smithy_client._json)(data); const response = { $metadata: deserializeMetadata(output), ...contents }; return response; }, "de_StartMessageMoveTaskCommand"); var de_TagQueueCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_TagQueueCommand"); var de_UntagQueueCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } await (0, import_smithy_client.collectBody)(output.body, context); const response = { $metadata: deserializeMetadata(output) }; return response; }, "de_UntagQueueCommand"); var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, body: await (0, import_core2.parseJsonErrorBody)(output.body, context) }; populateBodyWithQueryCompatibility(parsedOutput, output.headers); const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { case "InvalidAddress": case "com.amazonaws.sqs#InvalidAddress": throw await de_InvalidAddressRes(parsedOutput, context); case "InvalidSecurity": case "com.amazonaws.sqs#InvalidSecurity": throw await de_InvalidSecurityRes(parsedOutput, context); case "OverLimit": case "com.amazonaws.sqs#OverLimit": throw await de_OverLimitRes(parsedOutput, context); case "QueueDoesNotExist": case "com.amazonaws.sqs#QueueDoesNotExist": throw await de_QueueDoesNotExistRes(parsedOutput, context); case "RequestThrottled": case "com.amazonaws.sqs#RequestThrottled": throw await de_RequestThrottledRes(parsedOutput, context); case "UnsupportedOperation": case "com.amazonaws.sqs#UnsupportedOperation": throw await de_UnsupportedOperationRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.sqs#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "MessageNotInflight": case "com.amazonaws.sqs#MessageNotInflight": throw await de_MessageNotInflightRes(parsedOutput, context); case "ReceiptHandleIsInvalid": case "com.amazonaws.sqs#ReceiptHandleIsInvalid": throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); case "BatchEntryIdsNotDistinct": case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); case "EmptyBatchRequest": case "com.amazonaws.sqs#EmptyBatchRequest": throw await de_EmptyBatchRequestRes(parsedOutput, context); case "InvalidBatchEntryId": case "com.amazonaws.sqs#InvalidBatchEntryId": throw await de_InvalidBatchEntryIdRes(parsedOutput, context); case "TooManyEntriesInBatchRequest": case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); case "InvalidAttributeName": case "com.amazonaws.sqs#InvalidAttributeName": throw await de_InvalidAttributeNameRes(parsedOutput, context); case "InvalidAttributeValue": case "com.amazonaws.sqs#InvalidAttributeValue": throw await de_InvalidAttributeValueRes(parsedOutput, context); case "QueueDeletedRecently": case "com.amazonaws.sqs#QueueDeletedRecently": throw await de_QueueDeletedRecentlyRes(parsedOutput, context); case "QueueNameExists": case "com.amazonaws.sqs#QueueNameExists": throw await de_QueueNameExistsRes(parsedOutput, context); case "InvalidIdFormat": case "com.amazonaws.sqs#InvalidIdFormat": throw await de_InvalidIdFormatRes(parsedOutput, context); case "PurgeQueueInProgress": case "com.amazonaws.sqs#PurgeQueueInProgress": throw await de_PurgeQueueInProgressRes(parsedOutput, context); case "KmsAccessDenied": case "com.amazonaws.sqs#KmsAccessDenied": throw await de_KmsAccessDeniedRes(parsedOutput, context); case "KmsDisabled": case "com.amazonaws.sqs#KmsDisabled": throw await de_KmsDisabledRes(parsedOutput, context); case "KmsInvalidKeyUsage": case "com.amazonaws.sqs#KmsInvalidKeyUsage": throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); case "KmsInvalidState": case "com.amazonaws.sqs#KmsInvalidState": throw await de_KmsInvalidStateRes(parsedOutput, context); case "KmsNotFound": case "com.amazonaws.sqs#KmsNotFound": throw await de_KmsNotFoundRes(parsedOutput, context); case "KmsOptInRequired": case "com.amazonaws.sqs#KmsOptInRequired": throw await de_KmsOptInRequiredRes(parsedOutput, context); case "KmsThrottled": case "com.amazonaws.sqs#KmsThrottled": throw await de_KmsThrottledRes(parsedOutput, context); case "InvalidMessageContents": case "com.amazonaws.sqs#InvalidMessageContents": throw await de_InvalidMessageContentsRes(parsedOutput, context); case "BatchRequestTooLong": case "com.amazonaws.sqs#BatchRequestTooLong": throw await de_BatchRequestTooLongRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ output, parsedBody, errorCode }); } }, "de_CommandError"); var de_BatchEntryIdsNotDistinctRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new BatchEntryIdsNotDistinct({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_BatchEntryIdsNotDistinctRes"); var de_BatchRequestTooLongRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new BatchRequestTooLong({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_BatchRequestTooLongRes"); var de_EmptyBatchRequestRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new EmptyBatchRequest({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_EmptyBatchRequestRes"); var de_InvalidAddressRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidAddress({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidAddressRes"); var de_InvalidAttributeNameRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidAttributeName({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidAttributeNameRes"); var de_InvalidAttributeValueRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidAttributeValue({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidAttributeValueRes"); var de_InvalidBatchEntryIdRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidBatchEntryId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidBatchEntryIdRes"); var de_InvalidIdFormatRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidIdFormat({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidIdFormatRes"); var de_InvalidMessageContentsRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidMessageContents({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceException)(exception, body); }, "de_InvalidMessageContentsRes"); var de_InvalidSecurityRes = /* @__PURE__ */ __name(async (parsedOutput, context) => { const body = parsedOutput.body; const deserialized = (0, import_smithy_client._json)(body); const exception = new InvalidSecurity({ $metadata: deserializeMetadata(parsedOutput), ...deserialized }); return (0, import_smithy_client.decorateServiceExcepti