Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overlapping definition of string literals #4268

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-ts-generator-c6cc1b03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "ts-generator",
"description": "Fix generation of string literals from enum shapes"
}
38 changes: 19 additions & 19 deletions clients/accessanalyzer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ declare namespace AccessAnalyzer {
export type AccessPreviewFindingId = string;
export type AccessPreviewFindingsList = AccessPreviewFinding[];
export type AccessPreviewId = string;
export type AccessPreviewStatus = "COMPLETED"|"CREATING"|"FAILED"|string;
export type AccessPreviewStatus = "COMPLETED"|"CREATING"|"FAILED";
export interface AccessPreviewStatusReason {
/**
* The reason code for the current status of the access preview.
*/
code: AccessPreviewStatusReasonCode;
}
export type AccessPreviewStatusReasonCode = "INTERNAL_ERROR"|"INVALID_CONFIGURATION"|string;
export type AccessPreviewStatusReasonCode = "INTERNAL_ERROR"|"INVALID_CONFIGURATION";
export interface AccessPreviewSummary {
/**
* The unique ID for the access preview.
Expand Down Expand Up @@ -369,7 +369,7 @@ declare namespace AccessAnalyzer {
*/
uri?: AclUri;
}
export type AclPermission = "READ"|"WRITE"|"READ_ACP"|"WRITE_ACP"|"FULL_CONTROL"|string;
export type AclPermission = "READ"|"WRITE"|"READ_ACP"|"WRITE_ACP"|"FULL_CONTROL";
export type AclUri = string;
export type ActionList = String[];
export interface AnalyzedResource {
Expand Down Expand Up @@ -434,7 +434,7 @@ declare namespace AccessAnalyzer {
}
export type AnalyzedResourcesList = AnalyzedResourceSummary[];
export type AnalyzerArn = string;
export type AnalyzerStatus = "ACTIVE"|"CREATING"|"DISABLED"|"FAILED"|string;
export type AnalyzerStatus = "ACTIVE"|"CREATING"|"DISABLED"|"FAILED";
export interface AnalyzerSummary {
/**
* The ARN of the analyzer.
Expand Down Expand Up @@ -798,7 +798,7 @@ declare namespace AccessAnalyzer {
*/
sources?: FindingSourceList;
}
export type FindingChangeType = "CHANGED"|"NEW"|"UNCHANGED"|string;
export type FindingChangeType = "CHANGED"|"NEW"|"UNCHANGED";
export type FindingId = string;
export type FindingIdList = FindingId[];
export interface FindingSource {
Expand All @@ -818,9 +818,9 @@ declare namespace AccessAnalyzer {
accessPointArn?: String;
}
export type FindingSourceList = FindingSource[];
export type FindingSourceType = "POLICY"|"BUCKET_ACL"|"S3_ACCESS_POINT"|string;
export type FindingStatus = "ACTIVE"|"ARCHIVED"|"RESOLVED"|string;
export type FindingStatusUpdate = "ACTIVE"|"ARCHIVED"|string;
export type FindingSourceType = "POLICY"|"BUCKET_ACL"|"S3_ACCESS_POINT";
export type FindingStatus = "ACTIVE"|"ARCHIVED"|"RESOLVED";
export type FindingStatusUpdate = "ACTIVE"|"ARCHIVED";
export interface FindingSummary {
/**
* The ID of the finding.
Expand Down Expand Up @@ -1064,9 +1064,9 @@ declare namespace AccessAnalyzer {
*/
message: String;
}
export type JobErrorCode = "AUTHORIZATION_ERROR"|"RESOURCE_NOT_FOUND_ERROR"|"SERVICE_QUOTA_EXCEEDED_ERROR"|"SERVICE_ERROR"|string;
export type JobErrorCode = "AUTHORIZATION_ERROR"|"RESOURCE_NOT_FOUND_ERROR"|"SERVICE_QUOTA_EXCEEDED_ERROR"|"SERVICE_ERROR";
export type JobId = string;
export type JobStatus = "IN_PROGRESS"|"SUCCEEDED"|"FAILED"|"CANCELED"|string;
export type JobStatus = "IN_PROGRESS"|"SUCCEEDED"|"FAILED"|"CANCELED";
export type KmsConstraintsKey = string;
export type KmsConstraintsMap = {[key: string]: KmsConstraintsValue};
export type KmsConstraintsValue = string;
Expand Down Expand Up @@ -1103,7 +1103,7 @@ declare namespace AccessAnalyzer {
*/
encryptionContextSubset?: KmsConstraintsMap;
}
export type KmsGrantOperation = "CreateGrant"|"Decrypt"|"DescribeKey"|"Encrypt"|"GenerateDataKey"|"GenerateDataKeyPair"|"GenerateDataKeyPairWithoutPlaintext"|"GenerateDataKeyWithoutPlaintext"|"GetPublicKey"|"ReEncryptFrom"|"ReEncryptTo"|"RetireGrant"|"Sign"|"Verify"|string;
export type KmsGrantOperation = "CreateGrant"|"Decrypt"|"DescribeKey"|"Encrypt"|"GenerateDataKey"|"GenerateDataKeyPair"|"GenerateDataKeyPairWithoutPlaintext"|"GenerateDataKeyWithoutPlaintext"|"GetPublicKey"|"ReEncryptFrom"|"ReEncryptTo"|"RetireGrant"|"Sign"|"Verify";
export type KmsGrantOperationsList = KmsGrantOperation[];
export interface KmsKeyConfiguration {
/**
Expand Down Expand Up @@ -1319,7 +1319,7 @@ declare namespace AccessAnalyzer {
*/
tags?: TagsMap;
}
export type Locale = "DE"|"EN"|"ES"|"FR"|"IT"|"JA"|"KO"|"PT_BR"|"ZH_CN"|"ZH_TW"|string;
export type Locale = "DE"|"EN"|"ES"|"FR"|"IT"|"JA"|"KO"|"PT_BR"|"ZH_CN"|"ZH_TW";
export interface Location {
/**
* A path in a policy, represented as a sequence of path elements.
Expand All @@ -1339,7 +1339,7 @@ declare namespace AccessAnalyzer {
*/
internetConfiguration?: InternetConfiguration;
}
export type OrderBy = "ASC"|"DESC"|string;
export type OrderBy = "ASC"|"DESC";
export interface PathElement {
/**
* Refers to an index in a JSON array.
Expand Down Expand Up @@ -1390,7 +1390,7 @@ declare namespace AccessAnalyzer {
}
export type PolicyGenerationList = PolicyGeneration[];
export type PolicyName = string;
export type PolicyType = "IDENTITY_POLICY"|"RESOURCE_POLICY"|"SERVICE_CONTROL_POLICY"|string;
export type PolicyType = "IDENTITY_POLICY"|"RESOURCE_POLICY"|"SERVICE_CONTROL_POLICY";
export interface Position {
/**
* The line of the position, starting from 1.
Expand Down Expand Up @@ -1449,10 +1449,10 @@ declare namespace AccessAnalyzer {
kmsKeyId?: RdsDbSnapshotKmsKeyId;
}
export type RdsDbSnapshotKmsKeyId = string;
export type ReasonCode = "AWS_SERVICE_ACCESS_DISABLED"|"DELEGATED_ADMINISTRATOR_DEREGISTERED"|"ORGANIZATION_DELETED"|"SERVICE_LINKED_ROLE_CREATION_FAILED"|string;
export type ReasonCode = "AWS_SERVICE_ACCESS_DISABLED"|"DELEGATED_ADMINISTRATOR_DEREGISTERED"|"ORGANIZATION_DELETED"|"SERVICE_LINKED_ROLE_CREATION_FAILED";
export type RegionList = String[];
export type ResourceArn = string;
export type ResourceType = "AWS::S3::Bucket"|"AWS::IAM::Role"|"AWS::SQS::Queue"|"AWS::Lambda::Function"|"AWS::Lambda::LayerVersion"|"AWS::KMS::Key"|"AWS::SecretsManager::Secret"|"AWS::EFS::FileSystem"|"AWS::EC2::Snapshot"|"AWS::ECR::Repository"|"AWS::RDS::DBSnapshot"|"AWS::RDS::DBClusterSnapshot"|"AWS::SNS::Topic"|string;
export type ResourceType = "AWS::S3::Bucket"|"AWS::IAM::Role"|"AWS::SQS::Queue"|"AWS::Lambda::Function"|"AWS::Lambda::LayerVersion"|"AWS::KMS::Key"|"AWS::SecretsManager::Secret"|"AWS::EFS::FileSystem"|"AWS::EC2::Snapshot"|"AWS::ECR::Repository"|"AWS::RDS::DBSnapshot"|"AWS::RDS::DBClusterSnapshot"|"AWS::SNS::Topic";
export type RetiringPrincipal = string;
export type RoleArn = string;
export interface S3AccessPointConfiguration {
Expand Down Expand Up @@ -1654,7 +1654,7 @@ declare namespace AccessAnalyzer {
allRegions?: Boolean;
}
export type TrailPropertiesList = TrailProperties[];
export type Type = "ACCOUNT"|"ORGANIZATION"|string;
export type Type = "ACCOUNT"|"ORGANIZATION";
export interface UntagResourceRequest {
/**
* The ARN of the resource to remove the tag from.
Expand Down Expand Up @@ -1730,7 +1730,7 @@ declare namespace AccessAnalyzer {
locations: LocationList;
}
export type ValidatePolicyFindingList = ValidatePolicyFinding[];
export type ValidatePolicyFindingType = "ERROR"|"SECURITY_WARNING"|"SUGGESTION"|"WARNING"|string;
export type ValidatePolicyFindingType = "ERROR"|"SECURITY_WARNING"|"SUGGESTION"|"WARNING";
export interface ValidatePolicyRequest {
/**
* The locale to use for localizing the findings.
Expand All @@ -1757,7 +1757,7 @@ declare namespace AccessAnalyzer {
*/
validatePolicyResourceType?: ValidatePolicyResourceType;
}
export type ValidatePolicyResourceType = "AWS::S3::Bucket"|"AWS::S3::AccessPoint"|"AWS::S3::MultiRegionAccessPoint"|"AWS::S3ObjectLambda::AccessPoint"|"AWS::IAM::AssumeRolePolicyDocument"|string;
export type ValidatePolicyResourceType = "AWS::S3::Bucket"|"AWS::S3::AccessPoint"|"AWS::S3::MultiRegionAccessPoint"|"AWS::S3ObjectLambda::AccessPoint"|"AWS::IAM::AssumeRolePolicyDocument";
export interface ValidatePolicyResponse {
/**
* The list of findings in a policy returned by IAM Access Analyzer based on its suite of policy checks.
Expand Down
2 changes: 1 addition & 1 deletion clients/account.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ declare namespace Account {
*/
Title?: Title;
}
export type AlternateContactType = "BILLING"|"OPERATIONS"|"SECURITY"|string;
export type AlternateContactType = "BILLING"|"OPERATIONS"|"SECURITY";
export type City = string;
export type CompanyName = string;
export interface ContactInformation {
Expand Down
30 changes: 15 additions & 15 deletions clients/acm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ declare namespace ACM {
*/
CertificateTransparencyLoggingPreference?: CertificateTransparencyLoggingPreference;
}
export type CertificateStatus = "PENDING_VALIDATION"|"ISSUED"|"INACTIVE"|"EXPIRED"|"VALIDATION_TIMED_OUT"|"REVOKED"|"FAILED"|string;
export type CertificateStatus = "PENDING_VALIDATION"|"ISSUED"|"INACTIVE"|"EXPIRED"|"VALIDATION_TIMED_OUT"|"REVOKED"|"FAILED";
export type CertificateStatuses = CertificateStatus[];
export interface CertificateSummary {
/**
Expand Down Expand Up @@ -342,8 +342,8 @@ declare namespace ACM {
RevokedAt?: TStamp;
}
export type CertificateSummaryList = CertificateSummary[];
export type CertificateTransparencyLoggingPreference = "ENABLED"|"DISABLED"|string;
export type CertificateType = "IMPORTED"|"AMAZON_ISSUED"|"PRIVATE"|string;
export type CertificateTransparencyLoggingPreference = "ENABLED"|"DISABLED";
export type CertificateType = "IMPORTED"|"AMAZON_ISSUED"|"PRIVATE";
export interface DeleteCertificateRequest {
/**
* String that contains the ARN of the ACM certificate to be deleted. This must be of the form: arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 For more information about ARNs, see Amazon Resource Names (ARNs).
Expand All @@ -364,7 +364,7 @@ declare namespace ACM {
}
export type DomainList = DomainNameString[];
export type DomainNameString = string;
export type DomainStatus = "PENDING_VALIDATION"|"SUCCESS"|"FAILED"|string;
export type DomainStatus = "PENDING_VALIDATION"|"SUCCESS"|"FAILED";
export interface DomainValidation {
/**
* A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com.
Expand Down Expand Up @@ -445,9 +445,9 @@ declare namespace ACM {
}
export type ExtendedKeyUsageFilterList = ExtendedKeyUsageName[];
export type ExtendedKeyUsageList = ExtendedKeyUsage[];
export type ExtendedKeyUsageName = "TLS_WEB_SERVER_AUTHENTICATION"|"TLS_WEB_CLIENT_AUTHENTICATION"|"CODE_SIGNING"|"EMAIL_PROTECTION"|"TIME_STAMPING"|"OCSP_SIGNING"|"IPSEC_END_SYSTEM"|"IPSEC_TUNNEL"|"IPSEC_USER"|"ANY"|"NONE"|"CUSTOM"|string;
export type ExtendedKeyUsageName = "TLS_WEB_SERVER_AUTHENTICATION"|"TLS_WEB_CLIENT_AUTHENTICATION"|"CODE_SIGNING"|"EMAIL_PROTECTION"|"TIME_STAMPING"|"OCSP_SIGNING"|"IPSEC_END_SYSTEM"|"IPSEC_TUNNEL"|"IPSEC_USER"|"ANY"|"NONE"|"CUSTOM";
export type ExtendedKeyUsageNames = ExtendedKeyUsageName[];
export type FailureReason = "NO_AVAILABLE_CONTACTS"|"ADDITIONAL_VERIFICATION_REQUIRED"|"DOMAIN_NOT_ALLOWED"|"INVALID_PUBLIC_DOMAIN"|"DOMAIN_VALIDATION_DENIED"|"CAA_ERROR"|"PCA_LIMIT_EXCEEDED"|"PCA_INVALID_ARN"|"PCA_INVALID_STATE"|"PCA_REQUEST_FAILED"|"PCA_NAME_CONSTRAINTS_VALIDATION"|"PCA_RESOURCE_NOT_FOUND"|"PCA_INVALID_ARGS"|"PCA_INVALID_DURATION"|"PCA_ACCESS_DENIED"|"SLR_NOT_FOUND"|"OTHER"|string;
export type FailureReason = "NO_AVAILABLE_CONTACTS"|"ADDITIONAL_VERIFICATION_REQUIRED"|"DOMAIN_NOT_ALLOWED"|"INVALID_PUBLIC_DOMAIN"|"DOMAIN_VALIDATION_DENIED"|"CAA_ERROR"|"PCA_LIMIT_EXCEEDED"|"PCA_INVALID_ARN"|"PCA_INVALID_STATE"|"PCA_REQUEST_FAILED"|"PCA_NAME_CONSTRAINTS_VALIDATION"|"PCA_RESOURCE_NOT_FOUND"|"PCA_INVALID_ARGS"|"PCA_INVALID_DURATION"|"PCA_ACCESS_DENIED"|"SLR_NOT_FOUND"|"OTHER";
export interface Filters {
/**
* Specify one or more ExtendedKeyUsage extension values.
Expand Down Expand Up @@ -514,7 +514,7 @@ declare namespace ACM {
CertificateArn?: Arn;
}
export type InUseList = String[];
export type KeyAlgorithm = "RSA_1024"|"RSA_2048"|"RSA_3072"|"RSA_4096"|"EC_prime256v1"|"EC_secp384r1"|"EC_secp521r1"|string;
export type KeyAlgorithm = "RSA_1024"|"RSA_2048"|"RSA_3072"|"RSA_4096"|"EC_prime256v1"|"EC_secp384r1"|"EC_secp521r1";
export type KeyAlgorithmList = KeyAlgorithm[];
export interface KeyUsage {
/**
Expand All @@ -524,7 +524,7 @@ declare namespace ACM {
}
export type KeyUsageFilterList = KeyUsageName[];
export type KeyUsageList = KeyUsage[];
export type KeyUsageName = "DIGITAL_SIGNATURE"|"NON_REPUDIATION"|"KEY_ENCIPHERMENT"|"DATA_ENCIPHERMENT"|"KEY_AGREEMENT"|"CERTIFICATE_SIGNING"|"CRL_SIGNING"|"ENCIPHER_ONLY"|"DECIPHER_ONLY"|"ANY"|"CUSTOM"|string;
export type KeyUsageName = "DIGITAL_SIGNATURE"|"NON_REPUDIATION"|"KEY_ENCIPHERMENT"|"DATA_ENCIPHERMENT"|"KEY_AGREEMENT"|"CERTIFICATE_SIGNING"|"CRL_SIGNING"|"ENCIPHER_ONLY"|"DECIPHER_ONLY"|"ANY"|"CUSTOM";
export type KeyUsageNames = KeyUsageName[];
export interface ListCertificatesRequest {
/**
Expand Down Expand Up @@ -592,7 +592,7 @@ declare namespace ACM {
*/
IdempotencyToken: IdempotencyToken;
}
export type RecordType = "CNAME"|string;
export type RecordType = "CNAME";
export interface RemoveTagsFromCertificateRequest {
/**
* String that contains the ARN of the ACM Certificate with one or more tags that you want to remove. This must be of the form: arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 For more information about ARNs, see Amazon Resource Names (ARNs).
Expand All @@ -609,8 +609,8 @@ declare namespace ACM {
*/
CertificateArn: Arn;
}
export type RenewalEligibility = "ELIGIBLE"|"INELIGIBLE"|string;
export type RenewalStatus = "PENDING_AUTO_RENEWAL"|"PENDING_VALIDATION"|"SUCCESS"|"FAILED"|string;
export type RenewalEligibility = "ELIGIBLE"|"INELIGIBLE";
export type RenewalStatus = "PENDING_AUTO_RENEWAL"|"PENDING_VALIDATION"|"SUCCESS"|"FAILED";
export interface RenewalSummary {
/**
* The status of ACM's managed renewal of the certificate.
Expand Down Expand Up @@ -701,9 +701,9 @@ declare namespace ACM {
*/
Value: String;
}
export type RevocationReason = "UNSPECIFIED"|"KEY_COMPROMISE"|"CA_COMPROMISE"|"AFFILIATION_CHANGED"|"SUPERCEDED"|"CESSATION_OF_OPERATION"|"CERTIFICATE_HOLD"|"REMOVE_FROM_CRL"|"PRIVILEGE_WITHDRAWN"|"A_A_COMPROMISE"|string;
export type SortBy = "CREATED_AT"|string;
export type SortOrder = "ASCENDING"|"DESCENDING"|string;
export type RevocationReason = "UNSPECIFIED"|"KEY_COMPROMISE"|"CA_COMPROMISE"|"AFFILIATION_CHANGED"|"SUPERCEDED"|"CESSATION_OF_OPERATION"|"CERTIFICATE_HOLD"|"REMOVE_FROM_CRL"|"PRIVILEGE_WITHDRAWN"|"A_A_COMPROMISE";
export type SortBy = "CREATED_AT";
export type SortOrder = "ASCENDING"|"DESCENDING";
export type String = string;
export type TStamp = Date;
export interface Tag {
Expand All @@ -730,7 +730,7 @@ declare namespace ACM {
Options: CertificateOptions;
}
export type ValidationEmailList = String[];
export type ValidationMethod = "EMAIL"|"DNS"|string;
export type ValidationMethod = "EMAIL"|"DNS";
/**
* 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.
*/
Expand Down
Loading