@ts-cloud/core 0.2.2 → 0.2.4

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 (226) hide show
  1. package/dist/advanced-features.test.d.ts +1 -0
  2. package/dist/aws/cloudformation.d.ts +136 -0
  3. package/dist/aws/cloudfront.d.ts +45 -0
  4. package/dist/aws/credentials.d.ts +77 -0
  5. package/dist/aws/credentials.test.d.ts +4 -0
  6. package/dist/aws/index.d.ts +10 -0
  7. package/dist/aws/s3.d.ts +256 -0
  8. package/dist/aws/s3.test.d.ts +4 -0
  9. package/dist/aws/signature.d.ts +142 -0
  10. package/dist/aws/signature.test.d.ts +4 -0
  11. package/dist/backup/disaster-recovery.d.ts +140 -0
  12. package/dist/backup/disaster-recovery.test.d.ts +1 -0
  13. package/dist/backup/index.d.ts +8 -0
  14. package/dist/backup/manager.d.ts +172 -0
  15. package/dist/backup/manager.test.d.ts +1 -0
  16. package/dist/cicd/circleci.d.ts +50 -0
  17. package/dist/cicd/github-actions.d.ts +62 -0
  18. package/dist/cicd/gitlab-ci.d.ts +50 -0
  19. package/dist/cicd/index.d.ts +7 -0
  20. package/dist/cli/history.d.ts +137 -0
  21. package/dist/cli/index.d.ts +9 -0
  22. package/dist/cli/progress.d.ts +193 -0
  23. package/dist/cli/repl.d.ts +148 -0
  24. package/dist/cli/suggestions.d.ts +74 -0
  25. package/dist/cli/table.d.ts +73 -0
  26. package/dist/cli/table.test.d.ts +1 -0
  27. package/dist/cloudformation/builder.d.ts +93 -0
  28. package/dist/cloudformation/builder.test.d.ts +4 -0
  29. package/dist/cloudformation/builders/api-gateway.d.ts +30 -0
  30. package/dist/cloudformation/builders/cache.d.ts +35 -0
  31. package/dist/cloudformation/builders/cdn.d.ts +34 -0
  32. package/dist/cloudformation/builders/compute.d.ts +68 -0
  33. package/dist/cloudformation/builders/database.d.ts +61 -0
  34. package/dist/cloudformation/builders/functions.d.ts +32 -0
  35. package/dist/cloudformation/builders/messaging.d.ts +17 -0
  36. package/dist/cloudformation/builders/monitoring.d.ts +39 -0
  37. package/dist/cloudformation/builders/network.d.ts +14 -0
  38. package/dist/cloudformation/builders/queue.d.ts +16 -0
  39. package/dist/cloudformation/builders/security.d.ts +31 -0
  40. package/dist/cloudformation/builders/storage.d.ts +36 -0
  41. package/dist/cloudformation/index.d.ts +10 -0
  42. package/dist/cloudformation/types.d.ts +200 -0
  43. package/dist/compliance/aws-config.d.ts +175 -0
  44. package/dist/compliance/cloudtrail.d.ts +132 -0
  45. package/dist/compliance/compliance.test.d.ts +1 -0
  46. package/dist/compliance/guardduty.d.ts +176 -0
  47. package/dist/compliance/index.d.ts +12 -0
  48. package/dist/compliance/security-hub.d.ts +178 -0
  49. package/dist/containers/build-optimization.d.ts +155 -0
  50. package/dist/containers/containers.test.d.ts +1 -0
  51. package/dist/containers/image-scanning.d.ts +144 -0
  52. package/dist/containers/index.d.ts +8 -0
  53. package/dist/containers/registry.d.ts +129 -0
  54. package/dist/containers/service-mesh.d.ts +254 -0
  55. package/dist/database/database.test.d.ts +1 -0
  56. package/dist/database/index.d.ts +8 -0
  57. package/dist/database/migrations.d.ts +153 -0
  58. package/dist/database/performance.d.ts +219 -0
  59. package/dist/database/replicas.d.ts +218 -0
  60. package/dist/database/users.d.ts +165 -0
  61. package/dist/dependency-graph.d.ts +37 -0
  62. package/dist/deployment/ab-testing.d.ts +165 -0
  63. package/dist/deployment/blue-green.d.ts +140 -0
  64. package/dist/deployment/canary.d.ts +165 -0
  65. package/dist/deployment/deployment.test.d.ts +1 -0
  66. package/dist/deployment/index.d.ts +12 -0
  67. package/dist/deployment/progressive.d.ts +50 -0
  68. package/dist/dns/dns.test.d.ts +1 -0
  69. package/dist/dns/dnssec.d.ts +120 -0
  70. package/dist/dns/index.d.ts +7 -0
  71. package/dist/dns/resolver.d.ts +216 -0
  72. package/dist/dns/routing.d.ts +277 -0
  73. package/dist/email/advanced/analytics.d.ts +107 -0
  74. package/dist/email/advanced/index.d.ts +10 -0
  75. package/dist/email/advanced/rules.d.ts +131 -0
  76. package/dist/email/advanced/scheduling.d.ts +81 -0
  77. package/dist/email/advanced/search.d.ts +91 -0
  78. package/dist/email/advanced/shared-mailboxes.d.ts +109 -0
  79. package/dist/email/advanced/templates.d.ts +95 -0
  80. package/dist/email/advanced/threading.d.ts +65 -0
  81. package/dist/email/analytics.d.ts +189 -0
  82. package/dist/email/bounce-handling.d.ts +171 -0
  83. package/dist/email/email.test.d.ts +1 -0
  84. package/dist/email/handlers/__tests__/inbound.test.d.ts +1 -0
  85. package/dist/email/handlers/__tests__/outbound.test.d.ts +1 -0
  86. package/dist/email/handlers/converter.d.ts +11 -0
  87. package/dist/email/handlers/feedback.d.ts +11 -0
  88. package/dist/email/handlers/inbound.d.ts +13 -0
  89. package/dist/email/handlers/outbound.d.ts +13 -0
  90. package/dist/email/index.d.ts +10 -0
  91. package/dist/email/reputation.d.ts +133 -0
  92. package/dist/email/templates.d.ts +124 -0
  93. package/dist/errors/index.d.ts +177 -0
  94. package/dist/errors/index.test.d.ts +4 -0
  95. package/dist/health-checks/index.d.ts +35 -0
  96. package/dist/index.d.ts +15 -256
  97. package/dist/index.js +228 -80
  98. package/dist/intrinsic-functions.d.ts +77 -0
  99. package/dist/lambda/concurrency.d.ts +146 -0
  100. package/dist/lambda/destinations.d.ts +141 -0
  101. package/dist/lambda/dlq.d.ts +160 -0
  102. package/dist/lambda/index.d.ts +10 -0
  103. package/dist/lambda/lambda.test.d.ts +1 -0
  104. package/dist/lambda/layers.d.ts +117 -0
  105. package/dist/lambda/versions.d.ts +145 -0
  106. package/dist/lambda/vpc.d.ts +164 -0
  107. package/dist/local/config.d.ts +44 -0
  108. package/dist/local/index.d.ts +5 -0
  109. package/dist/local/mock-aws.d.ts +69 -0
  110. package/dist/modules/ai.d.ts +108 -0
  111. package/dist/modules/api.d.ts +157 -0
  112. package/dist/modules/auth.d.ts +262 -0
  113. package/dist/modules/cache.d.ts +108 -0
  114. package/dist/modules/cdn.d.ts +305 -0
  115. package/dist/modules/communication.d.ts +117 -0
  116. package/dist/modules/compute.d.ts +1376 -0
  117. package/dist/modules/database.d.ts +144 -0
  118. package/dist/modules/deployment.d.ts +372 -0
  119. package/dist/modules/dns.d.ts +143 -0
  120. package/dist/modules/email.d.ts +314 -0
  121. package/dist/modules/filesystem.d.ts +132 -0
  122. package/dist/modules/index.d.ts +31 -0
  123. package/dist/modules/messaging.d.ts +210 -0
  124. package/dist/modules/monitoring.d.ts +574 -0
  125. package/dist/modules/network.d.ts +148 -0
  126. package/dist/modules/parameter-store.d.ts +143 -0
  127. package/dist/modules/permissions.d.ts +245 -0
  128. package/dist/modules/phone.d.ts +125 -0
  129. package/dist/modules/queue.d.ts +411 -0
  130. package/dist/modules/redirects.d.ts +140 -0
  131. package/dist/modules/registry.d.ts +189 -0
  132. package/dist/modules/search.d.ts +135 -0
  133. package/dist/modules/secrets.d.ts +149 -0
  134. package/dist/modules/security.d.ts +219 -0
  135. package/dist/modules/sms.d.ts +130 -0
  136. package/dist/modules/storage.d.ts +344 -0
  137. package/dist/modules/workflow.d.ts +288 -0
  138. package/dist/multi-account/config.d.ts +166 -0
  139. package/dist/multi-account/index.d.ts +6 -0
  140. package/dist/multi-account/manager.d.ts +181 -0
  141. package/dist/multi-region/cross-region.d.ts +204 -0
  142. package/dist/multi-region/index.d.ts +7 -0
  143. package/dist/multi-region/manager.d.ts +136 -0
  144. package/dist/multi-region/regions.d.ts +98 -0
  145. package/dist/network-security/index.d.ts +55 -0
  146. package/dist/observability/index.d.ts +8 -0
  147. package/dist/observability/logs.d.ts +213 -0
  148. package/dist/observability/metrics.d.ts +187 -0
  149. package/dist/observability/observability.test.d.ts +1 -0
  150. package/dist/observability/synthetics.d.ts +189 -0
  151. package/dist/observability/xray.d.ts +193 -0
  152. package/dist/phone/advanced/analytics.d.ts +83 -0
  153. package/dist/phone/advanced/callbacks.d.ts +67 -0
  154. package/dist/phone/advanced/index.d.ts +7 -0
  155. package/dist/phone/advanced/ivr-builder.d.ts +130 -0
  156. package/dist/phone/advanced/recording.d.ts +62 -0
  157. package/dist/phone/handlers/__tests__/incoming-call.test.d.ts +1 -0
  158. package/dist/phone/handlers/incoming-call.d.ts +10 -0
  159. package/dist/phone/handlers/missed-call.d.ts +9 -0
  160. package/dist/phone/handlers/voicemail.d.ts +10 -0
  161. package/dist/phone/index.d.ts +5 -0
  162. package/dist/presets/api-backend.d.ts +11 -0
  163. package/dist/presets/data-pipeline.d.ts +11 -0
  164. package/dist/presets/extend.d.ts +194 -0
  165. package/dist/presets/extend.test.d.ts +4 -0
  166. package/dist/presets/fullstack-app.d.ts +12 -0
  167. package/dist/presets/index.d.ts +13 -0
  168. package/dist/presets/jamstack.d.ts +12 -0
  169. package/dist/presets/microservices.d.ts +18 -0
  170. package/dist/presets/ml-api.d.ts +13 -0
  171. package/dist/presets/nodejs-server.d.ts +14 -0
  172. package/dist/presets/nodejs-serverless.d.ts +14 -0
  173. package/dist/presets/realtime-app.d.ts +11 -0
  174. package/dist/presets/static-site.d.ts +12 -0
  175. package/dist/presets/traditional-web-app.d.ts +16 -0
  176. package/dist/presets/wordpress.d.ts +12 -0
  177. package/dist/preview/github.d.ts +32 -0
  178. package/dist/preview/github.test.d.ts +1 -0
  179. package/dist/preview/index.d.ts +10 -0
  180. package/dist/preview/manager.d.ts +101 -0
  181. package/dist/preview/manager.test.d.ts +1 -0
  182. package/dist/preview/notifications.d.ts +89 -0
  183. package/dist/preview/notifications.test.d.ts +1 -0
  184. package/dist/queue/batch-processing.d.ts +138 -0
  185. package/dist/queue/dlq-monitoring.d.ts +143 -0
  186. package/dist/queue/fifo.d.ts +131 -0
  187. package/dist/queue/index.d.ts +8 -0
  188. package/dist/queue/management.d.ts +162 -0
  189. package/dist/queue/queue.test.d.ts +1 -0
  190. package/dist/resource-mgmt/index.d.ts +44 -0
  191. package/dist/resource-naming.d.ts +26 -0
  192. package/dist/s3/index.d.ts +227 -0
  193. package/dist/schema/index.d.ts +12 -0
  194. package/dist/security/certificate-manager.d.ts +184 -0
  195. package/dist/security/index.d.ts +8 -0
  196. package/dist/security/scanning.d.ts +196 -0
  197. package/dist/security/secrets-manager.d.ts +204 -0
  198. package/dist/security/secrets-rotation.d.ts +167 -0
  199. package/dist/security/security.test.d.ts +1 -0
  200. package/dist/sms/advanced/ab-testing.d.ts +74 -0
  201. package/dist/sms/advanced/analytics.d.ts +75 -0
  202. package/dist/sms/advanced/campaigns.d.ts +96 -0
  203. package/dist/sms/advanced/chatbot.d.ts +67 -0
  204. package/dist/sms/advanced/index.d.ts +9 -0
  205. package/dist/sms/advanced/link-tracking.d.ts +60 -0
  206. package/dist/sms/advanced/mms.d.ts +60 -0
  207. package/dist/sms/handlers/__tests__/send.test.d.ts +1 -0
  208. package/dist/sms/handlers/delivery-status.d.ts +10 -0
  209. package/dist/sms/handlers/receive.d.ts +10 -0
  210. package/dist/sms/handlers/send.d.ts +10 -0
  211. package/dist/sms/index.d.ts +5 -0
  212. package/dist/stack-diff.d.ts +38 -0
  213. package/dist/static-site/index.d.ts +49 -0
  214. package/dist/template-builder.d.ts +42 -0
  215. package/dist/template-validator.d.ts +28 -0
  216. package/dist/types.d.ts +2514 -0
  217. package/dist/utils/cache.d.ts +117 -0
  218. package/dist/utils/diff.d.ts +52 -0
  219. package/dist/utils/hash.d.ts +73 -0
  220. package/dist/utils/index.d.ts +7 -0
  221. package/dist/utils/parallel.d.ts +78 -0
  222. package/dist/validators/credentials.d.ts +30 -0
  223. package/dist/validators/credentials.test.d.ts +4 -0
  224. package/dist/validators/quotas.d.ts +64 -0
  225. package/dist/validators/quotas.test.d.ts +4 -0
  226. package/package.json +2 -2
