@justair/justair-library 7.7.0 → 7.8.0-alpha.bda2dbd

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.
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/models/users.js"],"names":[],"mappings":"AA8FA,8BAuIE;AAiCF,wBAAmD;AA5PnD,iDAA4D;AAC5D,6CAAmD;AAUnD,4DA0BC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/models/users.js"],"names":[],"mappings":"AA8FA,8BAiJE;AAiCF,wBAAmD;AAtQnD,iDAA4D;AAC5D,6CAAmD;AAUnD,4DA0BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "7.7.0",
3
+ "version": "7.8.0-alpha.bda2dbd",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -147,6 +147,16 @@ const usersSchema = mongoose.Schema(
147
147
  optInEmail: { type: Boolean, default: false },
148
148
  isActive: { type: Boolean, default: true },
149
149
  hasOnboarded: { type: Boolean, default: false },
150
+ // JA-2670: migration-cohort marker for the V2 what's-new screen. Meaning:
151
+ // "this account no longer needs the screen" — set true at V2 signup
152
+ // (client:"v2" on POST /users), or claimed once at first V2 login via
153
+ // findOneAndUpdate({ _id, hasSeenV2WhatsNew: { $ne: true } }, ...).
154
+ // $ne:true is the contract: it must match documents where the field is
155
+ // ABSENT (every account created before this field existed) as well as
156
+ // stored false — an equality filter on false would silently skip every
157
+ // pre-existing user. Deliberately NOT immutable (the claim flips it) and
158
+ // there is no backfill; absence means "hasn't seen it".
159
+ hasSeenV2WhatsNew: { type: Boolean, default: false },
150
160
  isSharingLocation: { type: Boolean, default: false },
151
161
  toolTips: Object,
152
162
  alertPreferenceLevel: {