|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 4 | +import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 5 | + |
| 6 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 7 | +import type { GetVerificationRequest, GetVerificationResponse } from "../models/models_0"; |
| 8 | +import type { |
| 9 | + PartnerCentralAccountClientResolvedConfig, |
| 10 | + ServiceInputTypes, |
| 11 | + ServiceOutputTypes, |
| 12 | +} from "../PartnerCentralAccountClient"; |
| 13 | +import { GetVerification } from "../schemas/schemas_0"; |
| 14 | + |
| 15 | +/** |
| 16 | + * @public |
| 17 | + */ |
| 18 | +export type { __MetadataBearer }; |
| 19 | +export { $Command }; |
| 20 | +/** |
| 21 | + * @public |
| 22 | + * |
| 23 | + * The input for {@link GetVerificationCommand}. |
| 24 | + */ |
| 25 | +export interface GetVerificationCommandInput extends GetVerificationRequest {} |
| 26 | +/** |
| 27 | + * @public |
| 28 | + * |
| 29 | + * The output of {@link GetVerificationCommand}. |
| 30 | + */ |
| 31 | +export interface GetVerificationCommandOutput extends GetVerificationResponse, __MetadataBearer {} |
| 32 | + |
| 33 | +/** |
| 34 | + * <p>Retrieves the current status and details of a verification process for a partner account. This operation allows partners to check the progress and results of business or registrant verification processes.</p> |
| 35 | + * @example |
| 36 | + * Use a bare-bones client and the command you need to make an API call. |
| 37 | + * ```javascript |
| 38 | + * import { PartnerCentralAccountClient, GetVerificationCommand } from "@aws-sdk/client-partnercentral-account"; // ES Modules import |
| 39 | + * // const { PartnerCentralAccountClient, GetVerificationCommand } = require("@aws-sdk/client-partnercentral-account"); // CommonJS import |
| 40 | + * // import type { PartnerCentralAccountClientConfig } from "@aws-sdk/client-partnercentral-account"; |
| 41 | + * const config = {}; // type is PartnerCentralAccountClientConfig |
| 42 | + * const client = new PartnerCentralAccountClient(config); |
| 43 | + * const input = { // GetVerificationRequest |
| 44 | + * VerificationType: "BUSINESS_VERIFICATION" || "REGISTRANT_VERIFICATION", // required |
| 45 | + * }; |
| 46 | + * const command = new GetVerificationCommand(input); |
| 47 | + * const response = await client.send(command); |
| 48 | + * // { // GetVerificationResponse |
| 49 | + * // VerificationType: "BUSINESS_VERIFICATION" || "REGISTRANT_VERIFICATION", // required |
| 50 | + * // VerificationStatus: "PENDING_CUSTOMER_ACTION" || "IN_PROGRESS" || "FAILED" || "SUCCEEDED" || "REJECTED", // required |
| 51 | + * // VerificationStatusReason: "STRING_VALUE", |
| 52 | + * // VerificationResponseDetails: { // VerificationResponseDetails Union: only one key present |
| 53 | + * // BusinessVerificationResponse: { // BusinessVerificationResponse |
| 54 | + * // BusinessVerificationDetails: { // BusinessVerificationDetails |
| 55 | + * // LegalName: "STRING_VALUE", // required |
| 56 | + * // RegistrationId: "STRING_VALUE", // required |
| 57 | + * // CountryCode: "STRING_VALUE", // required |
| 58 | + * // JurisdictionOfIncorporation: "STRING_VALUE", |
| 59 | + * // }, |
| 60 | + * // }, |
| 61 | + * // RegistrantVerificationResponse: { // RegistrantVerificationResponse |
| 62 | + * // CompletionUrl: "STRING_VALUE", // required |
| 63 | + * // CompletionUrlExpiresAt: new Date("TIMESTAMP"), // required |
| 64 | + * // }, |
| 65 | + * // }, |
| 66 | + * // StartedAt: new Date("TIMESTAMP"), // required |
| 67 | + * // CompletedAt: new Date("TIMESTAMP"), |
| 68 | + * // }; |
| 69 | + * |
| 70 | + * ``` |
| 71 | + * |
| 72 | + * @param GetVerificationCommandInput - {@link GetVerificationCommandInput} |
| 73 | + * @returns {@link GetVerificationCommandOutput} |
| 74 | + * @see {@link GetVerificationCommandInput} for command's `input` shape. |
| 75 | + * @see {@link GetVerificationCommandOutput} for command's `response` shape. |
| 76 | + * @see {@link PartnerCentralAccountClientResolvedConfig | config} for PartnerCentralAccountClient's `config` shape. |
| 77 | + * |
| 78 | + * @throws {@link AccessDeniedException} (client fault) |
| 79 | + * <p>The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.</p> |
| 80 | + * |
| 81 | + * @throws {@link InternalServerException} (server fault) |
| 82 | + * <p>An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.</p> |
| 83 | + * |
| 84 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 85 | + * <p>The specified resource could not be found. This may occur when referencing a resource that does not exist or has been deleted.</p> |
| 86 | + * |
| 87 | + * @throws {@link ThrottlingException} (client fault) |
| 88 | + * <p>The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.</p> |
| 89 | + * |
| 90 | + * @throws {@link ValidationException} (client fault) |
| 91 | + * <p>The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.</p> |
| 92 | + * |
| 93 | + * @throws {@link PartnerCentralAccountServiceException} |
| 94 | + * <p>Base exception class for all service exceptions from PartnerCentralAccount service.</p> |
| 95 | + * |
| 96 | + * |
| 97 | + * @public |
| 98 | + */ |
| 99 | +export class GetVerificationCommand extends $Command |
| 100 | + .classBuilder< |
| 101 | + GetVerificationCommandInput, |
| 102 | + GetVerificationCommandOutput, |
| 103 | + PartnerCentralAccountClientResolvedConfig, |
| 104 | + ServiceInputTypes, |
| 105 | + ServiceOutputTypes |
| 106 | + >() |
| 107 | + .ep(commonParams) |
| 108 | + .m(function (this: any, Command: any, cs: any, config: PartnerCentralAccountClientResolvedConfig, o: any) { |
| 109 | + return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; |
| 110 | + }) |
| 111 | + .s("PartnerCentralAccount", "GetVerification", {}) |
| 112 | + .n("PartnerCentralAccountClient", "GetVerificationCommand") |
| 113 | + .sc(GetVerification) |
| 114 | + .build() { |
| 115 | + /** @internal type navigation helper, not in runtime. */ |
| 116 | + protected declare static __types: { |
| 117 | + api: { |
| 118 | + input: GetVerificationRequest; |
| 119 | + output: GetVerificationResponse; |
| 120 | + }; |
| 121 | + sdk: { |
| 122 | + input: GetVerificationCommandInput; |
| 123 | + output: GetVerificationCommandOutput; |
| 124 | + }; |
| 125 | + }; |
| 126 | +} |
0 commit comments