@aws-lite/apigatewayv2-types 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +38 -0
- package/package.json +13 -0
- package/readme.md +46 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
/* ! Do not remove IMPORTS_START / IMPORTS_END ! */
|
|
3
|
+
// $IMPORTS_START
|
|
4
|
+
CreateDeploymentCommandOutput as CreateDeploymentResponse,
|
|
5
|
+
GetDeploymentCommandOutput as GetDeploymentResponse,
|
|
6
|
+
UpdateStageCommandOutput as UpdateStageResponse,
|
|
7
|
+
// $IMPORTS_END
|
|
8
|
+
} from "@aws-sdk/client-apigatewayv2";
|
|
9
|
+
|
|
10
|
+
declare interface AwsLiteAPIGatewayV2 {
|
|
11
|
+
/* ! Do not remove METHODS_START / METHODS_END ! */
|
|
12
|
+
// $METHODS_START
|
|
13
|
+
/**
|
|
14
|
+
* @description
|
|
15
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/apigatewayv2/latest/api-reference/apis-apiid-deployments.html#CreateDeployment API Gateway V2: CreateDeployment}
|
|
16
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/apigatewayv2/readme.md#CreateDeployment API Gateway V2: CreateDeployment}
|
|
17
|
+
*/
|
|
18
|
+
CreateDeployment: (input: { ApiId: string, Description?: string, StageName?: string }) => Promise<CreateDeploymentResponse>
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/apigatewayv2/latest/api-reference/apis-apiid-deployments-deploymentid.html#GetDeployment API Gateway V2: GetDeployment}
|
|
22
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/apigatewayv2/readme.md#GetDeployment API Gateway V2: GetDeployment}
|
|
23
|
+
*/
|
|
24
|
+
GetDeployment: (input: { ApiId: string, NextToken?: string, MaxResults?: number }) => Promise<GetDeploymentResponse>
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
* - AWS docs: {@link https://docs.aws.amazon.com/apigatewayv2/latest/api-reference/apis-apiid-stages-stagename.html#UpdateStage API Gateway V2: UpdateStage}
|
|
28
|
+
* - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/apigatewayv2/readme.md#UpdateStage API Gateway V2: UpdateStage}
|
|
29
|
+
*/
|
|
30
|
+
UpdateStage: (input: { ApiId: string, StageName: string, AccessLogSettings?: Record<string, any>, AutoDeploy?: boolean, ClientCertificateId?: string, DefaultRouteSettings?: Record<string, any>, DeploymentId?: string, Description?: string, RouteSettings?: Record<string, any>, StageVariables?: Record<string, any> }) => Promise<UpdateStageResponse>
|
|
31
|
+
// $METHODS_END
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module "@aws-lite/client" {
|
|
35
|
+
interface AwsLiteClient {
|
|
36
|
+
APIGatewayV2: AwsLiteAPIGatewayV2;
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-lite/apigatewayv2-types",
|
|
3
|
+
"description": "Type definitions for the @aws-lite/apigatewayv2 plugin",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"main": "",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@aws-sdk/client-apigatewayv2": "3"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
## Install
|
|
2
|
+
|
|
3
|
+
Add to `devDependencies` in `package.json`:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npm i -D @aws-lite/apigatewayv2-types
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
<small>Be sure you also have `@aws-lite/apigatewayv2` installed.</small>
|
|
10
|
+
|
|
11
|
+
## Usage and Config
|
|
12
|
+
|
|
13
|
+
### Javascript VSCode Intellisense
|
|
14
|
+
|
|
15
|
+
In a Javascript project, the ambient types will be automatically loaded.
|
|
16
|
+
|
|
17
|
+
### TypeScript `tsconfig`
|
|
18
|
+
|
|
19
|
+
#### Add this package to `compilerOptions.types`
|
|
20
|
+
|
|
21
|
+
Example:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"extends": "@tsconfig/node-lts/tsconfig.json",
|
|
26
|
+
"compilerOptions": {
|
|
27
|
+
"types": [
|
|
28
|
+
"@aws-lite/apigatewayv2-types"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### Or use reference types
|
|
35
|
+
|
|
36
|
+
Either in individual files or in an `index.d.ts` file.
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
/// <reference types="@aws-lite/apigatewayv2-types" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
ymmv
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
/// <reference path="./node_modules/@aws-lite/apigatewayv2-types/index.d.ts" />
|
|
46
|
+
```
|