@aws-lite/lambda-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.
Files changed (3) hide show
  1. package/index.d.ts +45 -0
  2. package/package.json +13 -0
  3. package/readme.md +46 -0
package/index.d.ts ADDED
@@ -0,0 +1,45 @@
1
+ import {
2
+ /* ! Do not remove IMPORTS_START / IMPORTS_END ! */
3
+ // $IMPORTS_START
4
+ CreateFunctionCommandOutput as CreateFunctionResponse,
5
+ GetFunctionConfigurationCommandOutput as GetFunctionConfigurationResponse,
6
+ InvokeCommandOutput as InvokeResponse,
7
+ UpdateFunctionConfigurationCommandOutput as UpdateFunctionConfigurationResponse,
8
+ // $IMPORTS_END
9
+ } from "@aws-sdk/client-lambda";
10
+
11
+ declare interface AwsLiteLambda {
12
+ /* ! Do not remove METHODS_START / METHODS_END ! */
13
+ // $METHODS_START
14
+ /**
15
+ * @description
16
+ * - AWS docs: {@link https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html Lambda: CreateFunction}
17
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/lambda/readme.md#CreateFunction Lambda: CreateFunction}
18
+ */
19
+ CreateFunction: (input: { Code: Record<string, any>, FunctionName: string, Role: string, Architectures?: any[], CodeSigningConfigArn?: string, DeadLetterConfig?: Record<string, any>, Description?: string, Environment?: Record<string, any>, EphemeralStorage?: Record<string, any>, FileSystemConfigs?: any[], Handler?: string, ImageConfig?: Record<string, any>, KMSKeyArn?: string, Layers?: any[], MemorySize?: number, PackageType?: string, Publish?: boolean, Runtime?: string, SnapStart?: Record<string, any>, Tags?: any[], Timeout?: number, TracingConfig?: Record<string, any>, VpcConfig?: Record<string, any> }) => Promise<CreateFunctionResponse>
20
+ /**
21
+ * @description
22
+ * - AWS docs: {@link https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html Lambda: GetFunctionConfiguration}
23
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/lambda/readme.md#GetFunctionConfiguration Lambda: GetFunctionConfiguration}
24
+ */
25
+ GetFunctionConfiguration: (input: { FunctionName: string, Qualifier?: string }) => Promise<GetFunctionConfigurationResponse>
26
+ /**
27
+ * @description
28
+ * - AWS docs: {@link https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html Lambda: Invoke}
29
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/lambda/readme.md#Invoke Lambda: Invoke}
30
+ */
31
+ Invoke: (input: { FunctionName: string, InvocationType?: string, Payload: array,object, LogType?: string, ClientContext?: string, Qualifier?: string }) => Promise<InvokeResponse>
32
+ /**
33
+ * @description
34
+ * - AWS docs: {@link https://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionConfiguration.html Lambda: UpdateFunctionConfiguration}
35
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/lambda/readme.md#UpdateFunctionConfiguration Lambda: UpdateFunctionConfiguration}
36
+ */
37
+ UpdateFunctionConfiguration: (input: { FunctionName: string, DeadLetterConfig?: Record<string, any>, Description?: string, Environment?: Record<string, any>, EphemeralStorage?: Record<string, any>, FileSystemConfigs?: any[], Handler?: string, ImageConfig?: Record<string, any>, KMSKeyArn?: string, Layers?: any[], MemorySize?: number, RevisionId?: string, Role?: string, Runtime?: string, SnapStart?: Record<string, any>, Timeout?: number, TracingConfig?: Record<string, any>, VpcConfig?: Record<string, any> }) => Promise<UpdateFunctionConfigurationResponse>
38
+ // $METHODS_END
39
+ }
40
+
41
+ declare module "@aws-lite/client" {
42
+ interface AwsLiteClient {
43
+ Lambda: AwsLiteLambda;
44
+ }
45
+ }
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@aws-lite/lambda-types",
3
+ "description": "Type definitions for the @aws-lite/lambda 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-lambda": "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/lambda-types
7
+ ```
8
+
9
+ <small>Be sure you also have `@aws-lite/lambda` 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/lambda-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/lambda-types" />
40
+ ```
41
+
42
+ ymmv
43
+
44
+ ```ts
45
+ /// <reference path="./node_modules/@aws-lite/lambda-types/index.d.ts" />
46
+ ```