@mohasinac/appkit 4.30.13 → 4.30.15

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.
Files changed (28) hide show
  1. package/dist/features/admin/components/AdminBlogView.js +8 -1
  2. package/dist/features/admin/components/AdminCouponsView.js +8 -1
  3. package/dist/features/admin/components/AdminOffersView.js +9 -1
  4. package/dist/features/admin/components/AdminPayoutsView.js +9 -1
  5. package/dist/features/admin/components/AdminReviewsView.js +14 -1
  6. package/dist/features/admin/components/AdminScammersView.js +15 -1
  7. package/dist/features/admin/components/DataListingView.d.ts +22 -1
  8. package/dist/features/admin/components/DataListingView.js +7 -0
  9. package/dist/features/admin/hooks/useAdminListing.d.ts +9 -0
  10. package/dist/features/admin/hooks/useAdminListing.js +30 -2
  11. package/dist/features/events/components/AdminEventsView.js +7 -1
  12. package/dist/features/scams/repository/scammer.repository.d.ts +10 -1
  13. package/dist/features/scams/repository/scammer.repository.js +20 -2
  14. package/dist/features/scams/schemas/firestore.d.ts +10 -0
  15. package/dist/features/scams/schemas/firestore.js +1 -0
  16. package/dist/features/scams/schemas/index.d.ts +10 -10
  17. package/dist/features/seller/components/SellerCouponsView.js +7 -1
  18. package/dist/features/seller/components/SellerOffersView.js +8 -1
  19. package/dist/features/seller/components/SellerOrdersView.js +8 -1
  20. package/dist/schemas/registry.d.ts +8 -8
  21. package/dist/seed/_helpers/search-txt-wrappers.d.ts +2 -0
  22. package/dist/seed/_helpers/search-txt-wrappers.js +4 -1
  23. package/dist/seed/scammers-seed-data.js +10 -1
  24. package/dist/styles.css +1 -1
  25. package/dist/tailwind-utilities.css +1 -1
  26. package/dist/utils/search-txt-builders.d.ts +13 -0
  27. package/dist/utils/search-txt-builders.js +20 -0
  28. package/package.json +2 -9
@@ -1,4 +1,5 @@
1
1
  import type { ProductDocument } from "../features/products/schemas/firestore";
2
+ import type { ScammerDocument } from "../features/scams/schemas/firestore";
2
3
  import type { StoreDocument } from "../features/stores/schemas/firestore";
3
4
  import type { EventDocument } from "../features/events/schemas/firestore";
4
5
  import type { BlogPostDocument } from "../features/blog/schemas/firestore";
@@ -45,3 +46,15 @@ export declare function buildCouponSearchTxt(c: Partial<CouponDocument>): string
45
46
  * findable by substring from an admin list.
46
47
  */
47
48
  export declare function buildOfferSearchTxt(o: Partial<OfferDocument>): string[];
