@stacksjs/ts-cloud-core 0.1.6 → 0.1.7
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.
- package/dist/advanced-features.test.d.ts +0 -0
- package/dist/aws/cloudformation.d.ts +69 -0
- package/dist/aws/cloudfront.d.ts +21 -0
- package/dist/aws/credentials.d.ts +66 -0
- package/dist/aws/credentials.test.d.ts +0 -0
- package/dist/aws/index.d.ts +73 -0
- package/dist/aws/s3.d.ts +130 -0
- package/dist/aws/s3.test.d.ts +0 -0
- package/dist/aws/signature.d.ts +101 -0
- package/dist/aws/signature.test.d.ts +0 -0
- package/dist/backup/disaster-recovery.d.ts +98 -0
- package/dist/backup/disaster-recovery.test.d.ts +0 -0
- package/dist/backup/index.d.ts +24 -0
- package/dist/backup/manager.d.ts +112 -0
- package/dist/backup/manager.test.d.ts +0 -0
- package/dist/cicd/circleci.d.ts +47 -0
- package/dist/cicd/github-actions.d.ts +55 -0
- package/dist/cicd/gitlab-ci.d.ts +46 -0
- package/dist/cicd/index.d.ts +3 -0
- package/dist/cli/history.d.ts +66 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/progress.d.ts +97 -0
- package/dist/cli/repl.d.ts +76 -0
- package/dist/cli/suggestions.d.ts +67 -0
- package/dist/cli/table.d.ts +70 -0
- package/dist/cli/table.test.d.ts +0 -0
- package/dist/cloudformation/builder.d.ts +59 -0
- package/dist/cloudformation/builder.test.d.ts +0 -0
- package/dist/cloudformation/builders/api-gateway.d.ts +30 -0
- package/dist/cloudformation/builders/cache.d.ts +35 -0
- package/dist/cloudformation/builders/cdn.d.ts +34 -0
- package/dist/cloudformation/builders/compute.d.ts +66 -0
- package/dist/cloudformation/builders/database.d.ts +61 -0
- package/dist/cloudformation/builders/functions.d.ts +32 -0
- package/dist/cloudformation/builders/messaging.d.ts +17 -0
- package/dist/cloudformation/builders/monitoring.d.ts +36 -0
- package/dist/cloudformation/builders/network.d.ts +14 -0
- package/dist/cloudformation/builders/queue.d.ts +8 -0
- package/dist/cloudformation/builders/security.d.ts +31 -0
- package/dist/cloudformation/builders/storage.d.ts +8 -0
- package/dist/cloudformation/index.d.ts +24 -0
- package/dist/cloudformation/types.d.ts +132 -0
- package/dist/compliance/aws-config.d.ts +88 -0
- package/dist/compliance/cloudtrail.d.ts +96 -0
- package/dist/compliance/compliance.test.d.ts +0 -0
- package/dist/compliance/guardduty.d.ts +110 -0
- package/dist/compliance/index.d.ts +50 -0
- package/dist/compliance/security-hub.d.ts +110 -0
- package/dist/containers/build-optimization.d.ts +110 -0
- package/dist/containers/containers.test.d.ts +0 -0
- package/dist/containers/image-scanning.d.ts +96 -0
- package/dist/containers/index.d.ts +4 -0
- package/dist/containers/registry.d.ts +99 -0
- package/dist/containers/service-mesh.d.ts +206 -0
- package/dist/database/database.test.d.ts +0 -0
- package/dist/database/index.d.ts +4 -0
- package/dist/database/migrations.d.ts +102 -0
- package/dist/database/performance.d.ts +168 -0
- package/dist/database/replicas.d.ts +146 -0
- package/dist/database/users.d.ts +102 -0
- package/dist/dependency-graph.d.ts +19 -0
- package/dist/deployment/ab-testing.d.ts +114 -0
- package/dist/deployment/blue-green.d.ts +98 -0
- package/dist/deployment/canary.d.ts +103 -0
- package/dist/deployment/deployment.test.d.ts +0 -0
- package/dist/deployment/index.d.ts +45 -0
- package/dist/deployment/progressive.d.ts +34 -0
- package/dist/dns/dns.test.d.ts +0 -0
- package/dist/dns/dnssec.d.ts +75 -0
- package/dist/dns/index.d.ts +3 -0
- package/dist/dns/resolver.d.ts +150 -0
- package/dist/dns/routing.d.ts +217 -0
- package/dist/email/advanced/analytics.d.ts +78 -0
- package/dist/email/advanced/index.d.ts +7 -0
- package/dist/email/advanced/rules.d.ts +60 -0
- package/dist/email/advanced/scheduling.d.ts +63 -0
- package/dist/email/advanced/search.d.ts +76 -0
- package/dist/email/advanced/shared-mailboxes.d.ts +66 -0
- package/dist/email/advanced/templates.d.ts +39 -0
- package/dist/email/advanced/threading.d.ts +53 -0
- package/dist/email/analytics.d.ts +144 -0
- package/dist/email/bounce-handling.d.ts +120 -0
- package/dist/email/email.test.d.ts +0 -0
- package/dist/email/handlers/__tests__/inbound.test.d.ts +0 -0
- package/dist/email/handlers/__tests__/outbound.test.d.ts +0 -0
- package/dist/email/handlers/converter.d.ts +225 -0
- package/dist/email/handlers/feedback.d.ts +226 -0
- package/dist/email/handlers/inbound.d.ts +167 -0
- package/dist/email/handlers/outbound.d.ts +176 -0
- package/dist/email/index.d.ts +6 -0
- package/dist/email/reputation.d.ts +97 -0
- package/dist/email/templates.d.ts +82 -0
- package/dist/errors/index.d.ts +186 -0
- package/dist/errors/index.test.d.ts +0 -0
- package/dist/health-checks/index.d.ts +35 -0
- package/dist/index.d.ts +256 -0
- package/dist/index.js +63499 -0
- package/dist/intrinsic-functions.d.ts +37 -0
- package/dist/lambda/concurrency.d.ts +98 -0
- package/dist/lambda/destinations.d.ts +99 -0
- package/dist/lambda/dlq.d.ts +109 -0
- package/dist/lambda/index.d.ts +6 -0
- package/dist/lambda/lambda.test.d.ts +0 -0
- package/dist/lambda/layers.d.ts +81 -0
- package/dist/lambda/versions.d.ts +91 -0
- package/dist/lambda/vpc.d.ts +116 -0
- package/dist/local/config.d.ts +44 -0
- package/dist/local/index.d.ts +2 -0
- package/dist/local/mock-aws.d.ts +60 -0
- package/dist/modules/ai.d.ts +47 -0
- package/dist/modules/api.d.ts +98 -0
- package/dist/modules/auth.d.ts +165 -0
- package/dist/modules/cache.d.ts +73 -0
- package/dist/modules/cdn.d.ts +125 -0
- package/dist/modules/communication.d.ts +98 -0
- package/dist/modules/compute.d.ts +309 -0
- package/dist/modules/database.d.ts +105 -0
- package/dist/modules/deployment.d.ts +181 -0
- package/dist/modules/dns.d.ts +45 -0
- package/dist/modules/email.d.ts +217 -0
- package/dist/modules/filesystem.d.ts +94 -0
- package/dist/modules/index.d.ts +27 -0
- package/dist/modules/messaging.d.ts +108 -0
- package/dist/modules/monitoring.d.ts +127 -0
- package/dist/modules/network.d.ts +102 -0
- package/dist/modules/parameter-store.d.ts +33 -0
- package/dist/modules/permissions.d.ts +132 -0
- package/dist/modules/phone.d.ts +80 -0
- package/dist/modules/queue.d.ts +210 -0
- package/dist/modules/redirects.d.ts +59 -0
- package/dist/modules/registry.d.ts +73 -0
- package/dist/modules/search.d.ts +56 -0
- package/dist/modules/secrets.d.ts +80 -0
- package/dist/modules/security.d.ts +100 -0
- package/dist/modules/sms.d.ts +52 -0
- package/dist/modules/storage.d.ts +160 -0
- package/dist/modules/workflow.d.ts +205 -0
- package/dist/multi-account/config.d.ts +315 -0
- package/dist/multi-account/index.d.ts +2 -0
- package/dist/multi-account/manager.d.ts +100 -0
- package/dist/multi-region/cross-region.d.ts +114 -0
- package/dist/multi-region/index.d.ts +3 -0
- package/dist/multi-region/manager.d.ts +72 -0
- package/dist/multi-region/regions.d.ts +98 -0
- package/dist/network-security/index.d.ts +39 -0
- package/dist/observability/index.d.ts +4 -0
- package/dist/observability/logs.d.ts +129 -0
- package/dist/observability/metrics.d.ts +153 -0
- package/dist/observability/observability.test.d.ts +0 -0
- package/dist/observability/synthetics.d.ts +146 -0
- package/dist/observability/xray.d.ts +129 -0
- package/dist/phone/advanced/analytics.d.ts +66 -0
- package/dist/phone/advanced/callbacks.d.ts +50 -0
- package/dist/phone/advanced/index.d.ts +4 -0
- package/dist/phone/advanced/ivr-builder.d.ts +83 -0
- package/dist/phone/advanced/recording.d.ts +48 -0
- package/dist/phone/handlers/__tests__/incoming-call.test.d.ts +0 -0
- package/dist/phone/handlers/incoming-call.d.ts +115 -0
- package/dist/phone/handlers/missed-call.d.ts +114 -0
- package/dist/phone/handlers/voicemail.d.ts +177 -0
- package/dist/phone/index.d.ts +2 -0
- package/dist/presets/api-backend.d.ts +11 -0
- package/dist/presets/data-pipeline.d.ts +11 -0
- package/dist/presets/extend.d.ts +194 -0
- package/dist/presets/extend.test.d.ts +0 -0
- package/dist/presets/fullstack-app.d.ts +12 -0
- package/dist/presets/index.d.ts +24 -0
- package/dist/presets/jamstack.d.ts +12 -0
- package/dist/presets/microservices.d.ts +18 -0
- package/dist/presets/ml-api.d.ts +13 -0
- package/dist/presets/nodejs-server.d.ts +14 -0
- package/dist/presets/nodejs-serverless.d.ts +14 -0
- package/dist/presets/realtime-app.d.ts +11 -0
- package/dist/presets/static-site.d.ts +12 -0
- package/dist/presets/traditional-web-app.d.ts +16 -0
- package/dist/presets/wordpress.d.ts +12 -0
- package/dist/preview/github.d.ts +32 -0
- package/dist/preview/github.test.d.ts +0 -0
- package/dist/preview/index.d.ts +27 -0
- package/dist/preview/manager.d.ts +58 -0
- package/dist/preview/manager.test.d.ts +0 -0
- package/dist/preview/notifications.d.ts +55 -0
- package/dist/preview/notifications.test.d.ts +0 -0
- package/dist/queue/batch-processing.d.ts +87 -0
- package/dist/queue/dlq-monitoring.d.ts +95 -0
- package/dist/queue/fifo.d.ts +90 -0
- package/dist/queue/index.d.ts +4 -0
- package/dist/queue/management.d.ts +105 -0
- package/dist/queue/queue.test.d.ts +0 -0
- package/dist/resource-mgmt/index.d.ts +29 -0
- package/dist/resource-naming.d.ts +26 -0
- package/dist/s3/index.d.ts +173 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/security/certificate-manager.d.ts +121 -0
- package/dist/security/index.d.ts +4 -0
- package/dist/security/scanning.d.ts +147 -0
- package/dist/security/secrets-manager.d.ts +144 -0
- package/dist/security/secrets-rotation.d.ts +115 -0
- package/dist/security/security.test.d.ts +0 -0
- package/dist/sms/advanced/ab-testing.d.ts +54 -0
- package/dist/sms/advanced/analytics.d.ts +56 -0
- package/dist/sms/advanced/campaigns.d.ts +82 -0
- package/dist/sms/advanced/chatbot.d.ts +48 -0
- package/dist/sms/advanced/index.d.ts +6 -0
- package/dist/sms/advanced/link-tracking.d.ts +42 -0
- package/dist/sms/advanced/mms.d.ts +35 -0
- package/dist/sms/handlers/__tests__/send.test.d.ts +0 -0
- package/dist/sms/handlers/delivery-status.d.ts +131 -0
- package/dist/sms/handlers/receive.d.ts +160 -0
- package/dist/sms/handlers/send.d.ts +172 -0
- package/dist/sms/index.d.ts +2 -0
- package/dist/stack-diff.d.ts +34 -0
- package/dist/static-site/index.d.ts +49 -0
- package/dist/template-builder.d.ts +14 -0
- package/dist/template-validator.d.ts +24 -0
- package/dist/utils/cache.d.ts +55 -0
- package/dist/utils/diff.d.ts +48 -0
- package/dist/utils/hash.d.ts +58 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/parallel.d.ts +60 -0
- package/dist/validators/credentials.d.ts +23 -0
- package/dist/validators/credentials.test.d.ts +0 -0
- package/dist/validators/quotas.d.ts +60 -0
- package/dist/validators/quotas.test.d.ts +0 -0
- package/package.json +4 -4
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global DLQ monitoring manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const dlqMonitoringManager: DLQMonitoringManager;
|
|
5
|
+
/**
|
|
6
|
+
* SQS Dead Letter Queue Monitoring
|
|
7
|
+
* DLQ monitoring, alerts, and automated reprocessing
|
|
8
|
+
*/
|
|
9
|
+
export declare interface DLQMonitor {
|
|
10
|
+
id: string
|
|
11
|
+
name: string
|
|
12
|
+
queueUrl: string
|
|
13
|
+
sourceQueues: string[]
|
|
14
|
+
maxReceiveCount: number
|
|
15
|
+
alarmThreshold: number
|
|
16
|
+
autoReprocess: boolean
|
|
17
|
+
reprocessStrategy: 'immediate' | 'scheduled' | 'manual'
|
|
18
|
+
notificationTopicArn?: string
|
|
19
|
+
}
|
|
20
|
+
export declare interface DLQMetrics {
|
|
21
|
+
id: string
|
|
22
|
+
queueUrl: string
|
|
23
|
+
timestamp: Date
|
|
24
|
+
approximateNumberOfMessages: number
|
|
25
|
+
approximateAgeOfOldestMessage: number
|
|
26
|
+
messagesReceived: number
|
|
27
|
+
messagesDeleted: number
|
|
28
|
+
messagesReprocessed: number
|
|
29
|
+
}
|
|
30
|
+
export declare interface DLQAlert {
|
|
31
|
+
id: string
|
|
32
|
+
monitorId: string
|
|
33
|
+
alertType: 'threshold_exceeded' | 'old_message' | 'high_receive_count'
|
|
34
|
+
severity: 'low' | 'medium' | 'high' | 'critical'
|
|
35
|
+
message: string
|
|
36
|
+
timestamp: Date
|
|
37
|
+
acknowledged: boolean
|
|
38
|
+
}
|
|
39
|
+
export declare interface ReprocessJob {
|
|
40
|
+
id: string
|
|
41
|
+
queueUrl: string
|
|
42
|
+
messageId: string
|
|
43
|
+
attempts: number
|
|
44
|
+
status: 'pending' | 'processing' | 'success' | 'failed'
|
|
45
|
+
startedAt?: Date
|
|
46
|
+
completedAt?: Date
|
|
47
|
+
error?: string
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* DLQ monitoring manager
|
|
51
|
+
*/
|
|
52
|
+
export declare class DLQMonitoringManager {
|
|
53
|
+
private monitors: Map<string, DLQMonitor>;
|
|
54
|
+
private metrics: Map<string, DLQMetrics[]>;
|
|
55
|
+
private alerts: Map<string, DLQAlert>;
|
|
56
|
+
private reprocessJobs: Map<string, ReprocessJob>;
|
|
57
|
+
private monitorCounter: any;
|
|
58
|
+
private metricsCounter: any;
|
|
59
|
+
private alertCounter: any;
|
|
60
|
+
private jobCounter: any;
|
|
61
|
+
createDLQMonitor(monitor: Omit<DLQMonitor, 'id'>): DLQMonitor;
|
|
62
|
+
createAutomatedMonitor(options: {
|
|
63
|
+
name: string
|
|
64
|
+
queueUrl: string
|
|
65
|
+
sourceQueues: string[]
|
|
66
|
+
notificationTopicArn: string
|
|
67
|
+
}): DLQMonitor;
|
|
68
|
+
collectMetrics(queueUrl: string): DLQMetrics;
|
|
69
|
+
private checkForAlerts(queueUrl: string, metrics: DLQMetrics): void;
|
|
70
|
+
private createAlert(alert: Omit<DLQAlert, 'id' | 'timestamp' | 'acknowledged'>): DLQAlert;
|
|
71
|
+
acknowledgeAlert(alertId: string): DLQAlert;
|
|
72
|
+
createReprocessJob(options: {
|
|
73
|
+
queueUrl: string
|
|
74
|
+
messageId: string
|
|
75
|
+
}): ReprocessJob;
|
|
76
|
+
executeReprocessJob(jobId: string): Promise<ReprocessJob>;
|
|
77
|
+
batchReprocess(options: {
|
|
78
|
+
queueUrl: string
|
|
79
|
+
maxMessages: number
|
|
80
|
+
}): Promise<ReprocessJob[]>;
|
|
81
|
+
getDLQStatistics(queueUrl: string, hours?: number): {
|
|
82
|
+
totalMessages: number
|
|
83
|
+
avgAge: number
|
|
84
|
+
messagesReceived: number
|
|
85
|
+
messagesDeleted: number
|
|
86
|
+
messagesReprocessed: number
|
|
87
|
+
successRate: number
|
|
88
|
+
};
|
|
89
|
+
getMonitor(id: string): DLQMonitor | undefined;
|
|
90
|
+
listMonitors(): DLQMonitor[];
|
|
91
|
+
getAlerts(monitorId?: string, acknowledged?: boolean): DLQAlert[];
|
|
92
|
+
getReprocessJobs(queueUrl?: string): ReprocessJob[];
|
|
93
|
+
generateDLQAlarmCF(monitor: DLQMonitor): any;
|
|
94
|
+
clear(): void;
|
|
95
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global FIFO queue manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const fifoQueueManager: FIFOQueueManager;
|
|
5
|
+
/**
|
|
6
|
+
* SQS FIFO Queue Management
|
|
7
|
+
* First-In-First-Out queues with message ordering and deduplication
|
|
8
|
+
*/
|
|
9
|
+
export declare interface FIFOQueue {
|
|
10
|
+
id: string
|
|
11
|
+
name: string
|
|
12
|
+
queueUrl: string
|
|
13
|
+
contentBasedDeduplication: boolean
|
|
14
|
+
deduplicationScope: 'queue' | 'messageGroup'
|
|
15
|
+
fifoThroughputLimit: 'perQueue' | 'perMessageGroupId'
|
|
16
|
+
messageRetentionPeriod: number
|
|
17
|
+
visibilityTimeout: number
|
|
18
|
+
receiveMessageWaitTime: number
|
|
19
|
+
deadLetterTargetArn?: string
|
|
20
|
+
maxReceiveCount?: number
|
|
21
|
+
}
|
|
22
|
+
export declare interface MessageGroup {
|
|
23
|
+
id: string
|
|
24
|
+
messageGroupId: string
|
|
25
|
+
queueId: string
|
|
26
|
+
messagesInFlight: number
|
|
27
|
+
lastMessageTimestamp?: Date
|
|
28
|
+
}
|
|
29
|
+
export declare interface DeduplicationConfig {
|
|
30
|
+
id: string
|
|
31
|
+
queueId: string
|
|
32
|
+
deduplicationInterval: number
|
|
33
|
+
contentBasedDeduplication: boolean
|
|
34
|
+
deduplicationHashes: Map<string, Date>
|
|
35
|
+
}
|
|
36
|
+
export declare interface FIFOMessage {
|
|
37
|
+
id: string
|
|
38
|
+
messageId: string
|
|
39
|
+
messageGroupId: string
|
|
40
|
+
messageDeduplicationId?: string
|
|
41
|
+
body: string
|
|
42
|
+
attributes: Record<string, any>
|
|
43
|
+
sentTimestamp: Date
|
|
44
|
+
sequenceNumber: string
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* FIFO queue manager
|
|
48
|
+
*/
|
|
49
|
+
export declare class FIFOQueueManager {
|
|
50
|
+
private queues: Map<string, FIFOQueue>;
|
|
51
|
+
private messageGroups: Map<string, MessageGroup>;
|
|
52
|
+
private deduplicationConfigs: Map<string, DeduplicationConfig>;
|
|
53
|
+
private messages: Map<string, FIFOMessage>;
|
|
54
|
+
private queueCounter: any;
|
|
55
|
+
private groupCounter: any;
|
|
56
|
+
private deduplicationCounter: any;
|
|
57
|
+
private messageCounter: any;
|
|
58
|
+
private sequenceCounter: any;
|
|
59
|
+
createFIFOQueue(queue: Omit<FIFOQueue, 'id' | 'queueUrl'>): FIFOQueue;
|
|
60
|
+
createHighThroughputFIFO(options: {
|
|
61
|
+
name: string
|
|
62
|
+
contentBasedDeduplication?: boolean
|
|
63
|
+
}): FIFOQueue;
|
|
64
|
+
createStandardFIFO(options: {
|
|
65
|
+
name: string
|
|
66
|
+
contentBasedDeduplication?: boolean
|
|
67
|
+
}): FIFOQueue;
|
|
68
|
+
private createDeduplicationConfig(config: {
|
|
69
|
+
queueId: string
|
|
70
|
+
contentBasedDeduplication: boolean
|
|
71
|
+
deduplicationInterval: number
|
|
72
|
+
}): DeduplicationConfig;
|
|
73
|
+
sendMessage(options: {
|
|
74
|
+
queueId: string
|
|
75
|
+
messageGroupId: string
|
|
76
|
+
messageBody: string
|
|
77
|
+
messageDeduplicationId?: string
|
|
78
|
+
messageAttributes?: Record<string, any>
|
|
79
|
+
}): FIFOMessage | null;
|
|
80
|
+
private isDuplicate(config: DeduplicationConfig, deduplicationId: string): boolean;
|
|
81
|
+
private generateHash(content: string): string;
|
|
82
|
+
private generateSequenceNumber(): string;
|
|
83
|
+
private updateMessageGroup(queueId: string, messageGroupId: string): void;
|
|
84
|
+
getMessageGroups(queueId: string): MessageGroup[];
|
|
85
|
+
getQueue(id: string): FIFOQueue | undefined;
|
|
86
|
+
listQueues(): FIFOQueue[];
|
|
87
|
+
getMessages(queueId: string, messageGroupId?: string): FIFOMessage[];
|
|
88
|
+
generateFIFOQueueCF(queue: FIFOQueue): any;
|
|
89
|
+
clear(): void;
|
|
90
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global queue management manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const queueManagementManager: QueueManagementManager;
|
|
5
|
+
/**
|
|
6
|
+
* SQS Queue Management
|
|
7
|
+
* Retention policies, delay queues, and queue operations
|
|
8
|
+
*/
|
|
9
|
+
export declare interface QueueManagement {
|
|
10
|
+
id: string
|
|
11
|
+
queueUrl: string
|
|
12
|
+
queueName: string
|
|
13
|
+
messageRetentionPeriod: number
|
|
14
|
+
delaySeconds: number
|
|
15
|
+
maximumMessageSize: number
|
|
16
|
+
receiveMessageWaitTime: number
|
|
17
|
+
purgeInProgress: boolean
|
|
18
|
+
}
|
|
19
|
+
export declare interface RetentionPolicy {
|
|
20
|
+
id: string
|
|
21
|
+
queueId: string
|
|
22
|
+
retentionPeriod: number
|
|
23
|
+
autoCleanup: boolean
|
|
24
|
+
cleanupSchedule?: string
|
|
25
|
+
archiveExpiredMessages: boolean
|
|
26
|
+
archiveS3Bucket?: string
|
|
27
|
+
}
|
|
28
|
+
export declare interface DelayQueue {
|
|
29
|
+
id: string
|
|
30
|
+
queueUrl: string
|
|
31
|
+
defaultDelay: number
|
|
32
|
+
perMessageDelay: boolean
|
|
33
|
+
maxDelay: number
|
|
34
|
+
}
|
|
35
|
+
export declare interface PurgeOperation {
|
|
36
|
+
id: string
|
|
37
|
+
queueUrl: string
|
|
38
|
+
status: 'pending' | 'in_progress' | 'completed' | 'failed'
|
|
39
|
+
messagesPurged?: number
|
|
40
|
+
startedAt?: Date
|
|
41
|
+
completedAt?: Date
|
|
42
|
+
}
|
|
43
|
+
export declare interface QueueMetrics {
|
|
44
|
+
id: string
|
|
45
|
+
queueUrl: string
|
|
46
|
+
timestamp: Date
|
|
47
|
+
approximateNumberOfMessages: number
|
|
48
|
+
approximateNumberOfMessagesNotVisible: number
|
|
49
|
+
approximateNumberOfMessagesDelayed: number
|
|
50
|
+
oldestMessageAge?: number
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Queue management manager
|
|
54
|
+
*/
|
|
55
|
+
export declare class QueueManagementManager {
|
|
56
|
+
private queues: Map<string, QueueManagement>;
|
|
57
|
+
private retentionPolicies: Map<string, RetentionPolicy>;
|
|
58
|
+
private delayQueues: Map<string, DelayQueue>;
|
|
59
|
+
private purgeOperations: Map<string, PurgeOperation>;
|
|
60
|
+
private metrics: Map<string, QueueMetrics[]>;
|
|
61
|
+
private queueCounter: any;
|
|
62
|
+
private retentionCounter: any;
|
|
63
|
+
private delayCounter: any;
|
|
64
|
+
private purgeCounter: any;
|
|
65
|
+
private metricsCounter: any;
|
|
66
|
+
createQueue(queue: Omit<QueueManagement, 'id' | 'purgeInProgress'>): QueueManagement;
|
|
67
|
+
createStandardQueue(options: {
|
|
68
|
+
queueName: string
|
|
69
|
+
messageRetentionDays?: number
|
|
70
|
+
}): QueueManagement;
|
|
71
|
+
createLongPollingQueue(options: {
|
|
72
|
+
queueName: string
|
|
73
|
+
waitTimeSeconds?: number
|
|
74
|
+
}): QueueManagement;
|
|
75
|
+
createRetentionPolicy(policy: Omit<RetentionPolicy, 'id'>): RetentionPolicy;
|
|
76
|
+
createShortRetentionPolicy(options: {
|
|
77
|
+
queueId: string
|
|
78
|
+
retentionHours: number
|
|
79
|
+
}): RetentionPolicy;
|
|
80
|
+
createArchivalRetentionPolicy(options: {
|
|
81
|
+
queueId: string
|
|
82
|
+
retentionDays: number
|
|
83
|
+
s3Bucket: string
|
|
84
|
+
}): RetentionPolicy;
|
|
85
|
+
createDelayQueue(delay: Omit<DelayQueue, 'id'>): DelayQueue;
|
|
86
|
+
createScheduledDelayQueue(options: {
|
|
87
|
+
queueUrl: string
|
|
88
|
+
delayMinutes: number
|
|
89
|
+
}): DelayQueue;
|
|
90
|
+
purgeQueue(queueId: string): Promise<PurgeOperation>;
|
|
91
|
+
collectQueueMetrics(queueUrl: string): QueueMetrics;
|
|
92
|
+
getQueueHealth(queueUrl: string): {
|
|
93
|
+
status: 'healthy' | 'warning' | 'critical'
|
|
94
|
+
issues: string[]
|
|
95
|
+
recommendations: string[]
|
|
96
|
+
};
|
|
97
|
+
getQueue(id: string): QueueManagement | undefined;
|
|
98
|
+
listQueues(): QueueManagement[];
|
|
99
|
+
getRetentionPolicy(id: string): RetentionPolicy | undefined;
|
|
100
|
+
listRetentionPolicies(): RetentionPolicy[];
|
|
101
|
+
getPurgeOperations(queueUrl?: string): PurgeOperation[];
|
|
102
|
+
generateQueueCF(queue: QueueManagement): any;
|
|
103
|
+
generateCleanupRuleCF(policy: RetentionPolicy): any;
|
|
104
|
+
clear(): void;
|
|
105
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const resourceManagementManager: ResourceManagementManager;
|
|
2
|
+
/**
|
|
3
|
+
* Resource Management - Tagging strategies, cost allocation, resource groups
|
|
4
|
+
*/
|
|
5
|
+
export declare interface TaggingStrategy {
|
|
6
|
+
id: string
|
|
7
|
+
tags: Record<string, string>
|
|
8
|
+
resources: string[]
|
|
9
|
+
}
|
|
10
|
+
export declare interface CostAllocation {
|
|
11
|
+
id: string
|
|
12
|
+
tagKey: string
|
|
13
|
+
allocations: Array<{ tagValue: string; cost: number }>
|
|
14
|
+
}
|
|
15
|
+
export declare interface ResourceGroup {
|
|
16
|
+
id: string
|
|
17
|
+
name: string
|
|
18
|
+
query: { resourceTypeFilters: string[]; tagFilters: Array<{ key: string; values: string[] }> }
|
|
19
|
+
}
|
|
20
|
+
export declare class ResourceManagementManager {
|
|
21
|
+
private strategies: any;
|
|
22
|
+
private allocations: any;
|
|
23
|
+
private groups: any;
|
|
24
|
+
private counter: any;
|
|
25
|
+
createTaggingStrategy(tags: Record<string, string>, resources: string[]): TaggingStrategy;
|
|
26
|
+
createCostAllocation(tagKey: string, allocations: Array<{ tagValue: string; cost: number }>): CostAllocation;
|
|
27
|
+
createResourceGroup(name: string, resourceTypeFilters: string[], tagFilters: Array<{ key: string; values: string[] }>): ResourceGroup;
|
|
28
|
+
clear(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EnvironmentType } from '@stacksjs/ts-cloud-types';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a consistent resource name following the naming convention:
|
|
4
|
+
* {slug}-{environment}-{resourceType}-{timestamp}
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateResourceName(options: NamingOptions): string;
|
|
7
|
+
/**
|
|
8
|
+
* Generate a logical ID for CloudFormation resources
|
|
9
|
+
* Converts to PascalCase and removes hyphens
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateLogicalId(name: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Get current timestamp for resource naming
|
|
14
|
+
*/
|
|
15
|
+
export declare function getTimestamp(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Sanitize a name to be CloudFormation-compatible
|
|
18
|
+
*/
|
|
19
|
+
export declare function sanitizeName(name: string): string;
|
|
20
|
+
export declare interface NamingOptions {
|
|
21
|
+
slug: string
|
|
22
|
+
environment: EnvironmentType
|
|
23
|
+
timestamp?: string
|
|
24
|
+
resourceType: string
|
|
25
|
+
suffix?: string
|
|
26
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export declare const storageAdvancedManager: StorageAdvancedManager;
|
|
2
|
+
/**
|
|
3
|
+
* S3 Advanced Features
|
|
4
|
+
* Object Lock, Transfer Acceleration, Access Points, Glacier, Inventory, Batch Operations, Event Notifications
|
|
5
|
+
*/
|
|
6
|
+
export declare interface LifecyclePolicy {
|
|
7
|
+
id: string
|
|
8
|
+
transitions: Array<{ days: number; storageClass: string }>
|
|
9
|
+
expiration?: number
|
|
10
|
+
}
|
|
11
|
+
export declare interface VersioningConfig {
|
|
12
|
+
id: string
|
|
13
|
+
enabled: boolean
|
|
14
|
+
mfaDelete: boolean
|
|
15
|
+
}
|
|
16
|
+
export declare interface ReplicationRule {
|
|
17
|
+
id: string
|
|
18
|
+
sourceRegion: string
|
|
19
|
+
destRegion: string
|
|
20
|
+
destBucket: string
|
|
21
|
+
}
|
|
22
|
+
export declare interface IntelligentTieringConfig {
|
|
23
|
+
id: string
|
|
24
|
+
archiveDays: number
|
|
25
|
+
deepArchiveDays: number
|
|
26
|
+
}
|
|
27
|
+
export declare interface ObjectLockConfig {
|
|
28
|
+
id: string
|
|
29
|
+
bucketName: string
|
|
30
|
+
mode: 'COMPLIANCE' | 'GOVERNANCE'
|
|
31
|
+
retentionDays?: number
|
|
32
|
+
retentionYears?: number
|
|
33
|
+
legalHoldEnabled: boolean
|
|
34
|
+
}
|
|
35
|
+
export declare interface TransferAccelerationConfig {
|
|
36
|
+
id: string
|
|
37
|
+
bucketName: string
|
|
38
|
+
enabled: boolean
|
|
39
|
+
endpoint: string
|
|
40
|
+
}
|
|
41
|
+
export declare interface AccessPoint {
|
|
42
|
+
id: string
|
|
43
|
+
name: string
|
|
44
|
+
bucketName: string
|
|
45
|
+
vpcId?: string
|
|
46
|
+
publicAccessBlock: boolean
|
|
47
|
+
policy?: Record<string, any>
|
|
48
|
+
}
|
|
49
|
+
export declare interface GlacierArchiveConfig {
|
|
50
|
+
id: string
|
|
51
|
+
bucketName: string
|
|
52
|
+
archiveType: 'GLACIER' | 'DEEP_ARCHIVE'
|
|
53
|
+
transitionDays: number
|
|
54
|
+
restoreConfig?: {
|
|
55
|
+
tier: 'Expedited' | 'Standard' | 'Bulk'
|
|
56
|
+
days: number
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare interface InventoryConfig {
|
|
60
|
+
id: string
|
|
61
|
+
sourceBucket: string
|
|
62
|
+
destinationBucket: string
|
|
63
|
+
schedule: 'Daily' | 'Weekly'
|
|
64
|
+
format: 'CSV' | 'ORC' | 'Parquet'
|
|
65
|
+
includedFields: string[]
|
|
66
|
+
prefix?: string
|
|
67
|
+
}
|
|
68
|
+
export declare interface BatchOperation {
|
|
69
|
+
id: string
|
|
70
|
+
operation: 'Copy' | 'Delete' | 'RestoreObject' | 'Tagging' | 'ACL' | 'ObjectLock'
|
|
71
|
+
manifestBucket: string
|
|
72
|
+
manifestKey: string
|
|
73
|
+
priority: number
|
|
74
|
+
status: 'pending' | 'in_progress' | 'completed' | 'failed'
|
|
75
|
+
totalObjects?: number
|
|
76
|
+
processedObjects?: number
|
|
77
|
+
}
|
|
78
|
+
export declare interface EventNotification {
|
|
79
|
+
id: string
|
|
80
|
+
bucketName: string
|
|
81
|
+
events: Array<'s3:ObjectCreated:*' | 's3:ObjectRemoved:*' | 's3:ObjectRestore:*' | 's3:Replication:*'>
|
|
82
|
+
destination: {
|
|
83
|
+
type: 'Lambda' | 'SQS' | 'SNS'
|
|
84
|
+
arn: string
|
|
85
|
+
}
|
|
86
|
+
filter?: {
|
|
87
|
+
prefix?: string
|
|
88
|
+
suffix?: string
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export declare class StorageAdvancedManager {
|
|
92
|
+
private policies: any;
|
|
93
|
+
private versioningConfigs: any;
|
|
94
|
+
private replicationRules: any;
|
|
95
|
+
private tieringConfigs: any;
|
|
96
|
+
private objectLocks: any;
|
|
97
|
+
private transferAcceleration: any;
|
|
98
|
+
private accessPoints: any;
|
|
99
|
+
private glacierConfigs: any;
|
|
100
|
+
private inventories: any;
|
|
101
|
+
private batchOps: any;
|
|
102
|
+
private eventNotifications: any;
|
|
103
|
+
private counter: any;
|
|
104
|
+
createLifecyclePolicy(transitions: Array<{ days: number; storageClass: string }>, expiration?: number): LifecyclePolicy;
|
|
105
|
+
enableVersioning(mfaDelete?: any): VersioningConfig;
|
|
106
|
+
createReplicationRule(sourceRegion: string, destRegion: string, destBucket: string): ReplicationRule;
|
|
107
|
+
createIntelligentTiering(archiveDays: number, deepArchiveDays: number): IntelligentTieringConfig;
|
|
108
|
+
enableObjectLock(options: {
|
|
109
|
+
bucketName: string
|
|
110
|
+
mode?: 'COMPLIANCE' | 'GOVERNANCE'
|
|
111
|
+
retentionDays?: number
|
|
112
|
+
retentionYears?: number
|
|
113
|
+
legalHoldEnabled?: boolean
|
|
114
|
+
}): ObjectLockConfig;
|
|
115
|
+
enableTransferAcceleration(bucketName: string): TransferAccelerationConfig;
|
|
116
|
+
createAccessPoint(options: {
|
|
117
|
+
name: string
|
|
118
|
+
bucketName: string
|
|
119
|
+
vpcId?: string
|
|
120
|
+
publicAccessBlock?: boolean
|
|
121
|
+
policy?: Record<string, any>
|
|
122
|
+
}): AccessPoint;
|
|
123
|
+
createGlacierArchive(options: {
|
|
124
|
+
bucketName: string
|
|
125
|
+
archiveType: 'GLACIER' | 'DEEP_ARCHIVE'
|
|
126
|
+
transitionDays: number
|
|
127
|
+
restoreTier?: 'Expedited' | 'Standard' | 'Bulk'
|
|
128
|
+
restoreDays?: number
|
|
129
|
+
}): GlacierArchiveConfig;
|
|
130
|
+
createInventory(options: {
|
|
131
|
+
sourceBucket: string
|
|
132
|
+
destinationBucket: string
|
|
133
|
+
schedule?: 'Daily' | 'Weekly'
|
|
134
|
+
format?: 'CSV' | 'ORC' | 'Parquet'
|
|
135
|
+
includedFields?: string[]
|
|
136
|
+
prefix?: string
|
|
137
|
+
}): InventoryConfig;
|
|
138
|
+
createBatchOperation(options: {
|
|
139
|
+
operation: 'Copy' | 'Delete' | 'RestoreObject' | 'Tagging' | 'ACL' | 'ObjectLock'
|
|
140
|
+
manifestBucket: string
|
|
141
|
+
manifestKey: string
|
|
142
|
+
priority?: number
|
|
143
|
+
}): BatchOperation;
|
|
144
|
+
executeBatchOperation(batchOpId: string): BatchOperation;
|
|
145
|
+
getBatchOperationStatus(batchOpId: string): BatchOperation | undefined;
|
|
146
|
+
createLambdaNotification(options: {
|
|
147
|
+
bucketName: string
|
|
148
|
+
lambdaArn: string
|
|
149
|
+
events: Array<'s3:ObjectCreated:*' | 's3:ObjectRemoved:*' | 's3:ObjectRestore:*' | 's3:Replication:*'>
|
|
150
|
+
prefix?: string
|
|
151
|
+
suffix?: string
|
|
152
|
+
}): EventNotification;
|
|
153
|
+
createSQSNotification(options: {
|
|
154
|
+
bucketName: string
|
|
155
|
+
queueArn: string
|
|
156
|
+
events: Array<'s3:ObjectCreated:*' | 's3:ObjectRemoved:*' | 's3:ObjectRestore:*' | 's3:Replication:*'>
|
|
157
|
+
prefix?: string
|
|
158
|
+
suffix?: string
|
|
159
|
+
}): EventNotification;
|
|
160
|
+
createSNSNotification(options: {
|
|
161
|
+
bucketName: string
|
|
162
|
+
topicArn: string
|
|
163
|
+
events: Array<'s3:ObjectCreated:*' | 's3:ObjectRemoved:*' | 's3:ObjectRestore:*' | 's3:Replication:*'>
|
|
164
|
+
prefix?: string
|
|
165
|
+
suffix?: string
|
|
166
|
+
}): EventNotification;
|
|
167
|
+
generateObjectLockCF(config: ObjectLockConfig): any;
|
|
168
|
+
generateTransferAccelerationCF(config: TransferAccelerationConfig): any;
|
|
169
|
+
generateAccessPointCF(accessPoint: AccessPoint): any;
|
|
170
|
+
generateInventoryCF(inventory: InventoryConfig): any;
|
|
171
|
+
generateEventNotificationCF(notification: EventNotification): any;
|
|
172
|
+
clear(): void;
|
|
173
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global certificate manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const certificateManager: CertificateManager;
|
|
5
|
+
/**
|
|
6
|
+
* Certificate Lifecycle Management
|
|
7
|
+
* Automated certificate provisioning, renewal, and monitoring
|
|
8
|
+
*/
|
|
9
|
+
export declare interface Certificate {
|
|
10
|
+
id: string
|
|
11
|
+
arn: string
|
|
12
|
+
domainName: string
|
|
13
|
+
subjectAlternativeNames?: string[]
|
|
14
|
+
validationMethod: 'DNS' | 'EMAIL'
|
|
15
|
+
status: CertificateStatus
|
|
16
|
+
issuer?: string
|
|
17
|
+
issuedAt?: Date
|
|
18
|
+
expiresAt?: Date
|
|
19
|
+
renewalEligibility?: boolean
|
|
20
|
+
inUseBy?: string[]
|
|
21
|
+
}
|
|
22
|
+
export declare interface CertificateRenewal {
|
|
23
|
+
id: string
|
|
24
|
+
certificateArn: string
|
|
25
|
+
autoRenew: boolean
|
|
26
|
+
renewBeforeDays: number
|
|
27
|
+
lastRenewal?: Date
|
|
28
|
+
nextRenewal?: Date
|
|
29
|
+
renewalStatus?: 'success' | 'pending' | 'failed'
|
|
30
|
+
}
|
|
31
|
+
export declare interface CertificateValidation {
|
|
32
|
+
domainName: string
|
|
33
|
+
validationMethod: 'DNS' | 'EMAIL'
|
|
34
|
+
validationStatus: 'PENDING' | 'SUCCESS' | 'FAILED'
|
|
35
|
+
resourceRecords?: DnsRecord[]
|
|
36
|
+
validationEmails?: string[]
|
|
37
|
+
}
|
|
38
|
+
export declare interface DnsRecord {
|
|
39
|
+
name: string
|
|
40
|
+
type: 'CNAME' | 'A' | 'AAAA' | 'TXT'
|
|
41
|
+
value: string
|
|
42
|
+
}
|
|
43
|
+
export declare interface CertificateMonitor {
|
|
44
|
+
id: string
|
|
45
|
+
name: string
|
|
46
|
+
certificates: string[]
|
|
47
|
+
expirationThreshold: number
|
|
48
|
+
alertEnabled: boolean
|
|
49
|
+
snsTopicArn?: string
|
|
50
|
+
}
|
|
51
|
+
export declare interface CertificateAlert {
|
|
52
|
+
id: string
|
|
53
|
+
certificateArn: string
|
|
54
|
+
alertType: 'expiring_soon' | 'expired' | 'renewal_failed' | 'validation_failed'
|
|
55
|
+
severity: 'critical' | 'warning' | 'info'
|
|
56
|
+
message: string
|
|
57
|
+
timestamp: Date
|
|
58
|
+
acknowledged?: boolean
|
|
59
|
+
}
|
|
60
|
+
export type CertificateStatus = | 'PENDING_VALIDATION'
|
|
61
|
+
| 'ISSUED'
|
|
62
|
+
| 'INACTIVE'
|
|
63
|
+
| 'EXPIRED'
|
|
64
|
+
| 'VALIDATION_TIMED_OUT'
|
|
65
|
+
| 'REVOKED'
|
|
66
|
+
| 'FAILED'
|
|
67
|
+
/**
|
|
68
|
+
* Certificate manager
|
|
69
|
+
*/
|
|
70
|
+
export declare class CertificateManager {
|
|
71
|
+
private certificates: Map<string, Certificate>;
|
|
72
|
+
private renewals: Map<string, CertificateRenewal>;
|
|
73
|
+
private validations: Map<string, CertificateValidation>;
|
|
74
|
+
private monitors: Map<string, CertificateMonitor>;
|
|
75
|
+
private alerts: Map<string, CertificateAlert>;
|
|
76
|
+
private certificateCounter: any;
|
|
77
|
+
private renewalCounter: any;
|
|
78
|
+
private validationCounter: any;
|
|
79
|
+
private monitorCounter: any;
|
|
80
|
+
private alertCounter: any;
|
|
81
|
+
requestCertificate(options: {
|
|
82
|
+
domainName: string
|
|
83
|
+
subjectAlternativeNames?: string[]
|
|
84
|
+
validationMethod?: 'DNS' | 'EMAIL'
|
|
85
|
+
}): Certificate;
|
|
86
|
+
requestWildcardCertificate(options: {
|
|
87
|
+
domainName: string
|
|
88
|
+
includeApex?: boolean
|
|
89
|
+
}): Certificate;
|
|
90
|
+
requestMultiDomainCertificate(options: {
|
|
91
|
+
primaryDomain: string
|
|
92
|
+
additionalDomains: string[]
|
|
93
|
+
validationMethod?: 'DNS' | 'EMAIL'
|
|
94
|
+
}): Certificate;
|
|
95
|
+
private createValidation(certificate: Certificate): CertificateValidation;
|
|
96
|
+
validateCertificate(certificateId: string): { success: boolean; message: string };
|
|
97
|
+
enableAutoRenewal(options: {
|
|
98
|
+
certificateArn: string
|
|
99
|
+
renewBeforeDays?: number
|
|
100
|
+
}): CertificateRenewal;
|
|
101
|
+
renewCertificate(renewalId: string): Promise<{ success: boolean; message: string }>;
|
|
102
|
+
createMonitor(monitor: Omit<CertificateMonitor, 'id'>): CertificateMonitor;
|
|
103
|
+
checkExpiration(): CertificateAlert[];
|
|
104
|
+
createAlert(alert: Omit<CertificateAlert, 'id' | 'timestamp' | 'acknowledged'>): CertificateAlert;
|
|
105
|
+
acknowledgeAlert(alertId: string): void;
|
|
106
|
+
getCertificate(id: string): Certificate | undefined;
|
|
107
|
+
listCertificates(): Certificate[];
|
|
108
|
+
getExpiringCertificates(days?: number): Certificate[];
|
|
109
|
+
getValidation(certificateId: string): CertificateValidation | undefined;
|
|
110
|
+
getRenewal(id: string): CertificateRenewal | undefined;
|
|
111
|
+
listRenewals(): CertificateRenewal[];
|
|
112
|
+
listAlerts(acknowledged?: boolean): CertificateAlert[];
|
|
113
|
+
generateCertificateCF(certificate: Certificate): any;
|
|
114
|
+
generateExpirationAlarmCF(options: {
|
|
115
|
+
alarmName: string
|
|
116
|
+
certificateArn: string
|
|
117
|
+
daysBeforeExpiration: number
|
|
118
|
+
snsTopicArn?: string
|
|
119
|
+
}): any;
|
|
120
|
+
clear(): void;
|
|
121
|
+
}
|