Skip to content

Commit f16cab4

Browse files
committed
update api
1 parent edfb366 commit f16cab4

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

packages/rest-api-construct/API.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,31 @@ import * as apiGateway from 'aws-cdk-lib/aws-apigateway';
88
import { Construct } from 'constructs';
99
import * as lamb from 'aws-cdk-lib/aws-lambda';
1010

11+
// @public (undocumented)
12+
export type ExistingDirectory = {
13+
path: string;
14+
};
15+
16+
// @public (undocumented)
17+
export type ExistingLambda = {
18+
id: string;
19+
name: string;
20+
};
21+
22+
// @public (undocumented)
23+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
24+
25+
// @public (undocumented)
26+
export type LambdaSource = {
27+
runtime: lamb.Runtime;
28+
source: ExistingDirectory | ExistingLambda | NewFromCode;
29+
};
30+
31+
// @public (undocumented)
32+
export type NewFromCode = {
33+
code: string;
34+
};
35+
1136
// @public
1237
export class RestApiConstruct extends Construct {
1338
constructor(scope: Construct, id: string, props: RestApiConstructProps);
@@ -21,9 +46,12 @@ export type RestApiConstructProps = {
2146
apiProps: RestApiPathConfig[];
2247
};
2348

24-
// Warnings were encountered during analysis:
25-
//
26-
// src/types.ts:16:3 - (ae-forgotten-export) The symbol "RestApiPathConfig" needs to be exported by the entry point index.d.ts
49+
// @public (undocumented)
50+
export type RestApiPathConfig = {
51+
path: string;
52+
routes: HttpMethod[];
53+
lambdaEntry: LambdaSource;
54+
};
2755

2856
// (No @packageDocumentation comment for this package)
2957

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './construct.js';
22
export * from './types.js';
3+
export { RestApiPathConfig, LambdaSource } from './types.js';

packages/rest-api-construct/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type ExistingLambda = { id: string; name: string };
66
export type NewFromCode = { code: string };
77

88
//adds runtime to the source
9-
type LambdaSource = {
9+
export type LambdaSource = {
1010
runtime: lamb.Runtime;
1111
source: ExistingDirectory | ExistingLambda | NewFromCode;
1212
};

0 commit comments

Comments
 (0)