Skip to content

Commit

Permalink
AT-10890: Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
rddimon committed Nov 22, 2023
1 parent d466f5b commit aa374d0
Show file tree
Hide file tree
Showing 7 changed files with 199 additions and 120 deletions.
180 changes: 126 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 17 additions & 12 deletions src/aws/acm-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import {
ACMClient,
CertificateSummary,
ListCertificatesCommand,
ListCertificatesCommandInput,
ListCertificatesCommandOutput
CertificateStatus,
ACMClient,
CertificateSummary,
ListCertificatesCommand,
ListCertificatesCommandInput,
ListCertificatesCommandOutput
} from "@aws-sdk/client-acm";
import Globals from "../globals";
import DomainConfig = require("../models/domain-config");
import { getAWSPagedResults } from "../utils";
import {getAWSPagedResults} from "../utils";

const certStatuses = ["PENDING_VALIDATION", "ISSUED", "INACTIVE"];
const certStatuses = [
CertificateStatus.PENDING_VALIDATION,
CertificateStatus.ISSUED,
CertificateStatus.INACTIVE
];

class ACMWrapper {
public acm: ACMClient;
Expand All @@ -30,11 +35,11 @@ class ACMWrapper {

try {
const certificates = await getAWSPagedResults<CertificateSummary, ListCertificatesCommandInput, ListCertificatesCommandOutput>(
this.acm,
"CertificateSummaryList",
"NextToken",
"NextToken",
new ListCertificatesCommand({ CertificateStatuses: certStatuses })
this.acm,
"CertificateSummaryList",
"NextToken",
"NextToken",
new ListCertificatesCommand({CertificateStatuses: certStatuses})
);
// enhancement idea: weight the choice of cert so longer expires
// and RenewalEligibility = ELIGIBLE is more preferable
Expand Down
30 changes: 16 additions & 14 deletions src/aws/api-gateway-v1-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ import DomainConfig = require("../models/domain-config");
import DomainInfo = require("../models/domain-info");
import Globals from "../globals";
import {
APIGatewayClient,
BasePathMapping,
CreateBasePathMappingCommand,
CreateDomainNameCommand,
CreateDomainNameCommandOutput,
DeleteBasePathMappingCommand,
DeleteDomainNameCommand,
GetBasePathMappingsCommand,
GetBasePathMappingsCommandInput,
GetBasePathMappingsCommandOutput,
GetDomainNameCommand,
GetDomainNameCommandOutput,
UpdateBasePathMappingCommand
APIGatewayClient,
BasePathMapping,
CreateBasePathMappingCommand,
CreateDomainNameCommand,
CreateDomainNameCommandOutput,
DeleteBasePathMappingCommand,
DeleteDomainNameCommand,
GetBasePathMappingsCommand,
GetBasePathMappingsCommandInput,
GetBasePathMappingsCommandOutput,
GetDomainNameCommand,
GetDomainNameCommandOutput,
UpdateBasePathMappingCommand
} from "@aws-sdk/client-api-gateway";
import ApiGatewayMap = require("../models/api-gateway-map");
import APIGatewayBase = require("../models/apigateway-base");
import Logging from "../logging";
import { getAWSPagedResults } from "../utils";
import {getAWSPagedResults} from "../utils";

class APIGatewayV1Wrapper extends APIGatewayBase {
public readonly apiGateway: APIGatewayClient;

constructor(credentials?: any) {
super();
this.apiGateway = new APIGatewayClient({
Expand Down
Loading

0 comments on commit aa374d0

Please sign in to comment.