@getenginex/sdk-igaming 0.8.1 → 0.9.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/CHANGELOG.md +6 -0
- package/dist/index.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -7
- package/dist/index.d.ts +17 -7
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/testing/index.cjs +3 -1
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.js +3 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @getenginex/sdk-igaming
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 019c9cf: Bonus campaigns now model `wageringPolicy.multiplier.maximumConversion` (field 13 of `campaign.proto`, the bonus "maximum withdrawal") in offers and in the participation snapshot returned by every read and by `optIn`, `claim` and `redeemPromoCode`. `loyalty.get()` accepts `tier_benefits_json` as a JSON array too: `tierBenefits` is now `LoyaltyTierBenefits | null` (an object or an array), where a list used to become `null`.
|
|
8
|
+
|
|
3
9
|
## 0.8.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -204,7 +204,8 @@ var wageringPolicy = () => extension.wire({
|
|
|
204
204
|
),
|
|
205
205
|
deadline: z2__namespace.optional(validity()),
|
|
206
206
|
rounding: rounding(),
|
|
207
|
-
sportsbook_contribution_odds: z2__namespace.optional(oddsPolicy())
|
|
207
|
+
sportsbook_contribution_odds: z2__namespace.optional(oddsPolicy()),
|
|
208
|
+
maximum_conversion: z2__namespace.optional(money())
|
|
208
209
|
})
|
|
209
210
|
)
|
|
210
211
|
});
|
|
@@ -715,6 +716,12 @@ function nullableList(item) {
|
|
|
715
716
|
}
|
|
716
717
|
|
|
717
718
|
// src/modules/loyalty.ts
|
|
719
|
+
var ParsedBenefits = class {
|
|
720
|
+
constructor(value) {
|
|
721
|
+
this.value = value;
|
|
722
|
+
}
|
|
723
|
+
value;
|
|
724
|
+
};
|
|
718
725
|
var tierBenefits = () => z2__namespace.pipe(
|
|
719
726
|
z2__namespace.nullish(z2__namespace.string()),
|
|
720
727
|
z2__namespace.transform((text2, ctx) => {
|
|
@@ -725,9 +732,12 @@ var tierBenefits = () => z2__namespace.pipe(
|
|
|
725
732
|
} catch {
|
|
726
733
|
parsed = void 0;
|
|
727
734
|
}
|
|
728
|
-
if (typeof parsed === "object" && parsed !== null
|
|
729
|
-
|
|
730
|
-
|
|
735
|
+
if (typeof parsed === "object" && parsed !== null) return new ParsedBenefits(parsed);
|
|
736
|
+
ctx.issues.push({
|
|
737
|
+
code: "custom",
|
|
738
|
+
message: "tier_benefits_json is not a JSON object or array",
|
|
739
|
+
input: void 0
|
|
740
|
+
});
|
|
731
741
|
return z2__namespace.NEVER;
|
|
732
742
|
})
|
|
733
743
|
);
|
|
@@ -745,7 +755,7 @@ var loyaltySchema = /* @__PURE__ */ extension.lazy(
|
|
|
745
755
|
tier_expires_at: optionalTimestamp()
|
|
746
756
|
}),
|
|
747
757
|
z2__namespace.transform(({ tierBenefitsJson, ...rest }) => {
|
|
748
|
-
const benefits =
|
|
758
|
+
const benefits = tierBenefitsJson instanceof ParsedBenefits ? tierBenefitsJson.value : null;
|
|
749
759
|
return { ...rest, tierBenefits: benefits };
|
|
750
760
|
})
|
|
751
761
|
)
|