@stacksjs/ts-cloud 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aws/index.js +1 -269
- package/dist/bin/chunk-00kg80qg.js +1 -0
- package/dist/bin/chunk-09nwf2gy.js +34 -0
- package/dist/bin/chunk-1k5kszjp.js +111 -0
- package/dist/bin/chunk-21e0mavm.js +1 -0
- package/dist/bin/chunk-271gk1n2.js +6 -0
- package/dist/bin/chunk-2empps47.js +2 -0
- package/dist/bin/chunk-38pq971s.js +2 -0
- package/dist/bin/chunk-3gykfyq4.js +37 -0
- package/dist/bin/chunk-3vqfexc4.js +70 -0
- package/dist/bin/chunk-4vrqm9h0.js +2 -0
- package/dist/bin/chunk-598yf4bs.js +1 -0
- package/dist/bin/chunk-5ectjq0b.js +1 -0
- package/dist/bin/chunk-5erkxpt7.js +512 -0
- package/dist/bin/chunk-5mrtzemj.js +1 -0
- package/dist/bin/chunk-5n9fmabb.js +1 -0
- package/dist/bin/chunk-9knpg30y.js +1 -0
- package/dist/bin/chunk-9pvsff8g.js +1 -0
- package/dist/bin/chunk-ax9mr6wm.js +44 -0
- package/dist/bin/chunk-axhnkn5g.js +2 -0
- package/dist/bin/chunk-c1vcdgvr.js +1 -0
- package/dist/bin/chunk-ctd2vg9w.js +2 -0
- package/dist/bin/chunk-dbgffky8.js +1 -0
- package/dist/bin/chunk-ddk4rt4j.js +6 -0
- package/dist/bin/chunk-dwr30vbv.js +1 -0
- package/dist/bin/chunk-e0rkrq70.js +1 -0
- package/dist/bin/chunk-e3xrwh9z.js +1 -0
- package/dist/bin/chunk-etrb03mt.js +1507 -0
- package/dist/bin/chunk-fhc6ntvd.js +2 -0
- package/dist/bin/chunk-fpm59y25.js +6 -0
- package/dist/bin/chunk-fvbxvq6b.js +1 -0
- package/dist/bin/chunk-fy8j3y8p.js +92 -0
- package/dist/bin/chunk-fz21b57w.js +1 -0
- package/dist/bin/chunk-gavvf0pg.js +141 -0
- package/dist/bin/chunk-ggn7ax8p.js +4 -0
- package/dist/bin/chunk-gpe2prkm.js +1 -0
- package/dist/bin/chunk-h5pa5men.js +2 -0
- package/dist/bin/chunk-hm08xdxf.js +2 -0
- package/dist/bin/chunk-hzgz13nf.js +1 -0
- package/dist/bin/chunk-j703btc5.js +50 -0
- package/dist/bin/chunk-k9t9wvms.js +1 -0
- package/dist/bin/chunk-m669wtgr.js +1 -0
- package/dist/bin/chunk-m7dgskt1.js +1 -0
- package/dist/bin/chunk-mh0kdzqp.js +2 -0
- package/dist/bin/chunk-mr0atd2s.js +2 -0
- package/dist/bin/chunk-mz0wbbsj.js +3 -0
- package/dist/bin/chunk-ngcyftm2.js +1 -0
- package/dist/bin/chunk-p66ptpmr.js +2 -0
- package/dist/bin/chunk-qk9qgepa.js +1 -0
- package/dist/bin/chunk-rxcvf10f.js +7364 -0
- package/dist/bin/chunk-rytk89az.js +60 -0
- package/dist/bin/chunk-tga3hhwk.js +6 -0
- package/dist/bin/chunk-tx0tqq2k.js +8 -0
- package/dist/bin/chunk-vek8a0w6.js +1 -0
- package/dist/bin/chunk-vm3q5gf2.js +3 -0
- package/dist/bin/chunk-y7s5r8y6.js +3 -0
- package/dist/bin/chunk-yv9sth30.js +1 -0
- package/dist/bin/chunk-zmegvjp8.js +581 -0
- package/dist/bin/cli.js +417 -10597
- package/dist/bin/dashboard-server.js +1 -6998
- package/dist/chunk-0ccta6z6.js +6 -0
- package/dist/chunk-0k1cs6pp.js +1 -0
- package/dist/chunk-1egjn203.js +704 -0
- package/dist/chunk-2wx29qga.js +5 -0
- package/dist/chunk-5m5rqmv7.js +1 -0
- package/dist/chunk-8ea5022g.js +114 -0
- package/dist/chunk-8xqn3c0w.js +2 -0
- package/dist/chunk-b4esxhmw.js +2 -0
- package/dist/chunk-b8e5wzwn.js +44 -0
- package/dist/chunk-bggt4n6e.js +2 -0
- package/dist/chunk-cwkg37rs.js +37 -0
- package/dist/chunk-dskvqt67.js +7355 -0
- package/dist/chunk-gahsdmxf.js +1617 -0
- package/dist/chunk-gnv3r2jg.js +1 -0
- package/dist/chunk-hg3c48cp.js +34 -0
- package/dist/chunk-m5azeva3.js +2 -0
- package/dist/chunk-r3qf56b3.js +92 -0
- package/dist/chunk-sdqa9ghv.js +141 -0
- package/dist/chunk-svrvvcm7.js +1 -0
- package/dist/chunk-v0p3hpc3.js +60 -0
- package/dist/chunk-wdzjbecg.js +50 -0
- package/dist/chunk-ww8k3g7j.js +1 -0
- package/dist/chunk-xmqfc62w.js +1 -0
- package/dist/chunk-xrebj679.js +435 -0
- package/dist/chunk-xt3s24vr.js +2 -0
- package/dist/chunk-y21zk0pn.js +4 -0
- package/dist/deploy/attach-credentials.d.ts +57 -0
- package/dist/deploy/index.js +1 -168
- package/dist/deploy/site-ports.d.ts +151 -0
- package/dist/deploy/site-target.d.ts +24 -1
- package/dist/dns/index.js +1 -41
- package/dist/drivers/index.js +1 -154
- package/dist/index.js +100 -6129
- package/dist/protection/index.js +1 -89
- package/dist/push/index.js +1 -509
- package/dist/spend/index.js +1 -173
- package/dist/ui/404.html +16 -548
- package/dist/ui/_stx/chunk.5ddb5087.js +90 -0
- package/dist/ui/_stx/chunk.9fd39d5b.js +86 -0
- package/dist/ui/_stx/chunk.d5301f79.js +119 -0
- package/dist/ui/_stx/crosswind.222ed683.css +1 -0
- package/dist/ui/_stx/crosswind.616c25f3.css +1 -0
- package/dist/ui/_stx/crosswind.80baa894.css +320 -0
- package/dist/ui/_stx/crosswind.906ee17c.css +1 -0
- package/dist/ui/_stx/crosswind.996ed49e.css +1 -0
- package/dist/ui/_stx/crosswind.b7a99a5c.css +1 -0
- package/dist/ui/_stx/router.fa5bc4dc.js +4 -0
- package/dist/ui/_stx/runtime.c696d17a.js +1 -0
- package/dist/ui/_stx/style.448ab192.css +1 -0
- package/dist/ui/accept-invitation.html +2 -1133
- package/dist/ui/access-denied.html +7 -1130
- package/dist/ui/account/automation.html +12 -1134
- package/dist/ui/account/security.html +13 -1136
- package/dist/ui/applications/compose.html +12 -1134
- package/dist/ui/applications/new.html +13 -1137
- package/dist/ui/data/backups.html +91 -1136
- package/dist/ui/data/services.html +89 -1136
- package/dist/ui/data/volumes.html +61 -1136
- package/dist/ui/index.html +60 -1136
- package/dist/ui/infrastructure/topology.html +128 -1135
- package/dist/ui/integrations.html +13 -1138
- package/dist/ui/operations/alerts.html +59 -1136
- package/dist/ui/operations/configuration.html +13 -1135
- package/dist/ui/operations/jobs.html +87 -1136
- package/dist/ui/operations/maintenance.html +12 -1134
- package/dist/ui/operations/observability.html +93 -1136
- package/dist/ui/operations/previews.html +12 -1134
- package/dist/ui/operations/queue.html +12 -1134
- package/dist/ui/operations/regions.html +12 -1134
- package/dist/ui/operations/releases.html +12 -1134
- package/dist/ui/operations/spend.html +65 -1136
- package/dist/ui/operations/workloads.html +115 -1136
- package/dist/ui/robots.txt +2 -0
- package/dist/ui/security.html +24 -1136
- package/dist/ui/server/actions.html +67 -1138
- package/dist/ui/server/activity.html +7 -1130
- package/dist/ui/server/capacity.html +12 -1134
- package/dist/ui/server/database.html +166 -1135
- package/dist/ui/server/deployments.html +60 -1136
- package/dist/ui/server/diagnostics.html +7 -1130
- package/dist/ui/server/firewall.html +286 -1212
- package/dist/ui/server/fleet.html +45 -1136
- package/dist/ui/server/logs.html +34 -1135
- package/dist/ui/server/metrics.html +124 -1140
- package/dist/ui/server/security.html +7 -1130
- package/dist/ui/server/services.html +46 -1133
- package/dist/ui/server/sites.html +287 -1137
- package/dist/ui/server/ssh-keys.html +62 -1135
- package/dist/ui/server/team.html +155 -1136
- package/dist/ui/server/terminal.html +97 -1183
- package/dist/ui/serverless/alarms.html +62 -1135
- package/dist/ui/serverless/assets.html +47 -1132
- package/dist/ui/serverless/cost.html +7 -1130
- package/dist/ui/serverless/data.html +46 -1135
- package/dist/ui/serverless/deployments.html +47 -1132
- package/dist/ui/serverless/firewall.html +7 -1130
- package/dist/ui/serverless/functions.html +50 -1136
- package/dist/ui/serverless/logs.html +34 -1135
- package/dist/ui/serverless/metrics.html +7 -1130
- package/dist/ui/serverless/queues.html +58 -1135
- package/dist/ui/serverless/secrets.html +62 -1136
- package/dist/ui/serverless/traces.html +12 -1134
- package/dist/ui/serverless.html +64 -1137
- package/dist/ui-src/pages/server/firewall.stx +14 -14
- package/package.json +3 -3
- package/dist/chunk-01d86gt1.js +0 -1324
- package/dist/chunk-050r7ycy.js +0 -46516
- package/dist/chunk-29rse4p1.js +0 -12203
- package/dist/chunk-32e7ya18.js +0 -642
- package/dist/chunk-4cjrg98a.js +0 -597
- package/dist/chunk-50jpda9q.js +0 -371
- package/dist/chunk-6a1t7fnq.js +0 -12121
- package/dist/chunk-728jvrr0.js +0 -1701
- package/dist/chunk-7m60qnc8.js +0 -1762
- package/dist/chunk-aa2dkn7b.js +0 -205
- package/dist/chunk-d48vtdj4.js +0 -433
- package/dist/chunk-f55nkpvb.js +0 -8
- package/dist/chunk-fgk8cqew.js +0 -152
- package/dist/chunk-he9a874b.js +0 -769
- package/dist/chunk-hg7rhrgd.js +0 -7274
- package/dist/chunk-k2yyatfw.js +0 -10
- package/dist/chunk-k4px0bnv.js +0 -23
- package/dist/chunk-nsgqsmrh.js +0 -1779
- package/dist/chunk-qr803fye.js +0 -2122
- package/dist/chunk-rds0sy87.js +0 -1771
- package/dist/chunk-rxgchb08.js +0 -42033
- package/dist/chunk-ttz2ra5j.js +0 -12
- package/dist/chunk-v0bahtg2.js +0 -4
- package/dist/chunk-va2yd85b.js +0 -200
- package/dist/chunk-x9s0cqfx.js +0 -13
- package/dist/chunk-zqtpg06c.js +0 -1752
package/dist/aws/index.js
CHANGED
|
@@ -1,269 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ApplicationAutoScalingClient,
|
|
3
|
-
AwsBackupClient,
|
|
4
|
-
BedrockAgentClient,
|
|
5
|
-
BedrockAgentRuntimeClient,
|
|
6
|
-
BedrockClient,
|
|
7
|
-
BedrockRuntimeClient,
|
|
8
|
-
CloudWatchLogsClient,
|
|
9
|
-
ComprehendClient,
|
|
10
|
-
ConnectClient,
|
|
11
|
-
CostExplorerClient,
|
|
12
|
-
DynamoDBClient,
|
|
13
|
-
ECSClient,
|
|
14
|
-
EFSClient,
|
|
15
|
-
ELBv2Client,
|
|
16
|
-
ElastiCacheClient,
|
|
17
|
-
EventBridgeClient,
|
|
18
|
-
ImapServer,
|
|
19
|
-
KendraClient,
|
|
20
|
-
LambdaClient,
|
|
21
|
-
OpenSearchClient,
|
|
22
|
-
PersonalizeClient,
|
|
23
|
-
PersonalizeEventsClient,
|
|
24
|
-
PersonalizeRuntimeClient,
|
|
25
|
-
PollyClient,
|
|
26
|
-
RekognitionClient,
|
|
27
|
-
Route53DomainsClient,
|
|
28
|
-
SNSClient,
|
|
29
|
-
SQSClient,
|
|
30
|
-
STSClient,
|
|
31
|
-
SchedulerClient,
|
|
32
|
-
SecretsManagerClient,
|
|
33
|
-
SmsClient,
|
|
34
|
-
SmtpServer,
|
|
35
|
-
SupportClient,
|
|
36
|
-
SupportTemplates,
|
|
37
|
-
TextractClient,
|
|
38
|
-
TranscribeClient,
|
|
39
|
-
TranslateClient,
|
|
40
|
-
VoiceClient,
|
|
41
|
-
analyzeSentiment,
|
|
42
|
-
completeWithClaude,
|
|
43
|
-
containsPii,
|
|
44
|
-
countFacesInS3Image,
|
|
45
|
-
createDeliveryReceiptHandler,
|
|
46
|
-
createObjectStorageClient,
|
|
47
|
-
createRecordingHandler,
|
|
48
|
-
createSSML,
|
|
49
|
-
createScheduledSmsHandler,
|
|
50
|
-
createSmsClient,
|
|
51
|
-
createSmsInboxHandler,
|
|
52
|
-
createSmsInfrastructure,
|
|
53
|
-
createVoiceClient,
|
|
54
|
-
createVoicemailHandler,
|
|
55
|
-
detectLabelsFromS3,
|
|
56
|
-
detectLanguage,
|
|
57
|
-
extractEntities,
|
|
58
|
-
extractFormsFromS3,
|
|
59
|
-
extractTablesFromS3,
|
|
60
|
-
extractTextFromS3,
|
|
61
|
-
formatPhoneNumber,
|
|
62
|
-
generateEmbeddings,
|
|
63
|
-
getCountryCode,
|
|
64
|
-
getRecommendations,
|
|
65
|
-
getSimilarItems,
|
|
66
|
-
getSmsInfrastructureStatus,
|
|
67
|
-
isContentSafe,
|
|
68
|
-
isSamePhoneNumber,
|
|
69
|
-
isValidPhoneNumber,
|
|
70
|
-
keyMatchesFilters,
|
|
71
|
-
listClaudeModels,
|
|
72
|
-
listLanguages,
|
|
73
|
-
listVoices,
|
|
74
|
-
migrateObjectStorage,
|
|
75
|
-
normalizePhoneNumber,
|
|
76
|
-
providerEndpoint,
|
|
77
|
-
remapKey,
|
|
78
|
-
requestModelAccess,
|
|
79
|
-
resolveObjectStorage,
|
|
80
|
-
retrieveForRag,
|
|
81
|
-
search,
|
|
82
|
-
setupSmsInfrastructure,
|
|
83
|
-
startImapServer,
|
|
84
|
-
startSmtpServer,
|
|
85
|
-
textToSpeech,
|
|
86
|
-
trackEvent,
|
|
87
|
-
translate,
|
|
88
|
-
translateToMultiple
|
|
89
|
-
} from "../chunk-6a1t7fnq.js";
|
|
90
|
-
import {
|
|
91
|
-
EmailClient,
|
|
92
|
-
IAMClient,
|
|
93
|
-
SESClient,
|
|
94
|
-
email
|
|
95
|
-
} from "../chunk-nsgqsmrh.js";
|
|
96
|
-
import {
|
|
97
|
-
CloudFrontClient
|
|
98
|
-
} from "../chunk-01d86gt1.js";
|
|
99
|
-
import {
|
|
100
|
-
ECRClient
|
|
101
|
-
} from "../chunk-50jpda9q.js";
|
|
102
|
-
import {
|
|
103
|
-
RDSClient
|
|
104
|
-
} from "../chunk-he9a874b.js";
|
|
105
|
-
import {
|
|
106
|
-
ACMClient,
|
|
107
|
-
ACMDnsValidator,
|
|
108
|
-
CloudflareProvider,
|
|
109
|
-
DnsProviderFactory,
|
|
110
|
-
GoDaddyProvider,
|
|
111
|
-
PROXIABLE_RECORD_TYPES,
|
|
112
|
-
PorkbunProvider,
|
|
113
|
-
Route53Provider,
|
|
114
|
-
UnifiedDnsValidator,
|
|
115
|
-
createDnsProvider,
|
|
116
|
-
createGoDaddyValidator,
|
|
117
|
-
createPorkbunValidator,
|
|
118
|
-
createRoute53Validator,
|
|
119
|
-
detectDnsProvider,
|
|
120
|
-
dnsProviders,
|
|
121
|
-
policyTag,
|
|
122
|
-
qualifyName,
|
|
123
|
-
reconcileDeclaredRecords,
|
|
124
|
-
resolveDeclaredRecords
|
|
125
|
-
} from "../chunk-qr803fye.js";
|
|
126
|
-
import {
|
|
127
|
-
Route53Client
|
|
128
|
-
} from "../chunk-32e7ya18.js";
|
|
129
|
-
import {
|
|
130
|
-
EC2Client,
|
|
131
|
-
SSMClient
|
|
132
|
-
} from "../chunk-7m60qnc8.js";
|
|
133
|
-
import {
|
|
134
|
-
CloudFormationClient
|
|
135
|
-
} from "../chunk-4cjrg98a.js";
|
|
136
|
-
import {
|
|
137
|
-
S3Client
|
|
138
|
-
} from "../chunk-rds0sy87.js";
|
|
139
|
-
import {
|
|
140
|
-
AWSClient,
|
|
141
|
-
buildQueryParams,
|
|
142
|
-
detectCredentialSource,
|
|
143
|
-
resolveS3Endpoint
|
|
144
|
-
} from "../chunk-zqtpg06c.js";
|
|
145
|
-
import"../chunk-v0bahtg2.js";
|
|
146
|
-
export {
|
|
147
|
-
translateToMultiple,
|
|
148
|
-
translate,
|
|
149
|
-
trackEvent,
|
|
150
|
-
textToSpeech,
|
|
151
|
-
startSmtpServer,
|
|
152
|
-
startImapServer,
|
|
153
|
-
setupSmsInfrastructure,
|
|
154
|
-
search,
|
|
155
|
-
retrieveForRag,
|
|
156
|
-
resolveS3Endpoint,
|
|
157
|
-
resolveObjectStorage,
|
|
158
|
-
resolveDeclaredRecords,
|
|
159
|
-
requestModelAccess,
|
|
160
|
-
remapKey,
|
|
161
|
-
reconcileDeclaredRecords,
|
|
162
|
-
qualifyName,
|
|
163
|
-
providerEndpoint,
|
|
164
|
-
policyTag,
|
|
165
|
-
normalizePhoneNumber,
|
|
166
|
-
migrateObjectStorage,
|
|
167
|
-
listVoices,
|
|
168
|
-
listLanguages,
|
|
169
|
-
listClaudeModels,
|
|
170
|
-
keyMatchesFilters,
|
|
171
|
-
isValidPhoneNumber,
|
|
172
|
-
isSamePhoneNumber,
|
|
173
|
-
isContentSafe,
|
|
174
|
-
getSmsInfrastructureStatus,
|
|
175
|
-
getSimilarItems,
|
|
176
|
-
getRecommendations,
|
|
177
|
-
getCountryCode,
|
|
178
|
-
generateEmbeddings,
|
|
179
|
-
formatPhoneNumber,
|
|
180
|
-
extractTextFromS3,
|
|
181
|
-
extractTablesFromS3,
|
|
182
|
-
extractFormsFromS3,
|
|
183
|
-
extractEntities,
|
|
184
|
-
email,
|
|
185
|
-
dnsProviders,
|
|
186
|
-
detectLanguage,
|
|
187
|
-
detectLabelsFromS3,
|
|
188
|
-
detectDnsProvider,
|
|
189
|
-
detectCredentialSource,
|
|
190
|
-
createVoicemailHandler,
|
|
191
|
-
createVoiceClient,
|
|
192
|
-
createSmsInfrastructure,
|
|
193
|
-
createSmsInboxHandler,
|
|
194
|
-
createSmsClient,
|
|
195
|
-
createScheduledSmsHandler,
|
|
196
|
-
createSSML,
|
|
197
|
-
createRoute53Validator,
|
|
198
|
-
createRecordingHandler,
|
|
199
|
-
createPorkbunValidator,
|
|
200
|
-
createObjectStorageClient,
|
|
201
|
-
createGoDaddyValidator,
|
|
202
|
-
createDnsProvider,
|
|
203
|
-
createDeliveryReceiptHandler,
|
|
204
|
-
countFacesInS3Image,
|
|
205
|
-
containsPii,
|
|
206
|
-
completeWithClaude,
|
|
207
|
-
buildQueryParams,
|
|
208
|
-
analyzeSentiment,
|
|
209
|
-
VoiceClient,
|
|
210
|
-
UnifiedDnsValidator,
|
|
211
|
-
TranslateClient,
|
|
212
|
-
TranscribeClient,
|
|
213
|
-
TextractClient,
|
|
214
|
-
SupportTemplates,
|
|
215
|
-
SupportClient,
|
|
216
|
-
SmtpServer,
|
|
217
|
-
SmsClient,
|
|
218
|
-
SecretsManagerClient,
|
|
219
|
-
SchedulerClient,
|
|
220
|
-
STSClient,
|
|
221
|
-
SSMClient,
|
|
222
|
-
SQSClient,
|
|
223
|
-
SNSClient,
|
|
224
|
-
SESClient,
|
|
225
|
-
S3Client,
|
|
226
|
-
Route53Provider,
|
|
227
|
-
Route53DomainsClient,
|
|
228
|
-
Route53Client,
|
|
229
|
-
RekognitionClient,
|
|
230
|
-
RDSClient,
|
|
231
|
-
PorkbunProvider,
|
|
232
|
-
PollyClient,
|
|
233
|
-
PersonalizeRuntimeClient,
|
|
234
|
-
PersonalizeEventsClient,
|
|
235
|
-
PersonalizeClient,
|
|
236
|
-
PROXIABLE_RECORD_TYPES,
|
|
237
|
-
OpenSearchClient,
|
|
238
|
-
LambdaClient,
|
|
239
|
-
KendraClient,
|
|
240
|
-
ImapServer,
|
|
241
|
-
IAMClient,
|
|
242
|
-
GoDaddyProvider,
|
|
243
|
-
EventBridgeClient,
|
|
244
|
-
EmailClient,
|
|
245
|
-
ElastiCacheClient,
|
|
246
|
-
ELBv2Client,
|
|
247
|
-
EFSClient,
|
|
248
|
-
ECSClient,
|
|
249
|
-
ECRClient,
|
|
250
|
-
EC2Client,
|
|
251
|
-
DynamoDBClient,
|
|
252
|
-
DnsProviderFactory,
|
|
253
|
-
CostExplorerClient,
|
|
254
|
-
ConnectClient,
|
|
255
|
-
ComprehendClient,
|
|
256
|
-
CloudflareProvider,
|
|
257
|
-
CloudWatchLogsClient,
|
|
258
|
-
CloudFrontClient,
|
|
259
|
-
CloudFormationClient,
|
|
260
|
-
BedrockRuntimeClient,
|
|
261
|
-
BedrockClient,
|
|
262
|
-
BedrockAgentRuntimeClient,
|
|
263
|
-
BedrockAgentClient,
|
|
264
|
-
AwsBackupClient,
|
|
265
|
-
ApplicationAutoScalingClient,
|
|
266
|
-
AWSClient,
|
|
267
|
-
ACMDnsValidator,
|
|
268
|
-
ACMClient
|
|
269
|
-
};
|
|
1
|
+
import{$d as $,$e as $a,Ae as Aa,Be as Ba,Ce as Ca,De as Da,Ee as Ea,Fe as Fa,Ge as Ga,He as Ha,Ie as Ia,Jd as k,Je as Ja,Kd as l,Ke as Ka,Ld as m,Le as La,Md as n,Me as Ma,Nd as o,Ne as Na,Od as p,Oe as Oa,Pd as q,Pe as Pa,Qd as r,Qe as Qa,Rd as t,Re as Ra,Sd as w,Se as Sa,Td as R,Te as Ta,Ud as T,Ue as Ua,Vd as U,Ve as Va,Wd as V,We as Wa,Xd as W,Xe as Xa,Yd as X,Ye as Ya,Zd as Y,Ze as Za,_d as Z,_e as _a,ae as aa,af as ab,be as ba,bf as bb,ce as ca,cf as cb,de as da,df as db,ee as ea,ef as eb,fe as fa,ff as fb,ge as ga,gf as gb,he as ha,hf as hb,ie as ia,if as ib,je as ja,jf as jb,ke as ka,kf as kb,le as la,lf as lb,me as ma,mf as mb,ne as na,nf as nb,oe as oa,pe as pa,qe as qa,re as ra,se as sa,te as ta,ue as ua,ve as va,we as wa,xe as xa,ye as ya,ze as za}from"../chunk-8ea5022g.js";import{of as e,pf as h,qf as i,rf as j}from"../chunk-hg3c48cp.js";import{sf as v}from"../chunk-sdqa9ghv.js";import{tf as Q}from"../chunk-bggt4n6e.js";import{uf as _}from"../chunk-m5azeva3.js";import{Af as B,Bf as C,Cf as D,Df as E,Ef as F,Ff as G,Gf as H,Hf as I,If as J,Jf as K,Kf as L,Lf as M,Mf as N,Nf as O,Of as P,vf as x,wf as y,xf as z,zf as A}from"../chunk-8xqn3c0w.js";import{Pf as f}from"../chunk-wdzjbecg.js";import{Nh as u,Oh as S}from"../chunk-y21zk0pn.js";import{Ph as s}from"../chunk-b4esxhmw.js";import{Rh as g}from"../chunk-r3qf56b3.js";import{Sh as a,Th as b,Uh as c,Vh as d}from"../chunk-0ccta6z6.js";import"../chunk-xt3s24vr.js";export{Da as translateToMultiple,Ca as translate,Ka as trackEvent,ya as textToSpeech,Va as startSmtpServer,Ta as startImapServer,kb as setupSmsInfrastructure,Ma as search,Na as retrieveForRag,a as resolveS3Endpoint,q as resolveObjectStorage,D as resolveDeclaredRecords,ga as requestModelAccess,m as remapKey,E as reconcileDeclaredRecords,C as qualifyName,p as providerEndpoint,B as policyTag,$a as normalizePhoneNumber,o as migrateObjectStorage,za as listVoices,Ea as listLanguages,ha as listClaudeModels,n as keyMatchesFilters,bb as isValidPhoneNumber,db as isSamePhoneNumber,sa as isContentSafe,lb as getSmsInfrastructureStatus,Ja as getSimilarItems,Ia as getRecommendations,cb as getCountryCode,ja as generateEmbeddings,ab as formatPhoneNumber,ua as extractTextFromS3,wa as extractTablesFromS3,va as extractFormsFromS3,ma as extractEntities,j as email,N as dnsProviders,na as detectLanguage,qa as detectLabelsFromS3,L as detectDnsProvider,d as detectCredentialSource,fb as createVoicemailHandler,hb as createVoiceClient,mb as createSmsInfrastructure,Xa as createSmsInboxHandler,Za as createSmsClient,Ya as createScheduledSmsHandler,Aa as createSSML,J as createRoute53Validator,gb as createRecordingHandler,H as createPorkbunValidator,r as createObjectStorageClient,I as createGoDaddyValidator,K as createDnsProvider,_a as createDeliveryReceiptHandler,ra as countFacesInS3Image,oa as containsPii,ia as completeWithClaude,c as buildQueryParams,la as analyzeSentiment,eb as VoiceClient,G as UnifiedDnsValidator,Ba as TranslateClient,ba as TranscribeClient,ta as TextractClient,jb as SupportTemplates,ib as SupportClient,Ua as SmtpServer,Wa as SmsClient,T as SecretsManagerClient,Qa as SchedulerClient,k as STSClient,S as SSMClient,V as SQSClient,U as SNSClient,h as SESClient,g as S3Client,F as Route53Provider,w as Route53DomainsClient,f as Route53Client,pa as RekognitionClient,_ as RDSClient,y as PorkbunProvider,xa as PollyClient,Ga as PersonalizeRuntimeClient,Ha as PersonalizeEventsClient,Fa as PersonalizeClient,x as PROXIABLE_RECORD_TYPES,aa as OpenSearchClient,W as LambdaClient,La as KendraClient,Sa as ImapServer,e as IAMClient,z as GoDaddyProvider,Oa as EventBridgeClient,i as EmailClient,Pa as ElastiCacheClient,Z as ELBv2Client,nb as EFSClient,R as ECSClient,Q as ECRClient,u as EC2Client,$ as DynamoDBClient,M as DnsProviderFactory,t as CostExplorerClient,Y as ConnectClient,ka as ComprehendClient,A as CloudflareProvider,X as CloudWatchLogsClient,v as CloudFrontClient,s as CloudFormationClient,ca as BedrockRuntimeClient,da as BedrockClient,ea as BedrockAgentRuntimeClient,fa as BedrockAgentClient,l as AwsBackupClient,Ra as ApplicationAutoScalingClient,b as AWSClient,P as ACMDnsValidator,O as ACMClient};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{qg as a}from"./chunk-2empps47.js";import"./chunk-mr0atd2s.js";import"./chunk-271gk1n2.js";import"./chunk-fpm59y25.js";import"./chunk-rxcvf10f.js";import"./chunk-mh0kdzqp.js";export{a as buildAndPushServerlessImage};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import{Zf as j}from"./chunk-j703btc5.js";import{$f as E}from"./chunk-fy8j3y8p.js";import{Og as L}from"./chunk-fpm59y25.js";import{Vo as W}from"./chunk-mh0kdzqp.js";function h(z,D){let F=[`Action=${z}`,"Version=2010-05-08"];for(let[J,H]of Object.entries(D)){if(H===void 0||H===null)continue;if(Array.isArray(H))H.forEach((O,Z)=>{if(typeof O==="object"&&O!==null)for(let[$,_]of Object.entries(O))F.push(`${J}.member.${Z+1}.${$}=${encodeURIComponent(String(_))}`);else F.push(`${J}.member.${Z+1}=${encodeURIComponent(String(O))}`)});else if(typeof H==="object"){for(let[O,Z]of Object.entries(H))if(Z!==void 0&&Z!==null)F.push(`${J}.${O}=${encodeURIComponent(String(Z))}`)}else F.push(`${J}=${encodeURIComponent(String(H))}`)}return F.join("&")}function G(z,D){let F=new RegExp(`<${D}>([^<]*)</${D}>`),J=z.match(F);return J?J[1]:void 0}function Y(z,D,F){let J=new RegExp(`<${D}>([\\s\\S]*?)</${D}>`),H=z.match(J);if(!H)return[];let O=[],Z=new RegExp(`<${F}>([\\s\\S]*?)</${F}>`,"g"),$;while(($=Z.exec(H[1]))!==null)O.push($[1]);return O}class w{client;region;constructor(z="us-east-1",D){this.client=new L(void 0,{profile:D}),this.region=z}async request(z,D={}){let F=h(z,D);return await this.client.request({service:"iam",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:F})}async createUser(z){let D=await this.request("CreateUser",z);return this.parseUser(D)}async getUser(z={}){let D=await this.request("GetUser",z);return this.parseUser(D)}async listUsers(z={}){let D=await this.request("ListUsers",z),F=this.parseUsers(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Users:F,IsTruncated:J,Marker:H}}async updateUser(z){await this.request("UpdateUser",z)}async deleteUser(z){await this.request("DeleteUser",z)}parseUser(z){return{UserName:G(z,"UserName")||"",UserId:G(z,"UserId")||"",Arn:G(z,"Arn")||"",Path:G(z,"Path"),CreateDate:G(z,"CreateDate"),PasswordLastUsed:G(z,"PasswordLastUsed")}}parseUsers(z){return Y(z,"Users","member").map((F)=>({UserName:G(F,"UserName")||"",UserId:G(F,"UserId")||"",Arn:G(F,"Arn")||"",Path:G(F,"Path"),CreateDate:G(F,"CreateDate"),PasswordLastUsed:G(F,"PasswordLastUsed")}))}async createGroup(z){let D=await this.request("CreateGroup",z);return this.parseGroup(D)}async getGroup(z){let D=await this.request("GetGroup",z),F=this.parseGroup(D),J=this.parseUsers(D),H=G(D,"IsTruncated")==="true",O=G(D,"Marker");return{Group:F,Users:J,IsTruncated:H,Marker:O}}async listGroups(z={}){let D=await this.request("ListGroups",z),F=this.parseGroups(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Groups:F,IsTruncated:J,Marker:H}}async updateGroup(z){await this.request("UpdateGroup",z)}async deleteGroup(z){await this.request("DeleteGroup",z)}async addUserToGroup(z){await this.request("AddUserToGroup",z)}async removeUserFromGroup(z){await this.request("RemoveUserFromGroup",z)}async listGroupsForUser(z){let D=await this.request("ListGroupsForUser",z),F=this.parseGroups(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Groups:F,IsTruncated:J,Marker:H}}parseGroup(z){return{GroupName:G(z,"GroupName")||"",GroupId:G(z,"GroupId")||"",Arn:G(z,"Arn")||"",Path:G(z,"Path"),CreateDate:G(z,"CreateDate")}}parseGroups(z){return Y(z,"Groups","member").map((F)=>({GroupName:G(F,"GroupName")||"",GroupId:G(F,"GroupId")||"",Arn:G(F,"Arn")||"",Path:G(F,"Path"),CreateDate:G(F,"CreateDate")}))}async createRole(z){let D=await this.request("CreateRole",z);return this.parseRole(D)}async getRole(z){let D=await this.request("GetRole",z);return this.parseRole(D)}async listRoles(z={}){let D=await this.request("ListRoles",z),F=this.parseRoles(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Roles:F,IsTruncated:J,Marker:H}}async updateRole(z){await this.request("UpdateRole",z)}async updateRoleDescription(z){let D=await this.request("UpdateRoleDescription",z);return this.parseRole(D)}async updateAssumeRolePolicy(z){await this.request("UpdateAssumeRolePolicy",z)}async deleteRole(z){await this.request("DeleteRole",z)}async tagRole(z){await this.request("TagRole",z)}async untagRole(z){await this.request("UntagRole",z)}async listRoleTags(z){let D=await this.request("ListRoleTags",z),F=this.parseTags(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Tags:F,IsTruncated:J,Marker:H}}parseRole(z){return{RoleName:G(z,"RoleName")||"",RoleId:G(z,"RoleId")||"",Arn:G(z,"Arn")||"",Path:G(z,"Path"),CreateDate:G(z,"CreateDate"),AssumeRolePolicyDocument:G(z,"AssumeRolePolicyDocument"),Description:G(z,"Description"),MaxSessionDuration:G(z,"MaxSessionDuration")?Number.parseInt(G(z,"MaxSessionDuration"),10):void 0}}parseRoles(z){return Y(z,"Roles","member").map((F)=>({RoleName:G(F,"RoleName")||"",RoleId:G(F,"RoleId")||"",Arn:G(F,"Arn")||"",Path:G(F,"Path"),CreateDate:G(F,"CreateDate"),AssumeRolePolicyDocument:G(F,"AssumeRolePolicyDocument"),Description:G(F,"Description"),MaxSessionDuration:G(F,"MaxSessionDuration")?Number.parseInt(G(F,"MaxSessionDuration"),10):void 0}))}parseTags(z){return Y(z,"Tags","member").map((F)=>({Key:G(F,"Key")||"",Value:G(F,"Value")||""}))}async createPolicy(z){let D=await this.request("CreatePolicy",z);return this.parsePolicy(D)}async getPolicy(z){let D=await this.request("GetPolicy",z);return this.parsePolicy(D)}async getPolicyVersion(z){let D=await this.request("GetPolicyVersion",z);return{VersionId:G(D,"VersionId")||"",IsDefaultVersion:G(D,"IsDefaultVersion")==="true",CreateDate:G(D,"CreateDate"),Document:G(D,"Document")}}async listPolicies(z={}){let D=await this.request("ListPolicies",z),F=this.parsePolicies(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Policies:F,IsTruncated:J,Marker:H}}async listPolicyVersions(z){let D=await this.request("ListPolicyVersions",z),F=this.parsePolicyVersions(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{Versions:F,IsTruncated:J,Marker:H}}async createPolicyVersion(z){let D=await this.request("CreatePolicyVersion",z);return{VersionId:G(D,"VersionId")||"",IsDefaultVersion:G(D,"IsDefaultVersion")==="true",CreateDate:G(D,"CreateDate")}}async deletePolicyVersion(z){await this.request("DeletePolicyVersion",z)}async setDefaultPolicyVersion(z){await this.request("SetDefaultPolicyVersion",z)}async deletePolicy(z){await this.request("DeletePolicy",z)}async attachUserPolicy(z){await this.request("AttachUserPolicy",z)}async detachUserPolicy(z){await this.request("DetachUserPolicy",z)}async attachGroupPolicy(z){await this.request("AttachGroupPolicy",z)}async detachGroupPolicy(z){await this.request("DetachGroupPolicy",z)}async attachRolePolicy(z){await this.request("AttachRolePolicy",z)}async detachRolePolicy(z){await this.request("DetachRolePolicy",z)}async listAttachedUserPolicies(z){let D=await this.request("ListAttachedUserPolicies",z),F=this.parseAttachedPolicies(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{AttachedPolicies:F,IsTruncated:J,Marker:H}}async listAttachedGroupPolicies(z){let D=await this.request("ListAttachedGroupPolicies",z),F=this.parseAttachedPolicies(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{AttachedPolicies:F,IsTruncated:J,Marker:H}}async listAttachedRolePolicies(z){let D=await this.request("ListAttachedRolePolicies",z),F=this.parseAttachedPolicies(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{AttachedPolicies:F,IsTruncated:J,Marker:H}}parsePolicy(z){return{PolicyName:G(z,"PolicyName")||"",PolicyId:G(z,"PolicyId")||"",Arn:G(z,"Arn")||"",Path:G(z,"Path"),DefaultVersionId:G(z,"DefaultVersionId"),AttachmentCount:G(z,"AttachmentCount")?Number.parseInt(G(z,"AttachmentCount"),10):void 0,PermissionsBoundaryUsageCount:G(z,"PermissionsBoundaryUsageCount")?Number.parseInt(G(z,"PermissionsBoundaryUsageCount"),10):void 0,IsAttachable:G(z,"IsAttachable")==="true",Description:G(z,"Description"),CreateDate:G(z,"CreateDate"),UpdateDate:G(z,"UpdateDate")}}parsePolicies(z){return Y(z,"Policies","member").map((F)=>({PolicyName:G(F,"PolicyName")||"",PolicyId:G(F,"PolicyId")||"",Arn:G(F,"Arn")||"",Path:G(F,"Path"),DefaultVersionId:G(F,"DefaultVersionId"),AttachmentCount:G(F,"AttachmentCount")?Number.parseInt(G(F,"AttachmentCount"),10):void 0,PermissionsBoundaryUsageCount:G(F,"PermissionsBoundaryUsageCount")?Number.parseInt(G(F,"PermissionsBoundaryUsageCount"),10):void 0,IsAttachable:G(F,"IsAttachable")==="true",Description:G(F,"Description"),CreateDate:G(F,"CreateDate"),UpdateDate:G(F,"UpdateDate")}))}parsePolicyVersions(z){return Y(z,"Versions","member").map((F)=>({VersionId:G(F,"VersionId")||"",IsDefaultVersion:G(F,"IsDefaultVersion")==="true",CreateDate:G(F,"CreateDate")}))}parseAttachedPolicies(z){return Y(z,"AttachedPolicies","member").map((F)=>({PolicyName:G(F,"PolicyName")||"",PolicyArn:G(F,"PolicyArn")||""}))}async putUserPolicy(z){await this.request("PutUserPolicy",z)}async getUserPolicy(z){let D=await this.request("GetUserPolicy",z);return{UserName:G(D,"UserName")||"",PolicyName:G(D,"PolicyName")||"",PolicyDocument:decodeURIComponent(G(D,"PolicyDocument")||"")}}async deleteUserPolicy(z){await this.request("DeleteUserPolicy",z)}async listUserPolicies(z){let D=await this.request("ListUserPolicies",z),F=Y(D,"PolicyNames","member"),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{PolicyNames:F,IsTruncated:J,Marker:H}}async putGroupPolicy(z){await this.request("PutGroupPolicy",z)}async getGroupPolicy(z){let D=await this.request("GetGroupPolicy",z);return{GroupName:G(D,"GroupName")||"",PolicyName:G(D,"PolicyName")||"",PolicyDocument:decodeURIComponent(G(D,"PolicyDocument")||"")}}async deleteGroupPolicy(z){await this.request("DeleteGroupPolicy",z)}async listGroupPolicies(z){let D=await this.request("ListGroupPolicies",z),F=Y(D,"PolicyNames","member"),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{PolicyNames:F,IsTruncated:J,Marker:H}}async putRolePolicy(z){await this.request("PutRolePolicy",z)}async getRolePolicy(z){let D=await this.request("GetRolePolicy",z);return{RoleName:G(D,"RoleName")||"",PolicyName:G(D,"PolicyName")||"",PolicyDocument:decodeURIComponent(G(D,"PolicyDocument")||"")}}async deleteRolePolicy(z){await this.request("DeleteRolePolicy",z)}async listRolePolicies(z){let D=await this.request("ListRolePolicies",z),F=Y(D,"PolicyNames","member"),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{PolicyNames:F,IsTruncated:J,Marker:H}}async createAccessKey(z={}){let D=await this.request("CreateAccessKey",z);if(typeof D==="object"){let F=D?.CreateAccessKeyResult?.AccessKey||D?.AccessKey;if(F)return{AccessKey:{UserName:F.UserName||"",AccessKeyId:F.AccessKeyId||"",Status:F.Status||"Active",SecretAccessKey:F.SecretAccessKey||"",CreateDate:F.CreateDate}}}return{AccessKey:{UserName:G(D,"UserName")||"",AccessKeyId:G(D,"AccessKeyId")||"",Status:G(D,"Status")||"Active",SecretAccessKey:G(D,"SecretAccessKey")||"",CreateDate:G(D,"CreateDate")}}}async listAccessKeys(z={}){let D=await this.request("ListAccessKeys",z),F=this.parseAccessKeys(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{AccessKeyMetadata:F,IsTruncated:J,Marker:H}}async updateAccessKey(z){await this.request("UpdateAccessKey",z)}async deleteAccessKey(z){await this.request("DeleteAccessKey",z)}async getAccessKeyLastUsed(z){let D=await this.request("GetAccessKeyLastUsed",z);return{UserName:G(D,"UserName")||"",AccessKeyLastUsed:{LastUsedDate:G(D,"LastUsedDate"),ServiceName:G(D,"ServiceName"),Region:G(D,"Region")}}}parseAccessKeys(z){return Y(z,"AccessKeyMetadata","member").map((F)=>({UserName:G(F,"UserName"),AccessKeyId:G(F,"AccessKeyId")||"",Status:G(F,"Status")||"Active",CreateDate:G(F,"CreateDate")}))}async createInstanceProfile(z){let D=await this.request("CreateInstanceProfile",z);return this.parseInstanceProfile(D)}async getInstanceProfile(z){let D=await this.request("GetInstanceProfile",z);return this.parseInstanceProfile(D)}async listInstanceProfiles(z={}){let D=await this.request("ListInstanceProfiles",z),F=this.parseInstanceProfiles(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{InstanceProfiles:F,IsTruncated:J,Marker:H}}async listInstanceProfilesForRole(z){let D=await this.request("ListInstanceProfilesForRole",z),F=this.parseInstanceProfiles(D),J=G(D,"IsTruncated")==="true",H=G(D,"Marker");return{InstanceProfiles:F,IsTruncated:J,Marker:H}}async addRoleToInstanceProfile(z){await this.request("AddRoleToInstanceProfile",z)}async removeRoleFromInstanceProfile(z){await this.request("RemoveRoleFromInstanceProfile",z)}async deleteInstanceProfile(z){await this.request("DeleteInstanceProfile",z)}parseInstanceProfile(z){return{InstanceProfileName:G(z,"InstanceProfileName")||"",InstanceProfileId:G(z,"InstanceProfileId")||"",Arn:G(z,"Arn")||"",Path:G(z,"Path"),CreateDate:G(z,"CreateDate")}}parseInstanceProfiles(z){return Y(z,"InstanceProfiles","member").map((F)=>({InstanceProfileName:G(F,"InstanceProfileName")||"",InstanceProfileId:G(F,"InstanceProfileId")||"",Arn:G(F,"Arn")||"",Path:G(F,"Path"),CreateDate:G(F,"CreateDate")}))}async getAccountPasswordPolicy(){let z=await this.request("GetAccountPasswordPolicy");return{MinimumPasswordLength:G(z,"MinimumPasswordLength")?Number.parseInt(G(z,"MinimumPasswordLength"),10):void 0,RequireSymbols:G(z,"RequireSymbols")==="true",RequireNumbers:G(z,"RequireNumbers")==="true",RequireUppercaseCharacters:G(z,"RequireUppercaseCharacters")==="true",RequireLowercaseCharacters:G(z,"RequireLowercaseCharacters")==="true",AllowUsersToChangePassword:G(z,"AllowUsersToChangePassword")==="true",ExpirePasswords:G(z,"ExpirePasswords")==="true",MaxPasswordAge:G(z,"MaxPasswordAge")?Number.parseInt(G(z,"MaxPasswordAge"),10):void 0,PasswordReusePrevention:G(z,"PasswordReusePrevention")?Number.parseInt(G(z,"PasswordReusePrevention"),10):void 0,HardExpiry:G(z,"HardExpiry")==="true"}}async updateAccountPasswordPolicy(z){await this.request("UpdateAccountPasswordPolicy",z)}async deleteAccountPasswordPolicy(){await this.request("DeleteAccountPasswordPolicy")}async getAccountSummary(){let z=await this.request("GetAccountSummary"),D={},F=Y(z,"SummaryMap","entry");for(let J of F){let H=G(J,"key"),O=G(J,"value");if(H&&O)D[H]=Number.parseInt(O,10)}return D}async listAccountAliases(){let z=await this.request("ListAccountAliases"),D=Y(z,"AccountAliases","member"),F=G(z,"IsTruncated")==="true",J=G(z,"Marker");return{AccountAliases:D,IsTruncated:F,Marker:J}}async createAccountAlias(z){await this.request("CreateAccountAlias",z)}async deleteAccountAlias(z){await this.request("DeleteAccountAlias",z)}async simulatePrincipalPolicy(z){let D=await this.request("SimulatePrincipalPolicy",z);return this.parseSimulationResults(D)}parseSimulationResults(z){let F=Y(z,"EvaluationResults","member").map((O)=>{let $=Y(O,"MatchedStatements","member").map((_)=>({SourcePolicyId:G(_,"SourcePolicyId"),SourcePolicyType:G(_,"SourcePolicyType")}));return{EvalActionName:G(O,"EvalActionName")||"",EvalResourceName:G(O,"EvalResourceName"),EvalDecision:G(O,"EvalDecision")||"",MatchedStatements:$.length>0?$:void 0}}),J=G(z,"IsTruncated")==="true",H=G(z,"Marker");return{EvaluationResults:F,IsTruncated:J,Marker:H}}}class U{client;region;constructor(z="us-east-1",D){this.region=z,this.client=new L(D)}async createEmailIdentity(z){return await this.client.request({service:"email",region:this.region,method:"POST",path:"/v2/email/identities",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})}async getEmailIdentity(z){let D=await this.client.request({service:"email",region:this.region,method:"GET",path:`/v2/email/identities/${encodeURIComponent(z)}`,headers:{"Content-Type":"application/json"}});return{IdentityType:D.IdentityType,IdentityName:z,SendingEnabled:D.VerifiedForSendingStatus,VerificationStatus:D.VerificationStatus,DkimAttributes:D.DkimAttributes,MailFromAttributes:D.MailFromAttributes}}async putEmailIdentityMailFromAttributes(z,D){await this.client.request({service:"email",region:this.region,method:"PUT",path:`/v2/email/identities/${encodeURIComponent(z)}/mail-from`,headers:{"Content-Type":"application/json"},body:JSON.stringify(D)})}async listEmailIdentities(z){let D="/v2/email/identities",F=[];if(z?.PageSize)F.push(`PageSize=${z.PageSize}`);if(z?.NextToken)F.push(`NextToken=${encodeURIComponent(z.NextToken)}`);if(F.length>0)D+=`?${F.join("&")}`;let J=await this.client.request({service:"email",region:this.region,method:"GET",path:D,headers:{"Content-Type":"application/json"}});return{EmailIdentities:J.EmailIdentities,NextToken:J.NextToken}}async deleteEmailIdentity(z){await this.client.request({service:"email",region:this.region,method:"DELETE",path:`/v2/email/identities/${encodeURIComponent(z)}`,headers:{"Content-Type":"application/json"}})}async putEmailIdentityDkimAttributes(z){await this.client.request({service:"email",region:this.region,method:"PUT",path:`/v2/email/identities/${encodeURIComponent(z.EmailIdentity)}/dkim`,headers:{"Content-Type":"application/json"},body:JSON.stringify({SigningEnabled:z.SigningEnabled})})}async sendEmail(z){return{MessageId:(await this.client.request({service:"email",region:this.region,method:"POST",path:"/v2/email/outbound-emails",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})).MessageId}}async sendBulkEmail(z){return{BulkEmailEntryResults:(await this.client.request({service:"email",region:this.region,method:"POST",path:"/v2/email/outbound-bulk-emails",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})).BulkEmailEntryResults}}async createEmailTemplate(z){await this.client.request({service:"email",region:this.region,method:"POST",path:"/v2/email/templates",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})}async getEmailTemplate(z){return await this.client.request({service:"email",region:this.region,method:"GET",path:`/v2/email/templates/${encodeURIComponent(z)}`,headers:{"Content-Type":"application/json"}})}async deleteEmailTemplate(z){await this.client.request({service:"email",region:this.region,method:"DELETE",path:`/v2/email/templates/${encodeURIComponent(z)}`,headers:{"Content-Type":"application/json"}})}async listEmailTemplates(z){let D="/v2/email/templates",F=[];if(z?.PageSize)F.push(`PageSize=${z.PageSize}`);if(z?.NextToken)F.push(`NextToken=${encodeURIComponent(z.NextToken)}`);if(F.length>0)D+=`?${F.join("&")}`;return await this.client.request({service:"email",region:this.region,method:"GET",path:D,headers:{"Content-Type":"application/json"}})}async getSendStatistics(){return{SendDataPoints:(await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"Action=GetSendStatistics&Version=2010-12-01"})).GetSendStatisticsResponse?.GetSendStatisticsResult?.SendDataPoints?.member}}async getSendQuota(){let D=(await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"Action=GetSendQuota&Version=2010-12-01"})).GetSendQuotaResponse?.GetSendQuotaResult;return{Max24HourSend:D?.Max24HourSend?Number(D.Max24HourSend):void 0,MaxSendRate:D?.MaxSendRate?Number(D.MaxSendRate):void 0,SentLast24Hours:D?.SentLast24Hours?Number(D.SentLast24Hours):void 0}}async verifyDomain(z){let D=await this.createEmailIdentity({EmailIdentity:z});return{dkimTokens:D.DkimAttributes?.Tokens,verificationStatus:D.DkimAttributes?.Status}}async sendSimpleEmail(z){let D=Array.isArray(z.to)?z.to:[z.to],F=z.replyTo?Array.isArray(z.replyTo)?z.replyTo:[z.replyTo]:void 0,J={};if(z.text)J.Text={Data:z.text};if(z.html)J.Html={Data:z.html};return this.sendEmail({FromEmailAddress:z.from,Destination:{ToAddresses:D},Content:{Simple:{Subject:{Data:z.subject},Body:J}},ReplyToAddresses:F})}async sendTemplatedEmail(z){let D=Array.isArray(z.to)?z.to:[z.to],F=z.replyTo?Array.isArray(z.replyTo)?z.replyTo:[z.replyTo]:void 0;return this.sendEmail({FromEmailAddress:z.from,Destination:{ToAddresses:D},Content:{Template:{TemplateName:z.templateName,TemplateData:JSON.stringify(z.templateData)}},ReplyToAddresses:F})}async getDkimRecords(z){let D=await this.getEmailIdentity(z);if(!D.DkimAttributes?.Tokens)return[];return D.DkimAttributes.Tokens.map((F)=>({name:`${F}._domainkey.${z}`,type:"CNAME",value:`${F}.dkim.amazonses.com`}))}async isDomainVerified(z){try{let D=await this.getEmailIdentity(z);return D.VerificationStatus==="SUCCESS"&&D.SendingEnabled===!0}catch{return!1}}async waitForDomainVerification(z,D=60,F=30000){for(let J=0;J<D;J++){if(await this.isDomainVerified(z))return!0;await new Promise((O)=>setTimeout(O,F))}return!1}buildFormBody(z){return Object.entries(z).filter(([,F])=>F!==void 0).map(([F,J])=>`${encodeURIComponent(F)}=${encodeURIComponent(J)}`).join("&")}async createReceiptRuleSet(z){await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"CreateReceiptRuleSet",Version:"2010-12-01",RuleSetName:z})})}async deleteReceiptRuleSet(z){await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"DeleteReceiptRuleSet",Version:"2010-12-01",RuleSetName:z})})}async setActiveReceiptRuleSet(z){await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"SetActiveReceiptRuleSet",Version:"2010-12-01",RuleSetName:z})})}async listReceiptRuleSets(z){let D={Action:"ListReceiptRuleSets",Version:"2010-12-01"};if(z)D.NextToken=z;let F=await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody(D)}),J=F?.ListReceiptRuleSetsResponse?.ListReceiptRuleSetsResult||F?.ListReceiptRuleSetsResult,H=J?.RuleSets?.member;return{RuleSets:Array.isArray(H)?H:H?[H]:[],NextToken:J?.NextToken}}async describeReceiptRuleSet(z){let D=await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"DescribeReceiptRuleSet",Version:"2010-12-01",RuleSetName:z})}),F=D?.DescribeReceiptRuleSetResponse?.DescribeReceiptRuleSetResult||D?.DescribeReceiptRuleSetResult,J=F?.Rules?.member;return{Metadata:F?.Metadata,Rules:Array.isArray(J)?J:J?[J]:[]}}async createReceiptRule(z){let D={Action:"CreateReceiptRule",Version:"2010-12-01",RuleSetName:z.RuleSetName,"Rule.Name":z.Rule.Name,"Rule.Enabled":z.Rule.Enabled!==!1?"true":"false"};if(z.Rule.TlsPolicy)D["Rule.TlsPolicy"]=z.Rule.TlsPolicy;if(z.Rule.ScanEnabled!==void 0)D["Rule.ScanEnabled"]=z.Rule.ScanEnabled?"true":"false";if(z.After)D.After=z.After;if(z.Rule.Recipients)z.Rule.Recipients.forEach((F,J)=>{D[`Rule.Recipients.member.${J+1}`]=F});z.Rule.Actions.forEach((F,J)=>{let H=J+1;if(F.S3Action){if(D[`Rule.Actions.member.${H}.S3Action.BucketName`]=F.S3Action.BucketName,F.S3Action.ObjectKeyPrefix)D[`Rule.Actions.member.${H}.S3Action.ObjectKeyPrefix`]=F.S3Action.ObjectKeyPrefix;if(F.S3Action.KmsKeyArn)D[`Rule.Actions.member.${H}.S3Action.KmsKeyArn`]=F.S3Action.KmsKeyArn}if(F.LambdaAction)D[`Rule.Actions.member.${H}.LambdaAction.FunctionArn`]=F.LambdaAction.FunctionArn,D[`Rule.Actions.member.${H}.LambdaAction.InvocationType`]=F.LambdaAction.InvocationType||"Event";if(F.SNSAction){if(D[`Rule.Actions.member.${H}.SNSAction.TopicArn`]=F.SNSAction.TopicArn,F.SNSAction.Encoding)D[`Rule.Actions.member.${H}.SNSAction.Encoding`]=F.SNSAction.Encoding}if(F.StopAction){if(D[`Rule.Actions.member.${H}.StopAction.Scope`]=F.StopAction.Scope,F.StopAction.TopicArn)D[`Rule.Actions.member.${H}.StopAction.TopicArn`]=F.StopAction.TopicArn}}),await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody(D)})}async deleteReceiptRule(z,D){await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"DeleteReceiptRule",Version:"2010-12-01",RuleSetName:z,RuleName:D})})}async receiptRuleSetExists(z){try{return await this.describeReceiptRuleSet(z),!0}catch(D){if(D.code==="RuleSetDoesNotExist"||D.statusCode===400)return!1;throw D}}async getActiveReceiptRuleSet(){let z=await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody({Action:"DescribeActiveReceiptRuleSet",Version:"2010-12-01"})}),D=z?.DescribeActiveReceiptRuleSetResponse?.DescribeActiveReceiptRuleSetResult||z?.DescribeActiveReceiptRuleSetResult;if(!D?.Metadata)return null;let F=D?.Rules?.member;return{Metadata:D?.Metadata,Rules:Array.isArray(F)?F:F?[F]:[]}}async updateReceiptRule(z){let D={Action:"UpdateReceiptRule",Version:"2010-12-01",RuleSetName:z.RuleSetName,"Rule.Name":z.Rule.Name};if(z.Rule.Enabled!==void 0)D["Rule.Enabled"]=z.Rule.Enabled?"true":"false";if(z.Rule.TlsPolicy)D["Rule.TlsPolicy"]=z.Rule.TlsPolicy;if(z.Rule.ScanEnabled!==void 0)D["Rule.ScanEnabled"]=z.Rule.ScanEnabled?"true":"false";if(z.Rule.Recipients)z.Rule.Recipients.forEach((F,J)=>{D[`Rule.Recipients.member.${J+1}`]=F});z.Rule.Actions.forEach((F,J)=>{let H=J+1;if(F.S3Action){if(D[`Rule.Actions.member.${H}.S3Action.BucketName`]=F.S3Action.BucketName,F.S3Action.ObjectKeyPrefix)D[`Rule.Actions.member.${H}.S3Action.ObjectKeyPrefix`]=F.S3Action.ObjectKeyPrefix;if(F.S3Action.KmsKeyArn)D[`Rule.Actions.member.${H}.S3Action.KmsKeyArn`]=F.S3Action.KmsKeyArn}if(F.LambdaAction)D[`Rule.Actions.member.${H}.LambdaAction.FunctionArn`]=F.LambdaAction.FunctionArn,D[`Rule.Actions.member.${H}.LambdaAction.InvocationType`]=F.LambdaAction.InvocationType||"Event";if(F.SNSAction){if(D[`Rule.Actions.member.${H}.SNSAction.TopicArn`]=F.SNSAction.TopicArn,F.SNSAction.Encoding)D[`Rule.Actions.member.${H}.SNSAction.Encoding`]=F.SNSAction.Encoding}if(F.StopAction){if(D[`Rule.Actions.member.${H}.StopAction.Scope`]=F.StopAction.Scope,F.StopAction.TopicArn)D[`Rule.Actions.member.${H}.StopAction.TopicArn`]=F.StopAction.TopicArn}}),await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody(D)})}async sendRawEmail(z){let D=Buffer.from(z.rawMessage).toString("base64"),F={Action:"SendRawEmail",Version:"2010-12-01",Source:z.source,"RawMessage.Data":D};z.destinations.forEach((O,Z)=>{F[`Destinations.member.${Z+1}`]=O});let J=await this.client.request({service:"ses",region:this.region,method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.buildFormBody(F)});return{MessageId:(J?.SendRawEmailResponse?.SendRawEmailResult||J?.SendRawEmailResult)?.MessageId}}async getSuppressedDestination(z){try{return(await this.client.request({service:"ses",region:this.region,method:"GET",path:`/v2/email/suppression/addresses/${encodeURIComponent(z)}`}))?.SuppressedDestination||null}catch(D){if(D.message?.includes("404")||D.message?.includes("NotFoundException"))return null;throw D}}async deleteSuppressedDestination(z){await this.client.request({service:"ses",region:this.region,method:"DELETE",path:`/v2/email/suppression/addresses/${encodeURIComponent(z)}`})}}class M{ses;s3;iam;route53;region;domain;defaultFrom;constructor(z={}){this.region=z.region||"us-east-1",this.domain=z.domain,this.defaultFrom=z.defaultFrom,this.ses=new U(this.region),this.s3=new E(this.region),this.iam=new w(this.region),this.route53=new j(this.region)}async send(z){let D=z.from||this.defaultFrom;if(!D)throw Error("From address is required. Set defaultFrom in constructor or provide from in options.");let F=z.fromName?`${z.fromName} <${D}>`:D,J=Array.isArray(z.to)?z.to:[z.to];if(!z.attachments||z.attachments.length===0)return{messageId:(await this.ses.sendSimpleEmail({from:F,to:J,subject:z.subject,text:z.text,html:z.html,replyTo:z.replyTo})).MessageId||""};let H=this.buildRawEmail(z,F,J);return{messageId:(await this.ses.sendEmail({FromEmailAddress:F,Destination:{ToAddresses:J,CcAddresses:z.cc?Array.isArray(z.cc)?z.cc:[z.cc]:void 0,BccAddresses:z.bcc?Array.isArray(z.bcc)?z.bcc:[z.bcc]:void 0},Content:{Raw:{Data:Buffer.from(H).toString("base64")}}})).MessageId||""}}async sendTemplate(z){let D=z.from||this.defaultFrom;if(!D)throw Error("From address is required");let F=z.fromName?`${z.fromName} <${D}>`:D;return{messageId:(await this.ses.sendTemplatedEmail({from:F,to:z.to,templateName:z.templateName,templateData:z.templateData,replyTo:z.replyTo})).MessageId||""}}async sendBulk(z){let D=z.from||this.defaultFrom;if(!D)throw Error("From address is required");let F=z.recipients.map((H)=>({Destination:{ToAddresses:Array.isArray(H.to)?H.to:[H.to]},ReplacementEmailContent:H.templateData?{ReplacementTemplate:{ReplacementTemplateData:JSON.stringify(H.templateData)}}:void 0}));return{results:(await this.ses.sendBulkEmail({FromEmailAddress:D,BulkEmailEntries:F,DefaultContent:{Template:{TemplateName:z.templateName,TemplateData:JSON.stringify(z.defaultTemplateData)}}})).BulkEmailEntryResults?.map((H)=>({status:H.Status||"UNKNOWN",messageId:H.MessageId,error:H.Error}))||[]}}async setupDomain(z){let D;try{D=await this.ses.getEmailIdentity(z)}catch{let J=await this.ses.createEmailIdentity({EmailIdentity:z});D={VerificationStatus:J.DkimAttributes?.Status,DkimAttributes:J.DkimAttributes,SendingEnabled:J.VerifiedForSendingStatus}}try{await this.ses.putEmailIdentityDkimAttributes({EmailIdentity:z,SigningEnabled:!0})}catch{}try{await this.ses.putEmailIdentityMailFromAttributes(z,{MailFromDomain:`mail.${z}`,BehaviorOnMxFailure:"USE_DEFAULT_VALUE"})}catch{}let F=await this.ses.getDkimRecords(z);return{domainVerified:D.SendingEnabled===!0,dkimStatus:D.DkimAttributes?.Status||"UNKNOWN",dkimTokens:D.DkimAttributes?.Tokens,mailFromStatus:D.MailFromAttributes?.MailFromDomainStatus}}async getDnsRecords(z){let D=[],F=await this.ses.getDkimRecords(z);for(let J of F)D.push({type:J.type,name:J.name,value:J.value,ttl:1800});return D.push({type:"MX",name:z,value:`inbound-smtp.${this.region}.amazonaws.com`,priority:10,ttl:3600}),D.push({type:"MX",name:`mail.${z}`,value:`feedback-smtp.${this.region}.amazonses.com`,priority:10,ttl:3600}),D.push({type:"TXT",name:`mail.${z}`,value:"v=spf1 include:amazonses.com ~all",ttl:3600}),D.push({type:"TXT",name:`_dmarc.${z}`,value:`v=DMARC1;p=quarantine;pct=25;rua=mailto:dmarcreports@${z}`,ttl:3600}),D}async isDomainReady(z){try{let D=await this.ses.getEmailIdentity(z);return D.SendingEnabled===!0&&D.DkimAttributes?.Status==="SUCCESS"}catch{return!1}}async setupReceiving(z){let D={Version:"2012-10-17",Statement:[{Sid:"AllowSESPuts",Effect:"Allow",Principal:{Service:"ses.amazonaws.com"},Action:"s3:PutObject",Resource:`arn:aws:s3:::${z.bucketName}/*`,Condition:{StringEquals:{"AWS:SourceAccount":z.accountId}}}]};await this.s3.putBucketPolicy(z.bucketName,D);try{await this.ses.createReceiptRuleSet(z.ruleSetName)}catch(J){if(!J.message?.includes("already exists")&&J.code!=="AlreadyExists")throw J}let F=[{S3Action:{BucketName:z.bucketName,ObjectKeyPrefix:z.prefix||"inbox/"}}];if(z.lambdaArn)F.push({LambdaAction:{FunctionArn:z.lambdaArn,InvocationType:"Event"}});try{await this.ses.createReceiptRule({RuleSetName:z.ruleSetName,Rule:{Name:z.ruleName,Enabled:!0,TlsPolicy:"Optional",Recipients:z.recipients||[z.domain],ScanEnabled:z.scanEnabled!==!1,Actions:F}})}catch(J){if(J.message?.includes("already exists"))await this.ses.deleteReceiptRule(z.ruleSetName,z.ruleName),await this.ses.createReceiptRule({RuleSetName:z.ruleSetName,Rule:{Name:z.ruleName,Enabled:!0,TlsPolicy:"Optional",Recipients:z.recipients||[z.domain],ScanEnabled:z.scanEnabled!==!1,Actions:F}});else throw J}await this.ses.setActiveReceiptRuleSet(z.ruleSetName)}async getIncomingEmails(z){return(await this.s3.list({bucket:z.bucket,prefix:z.prefix||"incoming/",maxKeys:z.maxResults||100})).map((F)=>({key:F.Key||"",lastModified:F.LastModified||"",size:F.Size||0}))}async readEmail(z){return await this.s3.getObject(z.bucket,z.key)}async createSmtpCredentials(z){let D=`ses-smtp-${z.username.replace(/[^a-zA-Z0-9]/g,"-")}`,{AWSClient:F}=await import("./chunk-dbgffky8.js"),J=new F,H=(Q,C)=>{let I={Action:Q,Version:"2010-05-08",...C};return Object.entries(I).map(([R,K])=>`${encodeURIComponent(R)}=${encodeURIComponent(K)}`).join("&")};try{await J.request({service:"iam",region:"us-east-1",method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:H("CreateUser",{UserName:D})})}catch(Q){if(!Q.message?.includes("EntityAlreadyExists"))throw Q}let O={Version:"2012-10-17",Statement:[{Effect:"Allow",Action:"ses:SendRawEmail",Resource:"*",Condition:{StringLike:{"ses:FromAddress":`*@${z.domain}`}}}]},Z=`ses-smtp-policy-${z.domain.replace(/\./g,"-")}`;try{await J.request({service:"iam",region:"us-east-1",method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:H("PutUserPolicy",{UserName:D,PolicyName:Z,PolicyDocument:JSON.stringify(O)})})}catch{}let _=(await J.request({service:"iam",region:"us-east-1",method:"POST",path:"/",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:H("CreateAccessKey",{UserName:D})}))?.CreateAccessKeyResult?.AccessKey;if(!_?.AccessKeyId||!_?.SecretAccessKey)throw Error("Failed to create access key");let B=this.deriveSmtpPassword(_.SecretAccessKey);return{username:_.AccessKeyId,password:B,server:`email-smtp.${this.region}.amazonaws.com`,port:587}}deriveSmtpPassword(z){let D=W("node:crypto"),F="SendRawEmail",J=Buffer.from([4]),H=D.createHmac("sha256",`AWS4${z}`).update("11111111").digest();return H=D.createHmac("sha256",H).update(this.region).digest(),H=D.createHmac("sha256",H).update("ses").digest(),H=D.createHmac("sha256",H).update("aws4_request").digest(),H=D.createHmac("sha256",H).update("SendRawEmail").digest(),Buffer.concat([J,H]).toString("base64")}async createTemplate(z){await this.ses.createEmailTemplate({TemplateName:z.name,TemplateContent:{Subject:z.subject,Text:z.text,Html:z.html}})}async getTemplate(z){try{let D=await this.ses.getEmailTemplate(z);return{name:D.TemplateName||z,subject:D.TemplateContent?.Subject,text:D.TemplateContent?.Text,html:D.TemplateContent?.Html}}catch{return null}}async deleteTemplate(z){await this.ses.deleteEmailTemplate(z)}async listTemplates(){return(await this.ses.listEmailTemplates()).TemplatesMetadata?.map((D)=>({name:D.TemplateName||"",createdAt:D.CreatedTimestamp}))||[]}async deploy(z){let D=`${z.appName}-${z.environment}-email-rules`,F=`${z.appName}-inbound-email`,J=z.storage?.bucketName||`${z.appName}-${z.environment}-email`,H=await this.setupDomain(z.domain);if(!(await this.s3.listBuckets()).Buckets?.some((_)=>_.Name===J))await this.s3.createBucket(J);await this.setupReceiving({domain:z.domain,ruleSetName:D,ruleName:F,bucketName:J,prefix:z.storage?.prefix||"inbox/",accountId:z.accountId,recipients:z.catchAll?[z.domain]:z.mailboxes,scanEnabled:!0});let $=await this.getDnsRecords(z.domain);return{success:!0,domainVerified:H.domainVerified,dkimStatus:H.dkimStatus,receiptRuleSet:D,storageBucket:J,dnsRecords:$}}async undeploy(z){let D=`${z.appName}-${z.environment}-email-rules`,F=`${z.appName}-inbound-email`,J=`${z.appName}-${z.environment}-email`;try{await this.ses.deleteReceiptRule(D,F)}catch{}try{await this.ses.deleteReceiptRuleSet(D)}catch{}if(z.deleteBucket)try{await this.s3.emptyAndDeleteBucket(J)}catch{}}async getSendingStats(){let z=await this.ses.getSendQuota();return{sentLast24Hours:z.SentLast24Hours||0,maxSendRate:z.MaxSendRate||0,max24HourSend:z.Max24HourSend||0}}buildRawEmail(z,D,F){let J=`----=_Part_${Date.now()}_${Math.random().toString(36).substring(2)}`,H="";if(H+=`From: ${D}\r
|
|
2
|
+
`,H+=`To: ${F.join(", ")}\r
|
|
3
|
+
`,z.cc){let O=Array.isArray(z.cc)?z.cc:[z.cc];H+=`Cc: ${O.join(", ")}\r
|
|
4
|
+
`}if(H+=`Subject: ${z.subject}\r
|
|
5
|
+
`,H+=`MIME-Version: 1.0\r
|
|
6
|
+
`,H+=`Content-Type: multipart/mixed; boundary="${J}"\r
|
|
7
|
+
`,H+=`\r
|
|
8
|
+
`,z.text||z.html)if(H+=`--${J}\r
|
|
9
|
+
`,z.html&&z.text){let O=`----=_Alt_${Date.now()}`;H+=`Content-Type: multipart/alternative; boundary="${O}"\r
|
|
10
|
+
`,H+=`\r
|
|
11
|
+
`,H+=`--${O}\r
|
|
12
|
+
`,H+=`Content-Type: text/plain; charset="UTF-8"\r
|
|
13
|
+
`,H+=`\r
|
|
14
|
+
`,H+=`${z.text}\r
|
|
15
|
+
`,H+=`--${O}\r
|
|
16
|
+
`,H+=`Content-Type: text/html; charset="UTF-8"\r
|
|
17
|
+
`,H+=`\r
|
|
18
|
+
`,H+=`${z.html}\r
|
|
19
|
+
`,H+=`--${O}--\r
|
|
20
|
+
`}else if(z.html)H+=`Content-Type: text/html; charset="UTF-8"\r
|
|
21
|
+
`,H+=`\r
|
|
22
|
+
`,H+=`${z.html}\r
|
|
23
|
+
`;else H+=`Content-Type: text/plain; charset="UTF-8"\r
|
|
24
|
+
`,H+=`\r
|
|
25
|
+
`,H+=`${z.text}\r
|
|
26
|
+
`;if(z.attachments)for(let O of z.attachments)H+=`--${J}\r
|
|
27
|
+
`,H+=`Content-Type: ${O.contentType||"application/octet-stream"}; name="${O.filename}"\r
|
|
28
|
+
`,H+=`Content-Transfer-Encoding: base64\r
|
|
29
|
+
`,H+=`Content-Disposition: attachment; filename="${O.filename}"\r
|
|
30
|
+
`,H+=`\r
|
|
31
|
+
`,H+=`${O.content}\r
|
|
32
|
+
`;return H+=`--${J}--\r
|
|
33
|
+
`,H}}var y=new M;
|
|
34
|
+
export{w as Vf,U as Wf,M as Xf,y as Yf};
|