-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathextension.yaml
More file actions
247 lines (228 loc) · 8.11 KB
/
Copy pathextension.yaml
File metadata and controls
247 lines (228 loc) · 8.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
name: mailersend-email
version: 0.3.0
specVersion: v1beta
displayName: Send email with MailerSend
description: >-
Send transactional emails using MailerSend.
icon: mailersend.png
tags: [messaging]
license: Apache-2.0
sourceUrl: https://github.com/mailersend/mailersend-firebase
releaseNotesUrl: https://github.com/mailersend/mailersend-firebase/CHANGELOG.md
author:
authorName: MailerSend
url: https://www.mailersend.com
contributors:
- authorName: Ramunas Pabreza
email: ramunas@mailerlite.com
- authorName: Tautvydas Tijunaitis
email: tautvydas@mailerlite.com
billingRequired: true
roles:
- role: datastore.user
reason: Required to update emails in collection that have failed to send
resources:
- name: processDocumentCreated
type: firebaseextensions.v1beta.v2function
description: >-
Processes created document in Cloud Firestore collection, sends an email and updates status information.
properties:
buildConfig:
runtime: nodejs22
location: ${LOCATION}
eventTrigger:
eventType: google.cloud.firestore.document.v1.created
triggerRegion: ${DATABASE_LOCATION}
eventFilters:
- attribute: database
value: (default)
- attribute: document
value: ${EMAIL_COLLECTION}/{documentId}
operator: match-path-pattern
- name: processBulkDocumentCreated
type: firebaseextensions.v1beta.v2function
description: >-
Processes created document in the bulk emails Cloud Firestore collection, sends a bulk email and updates status information.
properties:
buildConfig:
runtime: nodejs22
location: ${LOCATION}
eventTrigger:
eventType: google.cloud.firestore.document.v1.created
triggerRegion: ${DATABASE_LOCATION}
eventFilters:
- attribute: database
value: (default)
- attribute: document
value: ${BULK_EMAIL_COLLECTION}/{documentId}
operator: match-path-pattern
params:
- param: LOCATION
label: Cloud Functions location
description: >-
Where do you want to deploy the functions created for this extension?
For help selecting a location, refer to the [location selection
guide](https://firebase.google.com/docs/functions/locations).
type: select
options:
- label: Iowa (us-central1)
value: us-central1
- label: South Carolina (us-east1)
value: us-east1
- label: Northern Virginia (us-east4)
value: us-east4
- label: Los Angeles (us-west2)
value: us-west2
- label: Salt Lake City (us-west3)
value: us-west3
- label: Las Vegas (us-west4)
value: us-west4
- label: Warsaw (europe-central2)
value: europe-central2
- label: Belgium (europe-west1)
value: europe-west1
- label: London (europe-west2)
value: europe-west2
- label: Frankfurt (europe-west3)
value: europe-west3
- label: Zurich (europe-west6)
value: europe-west6
- label: Hong Kong (asia-east2)
value: asia-east2
- label: Tokyo (asia-northeast1)
value: asia-northeast1
- label: Osaka (asia-northeast2)
value: asia-northeast2
- label: Seoul (asia-northeast3)
value: asia-northeast3
- label: Mumbai (asia-south1)
value: asia-south1
- label: Jakarta (asia-southeast2)
value: asia-southeast2
- label: Montreal (northamerica-northeast1)
value: northamerica-northeast1
- label: Sao Paulo (southamerica-east1)
value: southamerica-east1
- label: Sydney (australia-southeast1)
value: australia-southeast1
required: true
immutable: true
- param: DATABASE_LOCATION
label: Firestore Database Location
description: >-
The location of your Firestore database.
For standard databases, this is usually the same as your Cloud Functions location (e.g. us-central1).
For multi-region databases, this might be 'nam5' or 'eur3'.
type: select
options:
- label: Iowa (us-central1)
value: us-central1
- label: South Carolina (us-east1)
value: us-east1
- label: Northern Virginia (us-east4)
value: us-east4
- label: Los Angeles (us-west2)
value: us-west2
- label: Salt Lake City (us-west3)
value: us-west3
- label: Las Vegas (us-west4)
value: us-west4
- label: Warsaw (europe-central2)
value: europe-central2
- label: Belgium (europe-west1)
value: europe-west1
- label: London (europe-west2)
value: europe-west2
- label: Frankfurt (europe-west3)
value: europe-west3
- label: Zurich (europe-west6)
value: europe-west6
- label: Hong Kong (asia-east2)
value: asia-east2
- label: Tokyo (asia-northeast1)
value: asia-northeast1
- label: Osaka (asia-northeast2)
value: asia-northeast2
- label: Seoul (asia-northeast3)
value: asia-northeast3
- label: Mumbai (asia-south1)
value: asia-south1
- label: Jakarta (asia-southeast2)
value: asia-southeast2
- label: Montreal (northamerica-northeast1)
value: northamerica-northeast1
- label: Sao Paulo (southamerica-east1)
value: southamerica-east1
- label: Sydney (australia-southeast1)
value: australia-southeast1
- label: North America (nam5)
value: nam5
- label: Europe (eur3)
value: eur3
default: us-central1
required: true
immutable: true
- param: EMAIL_COLLECTION
label: Emails documents collection
description: >-
What is the path to the collection that contains the documents used to build and send the email?
type: string
default: emails
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
validationErrorMessage: Must be a valid Cloud Firestore collection.
required: true
- param: BULK_EMAIL_COLLECTION
label: Bulk emails documents collection
description: >-
What is the path to the collection that contains the documents used to build and send bulk emails?
type: string
default: bulk_emails
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
validationErrorMessage: Must be a valid Cloud Firestore collection.
required: false
- param: MAILERSEND_API_KEY
label: MailerSend API key
type: secret
description: >-
API tokens are used for authentication when sending emails. You can find more details how to create MailerSend API token [here](https://www.mailersend.com/help/managing-api-tokens).
example: eyJ*******************************
required: true
- param: DEFAULT_FROM_EMAIL
label: Default FROM email address
description: >-
The email address to use as the sender's address (if it's not specified in the added email document or template).
type: string
example: email@example.com
validationRegex: ^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-.]+.[a-zA-Z0-9-]+$
validationErrorMessage: Must be a valid email address or valid name plus email address
required: false
- param: DEFAULT_FROM_NAME
label: Default FROM name
description: >-
The name to use as the sender's name.
type: string
example: John doe
required: false
- param: DEFAULT_REPLY_TO_EMAIL
label: Default reply to email address
description: >-
The email address to use as the reply to address (if it's not specified in the added email document or template).
type: string
example: email@example.com
validationRegex: ^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-.]+.[a-zA-Z0-9-]+$
validationErrorMessage: Must be a valid email address or valid name plus email address
required: false
- param: DEFAULT_REPLY_TO_NAME
label: Default reply to name
description: >-
The name to use as the reply to name.
type: string
example: John doe
required: false
- param: DEFAULT_TEMPLATE_ID
label: Default template ID
description: >-
The default template id to use for emails (it will be used if not specified in the added email document).
type: string
example: o65qngk2vn3gwr12
required: false