backend-manager 3.2.20 → 3.2.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "3.2.20",
3
+ "version": "3.2.22",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -127,8 +127,11 @@ Module.prototype.sendRateEmail = function (user) {
127
127
  template: 'd-b7f8da3c98ad49a2ad1e187f3a67b546',
128
128
  group: 25927,
129
129
  data: {
130
+ email: {
131
+ preview: `You have signed up for too many accounts at ${Manager.config.brand.name}! Your account has been deleted.`,
132
+ },
130
133
  body: {
131
- title: 'Account deleted',
134
+ title: `Account deleted`,
132
135
  message: `
133
136
  Your account at <strong>${Manager.config.brand.name}</strong> has been <strong>deleted</strong> because you have signed up for too many accounts.
134
137
  <br>
@@ -138,11 +141,7 @@ Module.prototype.sendRateEmail = function (user) {
138
141
  <br>
139
142
  <strong>User Record</strong>:
140
143
  <br>
141
- <pre>
142
- <code>
143
- ${JSON.stringify(user, null, 2)}
144
- </code>
145
- </pre>
144
+ <pre><code>${JSON.stringify(user, null, 2)}</code></pre>
146
145
  `,
147
146
  },
148
147
  },
@@ -178,21 +177,40 @@ Module.prototype.sendWelcomeEmail = function (user) {
178
177
  email: user.auth.email,
179
178
  },
180
179
  categories: [`account/welcome-1`],
181
- subject: `Your ${Manager.config.brand.name} account has been deleted`,
180
+ subject: `Welcome to ${Manager.config.brand.name}!`,
182
181
  template: 'd-b7f8da3c98ad49a2ad1e187f3a67b546',
183
182
  group: 25928,
184
183
  data: {
185
- title: 'Account deleted',
186
- message: `
187
- Your account at ${Manager.config.brand.name} has been deleted because you have signed up for too many accounts.
188
- <br>
189
- If you believe this is a mistake, please contact us at ${Manager.config.brand.email}.
190
- <br>
191
- <br>
192
- <strong>User Record</strong>:
193
- <br>
194
- ${JSON.stringify(user, null, 2)}
195
- `
184
+ email: {
185
+ preview: `Welcome to ${Manager.config.brand.name}! I'm Ian, the CEO. I'm here to help you get started.`,
186
+ },
187
+ body: {
188
+ title: `Welcome to ${Manager.config.brand.name}!`,
189
+ message: `
190
+ Hey there,
191
+ <br>
192
+ <br>
193
+ I'm Ian, the CEO of <strong>${Manager.config.brand.name}</strong>. I'm here to help you get started.
194
+ <br>
195
+ <br>
196
+ I'm thrilled to welcome you to <strong>${Manager.config.brand.name}</strong>! Your journey with us starts now, and we're eager to <strong>support you every step of the way</strong>.
197
+ <br>
198
+ <br>
199
+ As the founder and CEO, <strong>I'm personally committed to ensuring your experience with us is nothing short of exceptional</strong>. Should you need any assistance or have any questions, feel free to reply directly to this email. Our team and I are here to help.
200
+ <br>
201
+ <br>
202
+ Thanks for choosing <strong>${Manager.config.brand.name}</strong>. Here's to new beginnings!
203
+ <br>
204
+ <br>
205
+ `
206
+ },
207
+ signoff: {
208
+ type: 'personal',
209
+ image: null,
210
+ name: 'Ian Wiedenman, CEO',
211
+ url: 'https://ianwiedenman.com',
212
+ urlText: '@ianwieds',
213
+ },
196
214
  },
197
215
  },
198
216
  })
@@ -226,7 +244,7 @@ Module.prototype.signUp = function (payload) {
226
244
  assistant.log(`signUp(): payload`, payload)
227
245
 
228
246
  // Check if the user has a UID and email
229
- if (!payload?.auth?.uid || !payload?.email?.uid) {
247
+ if (!payload?.auth?.uid || !payload?.auth?.email) {
230
248
  return reject(new Error('Cannot create user without UID and email.'))
231
249
  }
232
250
 
@@ -257,7 +275,7 @@ Module.prototype.signUp = function (payload) {
257
275
  metadata: Manager.Metadata().set({tag: 'user:sign-up'}),
258
276
  }
259
277
 
260
- assistant.log(`signUp(): user`, user)
278
+ assistant.log(`signUp(): user`, user);
261
279
 
262
280
  // Set the user
263
281
  self.libraries.admin.firestore().doc(`users/${payload.auth.uid}`)