backend-manager 5.0.147 → 5.0.148

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/CHANGELOG.md CHANGED
@@ -14,6 +14,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
14
14
  - `Fixed` for any bug fixes.
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
+ # [5.0.146] - 2026-03-13
18
+ ### Added
19
+ - Promo discount support in payment analytics — `resolveActualValue()` computes effective price accounting for trials ($0) and percentage discounts
20
+ - Promo discount details (code, percent, savings, totalToday) in new-subscription order confirmation emails
21
+
22
+ ### Changed
23
+ - `trackPayment()` and `resolvePaymentEvent()` now accept `order` parameter to access discount data
24
+
17
25
  # [5.0.144] - 2026-03-13
18
26
  ### Added
19
27
  - `User.resolveSubscription()` static method that derives calculated subscription fields (plan, active, trialing, cancelling) from raw user data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "5.0.147",
3
+ "version": "5.0.148",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -29,7 +29,7 @@ const GENERIC_DOMAINS = new Set([
29
29
  * @returns {{ firstName: string, lastName: string, company: string, confidence: number, method: string }}
30
30
  */
31
31
  async function inferContact(email, assistant) {
32
- if (process.env.OPENAI_API_KEY) {
32
+ if (process.env.BACKEND_MANAGER_OPENAI_API_KEY) {
33
33
  const aiResult = await inferContactWithAI(email, assistant);
34
34
  if (aiResult && (aiResult.firstName || aiResult.lastName)) {
35
35
  return aiResult;
package/templates/_.env CHANGED
@@ -2,6 +2,7 @@
2
2
  # Backend Manager
3
3
  BACKEND_MANAGER_KEY=""
4
4
  BACKEND_MANAGER_NAMESPACE=""
5
+ BACKEND_MANAGER_OPENAI_API_KEY=""
5
6
 
6
7
  # GitHub
7
8
  GITHUB_TOKEN=""