Skip to content

Commit 559ab85

Browse files
chore: wip
1 parent af5434f commit 559ab85

File tree

4 files changed

+78
-74
lines changed

4 files changed

+78
-74
lines changed

config/email.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,4 @@ export default {
2424
},
2525

2626
default: env.MAIL_DRIVER || 'ses',
27-
28-
drivers: {
29-
ses: {
30-
region: env.AWS_SES_REGION || 'us-east-1',
31-
credentials: {
32-
accessKeyId: env.AWS_ACCESS_KEY_ID,
33-
secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
34-
},
35-
},
36-
37-
sendgrid: {
38-
apiKey: env.SENDGRID_API_KEY,
39-
maxRetries: env.SENDGRID_MAX_RETRIES ? Number.parseInt(env.SENDGRID_MAX_RETRIES) : 3,
40-
retryTimeout: env.SENDGRID_RETRY_TIMEOUT ? Number.parseInt(env.SENDGRID_RETRY_TIMEOUT) : 1000,
41-
},
42-
43-
mailgun: {
44-
apiKey: env.MAILGUN_API_KEY,
45-
domain: env.MAILGUN_DOMAIN,
46-
endpoint: env.MAILGUN_ENDPOINT || 'api.mailgun.net',
47-
maxRetries: env.MAILGUN_MAX_RETRIES ? Number.parseInt(env.MAILGUN_MAX_RETRIES) : 3,
48-
retryTimeout: env.MAILGUN_RETRY_TIMEOUT ? Number.parseInt(env.MAILGUN_RETRY_TIMEOUT) : 1000,
49-
},
50-
51-
mailtrap: {
52-
token: env.MAILTRAP_TOKEN,
53-
inboxId: env.MAILTRAP_INBOX_ID,
54-
maxRetries: env.MAILTRAP_MAX_RETRIES ? Number.parseInt(env.MAILTRAP_MAX_RETRIES) : 3,
55-
retryTimeout: env.MAILTRAP_RETRY_TIMEOUT ? Number.parseInt(env.MAILTRAP_RETRY_TIMEOUT) : 1000,
56-
},
57-
},
5827
} satisfies EmailConfig

config/services.ts

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@ export default {
1616
region: env.AWS_DEFAULT_REGION || 'us-east-1',
1717
},
1818

19+
ses: {
20+
region: env.AWS_SES_REGION || 'us-east-1',
21+
credentials: {
22+
accessKeyId: env.AWS_ACCESS_KEY_ID,
23+
secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
24+
},
25+
},
26+
27+
sendgrid: {
28+
apiKey: env.SENDGRID_API_KEY,
29+
maxRetries: env.SENDGRID_MAX_RETRIES ? Number.parseInt(env.SENDGRID_MAX_RETRIES) : 3,
30+
retryTimeout: env.SENDGRID_RETRY_TIMEOUT ? Number.parseInt(env.SENDGRID_RETRY_TIMEOUT) : 1000,
31+
},
32+
33+
mailgun: {
34+
apiKey: env.MAILGUN_API_KEY,
35+
domain: env.MAILGUN_DOMAIN,
36+
endpoint: env.MAILGUN_ENDPOINT || 'api.mailgun.net',
37+
maxRetries: env.MAILGUN_MAX_RETRIES ? Number.parseInt(env.MAILGUN_MAX_RETRIES) : 3,
38+
retryTimeout: env.MAILGUN_RETRY_TIMEOUT ? Number.parseInt(env.MAILGUN_RETRY_TIMEOUT) : 1000,
39+
},
40+
41+
mailtrap: {
42+
token: env.MAILTRAP_TOKEN,
43+
inboxId: env.MAILTRAP_INBOX_ID,
44+
maxRetries: env.MAILTRAP_MAX_RETRIES ? Number.parseInt(env.MAILTRAP_MAX_RETRIES) : 3,
45+
retryTimeout: env.MAILTRAP_RETRY_TIMEOUT ? Number.parseInt(env.MAILTRAP_RETRY_TIMEOUT) : 1000,
46+
},
47+
1948
hetzner: {
2049
appId: '',
2150
apiKey: '',
@@ -36,10 +65,10 @@ export default {
3665
apiKey: '',
3766
},
3867

39-
lemonSqueezy: {
40-
appId: '',
41-
apiKey: '',
42-
},
68+
// lemonSqueezy: {
69+
// appId: '',
70+
// apiKey: '',
71+
// },
4372

4473
stripe: {
4574
appId: '',

storage/framework/core/types/src/email.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,6 @@ export interface EmailOptions {
1616
}
1717

1818
default: 'ses' | 'sendgrid' | 'mailgun' | 'mailtrap'
19-
20-
drivers: {
21-
ses?: {
22-
region: string
23-
credentials: {
24-
accessKeyId?: string
25-
secretAccessKey?: string
26-
}
27-
maxRetries?: number
28-
retryTimeout?: number
29-
}
30-
sendgrid?: {
31-
apiKey?: string
32-
maxRetries?: number
33-
retryTimeout?: number
34-
}
35-
mailgun?: {
36-
apiKey?: string
37-
domain?: string
38-
endpoint?: string
39-
maxRetries?: number
40-
retryTimeout?: number
41-
}
42-
mailtrap?: {
43-
token?: string
44-
inboxId?: string | number
45-
maxRetries?: number
46-
retryTimeout?: number
47-
}
48-
}
4919
}
5020

5121
export type EmailConfig = Partial<EmailOptions>

storage/framework/core/types/src/services.ts

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,64 @@ export interface ServicesOptions {
44
apiKey: string
55
}
66

7+
aws?: {
8+
accountId: string
9+
appId: string
10+
apiKey: string
11+
region: string
12+
}
13+
714
godaddy?: {
815
apiKey: string
916
apiSecret: string
1017
}
1118

12-
meilisearch?: {
19+
hetzner: {
1320
appId: string
1421
apiKey: string
1522
}
1623

17-
lemonSqueezy?: {
24+
// lemonSqueezy?: {
25+
// appId: string
26+
// apiKey: string
27+
// }
28+
29+
mailgun?: {
30+
apiKey?: string
31+
domain?: string
32+
endpoint?: string
33+
maxRetries?: number
34+
retryTimeout?: number
35+
}
36+
37+
mailtrap?: {
38+
token?: string
39+
inboxId?: string | number
40+
maxRetries?: number
41+
retryTimeout?: number
42+
}
43+
44+
meilisearch?: {
1845
appId: string
1946
apiKey: string
2047
}
2148

49+
sendgrid?: {
50+
apiKey?: string
51+
maxRetries?: number
52+
retryTimeout?: number
53+
}
54+
55+
ses?: {
56+
region: string
57+
credentials: {
58+
accessKeyId?: string
59+
secretAccessKey?: string
60+
}
61+
maxRetries?: number
62+
retryTimeout?: number
63+
}
64+
2265
stripe?: {
2366
appId: string
2467
apiKey: string
@@ -28,13 +71,6 @@ export interface ServicesOptions {
2871
// appId: string
2972
// apiKey: string
3073
// }
31-
32-
aws?: {
33-
accountId: string
34-
appId: string
35-
apiKey: string
36-
region: string
37-
}
3874
}
3975

4076
export type ServicesConfig = Partial<ServicesOptions>

0 commit comments

Comments
 (0)