UNPKG

12.1 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class CodeGuruReviewer extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: CodeGuruReviewer.Types.ClientConfiguration)
13 config: Config & CodeGuruReviewer.Types.ClientConfiguration;
14 /**
15 * Associates an AWS CodeCommit repository with Amazon CodeGuru Reviewer. When you associate an AWS CodeCommit repository with Amazon CodeGuru Reviewer, Amazon CodeGuru Reviewer will provide recommendations for each pull request. You can view recommendations in the AWS CodeCommit repository. You can associate a GitHub repository using the Amazon CodeGuru Reviewer console.
16 */
17 associateRepository(params: CodeGuruReviewer.Types.AssociateRepositoryRequest, callback?: (err: AWSError, data: CodeGuruReviewer.Types.AssociateRepositoryResponse) => void): Request<CodeGuruReviewer.Types.AssociateRepositoryResponse, AWSError>;
18 /**
19 * Associates an AWS CodeCommit repository with Amazon CodeGuru Reviewer. When you associate an AWS CodeCommit repository with Amazon CodeGuru Reviewer, Amazon CodeGuru Reviewer will provide recommendations for each pull request. You can view recommendations in the AWS CodeCommit repository. You can associate a GitHub repository using the Amazon CodeGuru Reviewer console.
20 */
21 associateRepository(callback?: (err: AWSError, data: CodeGuruReviewer.Types.AssociateRepositoryResponse) => void): Request<CodeGuruReviewer.Types.AssociateRepositoryResponse, AWSError>;
22 /**
23 * Describes a repository association.
24 */
25 describeRepositoryAssociation(params: CodeGuruReviewer.Types.DescribeRepositoryAssociationRequest, callback?: (err: AWSError, data: CodeGuruReviewer.Types.DescribeRepositoryAssociationResponse) => void): Request<CodeGuruReviewer.Types.DescribeRepositoryAssociationResponse, AWSError>;
26 /**
27 * Describes a repository association.
28 */
29 describeRepositoryAssociation(callback?: (err: AWSError, data: CodeGuruReviewer.Types.DescribeRepositoryAssociationResponse) => void): Request<CodeGuruReviewer.Types.DescribeRepositoryAssociationResponse, AWSError>;
30 /**
31 * Removes the association between Amazon CodeGuru Reviewer and a repository.
32 */
33 disassociateRepository(params: CodeGuruReviewer.Types.DisassociateRepositoryRequest, callback?: (err: AWSError, data: CodeGuruReviewer.Types.DisassociateRepositoryResponse) => void): Request<CodeGuruReviewer.Types.DisassociateRepositoryResponse, AWSError>;
34 /**
35 * Removes the association between Amazon CodeGuru Reviewer and a repository.
36 */
37 disassociateRepository(callback?: (err: AWSError, data: CodeGuruReviewer.Types.DisassociateRepositoryResponse) => void): Request<CodeGuruReviewer.Types.DisassociateRepositoryResponse, AWSError>;
38 /**
39 * Lists repository associations. You can optionally filter on one or more of the following recommendation properties: provider types, states, names, and owners.
40 */
41 listRepositoryAssociations(params: CodeGuruReviewer.Types.ListRepositoryAssociationsRequest, callback?: (err: AWSError, data: CodeGuruReviewer.Types.ListRepositoryAssociationsResponse) => void): Request<CodeGuruReviewer.Types.ListRepositoryAssociationsResponse, AWSError>;
42 /**
43 * Lists repository associations. You can optionally filter on one or more of the following recommendation properties: provider types, states, names, and owners.
44 */
45 listRepositoryAssociations(callback?: (err: AWSError, data: CodeGuruReviewer.Types.ListRepositoryAssociationsResponse) => void): Request<CodeGuruReviewer.Types.ListRepositoryAssociationsResponse, AWSError>;
46}
47declare namespace CodeGuruReviewer {
48 export type Arn = string;
49 export interface AssociateRepositoryRequest {
50 /**
51 * The repository to associate.
52 */
53 Repository: Repository;
54 /**
55 * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you want to add a new repository association, this parameter specifies a unique identifier for the new repository association that helps ensure idempotency. If you use the AWS CLI or one of the AWS SDK to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes that in the request. If you don't use the SDK and instead generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a ClientRequestToken yourself for new versions and include that value in the request. You typically only need to interact with this value if you implement your own retry logic and want to ensure that a given repository association is not created twice. We recommend that you generate a UUID-type value to ensure uniqueness within the specified repository association. Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.
56 */
57 ClientRequestToken?: ClientRequestToken;
58 }
59 export interface AssociateRepositoryResponse {
60 /**
61 * Information about the repository association.
62 */
63 RepositoryAssociation?: RepositoryAssociation;
64 }
65 export type AssociationId = string;
66 export type ClientRequestToken = string;
67 export interface CodeCommitRepository {
68 /**
69 * The name of the AWS CodeCommit repository.
70 */
71 Name: Name;
72 }
73 export interface DescribeRepositoryAssociationRequest {
74 /**
75 * The Amazon Resource Name (ARN) identifying the association.
76 */
77 AssociationArn: Arn;
78 }
79 export interface DescribeRepositoryAssociationResponse {
80 /**
81 * Information about the repository association.
82 */
83 RepositoryAssociation?: RepositoryAssociation;
84 }
85 export interface DisassociateRepositoryRequest {
86 /**
87 * The Amazon Resource Name (ARN) identifying the association.
88 */
89 AssociationArn: Arn;
90 }
91 export interface DisassociateRepositoryResponse {
92 /**
93 * Information about the disassociated repository.
94 */
95 RepositoryAssociation?: RepositoryAssociation;
96 }
97 export interface ListRepositoryAssociationsRequest {
98 /**
99 * List of provider types to use as a filter.
100 */
101 ProviderTypes?: ProviderTypes;
102 /**
103 * List of states to use as a filter.
104 */
105 States?: RepositoryAssociationStates;
106 /**
107 * List of names to use as a filter.
108 */
109 Names?: Names;
110 /**
111 * List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the GitHub account name.
112 */
113 Owners?: Owners;
114 /**
115 * The maximum number of repository association results returned by ListRepositoryAssociations in paginated output. When this parameter is used, ListRepositoryAssociations only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListRepositoryAssociations request with the returned nextToken value. This value can be between 1 and 100. If this parameter is not used, then ListRepositoryAssociations returns up to 100 results and a nextToken value if applicable.
116 */
117 MaxResults?: MaxResults;
118 /**
119 * The nextToken value returned from a previous paginated ListRepositoryAssociations request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
120 */
121 NextToken?: NextToken;
122 }
123 export interface ListRepositoryAssociationsResponse {
124 /**
125 * A list of repository associations that meet the criteria of the request.
126 */
127 RepositoryAssociationSummaries?: RepositoryAssociationSummaries;
128 /**
129 * The nextToken value to include in a future ListRecommendations request. When the results of a ListRecommendations request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
130 */
131 NextToken?: NextToken;
132 }
133 export type MaxResults = number;
134 export type Name = string;
135 export type Names = Name[];
136 export type NextToken = string;
137 export type Owner = string;
138 export type Owners = Owner[];
139 export type ProviderType = "CodeCommit"|"GitHub"|string;
140 export type ProviderTypes = ProviderType[];
141 export interface Repository {
142 /**
143 * Information about an AWS CodeCommit repository.
144 */
145 CodeCommit?: CodeCommitRepository;
146 }
147 export interface RepositoryAssociation {
148 /**
149 * The id of the repository association.
150 */
151 AssociationId?: AssociationId;
152 /**
153 * The Amazon Resource Name (ARN) identifying the repository association.
154 */
155 AssociationArn?: Arn;
156 /**
157 * The name of the repository.
158 */
159 Name?: Name;
160 /**
161 * The owner of the repository.
162 */
163 Owner?: Owner;
164 /**
165 * The provider type of the repository association.
166 */
167 ProviderType?: ProviderType;
168 /**
169 * The state of the repository association.
170 */
171 State?: RepositoryAssociationState;
172 /**
173 * A description of why the repository association is in the current state.
174 */
175 StateReason?: StateReason;
176 /**
177 * The time, in milliseconds since the epoch, when the repository association was last updated.
178 */
179 LastUpdatedTimeStamp?: TimeStamp;
180 /**
181 * The time, in milliseconds since the epoch, when the repository association was created.
182 */
183 CreatedTimeStamp?: TimeStamp;
184 }
185 export type RepositoryAssociationState = "Associated"|"Associating"|"Failed"|"Disassociating"|string;
186 export type RepositoryAssociationStates = RepositoryAssociationState[];
187 export type RepositoryAssociationSummaries = RepositoryAssociationSummary[];
188 export interface RepositoryAssociationSummary {
189 /**
190 * The Amazon Resource Name (ARN) identifying the repository association.
191 */
192 AssociationArn?: Arn;
193 /**
194 * The time, in milliseconds since the epoch, since the repository association was last updated.
195 */
196 LastUpdatedTimeStamp?: TimeStamp;
197 /**
198 * The repository association ID.
199 */
200 AssociationId?: AssociationId;
201 /**
202 * The name of the repository association.
203 */
204 Name?: Name;
205 /**
206 * The owner of the repository association.
207 */
208 Owner?: Owner;
209 /**
210 * The provider type of the repository association.
211 */
212 ProviderType?: ProviderType;
213 /**
214 * The state of the repository association. Associated Amazon CodeGuru Reviewer is associated with the repository. Associating The association is in progress. Failed The association failed. For more information about troubleshooting (or why it failed), see [troubleshooting topic]. Disassociating Amazon CodeGuru Reviewer is in the process of disassociating with the repository.
215 */
216 State?: RepositoryAssociationState;
217 }
218 export type StateReason = string;
219 export type TimeStamp = Date;
220 /**
221 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
222 */
223 export type apiVersion = "2019-09-19"|"latest"|string;
224 export interface ClientApiVersions {
225 /**
226 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
227 */
228 apiVersion?: apiVersion;
229 }
230 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
231 /**
232 * Contains interfaces for use with the CodeGuruReviewer client.
233 */
234 export import Types = CodeGuruReviewer;
235}
236export = CodeGuruReviewer;