@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,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global security scanning manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const securityScanningManager: SecurityScanningManager;
|
|
5
|
+
/**
|
|
6
|
+
* Security Scanning & Vulnerability Assessment
|
|
7
|
+
* Automated security scanning, vulnerability detection, and compliance checking
|
|
8
|
+
*/
|
|
9
|
+
export declare interface SecurityScan {
|
|
10
|
+
id: string
|
|
11
|
+
name: string
|
|
12
|
+
scanType: ScanType
|
|
13
|
+
target: ScanTarget
|
|
14
|
+
status: 'queued' | 'running' | 'completed' | 'failed'
|
|
15
|
+
startedAt?: Date
|
|
16
|
+
completedAt?: Date
|
|
17
|
+
findings: SecurityFinding[]
|
|
18
|
+
summary?: ScanSummary
|
|
19
|
+
}
|
|
20
|
+
export declare interface ScanTarget {
|
|
21
|
+
type: 'ecr_image' | 'ec2_instance' | 'lambda' | 'api' | 'repository'
|
|
22
|
+
identifier: string
|
|
23
|
+
region?: string
|
|
24
|
+
}
|
|
25
|
+
export declare interface SecurityFinding {
|
|
26
|
+
id: string
|
|
27
|
+
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO'
|
|
28
|
+
title: string
|
|
29
|
+
description: string
|
|
30
|
+
cve?: string
|
|
31
|
+
cvss?: number
|
|
32
|
+
affectedResource: string
|
|
33
|
+
remediation?: string
|
|
34
|
+
status: 'OPEN' | 'SUPPRESSED' | 'RESOLVED'
|
|
35
|
+
firstDetected: Date
|
|
36
|
+
lastSeen: Date
|
|
37
|
+
}
|
|
38
|
+
export declare interface ScanSummary {
|
|
39
|
+
totalFindings: number
|
|
40
|
+
criticalCount: number
|
|
41
|
+
highCount: number
|
|
42
|
+
mediumCount: number
|
|
43
|
+
lowCount: number
|
|
44
|
+
infoCount: number
|
|
45
|
+
executionTime: number
|
|
46
|
+
}
|
|
47
|
+
export declare interface VulnerabilityReport {
|
|
48
|
+
id: string
|
|
49
|
+
scanId: string
|
|
50
|
+
reportType: 'summary' | 'detailed' | 'executive'
|
|
51
|
+
format: 'json' | 'pdf' | 'html'
|
|
52
|
+
generatedAt: Date
|
|
53
|
+
s3Location?: string
|
|
54
|
+
}
|
|
55
|
+
export declare interface ComplianceCheck {
|
|
56
|
+
id: string
|
|
57
|
+
framework: ComplianceFramework
|
|
58
|
+
checkId: string
|
|
59
|
+
title: string
|
|
60
|
+
description: string
|
|
61
|
+
status: 'PASS' | 'FAIL' | 'WARNING' | 'NOT_APPLICABLE'
|
|
62
|
+
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'
|
|
63
|
+
resourceType: string
|
|
64
|
+
resourceId: string
|
|
65
|
+
remediation?: string
|
|
66
|
+
}
|
|
67
|
+
export declare interface SecurityPosture {
|
|
68
|
+
id: string
|
|
69
|
+
accountId: string
|
|
70
|
+
region: string
|
|
71
|
+
score: number
|
|
72
|
+
grade: 'A' | 'B' | 'C' | 'D' | 'F'
|
|
73
|
+
assessedAt: Date
|
|
74
|
+
strengths: string[]
|
|
75
|
+
weaknesses: string[]
|
|
76
|
+
recommendations: string[]
|
|
77
|
+
}
|
|
78
|
+
export type ScanType = | 'vulnerability'
|
|
79
|
+
| 'container_image'
|
|
80
|
+
| 'code_quality'
|
|
81
|
+
| 'secrets_detection'
|
|
82
|
+
| 'compliance'
|
|
83
|
+
| 'penetration_test'
|
|
84
|
+
export type ComplianceFramework = | 'CIS_AWS_FOUNDATIONS_1_4'
|
|
85
|
+
| 'CIS_AWS_FOUNDATIONS_1_2'
|
|
86
|
+
| 'PCI_DSS_3_2_1'
|
|
87
|
+
| 'HIPAA'
|
|
88
|
+
| 'SOC2'
|
|
89
|
+
| 'NIST_800_53'
|
|
90
|
+
| 'ISO_27001'
|
|
91
|
+
/**
|
|
92
|
+
* Security scanning manager
|
|
93
|
+
*/
|
|
94
|
+
export declare class SecurityScanningManager {
|
|
95
|
+
private scans: Map<string, SecurityScan>;
|
|
96
|
+
private findings: Map<string, SecurityFinding>;
|
|
97
|
+
private reports: Map<string, VulnerabilityReport>;
|
|
98
|
+
private complianceChecks: Map<string, ComplianceCheck>;
|
|
99
|
+
private postures: Map<string, SecurityPosture>;
|
|
100
|
+
private scanCounter: any;
|
|
101
|
+
private findingCounter: any;
|
|
102
|
+
private reportCounter: any;
|
|
103
|
+
private checkCounter: any;
|
|
104
|
+
private postureCounter: any;
|
|
105
|
+
createScan(scan: Omit<SecurityScan, 'id' | 'status' | 'findings'>): SecurityScan;
|
|
106
|
+
createContainerScan(options: {
|
|
107
|
+
name: string
|
|
108
|
+
imageUri: string
|
|
109
|
+
region?: string
|
|
110
|
+
}): SecurityScan;
|
|
111
|
+
createLambdaScan(options: {
|
|
112
|
+
name: string
|
|
113
|
+
functionName: string
|
|
114
|
+
region?: string
|
|
115
|
+
}): SecurityScan;
|
|
116
|
+
createSecretsDetectionScan(options: {
|
|
117
|
+
name: string
|
|
118
|
+
repositoryUrl: string
|
|
119
|
+
}): SecurityScan;
|
|
120
|
+
executeScan(scanId: string): Promise<SecurityScan>;
|
|
121
|
+
private simulateFindings(scan: SecurityScan): SecurityFinding[];
|
|
122
|
+
createFinding(finding: Omit<SecurityFinding, 'id'>): SecurityFinding;
|
|
123
|
+
suppressFinding(findingId: string, reason?: string): void;
|
|
124
|
+
resolveFinding(findingId: string): void;
|
|
125
|
+
generateReport(options: {
|
|
126
|
+
scanId: string
|
|
127
|
+
reportType: 'summary' | 'detailed' | 'executive'
|
|
128
|
+
format: 'json' | 'pdf' | 'html'
|
|
129
|
+
}): VulnerabilityReport;
|
|
130
|
+
runComplianceCheck(options: {
|
|
131
|
+
framework: ComplianceFramework
|
|
132
|
+
resourceType: string
|
|
133
|
+
resourceId: string
|
|
134
|
+
}): ComplianceCheck[];
|
|
135
|
+
createComplianceCheck(check: Omit<ComplianceCheck, 'id'>): ComplianceCheck;
|
|
136
|
+
assessSecurityPosture(options: {
|
|
137
|
+
accountId: string
|
|
138
|
+
region: string
|
|
139
|
+
}): SecurityPosture;
|
|
140
|
+
getScan(id: string): SecurityScan | undefined;
|
|
141
|
+
listScans(): SecurityScan[];
|
|
142
|
+
getOpenFindings(severity?: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO'): SecurityFinding[];
|
|
143
|
+
getComplianceChecksByStatus(status: 'PASS' | 'FAIL' | 'WARNING' | 'NOT_APPLICABLE'): ComplianceCheck[];
|
|
144
|
+
listPostures(): SecurityPosture[];
|
|
145
|
+
generateECRScanCF(repositoryName: string): any;
|
|
146
|
+
clear(): void;
|
|
147
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global secrets manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const secretsManager: SecretsManager;
|
|
5
|
+
/**
|
|
6
|
+
* Secrets Management
|
|
7
|
+
* Versioning, audit logging, and external secret manager integration
|
|
8
|
+
*/
|
|
9
|
+
export declare interface SecretVersion {
|
|
10
|
+
id: string
|
|
11
|
+
secretId: string
|
|
12
|
+
versionId: string
|
|
13
|
+
versionStages: string[]
|
|
14
|
+
value?: string
|
|
15
|
+
createdAt: Date
|
|
16
|
+
deprecatedAt?: Date
|
|
17
|
+
}
|
|
18
|
+
export declare interface SecretAudit {
|
|
19
|
+
id: string
|
|
20
|
+
secretId: string
|
|
21
|
+
action: SecretAction
|
|
22
|
+
actor: string
|
|
23
|
+
versionId?: string
|
|
24
|
+
timestamp: Date
|
|
25
|
+
ipAddress?: string
|
|
26
|
+
userAgent?: string
|
|
27
|
+
success: boolean
|
|
28
|
+
error?: string
|
|
29
|
+
}
|
|
30
|
+
export declare interface ExternalSecretManager {
|
|
31
|
+
id: string
|
|
32
|
+
type: 'vault' | 'onepassword' | 'azure_keyvault' | 'gcp_secretmanager'
|
|
33
|
+
name: string
|
|
34
|
+
endpoint?: string
|
|
35
|
+
authentication: ExternalAuthConfig
|
|
36
|
+
syncEnabled?: boolean
|
|
37
|
+
syncInterval?: number
|
|
38
|
+
}
|
|
39
|
+
export declare interface ExternalAuthConfig {
|
|
40
|
+
type: 'token' | 'iam' | 'certificate' | 'apikey'
|
|
41
|
+
credentials?: Record<string, string>
|
|
42
|
+
roleArn?: string
|
|
43
|
+
certificateArn?: string
|
|
44
|
+
}
|
|
45
|
+
export declare interface SecretReplication {
|
|
46
|
+
id: string
|
|
47
|
+
secretId: string
|
|
48
|
+
sourceRegion: string
|
|
49
|
+
replicaRegions: string[]
|
|
50
|
+
kmsKeyIds?: Record<string, string>
|
|
51
|
+
status: 'replicating' | 'completed' | 'failed'
|
|
52
|
+
}
|
|
53
|
+
export declare interface SecretPolicy {
|
|
54
|
+
id: string
|
|
55
|
+
secretId: string
|
|
56
|
+
policy: PolicyDocument
|
|
57
|
+
}
|
|
58
|
+
export declare interface PolicyDocument {
|
|
59
|
+
Version: string
|
|
60
|
+
Statement: PolicyStatement[]
|
|
61
|
+
}
|
|
62
|
+
export declare interface PolicyStatement {
|
|
63
|
+
Effect: 'Allow' | 'Deny'
|
|
64
|
+
Principal: {
|
|
65
|
+
AWS?: string | string[]
|
|
66
|
+
Service?: string | string[]
|
|
67
|
+
}
|
|
68
|
+
Action: string | string[]
|
|
69
|
+
Resource?: string | string[]
|
|
70
|
+
Condition?: Record<string, any>
|
|
71
|
+
}
|
|
72
|
+
export type SecretAction = | 'CREATE'
|
|
73
|
+
| 'READ'
|
|
74
|
+
| 'UPDATE'
|
|
75
|
+
| 'DELETE'
|
|
76
|
+
| 'ROTATE'
|
|
77
|
+
| 'RESTORE'
|
|
78
|
+
| 'REPLICATE'
|
|
79
|
+
/**
|
|
80
|
+
* Secrets manager
|
|
81
|
+
*/
|
|
82
|
+
export declare class SecretsManager {
|
|
83
|
+
private versions: Map<string, SecretVersion>;
|
|
84
|
+
private audits: Map<string, SecretAudit>;
|
|
85
|
+
private externalManagers: Map<string, ExternalSecretManager>;
|
|
86
|
+
private replications: Map<string, SecretReplication>;
|
|
87
|
+
private policies: Map<string, SecretPolicy>;
|
|
88
|
+
private versionCounter: any;
|
|
89
|
+
private auditCounter: any;
|
|
90
|
+
private managerCounter: any;
|
|
91
|
+
private replicationCounter: any;
|
|
92
|
+
private policyCounter: any;
|
|
93
|
+
createVersion(version: Omit<SecretVersion, 'id'>): SecretVersion;
|
|
94
|
+
getVersionByStage(secretId: string, stage: string): SecretVersion | undefined;
|
|
95
|
+
listVersions(secretId: string): SecretVersion[];
|
|
96
|
+
deprecateVersion(versionId: string): void;
|
|
97
|
+
restoreVersion(versionId: string): void;
|
|
98
|
+
auditAction(audit: Omit<SecretAudit, 'id' | 'timestamp'>): SecretAudit;
|
|
99
|
+
getAuditTrail(secretId: string, limit?: number): SecretAudit[];
|
|
100
|
+
getFailedAccesses(secretId: string, hours?: number): SecretAudit[];
|
|
101
|
+
registerExternalManager(manager: Omit<ExternalSecretManager, 'id'>): ExternalSecretManager;
|
|
102
|
+
registerVault(options: {
|
|
103
|
+
name: string
|
|
104
|
+
endpoint: string
|
|
105
|
+
token?: string
|
|
106
|
+
roleArn?: string
|
|
107
|
+
syncEnabled?: boolean
|
|
108
|
+
}): ExternalSecretManager;
|
|
109
|
+
registerOnePassword(options: {
|
|
110
|
+
name: string
|
|
111
|
+
endpoint?: string
|
|
112
|
+
apiKey: string
|
|
113
|
+
syncEnabled?: boolean
|
|
114
|
+
}): ExternalSecretManager;
|
|
115
|
+
enableReplication(options: {
|
|
116
|
+
secretId: string
|
|
117
|
+
sourceRegion: string
|
|
118
|
+
replicaRegions: string[]
|
|
119
|
+
kmsKeyIds?: Record<string, string>
|
|
120
|
+
}): SecretReplication;
|
|
121
|
+
createPolicy(options: {
|
|
122
|
+
secretId: string
|
|
123
|
+
allowedPrincipals: string[]
|
|
124
|
+
allowedActions: string[]
|
|
125
|
+
}): SecretPolicy;
|
|
126
|
+
createCrossAccountPolicy(options: {
|
|
127
|
+
secretId: string
|
|
128
|
+
accountId: string
|
|
129
|
+
roleNames: string[]
|
|
130
|
+
}): SecretPolicy;
|
|
131
|
+
getVersion(id: string): SecretVersion | undefined;
|
|
132
|
+
getExternalManager(id: string): ExternalSecretManager | undefined;
|
|
133
|
+
listExternalManagers(): ExternalSecretManager[];
|
|
134
|
+
getReplication(id: string): SecretReplication | undefined;
|
|
135
|
+
listReplications(): SecretReplication[];
|
|
136
|
+
generateSecretCF(options: {
|
|
137
|
+
name: string
|
|
138
|
+
description?: string
|
|
139
|
+
kmsKeyId?: string
|
|
140
|
+
replicaRegions?: string[]
|
|
141
|
+
}): any;
|
|
142
|
+
generateSecretPolicyCF(policy: SecretPolicy): any;
|
|
143
|
+
clear(): void;
|
|
144
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global secrets rotation manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const secretsRotationManager: SecretsRotationManager;
|
|
5
|
+
/**
|
|
6
|
+
* Automated Secrets Rotation
|
|
7
|
+
* Automatic rotation for RDS credentials, API keys, and other secrets
|
|
8
|
+
*/
|
|
9
|
+
export declare interface SecretRotation {
|
|
10
|
+
id: string
|
|
11
|
+
secretId: string
|
|
12
|
+
secretType: SecretType
|
|
13
|
+
rotationEnabled: boolean
|
|
14
|
+
rotationDays: number
|
|
15
|
+
rotationLambdaArn?: string
|
|
16
|
+
lastRotated?: Date
|
|
17
|
+
nextRotation?: Date
|
|
18
|
+
versionStages?: string[]
|
|
19
|
+
}
|
|
20
|
+
export declare interface RotationConfig {
|
|
21
|
+
automaticallyAfterDays: number
|
|
22
|
+
rotationLambda?: RotationLambda
|
|
23
|
+
requireMasterPassword?: boolean
|
|
24
|
+
excludeCharacters?: string
|
|
25
|
+
passwordLength?: number
|
|
26
|
+
}
|
|
27
|
+
export declare interface RotationLambda {
|
|
28
|
+
functionArn: string
|
|
29
|
+
functionName: string
|
|
30
|
+
runtime: string
|
|
31
|
+
handler: string
|
|
32
|
+
}
|
|
33
|
+
export declare interface RotationSchedule {
|
|
34
|
+
id: string
|
|
35
|
+
name: string
|
|
36
|
+
secrets: string[]
|
|
37
|
+
schedule: string
|
|
38
|
+
enabled: boolean
|
|
39
|
+
lastRun?: Date
|
|
40
|
+
nextRun?: Date
|
|
41
|
+
}
|
|
42
|
+
export declare interface RotationResult {
|
|
43
|
+
success: boolean
|
|
44
|
+
secretId: string
|
|
45
|
+
oldVersion: string
|
|
46
|
+
newVersion: string
|
|
47
|
+
rotatedAt: Date
|
|
48
|
+
error?: string
|
|
49
|
+
}
|
|
50
|
+
export declare interface RDSRotationConfig {
|
|
51
|
+
secretArn: string
|
|
52
|
+
databaseIdentifier: string
|
|
53
|
+
engine: 'postgres' | 'mysql' | 'sqlserver' | 'oracle'
|
|
54
|
+
masterSecretArn?: string
|
|
55
|
+
superuserSecretArn?: string
|
|
56
|
+
}
|
|
57
|
+
export type SecretType = | 'rds_credentials'
|
|
58
|
+
| 'api_key'
|
|
59
|
+
| 'oauth_token'
|
|
60
|
+
| 'ssh_key'
|
|
61
|
+
| 'certificate'
|
|
62
|
+
| 'generic'
|
|
63
|
+
/**
|
|
64
|
+
* Secrets rotation manager
|
|
65
|
+
*/
|
|
66
|
+
export declare class SecretsRotationManager {
|
|
67
|
+
private rotations: Map<string, SecretRotation>;
|
|
68
|
+
private schedules: Map<string, RotationSchedule>;
|
|
69
|
+
private rotationCounter: any;
|
|
70
|
+
private scheduleCounter: any;
|
|
71
|
+
createRotation(rotation: Omit<SecretRotation, 'id'>): SecretRotation;
|
|
72
|
+
enableRDSRotation(options: {
|
|
73
|
+
secretId: string
|
|
74
|
+
databaseIdentifier: string
|
|
75
|
+
engine: 'postgres' | 'mysql' | 'sqlserver' | 'oracle'
|
|
76
|
+
rotationDays?: number
|
|
77
|
+
masterSecretArn?: string
|
|
78
|
+
}): SecretRotation;
|
|
79
|
+
enableAPIKeyRotation(options: {
|
|
80
|
+
secretId: string
|
|
81
|
+
rotationDays?: number
|
|
82
|
+
rotationLambdaArn?: string
|
|
83
|
+
}): SecretRotation;
|
|
84
|
+
enableOAuthRotation(options: {
|
|
85
|
+
secretId: string
|
|
86
|
+
rotationDays?: number
|
|
87
|
+
rotationLambdaArn: string
|
|
88
|
+
}): SecretRotation;
|
|
89
|
+
enableSSHKeyRotation(options: {
|
|
90
|
+
secretId: string
|
|
91
|
+
rotationDays?: number
|
|
92
|
+
rotationLambdaArn: string
|
|
93
|
+
}): SecretRotation;
|
|
94
|
+
createSchedule(schedule: Omit<RotationSchedule, 'id'>): RotationSchedule;
|
|
95
|
+
executeRotation(rotationId: string): Promise<RotationResult>;
|
|
96
|
+
needsRotation(rotationId: string): boolean;
|
|
97
|
+
getSecretsNeedingRotation(): SecretRotation[];
|
|
98
|
+
private generateRDSRotationLambdaArn(engine: string): string;
|
|
99
|
+
getRotation(id: string): SecretRotation | undefined;
|
|
100
|
+
listRotations(): SecretRotation[];
|
|
101
|
+
getSchedule(id: string): RotationSchedule | undefined;
|
|
102
|
+
listSchedules(): RotationSchedule[];
|
|
103
|
+
generateRotationCF(rotation: SecretRotation): any;
|
|
104
|
+
generateRotationLambdaCF(options: {
|
|
105
|
+
functionName: string
|
|
106
|
+
secretType: SecretType
|
|
107
|
+
vpcConfig?: {
|
|
108
|
+
subnetIds: string[]
|
|
109
|
+
securityGroupIds: string[]
|
|
110
|
+
}
|
|
111
|
+
}): any;
|
|
112
|
+
generateRotationLambdaRoleCF(): any;
|
|
113
|
+
generateRotationScheduleCF(schedule: RotationSchedule): any;
|
|
114
|
+
clear(): void;
|
|
115
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A/B Testing for SMS Content
|
|
3
|
+
*
|
|
4
|
+
* Provides A/B testing capabilities for SMS campaigns
|
|
5
|
+
*/
|
|
6
|
+
export declare interface AbTest {
|
|
7
|
+
id: string
|
|
8
|
+
name: string
|
|
9
|
+
status: 'draft' | 'running' | 'completed' | 'cancelled'
|
|
10
|
+
variants: AbVariant[]
|
|
11
|
+
trafficSplit: number[]
|
|
12
|
+
winningCriteria: 'delivery_rate' | 'click_rate' | 'reply_rate' | 'conversion_rate'
|
|
13
|
+
sampleSize: number
|
|
14
|
+
currentSample: number
|
|
15
|
+
winner?: string
|
|
16
|
+
createdAt: string
|
|
17
|
+
startedAt?: string
|
|
18
|
+
completedAt?: string
|
|
19
|
+
}
|
|
20
|
+
export declare interface AbVariant {
|
|
21
|
+
id: string
|
|
22
|
+
name: string
|
|
23
|
+
message: string
|
|
24
|
+
stats: VariantStats
|
|
25
|
+
}
|
|
26
|
+
export declare interface VariantStats {
|
|
27
|
+
sent: number
|
|
28
|
+
delivered: number
|
|
29
|
+
clicked: number
|
|
30
|
+
replied: number
|
|
31
|
+
converted: number
|
|
32
|
+
deliveryRate: number
|
|
33
|
+
clickRate: number
|
|
34
|
+
replyRate: number
|
|
35
|
+
conversionRate: number
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A/B Testing Module
|
|
39
|
+
*/
|
|
40
|
+
export declare class AbTesting {
|
|
41
|
+
static AbTestManagerCode: any;
|
|
42
|
+
static createAbTestsTable(config: { slug: string }): Record<string, any>;
|
|
43
|
+
static createAbTestManagerLambda(config: {
|
|
44
|
+
slug: string
|
|
45
|
+
roleArn: string
|
|
46
|
+
abTestsTable: string
|
|
47
|
+
}): Record<string, any>;
|
|
48
|
+
static selectVariant(test: AbTest, recipientId: string): AbVariant;
|
|
49
|
+
static determineWinner(test: AbTest): AbVariant | null;
|
|
50
|
+
static calculateSignificance(variantA: AbVariant, variantB: AbVariant, criteria: string): number;
|
|
51
|
+
static private getMetricValue(variant: AbVariant, criteria: string): number;
|
|
52
|
+
static private hashString(str: string): number;
|
|
53
|
+
}
|
|
54
|
+
export default AbTesting;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMS Analytics
|
|
3
|
+
*
|
|
4
|
+
* Provides delivery rates, engagement metrics, and reporting
|
|
5
|
+
*/
|
|
6
|
+
export declare interface SmsMetrics {
|
|
7
|
+
period: string
|
|
8
|
+
sent: number
|
|
9
|
+
delivered: number
|
|
10
|
+
failed: number
|
|
11
|
+
pending: number
|
|
12
|
+
optedOut: number
|
|
13
|
+
deliveryRate: number
|
|
14
|
+
failureRate: number
|
|
15
|
+
averageDeliveryTime: number
|
|
16
|
+
cost: number
|
|
17
|
+
}
|
|
18
|
+
export declare interface SmsEngagement {
|
|
19
|
+
messageId: string
|
|
20
|
+
delivered: boolean
|
|
21
|
+
deliveredAt?: string
|
|
22
|
+
clicked?: boolean
|
|
23
|
+
clickedAt?: string
|
|
24
|
+
replied?: boolean
|
|
25
|
+
repliedAt?: string
|
|
26
|
+
replyContent?: string
|
|
27
|
+
optedOut?: boolean
|
|
28
|
+
optedOutAt?: string
|
|
29
|
+
}
|
|
30
|
+
export declare interface DeliveryReport {
|
|
31
|
+
messageId: string
|
|
32
|
+
to: string
|
|
33
|
+
status: 'PENDING' | 'SUCCESSFUL' | 'FAILED' | 'UNKNOWN'
|
|
34
|
+
statusCode?: string
|
|
35
|
+
statusMessage?: string
|
|
36
|
+
carrier?: string
|
|
37
|
+
countryCode?: string
|
|
38
|
+
priceInMillicents?: number
|
|
39
|
+
timestamp: string
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* SMS Analytics Module
|
|
43
|
+
*/
|
|
44
|
+
export declare class SmsAnalytics {
|
|
45
|
+
static AnalyticsAggregatorCode: any;
|
|
46
|
+
static DeliveryTrackerCode: any;
|
|
47
|
+
static createAnalyticsTable(config: { slug: string }): Record<string, any>;
|
|
48
|
+
static createDeliveryReportsTable(config: { slug: string }): Record<string, any>;
|
|
49
|
+
static createAnalyticsAggregatorLambda(config: {
|
|
50
|
+
slug: string
|
|
51
|
+
roleArn: string
|
|
52
|
+
messageLogTable: string
|
|
53
|
+
analyticsTable: string
|
|
54
|
+
}): Record<string, any>;
|
|
55
|
+
}
|
|
56
|
+
export default SmsAnalytics;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMS Campaigns and Scheduling
|
|
3
|
+
*
|
|
4
|
+
* Provides campaign management and scheduled SMS sending
|
|
5
|
+
*/
|
|
6
|
+
export declare interface SmsCampaign {
|
|
7
|
+
id: string
|
|
8
|
+
name: string
|
|
9
|
+
description?: string
|
|
10
|
+
status: 'draft' | 'scheduled' | 'running' | 'paused' | 'completed' | 'cancelled'
|
|
11
|
+
message: {
|
|
12
|
+
body: string
|
|
13
|
+
template?: string
|
|
14
|
+
variables?: string[]
|
|
15
|
+
}
|
|
16
|
+
audience: CampaignAudience
|
|
17
|
+
schedule: CampaignSchedule
|
|
18
|
+
settings: CampaignSettings
|
|
19
|
+
stats: CampaignStats
|
|
20
|
+
createdAt: string
|
|
21
|
+
updatedAt: string
|
|
22
|
+
startedAt?: string
|
|
23
|
+
completedAt?: string
|
|
24
|
+
}
|
|
25
|
+
export declare interface CampaignAudience {
|
|
26
|
+
type: 'list' | 'segment' | 'all'
|
|
27
|
+
listId?: string
|
|
28
|
+
segmentId?: string
|
|
29
|
+
filters?: AudienceFilter[]
|
|
30
|
+
estimatedSize?: number
|
|
31
|
+
}
|
|
32
|
+
export declare interface AudienceFilter {
|
|
33
|
+
field: string
|
|
34
|
+
operator: 'equals' | 'not-equals' | 'contains' | 'greater-than' | 'less-than'
|
|
35
|
+
value: string
|
|
36
|
+
}
|
|
37
|
+
export declare interface CampaignSchedule {
|
|
38
|
+
type: 'immediate' | 'scheduled' | 'recurring'
|
|
39
|
+
scheduledFor?: string
|
|
40
|
+
timezone?: string
|
|
41
|
+
recurrence?: {
|
|
42
|
+
frequency: 'daily' | 'weekly' | 'monthly'
|
|
43
|
+
interval: number
|
|
44
|
+
endDate?: string
|
|
45
|
+
maxOccurrences?: number
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export declare interface CampaignSettings {
|
|
49
|
+
messageType: 'TRANSACTIONAL' | 'PROMOTIONAL'
|
|
50
|
+
senderId?: string
|
|
51
|
+
originationNumber?: string
|
|
52
|
+
throttleRate?: number
|
|
53
|
+
quietHours?: {
|
|
54
|
+
start: string // HH:MM
|
|
55
|
+
end: string
|
|
56
|
+
timezone: string
|
|
57
|
+
}
|
|
58
|
+
optOutHandling: boolean
|
|
59
|
+
}
|
|
60
|
+
export declare interface CampaignStats {
|
|
61
|
+
totalRecipients: number
|
|
62
|
+
sent: number
|
|
63
|
+
delivered: number
|
|
64
|
+
failed: number
|
|
65
|
+
optedOut: number
|
|
66
|
+
deliveryRate: number
|
|
67
|
+
cost: number
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* SMS Campaigns Module
|
|
71
|
+
*/
|
|
72
|
+
export declare class SmsCampaigns {
|
|
73
|
+
static CampaignManagerCode: any;
|
|
74
|
+
static CampaignExecutorCode: any;
|
|
75
|
+
static createCampaignsTable(config: { slug: string }): Record<string, any>;
|
|
76
|
+
static createCampaignManagerLambda(config: {
|
|
77
|
+
slug: string
|
|
78
|
+
roleArn: string
|
|
79
|
+
campaignsTable: string
|
|
80
|
+
}): Record<string, any>;
|
|
81
|
+
}
|
|
82
|
+
export default SmsCampaigns;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMS Chatbot Integration
|
|
3
|
+
*
|
|
4
|
+
* Provides conversational SMS with AI/rule-based responses
|
|
5
|
+
*/
|
|
6
|
+
export declare interface ChatbotConfig {
|
|
7
|
+
enabled: boolean
|
|
8
|
+
provider: 'rules' | 'bedrock' | 'openai' | 'custom'
|
|
9
|
+
welcomeMessage?: string
|
|
10
|
+
fallbackMessage?: string
|
|
11
|
+
sessionTimeout?: number
|
|
12
|
+
maxTurns?: number
|
|
13
|
+
}
|
|
14
|
+
export declare interface ChatSession {
|
|
15
|
+
sessionId: string
|
|
16
|
+
phoneNumber: string
|
|
17
|
+
startedAt: string
|
|
18
|
+
lastMessageAt: string
|
|
19
|
+
turnCount: number
|
|
20
|
+
context: Record<string, any>
|
|
21
|
+
status: 'active' | 'ended' | 'timeout'
|
|
22
|
+
}
|
|
23
|
+
export declare interface ChatRule {
|
|
24
|
+
id: string
|
|
25
|
+
priority: number
|
|
26
|
+
patterns: string[]
|
|
27
|
+
response: string
|
|
28
|
+
action?: 'respond' | 'transfer' | 'end' | 'webhook'
|
|
29
|
+
actionParams?: Record<string, any>
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* SMS Chatbot Module
|
|
33
|
+
*/
|
|
34
|
+
export declare class SmsChatbot {
|
|
35
|
+
static ChatbotProcessorCode: string;
|
|
36
|
+
static createSessionsTable(config: { slug: string }): Record<string, any>;
|
|
37
|
+
static createRulesTable(config: { slug: string }): Record<string, any>;
|
|
38
|
+
static createChatbotProcessorLambda(config: {
|
|
39
|
+
slug: string
|
|
40
|
+
roleArn: string
|
|
41
|
+
sessionsTable: string
|
|
42
|
+
rulesTable: string
|
|
43
|
+
chatbotConfig: ChatbotConfig
|
|
44
|
+
originationNumber?: string
|
|
45
|
+
}): Record<string, any>;
|
|
46
|
+
static readonly DefaultRules: ChatRule[];
|
|
47
|
+
}
|
|
48
|
+
export default SmsChatbot;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link Shortening and Tracking
|
|
3
|
+
*
|
|
4
|
+
* Provides URL shortening and click tracking for SMS
|
|
5
|
+
*/
|
|
6
|
+
export declare interface ShortenedLink {
|
|
7
|
+
id: string
|
|
8
|
+
originalUrl: string
|
|
9
|
+
shortUrl: string
|
|
10
|
+
campaignId?: string
|
|
11
|
+
messageId?: string
|
|
12
|
+
clicks: number
|
|
13
|
+
uniqueClicks: number
|
|
14
|
+
createdAt: string
|
|
15
|
+
expiresAt?: string
|
|
16
|
+
}
|
|
17
|
+
export declare interface LinkClick {
|
|
18
|
+
linkId: string
|
|
19
|
+
clickedAt: string
|
|
20
|
+
userAgent?: string
|
|
21
|
+
ipAddress?: string
|
|
22
|
+
country?: string
|
|
23
|
+
device?: string
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Link Tracking Module
|
|
27
|
+
*/
|
|
28
|
+
export declare class LinkTracking {
|
|
29
|
+
static LinkShortenerCode: any;
|
|
30
|
+
static createLinksTable(config: { slug: string }): Record<string, any>;
|
|
31
|
+
static createLinkShortenerLambda(config: {
|
|
32
|
+
slug: string
|
|
33
|
+
roleArn: string
|
|
34
|
+
linksTable: string
|
|
35
|
+
shortDomain?: string
|
|
36
|
+
}): Record<string, any>;
|
|
37
|
+
static shortenUrlsInMessage(message: string, shortDomain: string, linkIdPrefix: string): {
|
|
38
|
+
message: string
|
|
39
|
+
links: Array<{ original: string; short: string; id: string }>
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export default LinkTracking;
|