-
Notifications
You must be signed in to change notification settings - Fork 374
/
extension.yaml
161 lines (145 loc) · 6.09 KB
/
extension.yaml
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
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: firestore-send-email
version: 0.1.9
specVersion: v1beta
displayName: Trigger Email
description:
Composes and sends an email based on the contents of a document written to a specified Cloud Firestore collection.
license: Apache-2.0
sourceUrl: https://github.com/firebase/extensions/tree/master/firestore-send-email
releaseNotesUrl: https://github.com/firebase/extensions/blob/master/firestore-send-email/CHANGELOG.md
author:
authorName: Firebase
url: https://firebase.google.com
contributors:
- authorName: Michael Bleigh
url: https://github.com/mbleigh
- authorName: Invertase
email: oss@invertase.io
url: https://github.com/invertase
billingRequired: true
roles:
- role: datastore.user
reason: Allows this extension to access Cloud Firestore to read and process added email documents.
resources:
- name: processQueue
type: firebaseextensions.v1beta.function
description:
Processes document changes in the specified Cloud Firestore collection,
delivers emails, and updates the document with delivery status information.
properties:
location: ${param:LOCATION}
runtime: nodejs10
eventTrigger:
eventType: providers/cloud.firestore/eventTypes/document.write
resource: projects/${param:PROJECT_ID}/databases/(default)/documents/${param:MAIL_COLLECTION}/{id}
params:
- param: LOCATION
label: Cloud Functions location
description: >-
Where do you want to deploy the functions created for this extension?
You usually want a location close to your database. 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: 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
default: us-central1
required: true
immutable: true
- param: SMTP_CONNECTION_URI
label: SMTP connection URI
description: >-
A URI representing an SMTP server this extension can use to deliver email. Note that port 25 is blocked by Google Cloud Platform, so we recommend using port 587 for SMTP connections. If you're using the SMTPS protocol, we recommend using port 465.
type: string
example: smtps://username:password@smtp.hostname.com:465
validationRegex: ^smtps?://[^:]+:[^:]+@.*$
validationErrorMessage: Invalid SMTP connection URI. Must be in the form `smtp(s)://username:password@hostname:port`.
required: true
- param: MAIL_COLLECTION
label: Email documents collection
description: >-
What is the path to the collection that contains the documents used to build and send the emails?
type: string
default: mail
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
validationErrorMessage: Must be a valid Cloud Firestore collection
required: true
- param: DEFAULT_FROM
label: Default FROM address
description: >-
The email address to use as the sender's address (if it's not specified in the added email document).
You can optionally include a name with the email address (`Friendly Firebaser <foobar@example.com>`).
type: string
example: foobar@example.com
validationRegex: ^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$|^.*<(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})>$
validationErrorMessage: Must be a valid email address or valid name plus email address
required: true
- param: DEFAULT_REPLY_TO
label: Default REPLY-TO address
description: >-
The email address to use as the reply-to address (if it's not specified in the added email document).
type: string
- param: USERS_COLLECTION
label: Users collection
description: >-
A collection of documents keyed by user UID.
If the `toUids`, `ccUids`, and/or `bccUids` recipient options are used in the added email document,
this extension delivers email to the `email` field based on lookups in this collection.
type: string
- param: TEMPLATES_COLLECTION
label: Templates collection
description: >-
A collection of email templates keyed by name.
This extension can render an email using a [Handlebar](https://handlebarsjs.com/) template,
if the template is specified in the added email document.
type: string