@thejob/schema 2.1.9 → 2.3.0
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/CLAUDE.md +17 -0
- package/dist/index.cjs +2178 -723
- package/dist/index.d.cts +1991 -535
- package/dist/index.d.ts +1991 -535
- package/dist/index.js +2080 -698
- package/package.json +1 -1
- package/src/billing/billing.constant.ts +179 -0
- package/src/billing/billing.schema.ts +280 -0
- package/src/common/facet.schema.ts +342 -0
- package/src/feedback/feedback-filter.schema.ts +39 -0
- package/src/geo/city-filter.schema.ts +41 -0
- package/src/geo/city.schema.ts +104 -0
- package/src/geo/country-filter.schema.ts +47 -0
- package/src/geo/country.schema.ts +148 -0
- package/src/geo/geo-sync.schema.ts +116 -0
- package/src/geo/geo.constant.ts +78 -0
- package/src/geo/state-filter.schema.ts +57 -0
- package/src/geo/state.schema.ts +101 -0
- package/src/group/group-filter.schema.ts +81 -0
- package/src/group/group.constant.ts +15 -0
- package/src/index.ts +35 -0
- package/src/job/job-filter.schema.ts +266 -0
- package/src/language/language-filter.schema.ts +40 -0
- package/src/marketing/marketing.constant.ts +105 -30
- package/src/marketing/marketing.schema.ts +118 -403
- package/src/page/page-filter.schema.ts +67 -0
- package/src/skill/skill-filter.schema.ts +61 -0
- package/src/user/push-subscription.schema.ts +97 -0
- package/src/user/user-filter.schema.ts +438 -0
- package/src/user/user-interest.schema.ts +34 -2
- package/src/user/user.constant.ts +20 -8
- package/src/user/user.schema.ts +45 -0
- package/src/user/user.types.ts +35 -0
package/CLAUDE.md
CHANGED
|
@@ -76,6 +76,23 @@ keys, its `.default()`, and that union.
|
|
|
76
76
|
|
|
77
77
|
Full picture: `thejob-notification-service/NOTIFICATIONS.md`.
|
|
78
78
|
|
|
79
|
+
## Billing money is in MINOR units
|
|
80
|
+
|
|
81
|
+
`src/billing/` is the one module where an amount is **not** what the rest of this
|
|
82
|
+
package means by an amount. Salary fields (`salaryRange.min`, `minSalary`) are
|
|
83
|
+
bare integers in the currency's **major** unit. Paddle works in **minor** units,
|
|
84
|
+
so `MoneySchema.amountMinor` is cents: `999` is $9.99.
|
|
85
|
+
|
|
86
|
+
The field is named `amountMinor` rather than `amount` precisely so it cannot be
|
|
87
|
+
copied next to a `currency` field and read like the salary pair. Do not "tidy" it
|
|
88
|
+
to `amount`, and do not convert on ingest — we store what Paddle sent.
|
|
89
|
+
|
|
90
|
+
Two other things in that module are deliberate: Paddle status enums keep their
|
|
91
|
+
underscores (`past_due`) because those are wire values compared as literals, and
|
|
92
|
+
`FeatureKey` is informational only. Never constrain a stored field with
|
|
93
|
+
`.oneOf(SupportedFeatureKeys)` — feature keys are data owned by billing-service,
|
|
94
|
+
and validating them here would make every new paywall a release of this package.
|
|
95
|
+
|
|
79
96
|
## Conventions
|
|
80
97
|
|
|
81
98
|
- One module per domain (`user/`, `job/`, `group/`, …), each exporting its schema and
|