vidspotai-shared 1.0.98 → 1.0.99

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.
@@ -69,12 +69,15 @@ export declare const SIGNUP_GRANT_CREDITS = 10;
69
69
  * Credits granted when a card-backed free trial actually starts (the
70
70
  * `isTrialInvoice` branch in payment.service.handleInvoiceSucceeded).
71
71
  *
72
- * NOTE: that branch OVERWRITES the credit doc (`total: 10, consumed: 0`), it
73
- * does not increment. So starting the trial RESETS the balance to 10 available
74
- * rather than adding 10 to whatever is left of the signup grant — a user who
75
- * burned their signup 10 gets a fresh 10, but a user who never touched it also
76
- * ends at 10, not 20. Long-standing behaviour, called out here because
77
- * SIGNUP_GRANT_CREDITS being non-zero again makes the overlap reachable.
72
+ * ADDITIVE since 2026-07-24: that branch applies `FieldValue.increment` to
73
+ * `credits.total` and leaves `consumed` alone, so starting the trial always
74
+ * moves available credits by exactly +10 on top of whatever is left of the
75
+ * signup grant. Signup + trial with nothing spent = 20 available.
76
+ *
77
+ * It used to overwrite (`total: 10, consumed: 0`), which was invisible while
78
+ * SIGNUP_GRANT_CREDITS was 0 but became a silent no-op for users who added a
79
+ * card without having spent their signup grant. Paid (non-trial) invoices still
80
+ * SET the balance to the plan's allowance — those are a purchase, not a bonus.
78
81
  *
79
82
  * Deliberately equal to MIN_CREDITS_PER_PAID_OP so the trial is exactly one
80
83
  * full generation of any kind.
@@ -1 +1 @@
1
- {"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,KAA0B,CAAC"}
1
+ {"version":3,"file":"creditUnit.d.ts","sourceRoot":"","sources":["../../src/globals/creditUnit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iDAAiD;AACjD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAqB,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,KAA0B,CAAC"}
@@ -72,12 +72,15 @@ exports.SIGNUP_GRANT_CREDITS = 10;
72
72
  * Credits granted when a card-backed free trial actually starts (the
73
73
  * `isTrialInvoice` branch in payment.service.handleInvoiceSucceeded).
74
74
  *
75
- * NOTE: that branch OVERWRITES the credit doc (`total: 10, consumed: 0`), it
76
- * does not increment. So starting the trial RESETS the balance to 10 available
77
- * rather than adding 10 to whatever is left of the signup grant — a user who
78
- * burned their signup 10 gets a fresh 10, but a user who never touched it also
79
- * ends at 10, not 20. Long-standing behaviour, called out here because
80
- * SIGNUP_GRANT_CREDITS being non-zero again makes the overlap reachable.
75
+ * ADDITIVE since 2026-07-24: that branch applies `FieldValue.increment` to
76
+ * `credits.total` and leaves `consumed` alone, so starting the trial always
77
+ * moves available credits by exactly +10 on top of whatever is left of the
78
+ * signup grant. Signup + trial with nothing spent = 20 available.
79
+ *
80
+ * It used to overwrite (`total: 10, consumed: 0`), which was invisible while
81
+ * SIGNUP_GRANT_CREDITS was 0 but became a silent no-op for users who added a
82
+ * card without having spent their signup grant. Paid (non-trial) invoices still
83
+ * SET the balance to the plan's allowance — those are a purchase, not a bonus.
81
84
  *
82
85
  * Deliberately equal to MIN_CREDITS_PER_PAID_OP so the trial is exactly one
83
86
  * full generation of any kind.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vidspotai-shared",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "exports": {