@xube/kit-aws-hooks-infrastructure 0.0.69 → 0.0.71

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.
@@ -1,3 +1,2 @@
1
1
  import { APIGatewayProxyResult, APIGatewayProxyWithCognitoAuthorizerEvent } from "aws-lambda";
2
- export declare const webhookTableName: string;
3
2
  export declare const handler: (event: APIGatewayProxyWithCognitoAuthorizerEvent) => Promise<APIGatewayProxyResult>;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handler = exports.webhookTableName = void 0;
3
+ exports.handler = void 0;
4
4
  const kit_aws_hooks_1 = require("@xube/kit-aws-hooks");
5
5
  const kit_constants_1 = require("@xube/kit-constants");
6
6
  const kit_log_1 = require("@xube/kit-log");
7
- exports.webhookTableName = process.env[kit_aws_hooks_1.WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
7
+ const webhookTableName = process.env[kit_aws_hooks_1.WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
8
8
  const handler = async (event) => {
9
- if (!exports.webhookTableName) {
9
+ if (!webhookTableName) {
10
10
  return {
11
11
  body: `Could not find webhook table name in environment variables`,
12
12
  statusCode: kit_constants_1.StatusCode.InternalError,
@@ -25,7 +25,7 @@ const handler = async (event) => {
25
25
  statusCode: kit_constants_1.StatusCode.BadRequest,
26
26
  };
27
27
  }
28
- const response = await (0, kit_aws_hooks_1.createWebhookForAccount)(request, exports.webhookTableName, kit_log_1.XubeLog.getInstance());
28
+ const response = await (0, kit_aws_hooks_1.createWebhookForAccount)(request, webhookTableName, kit_log_1.XubeLog.getInstance());
29
29
  return {
30
30
  body: JSON.stringify(response),
31
31
  statusCode: response.statusCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-hooks-infrastructure",
3
- "version": "0.0.69",
3
+ "version": "0.0.71",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -17,14 +17,14 @@
17
17
  },
18
18
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
19
19
  "devDependencies": {
20
- "@xube/kit-build": "^0.0.69"
20
+ "@xube/kit-build": "^0.0.71"
21
21
  },
22
22
  "dependencies": {
23
- "@xube/kit-aws": "^0.0.69",
24
- "@xube/kit-aws-hooks": "^0.0.69",
25
- "@xube/kit-aws-infrastructure": "^0.0.69",
26
- "@xube/kit-constants": "^0.0.69",
27
- "@xube/kit-log": "^0.0.69",
23
+ "@xube/kit-aws": "^0.0.71",
24
+ "@xube/kit-aws-hooks": "^0.0.71",
25
+ "@xube/kit-aws-infrastructure": "^0.0.71",
26
+ "@xube/kit-constants": "^0.0.71",
27
+ "@xube/kit-log": "^0.0.71",
28
28
  "aws-cdk-lib": "^2.100.0",
29
29
  "aws-lambda": "^1.0.7",
30
30
  "constructs": "^10.3.0"
@@ -10,7 +10,7 @@ import {
10
10
  APIGatewayProxyWithCognitoAuthorizerEvent,
11
11
  } from "aws-lambda";
12
12
 
13
- export const webhookTableName = process.env[WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
13
+ const webhookTableName = process.env[WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
14
14
 
15
15
  export const handler = async (
16
16
  event: APIGatewayProxyWithCognitoAuthorizerEvent
@@ -7,13 +7,9 @@ import { PARTITION_KEY, SORT_KEY } from "@xube/kit-aws-schema";
7
7
  import { XubeLog } from "@xube/kit-log";
8
8
  import { Duration } from "aws-cdk-lib";
9
9
  import {
10
- CorsOptions,
11
- IAuthorizer,
12
- IDomainName,
13
10
  LambdaIntegration,
14
11
  RestApi,
15
12
  } from "aws-cdk-lib/aws-apigateway";
16
- import { ICertificate } from "aws-cdk-lib/aws-certificatemanager";
17
13
  import { AttributeType, ITable, Table } from "aws-cdk-lib/aws-dynamodb";
18
14
  import { PolicyStatement } from "aws-cdk-lib/aws-iam";
19
15
  import { HttpMethod, Runtime, StartingPosition } from "aws-cdk-lib/aws-lambda";