@aws-lite/cloudfront-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 +66 -0
  2. package/package.json +13 -0
  3. package/readme.md +46 -0
package/index.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ import {
2
+ /* ! Do not remove IMPORTS_START / IMPORTS_END ! */
3
+ // $IMPORTS_START
4
+ CreateDistributionCommandOutput as CreateDistributionResponse,
5
+ CreateInvalidationCommandOutput as CreateInvalidationResponse,
6
+ DeleteDistributionCommandOutput as DeleteDistributionResponse,
7
+ GetDistributionCommandOutput as GetDistributionResponse,
8
+ GetDistributionConfigCommandOutput as GetDistributionConfigResponse,
9
+ ListDistributionsCommandOutput as ListDistributionsResponse,
10
+ UpdateDistributionCommandOutput as UpdateDistributionResponse,
11
+ // $IMPORTS_END
12
+ } from "@aws-sdk/client-cloudfront";
13
+
14
+ declare interface AwsLiteCloudFront {
15
+ /* ! Do not remove METHODS_START / METHODS_END ! */
16
+ // $METHODS_START
17
+ /**
18
+ * @description
19
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html CloudFront: CreateDistribution}
20
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#CreateDistribution CloudFront: CreateDistribution}
21
+ */
22
+ CreateDistribution: (input: { DistributionConfig: Record<string, any> }) => Promise<CreateDistributionResponse>
23
+ /**
24
+ * @description
25
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html CloudFront: CreateInvalidation}
26
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#CreateInvalidation CloudFront: CreateInvalidation}
27
+ */
28
+ CreateInvalidation: (input: { Id: string, InvalidationBatch: string }) => Promise<CreateInvalidationResponse>
29
+ /**
30
+ * @description
31
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_DeleteDistribution.html CloudFront: DeleteDistribution}
32
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#DeleteDistribution CloudFront: DeleteDistribution}
33
+ */
34
+ DeleteDistribution: (input: { Id: string }) => Promise<DeleteDistributionResponse>
35
+ /**
36
+ * @description
37
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html CloudFront: GetDistribution}
38
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#GetDistribution CloudFront: GetDistribution}
39
+ */
40
+ GetDistribution: (input: { Id: string }) => Promise<GetDistributionResponse>
41
+ /**
42
+ * @description
43
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistributionConfig.html CloudFront: GetDistributionConfig}
44
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#GetDistributionConfig CloudFront: GetDistributionConfig}
45
+ */
46
+ GetDistributionConfig: (input: { Id: string }) => Promise<GetDistributionConfigResponse>
47
+ /**
48
+ * @description
49
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ListDistributions.html CloudFront: ListDistributions}
50
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#ListDistributions CloudFront: ListDistributions}
51
+ */
52
+ ListDistributions: (input: { Marker?: string, MaxItems?: string }) => Promise<ListDistributionsResponse>
53
+ /**
54
+ * @description
55
+ * - AWS docs: {@link https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html CloudFront: UpdateDistribution}
56
+ * - aws-lite docs: {@link https://github.com/architect/aws-lite/blob/main/plugins/cloudfront/readme.md#UpdateDistribution CloudFront: UpdateDistribution}
57
+ */
58
+ UpdateDistribution: (input: { DistributionConfig: Record<string, any>, Id: string, IfMatch: string }) => Promise<UpdateDistributionResponse>
59
+ // $METHODS_END
60
+ }
61
+
62
+ declare module "@aws-lite/client" {
63
+ interface AwsLiteClient {
64
+ CloudFront: AwsLiteCloudFront;
65
+ }
66
+ }
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@aws-lite/cloudfront-types",
3
+ "description": "Type definitions for the @aws-lite/cloudfront 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-cloudfront": "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/cloudfront-types
7
+ ```
8
+
9
+ <small>Be sure you also have `@aws-lite/cloudfront` 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/cloudfront-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/cloudfront-types" />
40
+ ```
41
+
42
+ ymmv
43
+
44
+ ```ts
45
+ /// <reference path="./node_modules/@aws-lite/cloudfront-types/index.d.ts" />
46
+ ```