@stacksjs/ts-cloud 0.2.2 → 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 (76) hide show
  1. package/dist/aws/acm.d.ts +215 -0
  2. package/dist/aws/application-autoscaling.d.ts +345 -0
  3. package/dist/aws/bedrock.d.ts +2672 -0
  4. package/dist/aws/client.d.ts +181 -0
  5. package/dist/aws/cloudformation.d.ts +187 -0
  6. package/dist/aws/cloudfront.d.ts +416 -0
  7. package/dist/aws/cloudwatch-logs.d.ts +70 -0
  8. package/dist/aws/comprehend.d.ts +616 -0
  9. package/dist/aws/connect.d.ts +533 -0
  10. package/dist/aws/deploy-imap.d.ts +26 -0
  11. package/dist/aws/dynamodb.d.ts +270 -0
  12. package/dist/aws/ec2.d.ts +545 -0
  13. package/dist/aws/ecr.d.ts +240 -0
  14. package/dist/aws/ecs.d.ts +267 -0
  15. package/dist/aws/efs.d.ts +36 -0
  16. package/dist/aws/elasticache.d.ts +112 -0
  17. package/dist/aws/elbv2.d.ts +389 -0
  18. package/dist/aws/email.d.ts +260 -0
  19. package/dist/aws/eventbridge.d.ts +197 -0
  20. package/dist/aws/iam.d.ts +1013 -0
  21. package/dist/aws/imap-server.d.ts +298 -0
  22. package/dist/aws/index.d.ts +53 -0
  23. package/dist/aws/kendra.d.ts +831 -0
  24. package/dist/aws/lambda.d.ts +319 -0
  25. package/dist/aws/opensearch.d.ts +121 -0
  26. package/dist/aws/personalize.d.ts +586 -0
  27. package/dist/aws/polly.d.ts +243 -0
  28. package/dist/aws/rds.d.ts +346 -0
  29. package/dist/aws/rekognition.d.ts +691 -0
  30. package/dist/aws/route53-domains.d.ts +161 -0
  31. package/dist/aws/route53.d.ts +330 -0
  32. package/dist/aws/s3.d.ts +535 -0
  33. package/dist/aws/scheduler.d.ts +224 -0
  34. package/dist/aws/secrets-manager.d.ts +267 -0
  35. package/dist/aws/ses.d.ts +441 -0
  36. package/dist/aws/setup-phone.d.ts +1 -0
  37. package/dist/aws/setup-sms.d.ts +116 -0
  38. package/dist/aws/sms.d.ts +477 -0
  39. package/dist/aws/smtp-server.d.ts +108 -0
  40. package/dist/aws/sns.d.ts +224 -0
  41. package/dist/aws/sqs.d.ts +107 -0
  42. package/dist/aws/ssm.d.ts +311 -0
  43. package/dist/aws/sts.d.ts +21 -0
  44. package/dist/aws/support.d.ts +139 -0
  45. package/dist/aws/test-imap.d.ts +15 -0
  46. package/dist/aws/textract.d.ts +477 -0
  47. package/dist/aws/transcribe.d.ts +79 -0
  48. package/dist/aws/translate.d.ts +424 -0
  49. package/dist/aws/voice.d.ts +361 -0
  50. package/dist/bin/cli.js +4500 -809
  51. package/dist/config.d.ts +5 -0
  52. package/dist/deploy/index.d.ts +6 -0
  53. package/dist/deploy/static-site-external-dns.d.ts +70 -0
  54. package/dist/deploy/static-site.d.ts +110 -0
  55. package/dist/dns/cloudflare.d.ts +74 -0
  56. package/dist/dns/godaddy.d.ts +63 -0
  57. package/dist/dns/index.d.ts +67 -0
  58. package/dist/dns/porkbun.d.ts +43 -0
  59. package/dist/dns/route53-adapter.d.ts +67 -0
  60. package/dist/dns/types.d.ts +100 -0
  61. package/dist/dns/validator.d.ts +105 -0
  62. package/dist/generators/index.d.ts +4 -0
  63. package/dist/generators/infrastructure.d.ts +115 -0
  64. package/dist/index.d.ts +9 -165
  65. package/dist/index.js +24067 -6430
  66. package/dist/push/apns.d.ts +140 -0
  67. package/dist/push/fcm.d.ts +205 -0
  68. package/dist/push/index.d.ts +44 -0
  69. package/dist/security/pre-deploy-scanner.d.ts +97 -0
  70. package/dist/ssl/acme-client.d.ts +133 -0
  71. package/dist/ssl/index.d.ts +6 -0
  72. package/dist/ssl/letsencrypt.d.ts +96 -0
  73. package/dist/utils/cli.d.ts +121 -0
  74. package/dist/validation/index.d.ts +4 -0
  75. package/dist/validation/template.d.ts +27 -0
  76. package/package.json +6 -6
