@getenginex/sdk-igaming 0.7.0 → 0.8.1
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 +22 -0
- package/dist/index.cjs +342 -396
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +124 -101
- package/dist/index.d.ts +124 -101
- package/dist/index.js +342 -397
- package/dist/index.js.map +1 -1
- package/dist/query/index.cjs +0 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -5
- package/dist/query/index.d.ts +3 -5
- package/dist/query/index.js +0 -1
- package/dist/query/index.js.map +1 -1
- package/dist/testing/index.cjs +35 -66
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +3 -4
- package/dist/testing/index.d.ts +3 -4
- package/dist/testing/index.js +36 -67
- package/dist/testing/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @getenginex/sdk-igaming
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f82da4c: Smaller browser bundles under Turbopack before Next 16.4. The packages imported Zod as `import { z } from 'zod/mini'`, a namespace that Zod re-exports by name; Next 16.3's Turbopack does not tree-shake through it and bundled all of Zod (every locale, the JSON Schema generator, `compile`). They now use `import * as z from 'zod/mini'`, which every bundler tree-shakes. In a Next 16.3.1 app, the browser chunk with the core client goes from 124.8 kB to 60.2 kB gzip. No API change; the esbuild bundles that size-limit measures and Next 16.4 builds are unchanged.
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- f1f6b32: `referrals` follows the gateway's current contract (`GET /referrals` and `GET /referrals/history`).
|
|
14
|
+
|
|
15
|
+
**Breaking changes (code changes needed when upgrading):**
|
|
16
|
+
|
|
17
|
+
- `referrals.register` was removed, with `RegisterReferralInput`, `RegisteredReferral` and the `referrals.register` mutation of `createIgamingMutations`: the gateway no longer has `POST /referrals/register`. The code is only entered at sign-up, with the core's `auth.register({ referralCode })`.
|
|
18
|
+
- `referrals.get()` returns `ReferralInfo` `{ enabled, code, rules, totals }`. Gone: `link` (build the invitation link in the app), `totalReferrals`, `completedReferrals`, `pendingReferrals`, `totalEarned`, `bonusPerReferral` and `minDeposit`. `rules` (`ReferralRules`: `reward`, `minimumRealNetLoss`, `refereeWindowDays`, `holdHours`, `wageringMultiplier`, `maximumConversion`) is `null` without an active campaign; `totals` (`ReferralTotals`) counts the referrals per status.
|
|
19
|
+
- `referrals.listHistory()` items are `Referral` `{ id, refereeName, status, createdAt, deadlineAt, progress }`. Gone: `refereeEmailMasked` (the gateway no longer sends the email; `refereeName` arrives already masked by the bonus service), `code`, `referrerBonus`, `refereeBonus`, `completedAt` and `expiresAt`. The page has `code` (the player's referral code) instead of `completedCount` and `totalEarned`.
|
|
20
|
+
- `ReferralStatus` has the bonus service's values: `registered`, `deposited`, `in_hold`, `paid`, `not_eligible`, `expired`, `cancelled` (open union). It is read from `player_status`; against an older gateway that only sends the legacy `status`, `COMPLETED` becomes `paid`, `EXPIRED` `expired` and anything else `registered`.
|
|
21
|
+
- Money is `ReferralMoney` `{ amount, currency }` in minor units, read from the gateway's `{ minor_units, currency }` (integer as text, strict even in `'warn'`), instead of a major-unit float without a currency.
|
|
22
|
+
|
|
23
|
+
**New:** `ReferralProgress` `{ depositDone, realNetLoss, target, remaining }` on each referral (`remaining` computed as `max(0, target - realNetLoss)` when the gateway leaves it out). The `/testing` mock answers the new shapes (an active campaign and three referrals: `paid`, `deposited`, `expired`) and no longer answers `POST /referrals/register`. Docs: the Referrals page and an "iGaming 0.7 to 0.8" section in Upgrading (EN/PT/ES).
|
|
24
|
+
|
|
3
25
|
## 0.7.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|