@aetherionfw/core 1.0.0 → 1.1.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.
@@ -1,3 +1,4 @@
1
+ import { ApiGatewayMetadata } from '../registry/MetadataRegistry';
1
2
  export declare function Infra(): ClassDecorator;
2
3
  export declare function S3Bucket(props: {
3
4
  name: string;
@@ -46,3 +47,4 @@ export declare function RdsInstance(props: {
46
47
  size: string;
47
48
  dbName: string;
48
49
  }): PropertyDecorator;
50
+ export declare function ApiGateway(props: ApiGatewayMetadata): PropertyDecorator;
@@ -12,6 +12,7 @@ exports.CognitoUserPool = CognitoUserPool;
12
12
  exports.Vpc = Vpc;
13
13
  exports.IamRole = IamRole;
14
14
  exports.RdsInstance = RdsInstance;
15
+ exports.ApiGateway = ApiGateway;
15
16
  const MetadataRegistry_1 = require("../registry/MetadataRegistry");
16
17
  function Infra() {
17
18
  return (target) => {
@@ -118,3 +119,12 @@ function RdsInstance(props) {
118
119
  });
119
120
  };
120
121
  }
122
+ function ApiGateway(props) {
123
+ return (target, propertyKey) => {
124
+ MetadataRegistry_1.MetadataRegistry.getInstance().registerInfraResource(target.constructor, {
125
+ type: 'ApiGateway',
126
+ name: String(propertyKey),
127
+ props
128
+ });
129
+ };
130
+ }
@@ -12,6 +12,7 @@ export interface ControllerMetadata {
12
12
  memorySize?: number;
13
13
  timeout?: number;
14
14
  layers?: string[];
15
+ apiGateway?: string;
15
16
  }
16
17
  export interface RouteMetadata {
17
18
  method: string;
@@ -38,6 +39,16 @@ export interface InfraMetadata {
38
39
  name: string;
39
40
  props: any;
40
41
  }
42
+ export interface ApiGatewayMetadata {
43
+ name: string;
44
+ type: 'REST' | 'HTTP';
45
+ description?: string;
46
+ existingApiId?: string;
47
+ existingRootResourceId?: string;
48
+ stageName?: string;
49
+ corsEnabled?: boolean;
50
+ corsOrigins?: string[];
51
+ }
41
52
  export declare class MetadataRegistry {
42
53
  private static instance;
43
54
  private modules;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aetherionfw/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Core decorators and runtime for Aetherion Framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",