@ts-cloud/core 0.2.3 → 0.2.5

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,204 @@
1
+ /**
2
+ * Secrets Management
3
+ * Versioning, audit logging, and external secret manager integration
4
+ */
5
+ export interface SecretVersion {
6
+ id: string;
7
+ secretId: string;
8
+ versionId: string;
9
+ versionStages: string[];
10
+ value?: string;
11
+ createdAt: Date;
12
+ deprecatedAt?: Date;
13
+ }
14
+ export interface SecretAudit {
15
+ id: string;
16
+ secretId: string;
17
+ action: SecretAction;
18
+ actor: string;
19
+ versionId?: string;
20
+ timestamp: Date;
21
+ ipAddress?: string;
22
+ userAgent?: string;
23
+ success: boolean;
24
+ error?: string;
25
+ }
26
+ export type SecretAction = 'CREATE' | 'READ' | 'UPDATE' | 'DELETE' | 'ROTATE' | 'RESTORE' | 'REPLICATE';
27
+ export interface ExternalSecretManager {
28
+ id: string;
29
+ type: 'vault' | 'onepassword' | 'azure_keyvault' | 'gcp_secretmanager';
30
+ name: string;
31
+ endpoint?: string;
32
+ authentication: ExternalAuthConfig;
33
+ syncEnabled?: boolean;
34
+ syncInterval?: number;
35
+ }
36
+ export interface ExternalAuthConfig {
37
+ type: 'token' | 'iam' | 'certificate' | 'apikey';
38
+ credentials?: Record<string, string>;
39
+ roleArn?: string;
40
+ certificateArn?: string;
41
+ }
42
+ export interface SecretReplication {
43
+ id: string;
44
+ secretId: string;
45
+ sourceRegion: string;
46
+ replicaRegions: string[];
47
+ kmsKeyIds?: Record<string, string>;
48
+ status: 'replicating' | 'completed' | 'failed';
49
+ }
50
+ export interface SecretPolicy {
51
+ id: string;
52
+ secretId: string;
53
+ policy: PolicyDocument;
54
+ }
55
+ export interface PolicyDocument {
56
+ Version: string;
57
+ Statement: PolicyStatement[];
58
+ }
59
+ export interface PolicyStatement {
60
+ Effect: 'Allow' | 'Deny';
61
+ Principal: {
62
+ AWS?: string | string[];
63
+ Service?: string | string[];
64
+ };
65
+ Action: string | string[];
66
+ Resource?: string | string[];
67
+ Condition?: Record<string, any>;
68
+ }
69
+ /**
70
+ * Secrets manager
71
+ */
72
+ export declare class SecretsManager {
73
+ private versions;
74
+ private audits;
75
+ private externalManagers;
76
+ private replications;
77
+ private policies;
78
+ private versionCounter;
79
+ private auditCounter;
80
+ private managerCounter;
81
+ private replicationCounter;
82
+ private policyCounter;
83
+ /**
84
+ * Create secret version
85
+ */
86
+ createVersion(version: Omit<SecretVersion, 'id'>): SecretVersion;
87
+ /**
88
+ * Get secret version by stage
89
+ */
90
+ getVersionByStage(secretId: string, stage: string): SecretVersion | undefined;
91
+ /**
92
+ * List versions for secret
93
+ */
94
+ listVersions(secretId: string): SecretVersion[];
95
+ /**
96
+ * Deprecate version
97
+ */
98
+ deprecateVersion(versionId: string): void;
99
+ /**
100
+ * Restore version
101
+ */
102
+ restoreVersion(versionId: string): void;
103
+ /**
104
+ * Audit secret action
105
+ */
106
+ auditAction(audit: Omit<SecretAudit, 'id' | 'timestamp'>): SecretAudit;
107
+ /**
108
+ * Get audit trail for secret
109
+ */
110
+ getAuditTrail(secretId: string, limit?: number): SecretAudit[];
111
+ /**
112
+ * Get failed access attempts
113
+ */
114
+ getFailedAccesses(secretId: string, hours?: number): SecretAudit[];
115
+ /**
116
+ * Register external secret manager
117
+ */
118
+ registerExternalManager(manager: Omit<ExternalSecretManager, 'id'>): ExternalSecretManager;
119
+ /**
120
+ * Register HashiCorp Vault
121
+ */
122
+ registerVault(options: {
123
+ name: string;
124
+ endpoint: string;
125
+ token?: string;
126
+ roleArn?: string;
127
+ syncEnabled?: boolean;
128
+ }): ExternalSecretManager;
129
+ /**
130
+ * Register 1Password
131
+ */
132
+ registerOnePassword(options: {
133
+ name: string;
134
+ endpoint?: string;
135
+ apiKey: string;
136
+ syncEnabled?: boolean;
137
+ }): ExternalSecretManager;
138
+ /**
139
+ * Enable secret replication
140
+ */
141
+ enableReplication(options: {
142
+ secretId: string;
143
+ sourceRegion: string;
144
+ replicaRegions: string[];
145
+ kmsKeyIds?: Record<string, string>;
146
+ }): SecretReplication;
147
+ /**
148
+ * Create secret policy
149
+ */
150
+ createPolicy(options: {
151
+ secretId: string;
152
+ allowedPrincipals: string[];
153
+ allowedActions: string[];
154
+ }): SecretPolicy;
155
+ /**
156
+ * Create cross-account access policy
157
+ */
158
+ createCrossAccountPolicy(options: {
159
+ secretId: string;
160
+ accountId: string;
161
+ roleNames: string[];
162
+ }): SecretPolicy;
163
+ /**
164
+ * Get version
165
+ */
166
+ getVersion(id: string): SecretVersion | undefined;
167
+ /**
168
+ * Get external manager
169
+ */
170
+ getExternalManager(id: string): ExternalSecretManager | undefined;
171
+ /**
172
+ * List external managers
173
+ */
174
+ listExternalManagers(): ExternalSecretManager[];
175
+ /**
176
+ * Get replication
177
+ */
178
+ getReplication(id: string): SecretReplication | undefined;
179
+ /**
180
+ * List replications
181
+ */
182
+ listReplications(): SecretReplication[];
183
+ /**
184
+ * Generate CloudFormation for secret
185
+ */
186
+ generateSecretCF(options: {
187
+ name: string;
188
+ description?: string;
189
+ kmsKeyId?: string;
190
+ replicaRegions?: string[];
191
+ }): any;
192
+ /**
193
+ * Generate CloudFormation for secret policy
194
+ */
195
+ generateSecretPolicyCF(policy: SecretPolicy): any;
196
+ /**
197
+ * Clear all data
198
+ */
199
+ clear(): void;
200
+ }
201
+ /**
202
+ * Global secrets manager instance
203
+ */
204
+ export declare const secretsManager: SecretsManager;
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Automated Secrets Rotation
3
+ * Automatic rotation for RDS credentials, API keys, and other secrets
4
+ */
5
+ export interface SecretRotation {
6
+ id: string;
7
+ secretId: string;
8
+ secretType: SecretType;
9
+ rotationEnabled: boolean;
10
+ rotationDays: number;
11
+ rotationLambdaArn?: string;
12
+ lastRotated?: Date;
13
+ nextRotation?: Date;
14
+ versionStages?: string[];
15
+ }
16
+ export type SecretType = 'rds_credentials' | 'api_key' | 'oauth_token' | 'ssh_key' | 'certificate' | 'generic';
17
+ export interface RotationConfig {
18
+ automaticallyAfterDays: number;
19
+ rotationLambda?: RotationLambda;
20
+ requireMasterPassword?: boolean;
21
+ excludeCharacters?: string;
22
+ passwordLength?: number;
23
+ }
24
+ export interface RotationLambda {
25
+ functionArn: string;
26
+ functionName: string;
27
+ runtime: string;
28
+ handler: string;
29
+ }
30
+ export interface RotationSchedule {
31
+ id: string;
32
+ name: string;
33
+ secrets: string[];
34
+ schedule: string;
35
+ enabled: boolean;
36
+ lastRun?: Date;
37
+ nextRun?: Date;
38
+ }
39
+ export interface RotationResult {
40
+ success: boolean;
41
+ secretId: string;
42
+ oldVersion: string;
43
+ newVersion: string;
44
+ rotatedAt: Date;
45
+ error?: string;
46
+ }
47
+ export interface RDSRotationConfig {
48
+ secretArn: string;
49
+ databaseIdentifier: string;
50
+ engine: 'postgres' | 'mysql' | 'sqlserver' | 'oracle';
51
+ masterSecretArn?: string;
52
+ superuserSecretArn?: string;
53
+ }
54
+ /**
55
+ * Secrets rotation manager
56
+ */
57
+ export declare class SecretsRotationManager {
58
+ private rotations;
59
+ private schedules;
60
+ private rotationCounter;
61
+ private scheduleCounter;
62
+ /**
63
+ * Create secret rotation
64
+ */
65
+ createRotation(rotation: Omit<SecretRotation, 'id'>): SecretRotation;
66
+ /**
67
+ * Enable RDS credentials rotation
68
+ */
69
+ enableRDSRotation(options: {
70
+ secretId: string;
71
+ databaseIdentifier: string;
72
+ engine: 'postgres' | 'mysql' | 'sqlserver' | 'oracle';
73
+ rotationDays?: number;
74
+ masterSecretArn?: string;
75
+ }): SecretRotation;
76
+ /**
77
+ * Enable API key rotation
78
+ */
79
+ enableAPIKeyRotation(options: {
80
+ secretId: string;
81
+ rotationDays?: number;
82
+ rotationLambdaArn?: string;
83
+ }): SecretRotation;
84
+ /**
85
+ * Enable OAuth token rotation
86
+ */
87
+ enableOAuthRotation(options: {
88
+ secretId: string;
89
+ rotationDays?: number;
90
+ rotationLambdaArn: string;
91
+ }): SecretRotation;
92
+ /**
93
+ * Enable SSH key rotation
94
+ */
95
+ enableSSHKeyRotation(options: {
96
+ secretId: string;
97
+ rotationDays?: number;
98
+ rotationLambdaArn: string;
99
+ }): SecretRotation;
100
+ /**
101
+ * Create rotation schedule
102
+ */
103
+ createSchedule(schedule: Omit<RotationSchedule, 'id'>): RotationSchedule;
104
+ /**
105
+ * Execute rotation
106
+ */
107
+ executeRotation(rotationId: string): Promise<RotationResult>;
108
+ /**
109
+ * Check if rotation needed
110
+ */
111
+ needsRotation(rotationId: string): boolean;
112
+ /**
113
+ * Get secrets needing rotation
114
+ */
115
+ getSecretsNeedingRotation(): SecretRotation[];
116
+ /**
117
+ * Generate RDS rotation Lambda ARN
118
+ */
119
+ private generateRDSRotationLambdaArn;
120
+ /**
121
+ * Get rotation
122
+ */
123
+ getRotation(id: string): SecretRotation | undefined;
124
+ /**
125
+ * List rotations
126
+ */
127
+ listRotations(): SecretRotation[];
128
+ /**
129
+ * Get schedule
130
+ */
131
+ getSchedule(id: string): RotationSchedule | undefined;
132
+ /**
133
+ * List schedules
134
+ */
135
+ listSchedules(): RotationSchedule[];
136
+ /**
137
+ * Generate CloudFormation for rotation
138
+ */
139
+ generateRotationCF(rotation: SecretRotation): any;
140
+ /**
141
+ * Generate CloudFormation for rotation Lambda
142
+ */
143
+ generateRotationLambdaCF(options: {
144
+ functionName: string;
145
+ secretType: SecretType;
146
+ vpcConfig?: {
147
+ subnetIds: string[];
148
+ securityGroupIds: string[];
149
+ };
150
+ }): any;
151
+ /**
152
+ * Generate CloudFormation for rotation Lambda role
153
+ */
154
+ generateRotationLambdaRoleCF(): any;
155
+ /**
156
+ * Generate EventBridge rule for rotation schedule
157
+ */
158
+ generateRotationScheduleCF(schedule: RotationSchedule): any;
159
+ /**
160
+ * Clear all data
161
+ */
162
+ clear(): void;
163
+ }
164
+ /**
165
+ * Global secrets rotation manager instance
166
+ */
167
+ export declare const secretsRotationManager: SecretsRotationManager;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,74 @@
1
+ /**
2
+ * A/B Testing for SMS Content
3
+ *
4
+ * Provides A/B testing capabilities for SMS campaigns
5
+ */
6
+ export 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 interface AbVariant {
21
+ id: string;
22
+ name: string;
23
+ message: string;
24
+ stats: VariantStats;
25
+ }
26
+ export 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
+ /**
42
+ * Lambda code for A/B test management
43
+ */
44
+ static AbTestManagerCode: string;
45
+ /**
46
+ * Create A/B tests DynamoDB table
47
+ */
48
+ static createAbTestsTable(config: {
49
+ slug: string;
50
+ }): Record<string, any>;
51
+ /**
52
+ * Create A/B test manager Lambda
53
+ */
54
+ static createAbTestManagerLambda(config: {
55
+ slug: string;
56
+ roleArn: string;
57
+ abTestsTable: string;
58
+ }): Record<string, any>;
59
+ /**
60
+ * Select variant for a recipient
61
+ */
62
+ static selectVariant(test: AbTest, recipientId: string): AbVariant;
63
+ /**
64
+ * Determine winner based on criteria
65
+ */
66
+ static determineWinner(test: AbTest): AbVariant | null;
67
+ /**
68
+ * Calculate statistical significance
69
+ */
70
+ static calculateSignificance(variantA: AbVariant, variantB: AbVariant, criteria: string): number;
71
+ private static getMetricValue;
72
+ private static hashString;
73
+ }
74
+ export default AbTesting;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * SMS Analytics
3
+ *
4
+ * Provides delivery rates, engagement metrics, and reporting
5
+ */
6
+ export 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 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 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
+ /**
46
+ * Lambda code for analytics aggregation
47
+ */
48
+ static AnalyticsAggregatorCode: string;
49
+ /**
50
+ * Lambda code for real-time delivery tracking
51
+ */
52
+ static DeliveryTrackerCode: string;
53
+ /**
54
+ * Create analytics DynamoDB table
55
+ */
56
+ static createAnalyticsTable(config: {
57
+ slug: string;
58
+ }): Record<string, any>;
59
+ /**
60
+ * Create delivery reports table
61
+ */
62
+ static createDeliveryReportsTable(config: {
63
+ slug: string;
64
+ }): Record<string, any>;
65
+ /**
66
+ * Create analytics aggregator Lambda
67
+ */
68
+ static createAnalyticsAggregatorLambda(config: {
69
+ slug: string;
70
+ roleArn: string;
71
+ messageLogTable: string;
72
+ analyticsTable: string;
73
+ }): Record<string, any>;
74
+ }
75
+ export default SmsAnalytics;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * SMS Campaigns and Scheduling
3
+ *
4
+ * Provides campaign management and scheduled SMS sending
5
+ */
6
+ export 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 interface CampaignAudience {
26
+ type: 'list' | 'segment' | 'all';
27
+ listId?: string;
28
+ segmentId?: string;
29
+ filters?: AudienceFilter[];
30
+ estimatedSize?: number;
31
+ }
32
+ export interface AudienceFilter {
33
+ field: string;
34
+ operator: 'equals' | 'not-equals' | 'contains' | 'greater-than' | 'less-than';
35
+ value: string;
36
+ }
37
+ export 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 interface CampaignSettings {
49
+ messageType: 'TRANSACTIONAL' | 'PROMOTIONAL';
50
+ senderId?: string;
51
+ originationNumber?: string;
52
+ throttleRate?: number;
53
+ quietHours?: {
54
+ start: string;
55
+ end: string;
56
+ timezone: string;
57
+ };
58
+ optOutHandling: boolean;
59
+ }
60
+ export 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
+ /**
74
+ * Lambda code for campaign management
75
+ */
76
+ static CampaignManagerCode: string;
77
+ /**
78
+ * Lambda code for campaign execution
79
+ */
80
+ static CampaignExecutorCode: string;
81
+ /**
82
+ * Create campaigns DynamoDB table
83
+ */
84
+ static createCampaignsTable(config: {
85
+ slug: string;
86
+ }): Record<string, any>;
87
+ /**
88
+ * Create campaign manager Lambda
89
+ */
90
+ static createCampaignManagerLambda(config: {
91
+ slug: string;
92
+ roleArn: string;
93
+ campaignsTable: string;
94
+ }): Record<string, any>;
95
+ }
96
+ export default SmsCampaigns;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * SMS Chatbot Integration
3
+ *
4
+ * Provides conversational SMS with AI/rule-based responses
5
+ */
6
+ export 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 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 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
+ /**
36
+ * Lambda code for chatbot processing
37
+ */
38
+ static ChatbotProcessorCode: string;
39
+ /**
40
+ * Create sessions DynamoDB table
41
+ */
42
+ static createSessionsTable(config: {
43
+ slug: string;
44
+ }): Record<string, any>;
45
+ /**
46
+ * Create chatbot rules table
47
+ */
48
+ static createRulesTable(config: {
49
+ slug: string;
50
+ }): Record<string, any>;
51
+ /**
52
+ * Create chatbot processor Lambda
53
+ */
54
+ static createChatbotProcessorLambda(config: {
55
+ slug: string;
56
+ roleArn: string;
57
+ sessionsTable: string;
58
+ rulesTable: string;
59
+ chatbotConfig: ChatbotConfig;
60
+ originationNumber?: string;
61
+ }): Record<string, any>;
62
+ /**
63
+ * Built-in chatbot rules
64
+ */
65
+ static readonly DefaultRules: ChatRule[];
66
+ }
67
+ export default SmsChatbot;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SMS Advanced Features
3
+ */
4
+ export * from './campaigns';
5
+ export * from './analytics';
6
+ export * from './mms';
7
+ export * from './chatbot';
8
+ export * from './link-tracking';
9
+ export * from './ab-testing';