@@ -0,0 +1,298 @@
1
+ /**
2
+ * IMAP-to-S3 Bridge Server
3
+ * Provides IMAP access to emails stored in S3 via SES receipt rules
4
+ *
5
+ * This allows email clients like Mail.app to access emails that are
6
+ * stored in S3 buckets through SES inbound email processing.
7
+ */
8
+ export interface ImapServerConfig {
9
+ port?: number;
10
+ sslPort?: number;
11
+ host?: string;
12
+ region?: string;
13
+ bucket: string;
14
+ prefix?: string;
15
+ domain: string;
16
+ users: Record<string, {
17
+ password: string;
18
+ email: string;
19
+ }>;
20
+ tls?: {
21
+ key: string;
22
+ cert: string;
23
+ };
24
+ }
25
+ /**
26
+ * IMAP Server that reads emails from S3
27
+ */
28
+ export declare class ImapServer {
29
+ private config;
30
+ private s3;
31
+ private server?;
32
+ private tlsServer?;
33
+ private sessions;
34
+ private messageCache;
35
+ private flagsCache;
36
+ private uidMappingCache;
37
+ private nextUidCache;
38
+ private cacheTimestamp;
39
+ private uidCounter;
40
+ private readonly CACHE_TTL_MS;
41
+ constructor(config: ImapServerConfig);
42
+ /**
43
+ * Start the IMAP server
44
+ */
45
+ start(): Promise<void>;
46
+ /**
47
+ * Stop the IMAP server
48
+ */
49
+ stop(): Promise<void>;
50
+ /**
51
+ * Handle new connection
52
+ */
53
+ private handleConnection;
54
+ /**
55
+ * Send response to client
56
+ */
57
+ private send;
58
+ /**
59
+ * Process IMAP command
60
+ */
61
+ private processCommand;
62
+ /**
63
+ * Handle CAPABILITY command
64
+ */
65
+ private handleCapability;
66
+ /**
67
+ * Handle LOGOUT command
68
+ */
69
+ private handleLogout;
70
+ /**
71
+ * Handle LOGIN command
72
+ */
73
+ private handleLogin;
74
+ /**
75
+ * Handle AUTHENTICATE command
76
+ */
77
+ private handleAuthenticate;
78
+ /**
79
+ * Handle SELECT command
80
+ */
81
+ private handleSelect;
82
+ /**
83
+ * Handle EXAMINE command (read-only SELECT)
84
+ */
85
+ private handleExamine;
86
+ /**
87
+ * Handle NOOP command - check for new messages
88
+ */
89
+ private handleNoop;
90
+ /**
91
+ * Handle CHECK command - request a checkpoint/sync
92
+ */
93
+ private handleCheck;
94
+ /**
95
+ * Handle LIST command
96
+ */
97
+ private handleList;
98
+ /**
99
+ * Handle LSUB command (subscribed folders)
100
+ */
101
+ private handleLsub;
102
+ /**
103
+ * Handle STATUS command
104
+ */
105
+ private handleStatus;
106
+ /**
107
+ * Handle FETCH command
108
+ */
109
+ private handleFetch;
110
+ /**
111
+ * Handle UID command (UID FETCH, UID SEARCH, etc.)
112
+ */
113
+ private handleUid;
114
+ /**
115
+ * Handle UID FETCH
116
+ */
117
+ private handleUidFetch;
118
+ /**
119
+ * Handle SEARCH command
120
+ */
121
+ private handleSearch;
122
+ /**
123
+ * Handle UID SEARCH
124
+ */
125
+ private handleUidSearch;
126
+ /**
127
+ * Handle STORE command
128
+ * STORE sequence-set flags-operation flags
129
+ * Example: STORE 1 +FLAGS (\Deleted)
130
+ */
131
+ private handleStore;
132
+ /**
133
+ * Handle UID STORE
134
+ * UID STORE uid-set flags-operation flags
135
+ */
136
+ private handleUidStore;
137
+ /**
138
+ * Handle COPY command
139
+ * COPY sequence-set mailbox
140
+ */
141
+ private handleCopy;
142
+ /**
143
+ * Handle UID COPY
144
+ * UID COPY uid-set mailbox
145
+ */
146
+ private handleUidCopy;
147
+ /**
148
+ * Handle MOVE command (RFC 6851)
149
+ * MOVE sequence-set mailbox
150
+ */
151
+ private handleMove;
152
+ /**
153
+ * Handle UID MOVE command (RFC 6851)
154
+ * UID MOVE uid-set mailbox
155
+ */
156
+ private handleUidMove;
157
+ /**
158
+ * Handle UID EXPUNGE command (UIDPLUS extension)
159
+ * UID EXPUNGE uid-set - expunges only specified UIDs
160
+ */
161
+ private handleUidExpunge;
162
+ /**
163
+ * Handle CLOSE command
164
+ */
165
+ private handleClose;
166
+ /**
167
+ * Handle EXPUNGE command
168
+ * Removes messages marked with \Deleted flag
169
+ */
170
+ private handleExpunge;
171
+ /**
172
+ * Handle IDLE command
173
+ */
174
+ private handleIdle;
175
+ /**
176
+ * Handle STARTTLS command
177
+ */
178
+ private handleStartTls;
179
+ /**
180
+ * Handle NAMESPACE command
181
+ */
182
+ private handleNamespace;
183
+ /**
184
+ * Load messages from S3 for the selected folder
185
+ */
186
+ private loadMessages;
187
+ /**
188
+ * Load all messages from all folders for the "All Mail" virtual folder
189
+ * Uses persistent UIDs for stable message identification across sessions
190
+ */
191
+ private loadAllMailFolder;
192
+ /**
193
+ * Load messages from S3 for a specific folder (used by STATUS command)
194
+ * Uses persistent UIDs for stable message identification across sessions
195
+ */
196
+ private loadMessagesForFolder;
197
+ /**
198
+ * Parse email headers
199
+ */
200
+ private parseHeaders;
201
+ /**
202
+ * Build FETCH response
203
+ */
204
+ private buildFetchResponse;
205
+ /**
206
+ * Build ENVELOPE response
207
+ */
208
+ private buildEnvelope;
209
+ /**
210
+ * Format date for IMAP
211
+ */
212
+ private formatImapDate;
213
+ /**
214
+ * Parse IMAP sequence set (e.g., "1:*", "1,3,5", "1:10")
215
+ */
216
+ private parseSequenceSet;
217
+ /**
218
+ * Get UID validity value for a mailbox
219
+ */
220
+ private getUidValidity;
221
+ /**
222
+ * Get the S3 prefix for a folder
223
+ */
224
+ private getFolderPrefix;
225
+ /**
226
+ * Check if a folder is the virtual "All Mail" folder
227
+ */
228
+ private isAllMailFolder;
229
+ /**
230
+ * Load flags from S3
231
+ */
232
+ private loadFlags;
233
+ /**
234
+ * Save flags to S3
235
+ */
236
+ private saveFlags;
237
+ /**
238
+ * Load UID mapping from S3 (maps S3 keys to persistent UIDs)
239
+ */
240
+ private loadUidMapping;
241
+ /**
242
+ * Save UID mapping to S3
243
+ */
244
+ private saveUidMapping;
245
+ /**
246
+ * Get or assign a UID for a message (S3 key)
247
+ * Returns existing UID if message was seen before, assigns new UID otherwise
248
+ */
249
+ private getOrAssignUid;
250
+ /**
251
+ * Get messages for a specific folder
252
+ */
253
+ private getMessagesForFolder;
254
+ /**
255
+ * Set messages for a specific folder
256
+ */
257
+ private setMessagesForFolder;
258
+ /**
259
+ * Get UID counter for a folder
260
+ */
261
+ private getUidCounterForFolder;
262
+ /**
263
+ * Set UID counter for a folder
264
+ */
265
+ private setUidCounterForFolder;
266
+ /**
267
+ * Handle XLIST command (deprecated Gmail extension, but some clients use it)
268
+ */
269
+ private handleXlist;
270
+ /**
271
+ * Handle CREATE command
272
+ */
273
+ private handleCreate;
274
+ /**
275
+ * Handle DELETE command
276
+ */
277
+ private handleDelete;
278
+ /**
279
+ * Handle SUBSCRIBE command
280
+ */
281
+ private handleSubscribe;
282
+ /**
283
+ * Handle UNSUBSCRIBE command
284
+ */
285
+ private handleUnsubscribe;
286
+ /**
287
+ * Handle RENAME command
288
+ */
289
+ private handleRename;
290
+ /**
291
+ * Handle APPEND command
292
+ */
293
+ private handleAppend;
294
+ }
295
+ /**
296
+ * Create and start an IMAP server
297
+ */
298
+ export declare function startImapServer(config: ImapServerConfig): Promise<ImapServer>;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * AWS Integration Layer
3
+ * Direct API calls for AWS services (no SDK dependencies)
4
+ */
5
+ export * from './client';
6
+ export * from './cloudformation';
7
+ export * from './ec2';
8
+ export * from './s3';
9
+ export * from './cloudfront';
10
+ export * from './route53';
11
+ export * from './route53-domains';
12
+ export * from './acm';
13
+ export * from './ecr';
14
+ export * from './ecs';
15
+ export * from './sts';
16
+ export * from './ssm';
17
+ export * from './secrets-manager';
18
+ export * from './ses';
19
+ export * from './email';
20
+ export * from './sns';
21
+ export * from './sqs';
22
+ export * from './lambda';
23
+ export * from './cloudwatch-logs';
24
+ export * from './connect';
25
+ export * from './elbv2';
26
+ export * from './rds';
27
+ export * from './dynamodb';
28
+ export * from './opensearch';
29
+ export * from './transcribe';
30
+ export * from './bedrock';
31
+ export * from './comprehend';
32
+ export { RekognitionClient, detectLabelsFromS3, countFacesInS3Image, isContentSafe, } from './rekognition';
33
+ export type { S3Object as RekognitionS3Object, BoundingBox as RekognitionBoundingBox, Image, Video, Landmark, Pose, ImageQuality, Emotion, FaceDetail, DetectFacesCommandInput, DetectFacesCommandOutput, Label, DetectLabelsCommandInput, DetectLabelsCommandOutput, DetectTextCommandInput, TextDetection, DetectTextCommandOutput, DetectModerationLabelsCommandInput, ModerationLabel, DetectModerationLabelsCommandOutput, Celebrity, RecognizeCelebritiesCommandInput, RecognizeCelebritiesCommandOutput, CompareFacesCommandInput, CompareFacesMatch, CompareFacesCommandOutput, CreateCollectionCommandInput, CreateCollectionCommandOutput, DeleteCollectionCommandInput, DeleteCollectionCommandOutput, ListCollectionsCommandInput, ListCollectionsCommandOutput, IndexFacesCommandInput, FaceRecord, IndexFacesCommandOutput, SearchFacesByImageCommandInput, FaceMatch, SearchFacesByImageCommandOutput, SearchFacesCommandInput, SearchFacesCommandOutput, StartLabelDetectionCommandInput, StartLabelDetectionCommandOutput, GetLabelDetectionCommandInput, LabelDetection, GetLabelDetectionCommandOutput, StartFaceDetectionCommandInput, StartFaceDetectionCommandOutput, GetFaceDetectionCommandInput, FaceDetection, GetFaceDetectionCommandOutput, StartContentModerationCommandInput, StartContentModerationCommandOutput, GetContentModerationCommandInput, ContentModerationDetection, GetContentModerationCommandOutput, } from './rekognition';
34
+ export { TextractClient, extractTextFromS3, extractFormsFromS3, extractTablesFromS3, } from './textract';
35
+ export type { S3Object as TextractS3Object, BoundingBox as TextractBoundingBox, Document, Point, Geometry, Relationship, Block, DocumentMetadata, Warning, DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput, AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput, AnalyzeExpenseCommandInput, ExpenseField, LineItemGroup, ExpenseDocument, AnalyzeExpenseCommandOutput, AnalyzeIDCommandInput, IdentityDocument, AnalyzeIDCommandOutput, StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput, GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput, StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput, GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput, StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput, GetExpenseAnalysisCommandInput, GetExpenseAnalysisCommandOutput, StartLendingAnalysisCommandInput, StartLendingAnalysisCommandOutput, GetLendingAnalysisCommandInput, LendingDocument, LendingResult, GetLendingAnalysisCommandOutput, } from './textract';
36
+ export * from './polly';
37
+ export * from './translate';
38
+ export * from './personalize';
39
+ export { KendraClient, search, retrieveForRag, } from './kendra';
40
+ export type { CreateIndexCommandInput as KendraCreateIndexCommandInput, CreateIndexCommandOutput as KendraCreateIndexCommandOutput, DescribeIndexCommandInput, Index, DescribeIndexCommandOutput, ListIndicesCommandInput, IndexSummary, ListIndicesCommandOutput, DeleteIndexCommandInput, DeleteIndexCommandOutput, CreateDataSourceCommandInput as KendraCreateDataSourceCommandInput, CreateDataSourceCommandOutput as KendraCreateDataSourceCommandOutput, DescribeDataSourceCommandInput, DataSource, DescribeDataSourceCommandOutput, ListDataSourcesCommandInput as KendraListDataSourcesCommandInput, DataSourceSummary, ListDataSourcesCommandOutput as KendraListDataSourcesCommandOutput, StartDataSourceSyncJobCommandInput, StartDataSourceSyncJobCommandOutput, StopDataSourceSyncJobCommandInput, StopDataSourceSyncJobCommandOutput, QueryCommandInput, QueryResultItem, FacetResult, QueryCommandOutput, RetrieveCommandInput, RetrieveResultItem, RetrieveCommandOutput, BatchPutDocumentCommandInput, BatchPutDocumentCommandOutput, BatchDeleteDocumentCommandInput, BatchDeleteDocumentCommandOutput, } from './kendra';
41
+ export * from './eventbridge';
42
+ export * from './elasticache';
43
+ export * from './scheduler';
44
+ export * from './iam';
45
+ export * from './application-autoscaling';
46
+ export * from './imap-server';
47
+ export * from './smtp-server';
48
+ export * from './sms';
49
+ export * from './voice';
50
+ export * from './support';
51
+ export * from './setup-sms';
52
+ export * from './efs';
53
+ export * from '../dns';