@ts-cloud/core 0.2.3 → 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,213 @@
1
+ /**
2
+ * Log Aggregation
3
+ * Centralized logging across services with CloudWatch Logs
4
+ */
5
+ export interface LogGroup {
6
+ id: string;
7
+ name: string;
8
+ retentionDays?: number;
9
+ kmsKeyId?: string;
10
+ logStreams?: LogStream[];
11
+ metricFilters?: MetricFilter[];
12
+ subscriptionFilters?: SubscriptionFilter[];
13
+ }
14
+ export interface LogStream {
15
+ id: string;
16
+ name: string;
17
+ logGroupName: string;
18
+ creationTime: Date;
19
+ lastEventTime?: Date;
20
+ }
21
+ export interface MetricFilter {
22
+ id: string;
23
+ name: string;
24
+ filterPattern: string;
25
+ metricTransformations: MetricTransformation[];
26
+ }
27
+ export interface MetricTransformation {
28
+ metricName: string;
29
+ metricNamespace: string;
30
+ metricValue: string;
31
+ defaultValue?: number;
32
+ unit?: string;
33
+ dimensions?: Record<string, string>;
34
+ }
35
+ export interface SubscriptionFilter {
36
+ id: string;
37
+ name: string;
38
+ logGroupName: string;
39
+ filterPattern: string;
40
+ destinationArn: string;
41
+ roleArn?: string;
42
+ distribution?: 'Random' | 'ByLogStream';
43
+ }
44
+ export interface LogQuery {
45
+ id: string;
46
+ name: string;
47
+ queryString: string;
48
+ logGroupNames: string[];
49
+ startTime?: Date;
50
+ endTime?: Date;
51
+ }
52
+ export interface LogInsightsQuery {
53
+ id: string;
54
+ name: string;
55
+ description?: string;
56
+ query: string;
57
+ logGroupNames: string[];
58
+ schedule?: string;
59
+ }
60
+ /**
61
+ * Logs manager
62
+ */
63
+ export declare class LogsManager {
64
+ private logGroups;
65
+ private queries;
66
+ private insightsQueries;
67
+ private logGroupCounter;
68
+ private filterCounter;
69
+ private queryCounter;
70
+ /**
71
+ * Create log group
72
+ */
73
+ createLogGroup(group: Omit<LogGroup, 'id'>): LogGroup;
74
+ /**
75
+ * Create Lambda log group
76
+ */
77
+ createLambdaLogGroup(functionName: string, retentionDays?: number): LogGroup;
78
+ /**
79
+ * Create ECS log group
80
+ */
81
+ createECSLogGroup(options: {
82
+ clusterName: string;
83
+ serviceName: string;
84
+ retentionDays?: number;
85
+ }): LogGroup;
86
+ /**
87
+ * Create API Gateway log group
88
+ */
89
+ createAPIGatewayLogGroup(apiName: string, stage: string, retentionDays?: number): LogGroup;
90
+ /**
91
+ * Create application log group
92
+ */
93
+ createApplicationLogGroup(options: {
94
+ appName: string;
95
+ environment: string;
96
+ retentionDays?: number;
97
+ kmsKeyId?: string;
98
+ }): LogGroup;
99
+ /**
100
+ * Create metric filter
101
+ */
102
+ createMetricFilter(logGroupId: string, filter: Omit<MetricFilter, 'id'>): MetricFilter;
103
+ /**
104
+ * Create error count metric filter
105
+ */
106
+ createErrorCountFilter(logGroupId: string, namespace: string): MetricFilter;
107
+ /**
108
+ * Create latency metric filter
109
+ */
110
+ createLatencyFilter(logGroupId: string, namespace: string): MetricFilter;
111
+ /**
112
+ * Create custom pattern filter
113
+ */
114
+ createCustomPatternFilter(options: {
115
+ logGroupId: string;
116
+ name: string;
117
+ pattern: string;
118
+ metricName: string;
119
+ namespace: string;
120
+ }): MetricFilter;
121
+ /**
122
+ * Create subscription filter
123
+ */
124
+ createSubscriptionFilter(logGroupId: string, filter: Omit<SubscriptionFilter, 'id'>): SubscriptionFilter;
125
+ /**
126
+ * Create Kinesis subscription (for real-time log processing)
127
+ */
128
+ createKinesisSubscription(options: {
129
+ logGroupId: string;
130
+ kinesisStreamArn: string;
131
+ roleArn: string;
132
+ filterPattern?: string;
133
+ }): SubscriptionFilter;
134
+ /**
135
+ * Create Lambda subscription (for log processing)
136
+ */
137
+ createLambdaSubscription(options: {
138
+ logGroupId: string;
139
+ lambdaFunctionArn: string;
140
+ filterPattern?: string;
141
+ }): SubscriptionFilter;
142
+ /**
143
+ * Create Log Insights query
144
+ */
145
+ createInsightsQuery(query: Omit<LogInsightsQuery, 'id'>): LogInsightsQuery;
146
+ /**
147
+ * Create error analysis query
148
+ */
149
+ createErrorAnalysisQuery(logGroupNames: string[]): LogInsightsQuery;
150
+ /**
151
+ * Create latency analysis query
152
+ */
153
+ createLatencyAnalysisQuery(logGroupNames: string[]): LogInsightsQuery;
154
+ /**
155
+ * Create top errors query
156
+ */
157
+ createTopErrorsQuery(logGroupNames: string[]): LogInsightsQuery;
158
+ /**
159
+ * Get log group
160
+ */
161
+ getLogGroup(id: string): LogGroup | undefined;
162
+ /**
163
+ * List log groups
164
+ */
165
+ listLogGroups(): LogGroup[];
166
+ /**
167
+ * Get insights query
168
+ */
169
+ getInsightsQuery(id: string): LogInsightsQuery | undefined;
170
+ /**
171
+ * List insights queries
172
+ */
173
+ listInsightsQueries(): LogInsightsQuery[];
174
+ /**
175
+ * Generate CloudFormation for log group
176
+ */
177
+ generateLogGroupCF(group: LogGroup): any;
178
+ /**
179
+ * Generate CloudFormation for metric filter
180
+ */
181
+ generateMetricFilterCF(logGroup: LogGroup, filter: MetricFilter): any;
182
+ /**
183
+ * Generate CloudFormation for subscription filter
184
+ */
185
+ generateSubscriptionFilterCF(filter: SubscriptionFilter): any;
186
+ /**
187
+ * Generate CloudFormation for Log Insights query definition
188
+ */
189
+ generateQueryDefinitionCF(query: LogInsightsQuery): any;
190
+ /**
191
+ * Create log aggregation with multiple filters
192
+ */
193
+ createLogAggregation(logGroup: string, filters: Array<{
194
+ pattern: string;
195
+ metric: string;
196
+ }>, retention?: number): {
197
+ id: string;
198
+ logGroup: string;
199
+ filters: Array<{
200
+ pattern: string;
201
+ metric: string;
202
+ }>;
203
+ retention: number;
204
+ };
205
+ /**
206
+ * Clear all data
207
+ */
208
+ clear(): void;
209
+ }
210
+ /**
211
+ * Global logs manager instance
212
+ */
213
+ export declare const logsManager: LogsManager;
@@ -0,0 +1,187 @@
1
+ /**
2
+ * Custom CloudWatch Metrics
3
+ * Application and business metrics collection
4
+ */
5
+ export interface MetricNamespace {
6
+ id: string;
7
+ name: string;
8
+ description?: string;
9
+ metrics: CustomMetric[];
10
+ }
11
+ export interface CustomMetric {
12
+ id: string;
13
+ name: string;
14
+ namespace: string;
15
+ unit: MetricUnit;
16
+ dimensions?: MetricDimension[];
17
+ statisticValues?: MetricStatistic[];
18
+ alarms?: MetricAlarm[];
19
+ }
20
+ export type MetricUnit = 'Seconds' | 'Microseconds' | 'Milliseconds' | 'Bytes' | 'Kilobytes' | 'Megabytes' | 'Gigabytes' | 'Terabytes' | 'Bits' | 'Kilobits' | 'Megabits' | 'Gigabits' | 'Terabits' | 'Percent' | 'Count' | 'Bytes/Second' | 'Kilobytes/Second' | 'Megabytes/Second' | 'Gigabytes/Second' | 'Terabytes/Second' | 'Bits/Second' | 'Kilobits/Second' | 'Megabits/Second' | 'Gigabits/Second' | 'Terabits/Second' | 'Count/Second' | 'None';
21
+ export interface MetricDimension {
22
+ name: string;
23
+ value: string;
24
+ }
25
+ export interface MetricStatistic {
26
+ sampleCount: number;
27
+ sum: number;
28
+ minimum: number;
29
+ maximum: number;
30
+ timestamp: Date;
31
+ }
32
+ export interface MetricAlarm {
33
+ id: string;
34
+ name: string;
35
+ description?: string;
36
+ comparisonOperator: 'GreaterThanThreshold' | 'GreaterThanOrEqualToThreshold' | 'LessThanThreshold' | 'LessThanOrEqualToThreshold';
37
+ evaluationPeriods: number;
38
+ threshold: number;
39
+ period: number;
40
+ statistic: 'Average' | 'Sum' | 'Minimum' | 'Maximum' | 'SampleCount';
41
+ treatMissingData?: 'notBreaching' | 'breaching' | 'ignore' | 'missing';
42
+ actionsEnabled?: boolean;
43
+ alarmActions?: string[];
44
+ okActions?: string[];
45
+ insufficientDataActions?: string[];
46
+ }
47
+ /**
48
+ * Metrics manager
49
+ */
50
+ export declare class MetricsManager {
51
+ private namespaces;
52
+ private metrics;
53
+ private namespaceCounter;
54
+ private metricCounter;
55
+ private alarmCounter;
56
+ /**
57
+ * Create metric namespace
58
+ */
59
+ createNamespace(namespace: Omit<MetricNamespace, 'id'>): MetricNamespace;
60
+ /**
61
+ * Create custom metric
62
+ */
63
+ createMetric(metric: Omit<CustomMetric, 'id'>): CustomMetric;
64
+ /**
65
+ * Create business metric (e.g., orders, signups, revenue)
66
+ */
67
+ createBusinessMetric(options: {
68
+ name: string;
69
+ namespace: string;
70
+ unit: MetricUnit;
71
+ description?: string;
72
+ }): CustomMetric;
73
+ /**
74
+ * Create application metric (e.g., cache hits, queue depth)
75
+ */
76
+ createApplicationMetric(options: {
77
+ name: string;
78
+ namespace: string;
79
+ unit: MetricUnit;
80
+ serviceName: string;
81
+ }): CustomMetric;
82
+ /**
83
+ * Create performance metric
84
+ */
85
+ createPerformanceMetric(options: {
86
+ name: string;
87
+ namespace: string;
88
+ operation: string;
89
+ }): CustomMetric;
90
+ /**
91
+ * Create error metric
92
+ */
93
+ createErrorMetric(options: {
94
+ name: string;
95
+ namespace: string;
96
+ errorType: string;
97
+ }): CustomMetric;
98
+ /**
99
+ * Create metric alarm
100
+ */
101
+ createAlarm(metricId: string, alarm: Omit<MetricAlarm, 'id'>): MetricAlarm;
102
+ /**
103
+ * Create high error rate alarm
104
+ */
105
+ createErrorRateAlarm(options: {
106
+ metricId: string;
107
+ name: string;
108
+ threshold: number;
109
+ snsTopicArn?: string;
110
+ }): MetricAlarm;
111
+ /**
112
+ * Create latency alarm
113
+ */
114
+ createLatencyAlarm(options: {
115
+ metricId: string;
116
+ name: string;
117
+ thresholdMs: number;
118
+ snsTopicArn?: string;
119
+ }): MetricAlarm;
120
+ /**
121
+ * Create throughput alarm
122
+ */
123
+ createThroughputAlarm(options: {
124
+ metricId: string;
125
+ name: string;
126
+ minimumThreshold: number;
127
+ snsTopicArn?: string;
128
+ }): MetricAlarm;
129
+ /**
130
+ * Create composite alarm (multiple conditions)
131
+ */
132
+ createCompositeAlarm(options: {
133
+ name: string;
134
+ description?: string;
135
+ alarmRule: string;
136
+ actionsEnabled?: boolean;
137
+ alarmActions?: string[];
138
+ }): any;
139
+ /**
140
+ * Get namespace
141
+ */
142
+ getNamespace(id: string): MetricNamespace | undefined;
143
+ /**
144
+ * List namespaces
145
+ */
146
+ listNamespaces(): MetricNamespace[];
147
+ /**
148
+ * Get metric
149
+ */
150
+ getMetric(id: string): CustomMetric | undefined;
151
+ /**
152
+ * List metrics
153
+ */
154
+ listMetrics(): CustomMetric[];
155
+ /**
156
+ * Generate CloudFormation for metric alarm
157
+ */
158
+ generateAlarmCF(metric: CustomMetric, alarm: MetricAlarm): any;
159
+ /**
160
+ * Generate CloudFormation for composite alarm
161
+ */
162
+ generateCompositeAlarmCF(alarm: any): any;
163
+ /**
164
+ * Generate dashboard widget for metric
165
+ */
166
+ generateDashboardWidget(metric: CustomMetric): any;
167
+ /**
168
+ * Publish a custom metric value directly
169
+ */
170
+ publishCustomMetric(namespace: string, name: string, value: number, dimensions?: Record<string, string>, unit?: string): {
171
+ id: string;
172
+ namespace: string;
173
+ name: string;
174
+ dimensions: Record<string, string>;
175
+ value: number;
176
+ unit: string;
177
+ timestamp: Date;
178
+ };
179
+ /**
180
+ * Clear all data
181
+ */
182
+ clear(): void;
183
+ }
184
+ /**
185
+ * Global metrics manager instance
186
+ */
187
+ export declare const metricsManager: MetricsManager;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Synthetic Monitoring
3
+ * CloudWatch Synthetics Canaries for proactive monitoring
4
+ */
5
+ export interface SyntheticCanary {
6
+ id: string;
7
+ name: string;
8
+ description?: string;
9
+ runtimeVersion: string;
10
+ handler: string;
11
+ code: CanaryCode;
12
+ schedule: CanarySchedule;
13
+ runConfig?: CanaryRunConfig;
14
+ vpcConfig?: VpcConfig;
15
+ artifactS3Location: string;
16
+ successRetentionPeriod?: number;
17
+ failureRetentionPeriod?: number;
18
+ alarms?: CanaryAlarm[];
19
+ }
20
+ export interface CanaryCode {
21
+ type: 'script' | 's3';
22
+ script?: string;
23
+ s3Bucket?: string;
24
+ s3Key?: string;
25
+ s3Version?: string;
26
+ }
27
+ export interface CanarySchedule {
28
+ expression: string;
29
+ durationInSeconds?: number;
30
+ }
31
+ export interface CanaryRunConfig {
32
+ timeoutInSeconds: number;
33
+ memoryInMB: number;
34
+ environmentVariables?: Record<string, string>;
35
+ activeTracing?: boolean;
36
+ }
37
+ export interface VpcConfig {
38
+ subnetIds: string[];
39
+ securityGroupIds: string[];
40
+ }
41
+ export interface CanaryAlarm {
42
+ id: string;
43
+ name: string;
44
+ metric: 'SuccessPercent' | 'Duration' | 'Failed';
45
+ threshold: number;
46
+ evaluationPeriods: number;
47
+ snsTopicArn?: string;
48
+ }
49
+ export interface HeartbeatMonitor {
50
+ id: string;
51
+ name: string;
52
+ url: string;
53
+ interval: number;
54
+ timeout: number;
55
+ expectedStatus?: number;
56
+ }
57
+ export interface ApiMonitor {
58
+ id: string;
59
+ name: string;
60
+ baseUrl: string;
61
+ endpoints: ApiEndpoint[];
62
+ headers?: Record<string, string>;
63
+ interval: number;
64
+ }
65
+ export interface ApiEndpoint {
66
+ path: string;
67
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
68
+ expectedStatus: number;
69
+ body?: any;
70
+ assertions?: ApiAssertion[];
71
+ }
72
+ export interface ApiAssertion {
73
+ type: 'status' | 'header' | 'body' | 'latency';
74
+ field?: string;
75
+ operator: 'equals' | 'contains' | 'lessThan' | 'greaterThan';
76
+ value: any;
77
+ }
78
+ /**
79
+ * Synthetics manager
80
+ */
81
+ export declare class SyntheticsManager {
82
+ private canaries;
83
+ private heartbeats;
84
+ private apiMonitors;
85
+ private canaryCounter;
86
+ private heartbeatCounter;
87
+ private apiMonitorCounter;
88
+ private alarmCounter;
89
+ /**
90
+ * Latest runtime versions
91
+ */
92
+ static readonly RuntimeVersions: {
93
+ NODEJS_PUPPETEER_3_9: string;
94
+ NODEJS_PUPPETEER_4_0: string;
95
+ PYTHON_SELENIUM_1_3: string;
96
+ };
97
+ /**
98
+ * Create synthetic canary
99
+ */
100
+ createCanary(canary: Omit<SyntheticCanary, 'id'>): SyntheticCanary;
101
+ /**
102
+ * Create heartbeat canary
103
+ */
104
+ createHeartbeatCanary(options: {
105
+ name: string;
106
+ url: string;
107
+ interval: number;
108
+ s3Bucket: string;
109
+ }): SyntheticCanary;
110
+ /**
111
+ * Create API monitoring canary
112
+ */
113
+ createAPICanary(options: {
114
+ name: string;
115
+ baseUrl: string;
116
+ endpoints: ApiEndpoint[];
117
+ interval: number;
118
+ s3Bucket: string;
119
+ }): SyntheticCanary;
120
+ /**
121
+ * Create visual regression canary
122
+ */
123
+ createVisualRegressionCanary(options: {
124
+ name: string;
125
+ url: string;
126
+ screenshotName: string;
127
+ interval: number;
128
+ s3Bucket: string;
129
+ }): SyntheticCanary;
130
+ /**
131
+ * Create workflow canary (multi-step user journey)
132
+ */
133
+ createWorkflowCanary(options: {
134
+ name: string;
135
+ description: string;
136
+ steps: WorkflowStep[];
137
+ interval: number;
138
+ s3Bucket: string;
139
+ }): SyntheticCanary;
140
+ /**
141
+ * Generate action script for workflow steps
142
+ */
143
+ private generateActionScript;
144
+ /**
145
+ * Create canary alarm
146
+ */
147
+ createAlarm(canaryId: string, alarm: Omit<CanaryAlarm, 'id'>): CanaryAlarm;
148
+ /**
149
+ * Get canary
150
+ */
151
+ getCanary(id: string): SyntheticCanary | undefined;
152
+ /**
153
+ * List canaries
154
+ */
155
+ listCanaries(): SyntheticCanary[];
156
+ /**
157
+ * Generate CloudFormation for canary
158
+ */
159
+ generateCanaryCF(canary: SyntheticCanary): any;
160
+ /**
161
+ * Generate CloudFormation for canary execution role
162
+ */
163
+ generateCanaryRoleCF(): any;
164
+ /**
165
+ * Clear all data
166
+ */
167
+ clear(): void;
168
+ }
169
+ /**
170
+ * Workflow step interface
171
+ */
172
+ export interface WorkflowStep {
173
+ description: string;
174
+ url: string;
175
+ actions?: WorkflowAction[];
176
+ }
177
+ /**
178
+ * Workflow action interface
179
+ */
180
+ export interface WorkflowAction {
181
+ type: 'click' | 'type' | 'wait' | 'waitForSelector';
182
+ selector?: string;
183
+ value?: string;
184
+ duration?: number;
185
+ }
186
+ /**
187
+ * Global synthetics manager instance
188
+ */
189
+ export declare const syntheticsManager: SyntheticsManager;