@@ -0,0 +1,77 @@
1
+ /**
2
+ * CloudFormation Intrinsic Functions Helpers
3
+ */
4
+ export interface IntrinsicFunctions {
5
+ Ref: (logicalName: string) => {
6
+ Ref: string;
7
+ };
8
+ GetAtt: (logicalName: string, attributeName: string) => {
9
+ 'Fn::GetAtt': [string, string];
10
+ };
11
+ Sub: (template: string, variables?: Record<string, any>) => {
12
+ 'Fn::Sub': string | [string, Record<string, any>];
13
+ };
14
+ Join: (delimiter: string, values: any[]) => {
15
+ 'Fn::Join': [string, any[]];
16
+ };
17
+ Select: (index: number | string, list: any[]) => {
18
+ 'Fn::Select': [number | string, any[]];
19
+ };
20
+ Split: (delimiter: string, source: string) => {
21
+ 'Fn::Split': [string, string];
22
+ };
23
+ GetAZs: (region?: string) => {
24
+ 'Fn::GetAZs': string;
25
+ };
26
+ ImportValue: (name: string) => {
27
+ 'Fn::ImportValue': string;
28
+ };
29
+ If: (condition: string, trueValue: any, falseValue: any) => {
30
+ 'Fn::If': [string, any, any];
31
+ };
32
+ Equals: (value1: any, value2: any) => {
33
+ 'Fn::Equals': [any, any];
34
+ };
35
+ And: (...conditions: any[]) => {
36
+ 'Fn::And': any[];
37
+ };
38
+ Or: (...conditions: any[]) => {
39
+ 'Fn::Or': any[];
40
+ };
41
+ Not: (condition: any) => {
42
+ 'Fn::Not': [any];
43
+ };
44
+ Base64: (input: string) => {
45
+ 'Fn::Base64': string;
46
+ };
47
+ }
48
+ export declare const Fn: IntrinsicFunctions;
49
+ /**
50
+ * Pseudo Parameters - AWS CloudFormation provides several built-in parameters
51
+ */
52
+ export declare const Pseudo: {
53
+ readonly AccountId: {
54
+ readonly Ref: "AWS::AccountId";
55
+ };
56
+ readonly Region: {
57
+ readonly Ref: "AWS::Region";
58
+ };
59
+ readonly StackId: {
60
+ readonly Ref: "AWS::StackId";
61
+ };
62
+ readonly StackName: {
63
+ readonly Ref: "AWS::StackName";
64
+ };
65
+ readonly NotificationARNs: {
66
+ readonly Ref: "AWS::NotificationARNs";
67
+ };
68
+ readonly Partition: {
69
+ readonly Ref: "AWS::Partition";
70
+ };
71
+ readonly URLSuffix: {
72
+ readonly Ref: "AWS::URLSuffix";
73
+ };
74
+ readonly NoValue: {
75
+ readonly Ref: "AWS::NoValue";
76
+ };
77
+ };
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Lambda Concurrency Management
3
+ * Reserved and provisioned concurrency configuration
4
+ */
5
+ export interface ConcurrencyConfig {
6
+ id: string;
7
+ functionName: string;
8
+ reservedConcurrency?: number;
9
+ provisionedConcurrency?: ProvisionedConcurrencyConfig[];
10
+ }
11
+ export interface ProvisionedConcurrencyConfig {
12
+ id: string;
13
+ functionName: string;
14
+ qualifier: string;
15
+ provisionedConcurrentExecutions: number;
16
+ status: 'pending' | 'ready' | 'in_progress' | 'failed';
17
+ allocatedConcurrency?: number;
18
+ availableConcurrency?: number;
19
+ lastModified?: Date;
20
+ }
21
+ export interface ConcurrencySchedule {
22
+ id: string;
23
+ name: string;
24
+ functionName: string;
25
+ qualifier: string;
26
+ schedule: ScheduleRule[];
27
+ }
28
+ export interface ScheduleRule {
29
+ name: string;
30
+ cronExpression: string;
31
+ targetConcurrency: number;
32
+ minCapacity?: number;
33
+ maxCapacity?: number;
34
+ }
35
+ export interface AutoScalingConfig {
36
+ id: string;
37
+ functionName: string;
38
+ qualifier: string;
39
+ minCapacity: number;
40
+ maxCapacity: number;
41
+ targetUtilization: number;
42
+ scaleInCooldown?: number;
43
+ scaleOutCooldown?: number;
44
+ }
45
+ /**
46
+ * Lambda concurrency manager
47
+ */
48
+ export declare class LambdaConcurrencyManager {
49
+ private configs;
50
+ private provisionedConfigs;
51
+ private schedules;
52
+ private autoScalingConfigs;
53
+ private configCounter;
54
+ private provisionedCounter;
55
+ private scheduleCounter;
56
+ private autoScalingCounter;
57
+ /**
58
+ * Set reserved concurrency
59
+ */
60
+ setReservedConcurrency(options: {
61
+ functionName: string;
62
+ reservedConcurrency: number;
63
+ }): ConcurrencyConfig;
64
+ /**
65
+ * Set provisioned concurrency
66
+ */
67
+ setProvisionedConcurrency(options: {
68
+ functionName: string;
69
+ qualifier: string;
70
+ provisionedConcurrentExecutions: number;
71
+ }): ProvisionedConcurrencyConfig;
72
+ /**
73
+ * Configure warm pool
74
+ */
75
+ configureWarmPool(options: {
76
+ functionName: string;
77
+ alias: string;
78
+ minInstances: number;
79
+ }): ProvisionedConcurrencyConfig;
80
+ /**
81
+ * Create concurrency schedule
82
+ */
83
+ createSchedule(schedule: Omit<ConcurrencySchedule, 'id'>): ConcurrencySchedule;
84
+ /**
85
+ * Create business hours schedule
86
+ */
87
+ createBusinessHoursSchedule(options: {
88
+ functionName: string;
89
+ qualifier: string;
90
+ businessHoursConcurrency: number;
91
+ offHoursConcurrency: number;
92
+ }): ConcurrencySchedule;
93
+ /**
94
+ * Configure auto-scaling
95
+ */
96
+ configureAutoScaling(config: Omit<AutoScalingConfig, 'id'>): AutoScalingConfig;
97
+ /**
98
+ * Configure predictive auto-scaling
99
+ */
100
+ configurePredictiveScaling(options: {
101
+ functionName: string;
102
+ qualifier: string;
103
+ baselineCapacity: number;
104
+ peakCapacity: number;
105
+ }): AutoScalingConfig;
106
+ /**
107
+ * Get concurrency config
108
+ */
109
+ getConfig(id: string): ConcurrencyConfig | undefined;
110
+ /**
111
+ * List concurrency configs
112
+ */
113
+ listConfigs(): ConcurrencyConfig[];
114
+ /**
115
+ * Get provisioned config
116
+ */
117
+ getProvisionedConfig(id: string): ProvisionedConcurrencyConfig | undefined;
118
+ /**
119
+ * List provisioned configs
120
+ */
121
+ listProvisionedConfigs(): ProvisionedConcurrencyConfig[];
122
+ /**
123
+ * Generate CloudFormation for reserved concurrency
124
+ */
125
+ generateReservedConcurrencyCF(config: ConcurrencyConfig): any;
126
+ /**
127
+ * Generate CloudFormation for provisioned concurrency
128
+ */
129
+ generateProvisionedConcurrencyCF(config: ProvisionedConcurrencyConfig): any;
130
+ /**
131
+ * Generate CloudFormation for auto-scaling target
132
+ */
133
+ generateAutoScalingTargetCF(config: AutoScalingConfig): any;
134
+ /**
135
+ * Generate CloudFormation for auto-scaling policy
136
+ */
137
+ generateAutoScalingPolicyCF(config: AutoScalingConfig): any;
138
+ /**
139
+ * Clear all data
140
+ */
141
+ clear(): void;
142
+ }
143
+ /**
144
+ * Global Lambda concurrency manager instance
145
+ */
146
+ export declare const lambdaConcurrencyManager: LambdaConcurrencyManager;
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Lambda Destinations
3
+ * Asynchronous invocation destinations for success and failure
4
+ */
5
+ export interface LambdaDestination {
6
+ id: string;
7
+ functionName: string;
8
+ qualifier?: string;
9
+ successDestination?: DestinationConfig;
10
+ failureDestination?: DestinationConfig;
11
+ maxEventAge?: number;
12
+ maxRetries?: number;
13
+ }
14
+ export interface DestinationConfig {
15
+ type: 'sqs' | 'sns' | 'eventbridge' | 'lambda';
16
+ arn: string;
17
+ }
18
+ export interface DestinationRecord {
19
+ id: string;
20
+ timestamp: Date;
21
+ functionName: string;
22
+ requestId: string;
23
+ status: 'success' | 'failure';
24
+ destinationType: 'sqs' | 'sns' | 'eventbridge' | 'lambda';
25
+ destinationArn: string;
26
+ payload?: any;
27
+ error?: string;
28
+ }
29
+ export interface EventBridgeDestination {
30
+ id: string;
31
+ functionName: string;
32
+ eventBusArn: string;
33
+ detailType: string;
34
+ source: string;
35
+ }
36
+ /**
37
+ * Lambda destinations manager
38
+ */
39
+ export declare class LambdaDestinationsManager {
40
+ private destinations;
41
+ private records;
42
+ private eventBridgeDestinations;
43
+ private destinationCounter;
44
+ private recordCounter;
45
+ private eventBridgeCounter;
46
+ /**
47
+ * Configure destinations
48
+ */
49
+ configureDestinations(destination: Omit<LambdaDestination, 'id'>): LambdaDestination;
50
+ /**
51
+ * Configure SQS destination
52
+ */
53
+ configureSQSDestination(options: {
54
+ functionName: string;
55
+ queueArn: string;
56
+ onSuccess?: boolean;
57
+ onFailure?: boolean;
58
+ }): LambdaDestination;
59
+ /**
60
+ * Configure SNS destination
61
+ */
62
+ configureSNSDestination(options: {
63
+ functionName: string;
64
+ topicArn: string;
65
+ onSuccess?: boolean;
66
+ onFailure?: boolean;
67
+ }): LambdaDestination;
68
+ /**
69
+ * Configure EventBridge destination
70
+ */
71
+ configureEventBridgeDestination(options: {
72
+ functionName: string;
73
+ eventBusArn: string;
74
+ onSuccess?: boolean;
75
+ onFailure?: boolean;
76
+ }): LambdaDestination;
77
+ /**
78
+ * Configure Lambda destination
79
+ */
80
+ configureLambdaDestination(options: {
81
+ functionName: string;
82
+ destinationFunctionArn: string;
83
+ onSuccess?: boolean;
84
+ onFailure?: boolean;
85
+ }): LambdaDestination;
86
+ /**
87
+ * Configure DLQ with SNS destination
88
+ */
89
+ configureDLQWithNotification(options: {
90
+ functionName: string;
91
+ dlqArn: string;
92
+ notificationTopicArn: string;
93
+ }): LambdaDestination;
94
+ /**
95
+ * Create EventBridge integration
96
+ */
97
+ createEventBridgeIntegration(options: {
98
+ functionName: string;
99
+ eventBusArn: string;
100
+ detailType?: string;
101
+ source?: string;
102
+ }): EventBridgeDestination;
103
+ /**
104
+ * Simulate sending to destination
105
+ */
106
+ sendToDestination(options: {
107
+ functionName: string;
108
+ requestId: string;
109
+ status: 'success' | 'failure';
110
+ payload?: any;
111
+ error?: string;
112
+ }): DestinationRecord | null;
113
+ /**
114
+ * Get destination
115
+ */
116
+ getDestination(id: string): LambdaDestination | undefined;
117
+ /**
118
+ * List destinations
119
+ */
120
+ listDestinations(functionName?: string): LambdaDestination[];
121
+ /**
122
+ * Get destination records
123
+ */
124
+ getDestinationRecords(functionName?: string): DestinationRecord[];
125
+ /**
126
+ * Generate CloudFormation for EventSourceMapping with destination
127
+ */
128
+ generateEventInvokeConfigCF(destination: LambdaDestination): any;
129
+ /**
130
+ * Generate CloudFormation for EventBridge rule
131
+ */
132
+ generateEventBridgeRuleCF(destination: EventBridgeDestination): any;
133
+ /**
134
+ * Clear all data
135
+ */
136
+ clear(): void;
137
+ }
138
+ /**
139
+ * Global Lambda destinations manager instance
140
+ */
141
+ export declare const lambdaDestinationsManager: LambdaDestinationsManager;
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Lambda Dead Letter Queue (DLQ)
3
+ * Error handling and failed event management
4
+ */
5
+ export interface DLQConfig {
6
+ id: string;
7
+ functionName: string;
8
+ targetArn: string;
9
+ targetType: 'sqs' | 'sns';
10
+ maxReceiveCount?: number;
11
+ retentionPeriod?: number;
12
+ }
13
+ export interface DLQMessage {
14
+ id: string;
15
+ functionName: string;
16
+ requestId: string;
17
+ timestamp: Date;
18
+ errorMessage: string;
19
+ errorType: string;
20
+ stackTrace?: string;
21
+ payload: any;
22
+ attemptCount: number;
23
+ }
24
+ export interface DLQAlarm {
25
+ id: string;
26
+ dlqConfigId: string;
27
+ alarmName: string;
28
+ threshold: number;
29
+ evaluationPeriods: number;
30
+ notificationTopicArn?: string;
31
+ enabled: boolean;
32
+ }
33
+ export interface DLQReprocessing {
34
+ id: string;
35
+ dlqConfigId: string;
36
+ messageId: string;
37
+ status: 'pending' | 'processing' | 'success' | 'failed';
38
+ startedAt?: Date;
39
+ completedAt?: Date;
40
+ error?: string;
41
+ }
42
+ /**
43
+ * Lambda DLQ manager
44
+ */
45
+ export declare class LambdaDLQManager {
46
+ private dlqConfigs;
47
+ private messages;
48
+ private alarms;
49
+ private reprocessing;
50
+ private configCounter;
51
+ private messageCounter;
52
+ private alarmCounter;
53
+ private reprocessCounter;
54
+ /**
55
+ * Configure DLQ
56
+ */
57
+ configureDLQ(config: Omit<DLQConfig, 'id'>): DLQConfig;
58
+ /**
59
+ * Configure SQS DLQ
60
+ */
61
+ configureSQSDLQ(options: {
62
+ functionName: string;
63
+ queueArn: string;
64
+ maxReceiveCount?: number;
65
+ retentionPeriod?: number;
66
+ }): DLQConfig;
67
+ /**
68
+ * Configure SNS DLQ
69
+ */
70
+ configureSNSDLQ(options: {
71
+ functionName: string;
72
+ topicArn: string;
73
+ }): DLQConfig;
74
+ /**
75
+ * Configure DLQ with alarm
76
+ */
77
+ configureDLQWithAlarm(options: {
78
+ functionName: string;
79
+ queueArn: string;
80
+ alarmThreshold: number;
81
+ notificationTopicArn: string;
82
+ }): DLQConfig;
83
+ /**
84
+ * Send message to DLQ
85
+ */
86
+ sendToDLQ(options: {
87
+ functionName: string;
88
+ requestId: string;
89
+ errorMessage: string;
90
+ errorType: string;
91
+ stackTrace?: string;
92
+ payload: any;
93
+ attemptCount: number;
94
+ }): DLQMessage;
95
+ /**
96
+ * Create DLQ alarm
97
+ */
98
+ createDLQAlarm(alarm: Omit<DLQAlarm, 'id'>): DLQAlarm;
99
+ /**
100
+ * Create age alarm
101
+ */
102
+ createAgeAlarm(options: {
103
+ dlqConfigId: string;
104
+ maxAgeSeconds: number;
105
+ notificationTopicArn: string;
106
+ }): DLQAlarm;
107
+ /**
108
+ * Reprocess DLQ message
109
+ */
110
+ reprocessMessage(messageId: string): Promise<DLQReprocessing>;
111
+ /**
112
+ * Batch reprocess messages
113
+ */
114
+ batchReprocess(options: {
115
+ dlqConfigId: string;
116
+ maxMessages?: number;
117
+ }): Promise<DLQReprocessing[]>;
118
+ /**
119
+ * Get DLQ statistics
120
+ */
121
+ getDLQStats(dlqConfigId: string): {
122
+ totalMessages: number;
123
+ oldestMessage?: Date;
124
+ newestMessage?: Date;
125
+ averageAttempts: number;
126
+ errorTypes: Record<string, number>;
127
+ };
128
+ /**
129
+ * Get DLQ config
130
+ */
131
+ getDLQConfig(id: string): DLQConfig | undefined;
132
+ /**
133
+ * List DLQ configs
134
+ */
135
+ listDLQConfigs(): DLQConfig[];
136
+ /**
137
+ * Get DLQ messages
138
+ */
139
+ getDLQMessages(dlqConfigId: string): DLQMessage[];
140
+ /**
141
+ * Generate CloudFormation for DLQ
142
+ */
143
+ generateDLQCF(config: DLQConfig): any;
144
+ /**
145
+ * Generate CloudFormation for SQS DLQ
146
+ */
147
+ generateSQSDLQCF(config: DLQConfig): any;
148
+ /**
149
+ * Generate CloudFormation for DLQ alarm
150
+ */
151
+ generateDLQAlarmCF(alarm: DLQAlarm): any;
152
+ /**
153
+ * Clear all data
154
+ */
155
+ clear(): void;
156
+ }
157
+ /**
158
+ * Global Lambda DLQ manager instance
159
+ */
160
+ export declare const lambdaDLQManager: LambdaDLQManager;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Lambda Advanced Features
3
+ * Layers, versions, concurrency, destinations, VPC, and DLQ
4
+ */
5
+ export * from './layers';
6
+ export * from './versions';
7
+ export * from './concurrency';
8
+ export * from './destinations';
9
+ export * from './vpc';
10
+ export * from './dlq';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Lambda Layers Management
3
+ * Reusable code and dependencies for Lambda functions
4
+ */
5
+ export interface LambdaLayer {
6
+ id: string;
7
+ layerName: string;
8
+ layerArn: string;
9
+ version: number;
10
+ description?: string;
11
+ compatibleRuntimes: string[];
12
+ licenseInfo?: string;
13
+ content: LayerContent;
14
+ size: number;
15
+ }
16
+ export interface LayerContent {
17
+ type: 's3' | 'zip';
18
+ s3Bucket?: string;
19
+ s3Key?: string;
20
+ s3ObjectVersion?: string;
21
+ zipFile?: string;
22
+ }
23
+ export interface LayerVersion {
24
+ id: string;
25
+ layerName: string;
26
+ version: number;
27
+ createdAt: Date;
28
+ compatibleRuntimes: string[];
29
+ size: number;
30
+ codeHash: string;
31
+ }
32
+ export interface LayerPermission {
33
+ id: string;
34
+ layerName: string;
35
+ version: number;
36
+ principal: string;
37
+ action: 'lambda:GetLayerVersion';
38
+ organizationId?: string;
39
+ }
40
+ /**
41
+ * Lambda layers manager
42
+ */
43
+ export declare class LambdaLayersManager {
44
+ private layers;
45
+ private versions;
46
+ private permissions;
47
+ private layerCounter;
48
+ private versionCounter;
49
+ private permissionCounter;
50
+ /**
51
+ * Create Lambda layer
52
+ */
53
+ createLayer(layer: Omit<LambdaLayer, 'id' | 'layerArn' | 'version'>): LambdaLayer;
54
+ /**
55
+ * Create Node.js dependencies layer
56
+ */
57
+ createNodeDependenciesLayer(options: {
58
+ layerName: string;
59
+ nodeVersion: string;
60
+ s3Bucket: string;
61
+ s3Key: string;
62
+ }): LambdaLayer;
63
+ /**
64
+ * Create shared utilities layer
65
+ */
66
+ createUtilitiesLayer(options: {
67
+ layerName: string;
68
+ runtimes: string[];
69
+ s3Bucket: string;
70
+ s3Key: string;
71
+ }): LambdaLayer;
72
+ /**
73
+ * Publish layer version
74
+ */
75
+ publishVersion(layerId: string): LayerVersion;
76
+ /**
77
+ * Add layer permission
78
+ */
79
+ addPermission(options: {
80
+ layerName: string;
81
+ version: number;
82
+ principal: string;
83
+ organizationId?: string;
84
+ }): LayerPermission;
85
+ /**
86
+ * Generate hash
87
+ */
88
+ private generateHash;
89
+ /**
90
+ * Get layer
91
+ */
92
+ getLayer(id: string): LambdaLayer | undefined;
93
+ /**
94
+ * List layers
95
+ */
96
+ listLayers(): LambdaLayer[];
97
+ /**
98
+ * Get layer versions
99
+ */
100
+ getLayerVersions(layerName: string): LayerVersion[];
101
+ /**
102
+ * Generate CloudFormation for layer
103
+ */
104
+ generateLayerCF(layer: LambdaLayer): any;
105
+ /**
106
+ * Generate CloudFormation for layer permission
107
+ */
108
+ generateLayerPermissionCF(permission: LayerPermission): any;
109
+ /**
110
+ * Clear all data
111
+ */
112
+ clear(): void;
113
+ }
114
+ /**
115
+ * Global Lambda layers manager instance
116
+ */
117
+ export declare const lambdaLayersManager: LambdaLayersManager;