49
+ /**
50
+ * The scam registry's identity fields are stored PLAINTEXT on purpose — a
51
+ * victim googles a UPI ID before paying, so SEO is the feature (see the field
52
+ * comments on ScammerDocument). Indexing them is therefore aligned with the
53
+ * feature rather than a PII risk, and it is why this collection can have a
54
+ * partial-match box where users/reviews/payouts cannot.
55
+ *
56
+ * `description` is the reporter's narrative and is NOT indexed: it is free
57
+ * text naming victims and third parties, and the 600-token cap would let one
58
+ * long report crowd out every identity token in the same document.
59
+ */
60
+ export declare function buildScammerSearchTxt(s: Partial<ScammerDocument>): string[];
@@ -116,3 +116,23 @@ export function buildCouponSearchTxt(c) {
116
116
  export function buildOfferSearchTxt(o) {
117
117
  return buildSearchTxt([o.productTitle, o.productSlug, o.storeName]);
118
118
  }
119
+ /**
120
+ * The scam registry's identity fields are stored PLAINTEXT on purpose — a
121
+ * victim googles a UPI ID before paying, so SEO is the feature (see the field
122
+ * comments on ScammerDocument). Indexing them is therefore aligned with the
123
+ * feature rather than a PII risk, and it is why this collection can have a
124
+ * partial-match box where users/reviews/payouts cannot.
125
+ *
126
+ * `description` is the reporter's narrative and is NOT indexed: it is free
127
+ * text naming victims and third parties, and the 600-token cap would let one
128
+ * long report crowd out every identity token in the same document.
129
+ */
130
+ export function buildScammerSearchTxt(s) {
131
+ return buildSearchTxt([
132
+ s.displayNames ?? [],
133
+ s.phones ?? [],
134
+ s.upiIds ?? [],
135
+ s.emails ?? [],
136
+ s.scamType,
137
+ ]);
138
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.30.13",
3
+ "version": "4.30.15",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -167,8 +167,6 @@
167
167
  "audit:sieve-views": "node scripts/audit-sieve-constants-views.mjs",
168
168
  "check:types": "tsc -p tsconfig.build.json --noEmit",
169
169
  "check:audits": "node scripts/audit-violations.mjs && node scripts/verify-entries.mjs && node scripts/verify-css-build.mjs && node scripts/audit-use-client.mjs && node scripts/audit-double-navigation.mjs && node scripts/audit-repository-fields.mjs && node scripts/audit-query-provider.mjs && node scripts/audit-export-paths.mjs && node scripts/audit-listing-indices.mjs && node scripts/audit-listing-type-reads.mjs && node scripts/audit-create-with-id.mjs && node scripts/audit-css-imports.mjs && node scripts/audit-appkit-reexports.mjs && node scripts/audit-action-confirmation.mjs && node scripts/audit-route-strings.mjs && node scripts/audit-paginated-select.mjs && node scripts/audit-sieve-constants-views.mjs && node scripts/audit-schema-registry-completeness.mjs && node scripts/audit-firestore-schema-coverage.mjs && node scripts/audit-catch-normalize.mjs && node scripts/audit-route-schema-registry.mjs && node scripts/audit-z-any-z-unknown.mjs && node scripts/audit-dynamic-tailwind-arbitrary.mjs && node scripts/audit-surface-props-completeness.mjs && node scripts/audit-touch-handler-completeness.mjs && node scripts/audit-field-primitive-contract.mjs && node scripts/audit-innerhtml-sanitization.mjs",
170
- "test": "vitest run --passWithNoTests",
171
- "test:watch": "vitest",
172
170
  "check": "npm run check:types && npm run check:audits"
173
171
  },
174
172
  "dependencies": {
@@ -215,15 +213,12 @@
215
213
  "devDependencies": {
216
214
  "@tailwindcss/cli": "^4.3.3",
217
215
  "@tanstack/react-query": "^5.0.0",
218
- "@testing-library/jest-dom": "^7.0.1",
219
- "@testing-library/react": "^16.3.2",
220
216
  "@types/babel__generator": "^7.27.0",
221
217
  "@types/babel__template": "^7.4.4",
222
218
  "@types/babel__traverse": "^7.28.0",
223
219
  "@types/caseless": "^0.12.5",
224
220
  "@types/d3-color": "^3.1.3",
225
221
  "@types/d3-path": "^3.1.1",
226
- "@types/istanbul-lib-report": "^3.0.3",
227
222
  "@types/ms": "^2.1.0",
228
223
  "@types/yargs-parser": "^21.0.3",
229
224
  "@upstash/ratelimit": "^2.0.8",
@@ -233,7 +228,6 @@
233
228
  "firebase": "^12.18.0",
234
229
  "firebase-admin": "^14.3.0",
235
230
  "firebase-functions": "^7.3.2",
236
- "jsdom": "^29.1.1",
237
231
  "lucide-react": "^1.33.0",
238
232
  "next": "^15.0.0",
239
233
  "next-intl": "^4.9.1",
@@ -243,8 +237,7 @@
243
237
  "resend": "^6.10.0",
244
238
  "server-only": "^0.0.1",
245
239
  "tailwindcss": "^4.3.3",
246
- "typescript": "^5.9.3",
247
- "vitest": "^4.1.11"
240
+ "typescript": "^5.9.3"
248
241
  },
249
242
  "engines": {
250
243
  "node": ">=22"