@aws-amplify/auth
Version:
Auth category of aws-amplify
31 lines (28 loc) • 919 B
text/typescript
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';
import {
ServiceClientFactoryInput,
VerifyUserAttributeCommandInput,
VerifyUserAttributeCommandOutput,
} from './types';
import { cognitoUserPoolTransferHandler } from './shared/handler';
import {
createUserPoolDeserializer,
createUserPoolSerializer,
} from './shared/serde';
import { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants';
export const createVerifyUserAttributeClient = (
config: ServiceClientFactoryInput,
) =>
composeServiceApi(
cognitoUserPoolTransferHandler,
createUserPoolSerializer<VerifyUserAttributeCommandInput>(
'VerifyUserAttribute',
),
createUserPoolDeserializer<VerifyUserAttributeCommandOutput>(),
{
...DEFAULT_SERVICE_CLIENT_API_CONFIG,
...config,
},
);