Skip to content

Commit b9bad19

Browse files
author
awstools
committed
feat(client-partnercentral-account): Adding Verification API's to Partner Central Account SDK.
1 parent 4e8746f commit b9bad19

File tree

12 files changed

+1231
-11
lines changed

12 files changed

+1231
-11
lines changed

clients/client-partnercentral-account/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,14 @@ GetProfileVisibility
322322

323323
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/partnercentral-account/command/GetProfileVisibilityCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/GetProfileVisibilityCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/GetProfileVisibilityCommandOutput/)
324324

325+
</details>
326+
<details>
327+
<summary>
328+
GetVerification
329+
</summary>
330+
331+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/partnercentral-account/command/GetVerificationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/GetVerificationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/GetVerificationCommandOutput/)
332+
325333
</details>
326334
<details>
327335
<summary>
@@ -394,6 +402,14 @@ StartProfileUpdateTask
394402

395403
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/partnercentral-account/command/StartProfileUpdateTaskCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/StartProfileUpdateTaskCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/StartProfileUpdateTaskCommandOutput/)
396404

405+
</details>
406+
<details>
407+
<summary>
408+
StartVerification
409+
</summary>
410+
411+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/partnercentral-account/command/StartVerificationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/StartVerificationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-partnercentral-account/Interface/StartVerificationCommandOutput/)
412+
397413
</details>
398414
<details>
399415
<summary>

clients/client-partnercentral-account/src/PartnerCentralAccount.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ import {
7373
GetProfileVisibilityCommandInput,
7474
GetProfileVisibilityCommandOutput,
7575
} from "./commands/GetProfileVisibilityCommand";
76+
import {
77+
GetVerificationCommand,
78+
GetVerificationCommandInput,
79+
GetVerificationCommandOutput,
80+
} from "./commands/GetVerificationCommand";
7681
import {
7782
ListConnectionInvitationsCommand,
7883
ListConnectionInvitationsCommandInput,
@@ -118,6 +123,11 @@ import {
118123
StartProfileUpdateTaskCommandInput,
119124
StartProfileUpdateTaskCommandOutput,
120125
} from "./commands/StartProfileUpdateTaskCommand";
126+
import {
127+
StartVerificationCommand,
128+
StartVerificationCommandInput,
129+
StartVerificationCommandOutput,
130+
} from "./commands/StartVerificationCommand";
121131
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
122132
import {
123133
UntagResourceCommand,
@@ -147,6 +157,7 @@ const commands = {
147157
GetPartnerCommand,
148158
GetProfileUpdateTaskCommand,
149159
GetProfileVisibilityCommand,
160+
GetVerificationCommand,
150161
ListConnectionInvitationsCommand,
151162
ListConnectionsCommand,
152163
ListPartnersCommand,
@@ -156,6 +167,7 @@ const commands = {
156167
RejectConnectionInvitationCommand,
157168
SendEmailVerificationCodeCommand,
158169
StartProfileUpdateTaskCommand,
170+
StartVerificationCommand,
159171
TagResourceCommand,
160172
UntagResourceCommand,
161173
UpdateConnectionPreferencesCommand,
@@ -399,6 +411,20 @@ export interface PartnerCentralAccount {
399411
cb: (err: any, data?: GetProfileVisibilityCommandOutput) => void
400412
): void;
401413

414+
/**
415+
* @see {@link GetVerificationCommand}
416+
*/
417+
getVerification(
418+
args: GetVerificationCommandInput,
419+
options?: __HttpHandlerOptions
420+
): Promise<GetVerificationCommandOutput>;
421+
getVerification(args: GetVerificationCommandInput, cb: (err: any, data?: GetVerificationCommandOutput) => void): void;
422+
getVerification(
423+
args: GetVerificationCommandInput,
424+
options: __HttpHandlerOptions,
425+
cb: (err: any, data?: GetVerificationCommandOutput) => void
426+
): void;
427+
402428
/**
403429
* @see {@link ListConnectionInvitationsCommand}
404430
*/
@@ -543,6 +569,24 @@ export interface PartnerCentralAccount {
543569
cb: (err: any, data?: StartProfileUpdateTaskCommandOutput) => void
544570
): void;
545571

572+
/**
573+
* @see {@link StartVerificationCommand}
574+
*/
575+
startVerification(): Promise<StartVerificationCommandOutput>;
576+
startVerification(
577+
args: StartVerificationCommandInput,
578+
options?: __HttpHandlerOptions
579+
): Promise<StartVerificationCommandOutput>;
580+
startVerification(
581+
args: StartVerificationCommandInput,
582+
cb: (err: any, data?: StartVerificationCommandOutput) => void
583+
): void;
584+
startVerification(
585+
args: StartVerificationCommandInput,
586+
options: __HttpHandlerOptions,
587+
cb: (err: any, data?: StartVerificationCommandOutput) => void
588+
): void;
589+
546590
/**
547591
* @see {@link TagResourceCommand}
548592
*/

clients/client-partnercentral-account/src/PartnerCentralAccountClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ import {
114114
GetProfileVisibilityCommandInput,
115115
GetProfileVisibilityCommandOutput,
116116
} from "./commands/GetProfileVisibilityCommand";
117+
import { GetVerificationCommandInput, GetVerificationCommandOutput } from "./commands/GetVerificationCommand";
117118
import {
118119
ListConnectionInvitationsCommandInput,
119120
ListConnectionInvitationsCommandOutput,
@@ -144,6 +145,7 @@ import {
144145
StartProfileUpdateTaskCommandInput,
145146
StartProfileUpdateTaskCommandOutput,
146147
} from "./commands/StartProfileUpdateTaskCommand";
148+
import { StartVerificationCommandInput, StartVerificationCommandOutput } from "./commands/StartVerificationCommand";
147149
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
148150
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
149151
import {
@@ -180,6 +182,7 @@ export type ServiceInputTypes =
180182
| GetPartnerCommandInput
181183
| GetProfileUpdateTaskCommandInput
182184
| GetProfileVisibilityCommandInput
185+
| GetVerificationCommandInput
183186
| ListConnectionInvitationsCommandInput
184187
| ListConnectionsCommandInput
185188
| ListPartnersCommandInput
@@ -189,6 +192,7 @@ export type ServiceInputTypes =
189192
| RejectConnectionInvitationCommandInput
190193
| SendEmailVerificationCodeCommandInput
191194
| StartProfileUpdateTaskCommandInput
195+
| StartVerificationCommandInput
192196
| TagResourceCommandInput
193197
| UntagResourceCommandInput
194198
| UpdateConnectionPreferencesCommandInput;
@@ -212,6 +216,7 @@ export type ServiceOutputTypes =
212216
| GetPartnerCommandOutput
213217
| GetProfileUpdateTaskCommandOutput
214218
| GetProfileVisibilityCommandOutput
219+
| GetVerificationCommandOutput
215220
| ListConnectionInvitationsCommandOutput
216221
| ListConnectionsCommandOutput
217222
| ListPartnersCommandOutput
@@ -221,6 +226,7 @@ export type ServiceOutputTypes =
221226
| RejectConnectionInvitationCommandOutput
222227
| SendEmailVerificationCodeCommandOutput
223228
| StartProfileUpdateTaskCommandOutput
229+
| StartVerificationCommandOutput
224230
| TagResourceCommandOutput
225231
| UntagResourceCommandOutput
226232
| UpdateConnectionPreferencesCommandOutput;
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
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

Comments
 (0)