@getenginex/sdk-igaming 0.9.0 → 0.10.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/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var sdk = require('@getenginex/sdk');
4
4
  var extension = require('@getenginex/sdk/extension');
5
- var z2 = require('zod/mini');
5
+ var z4 = require('zod/mini');
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,13 +23,48 @@ function _interopNamespace(e) {
23
23
  }
24
24
 
25
25
  var extension__namespace = /*#__PURE__*/_interopNamespace(extension);
26
- var z2__namespace = /*#__PURE__*/_interopNamespace(z2);
26
+ var z4__namespace = /*#__PURE__*/_interopNamespace(z4);
27
27
 
28
28
  // src/client.ts
29
+
30
+ // src/internal/input.ts
31
+ function rejectInput(transport, message, route) {
32
+ return Promise.reject(
33
+ transport.reportError({ code: "CONFIGURATION_ERROR", message, status: 0 }, { ...route, attempt: 0 })
34
+ );
35
+ }
36
+ function pageInputProblem(name, input) {
37
+ if (input === void 0) return void 0;
38
+ if (typeof input !== "object" || input === null || Array.isArray(input)) return `${name}: input must be an object.`;
39
+ const { page, perPage } = input;
40
+ if (page !== void 0 && (typeof page !== "number" || !Number.isSafeInteger(page) || page < 1))
41
+ return `${name}: page must be an integer \u2265 1.`;
42
+ if (perPage !== void 0 && (typeof perPage !== "number" || !Number.isInteger(perPage) || perPage < 1 || perPage > 100))
43
+ return `${name}: perPage must be an integer from 1 to 100.`;
44
+ return void 0;
45
+ }
46
+ function optionalTimestamp() {
47
+ return z4__namespace.pipe(
48
+ z4__namespace.nullish(z4__namespace.string().check(z4__namespace.refine((value) => value === "" || !Number.isNaN(Date.parse(value)), "invalid date"))),
49
+ z4__namespace.transform((value) => value == null || value === "" || Date.parse(value) === 0 ? null : value)
50
+ );
51
+ }
52
+ function optionalText() {
53
+ return z4__namespace.pipe(
54
+ z4__namespace.nullish(z4__namespace.string()),
55
+ z4__namespace.transform((value) => value == null || value === "" ? null : value)
56
+ );
57
+ }
58
+ function nullableList(item) {
59
+ return z4__namespace.pipe(
60
+ z4__namespace.nullish(z4__namespace.array(item)),
61
+ z4__namespace.transform((value) => value ?? [])
62
+ );
63
+ }
29
64
  function protoEnum(prefix) {
30
- return z2__namespace.pipe(
31
- z2__namespace.optional(z2__namespace.union([z2__namespace.string(), z2__namespace.number()])),
32
- z2__namespace.transform((value) => {
65
+ return z4__namespace.pipe(
66
+ z4__namespace.optional(z4__namespace.union([z4__namespace.string(), z4__namespace.number()])),
67
+ z4__namespace.transform((value) => {
33
68
  if (value === void 0 || value === 0) return "unspecified";
34
69
  if (typeof value === "number") return String(value);
35
70
  return (value.startsWith(prefix) ? value.slice(prefix.length) : value).toLowerCase();
@@ -42,177 +77,292 @@ function minorUnits() {
42
77
  function currencyOrEmpty() {
43
78
  return extension.currencyCode({ allowEmpty: true });
44
79
  }
80
+ var NON_NEGATIVE_MONEY = "Expected money in minor units: a non-negative integer within the safe range of number";
81
+ function nonNegativeMinorUnits() {
82
+ return z4__namespace.pipe(
83
+ extension.strictValue(
84
+ (v) => typeof v === "number" && Number.isSafeInteger(v) && v >= 0 || typeof v === "string" && /^\d+$/.test(v) && Number.isSafeInteger(Number(v)),
85
+ NON_NEGATIVE_MONEY
86
+ ),
87
+ // `|| 0`: a JSON `-0` comes out as `0`.
88
+ z4__namespace.transform((v) => Number(v) || 0)
89
+ );
90
+ }
45
91
  var INTEGER_TEXT = "Expected an integer within the safe range of number";
46
92
  function integerText() {
47
- return z2__namespace.pipe(
48
- z2__namespace.union([
49
- z2__namespace.string().check(
50
- z2__namespace.refine((value) => /^-?\d+$/.test(value) && Number.isSafeInteger(Number(value)), { message: INTEGER_TEXT })
93
+ return z4__namespace.pipe(
94
+ z4__namespace.union([
95
+ z4__namespace.string().check(
96
+ z4__namespace.refine((value) => /^-?\d+$/.test(value) && Number.isSafeInteger(Number(value)), { message: INTEGER_TEXT })
51
97
  ),
52
- z2__namespace.number().check(z2__namespace.refine((value) => Number.isSafeInteger(value), { message: INTEGER_TEXT }))
98
+ z4__namespace.number().check(z4__namespace.refine((value) => Number.isSafeInteger(value), { message: INTEGER_TEXT }))
53
99
  ]),
54
- z2__namespace.transform(Number)
100
+ z4__namespace.transform(Number)
55
101
  );
56
102
  }
57
103
  function text() {
58
- return z2__namespace._default(z2__namespace.string(), "");
104
+ return z4__namespace._default(z4__namespace.string(), "");
59
105
  }
60
106
  function count() {
61
- return z2__namespace._default(z2__namespace.number(), 0);
107
+ return z4__namespace._default(z4__namespace.number(), 0);
62
108
  }
63
109
  function list(item) {
64
- return z2__namespace._default(z2__namespace.array(item), []);
110
+ return z4__namespace._default(z4__namespace.array(item), []);
65
111
  }
66
112
  function durationSeconds() {
67
- return z2__namespace.pipe(
68
- z2__namespace.string().check(z2__namespace.regex(/^-?\d+(\.\d+)?s$/, { message: 'Expected a protobuf duration, e.g. "86400s"' })),
69
- z2__namespace.transform((value) => Number(value.slice(0, -1)))
113
+ return z4__namespace.pipe(
114
+ z4__namespace.string().check(z4__namespace.regex(/^-?\d+(\.\d+)?s$/, { message: 'Expected a protobuf duration, e.g. "86400s"' })),
115
+ z4__namespace.transform((value) => Number(value.slice(0, -1)))
70
116
  );
71
117
  }
72
118
 
73
- // src/modules/bonus.ts
74
- var campaignCurrency = () => z2__namespace._default(currencyOrEmpty(), "");
75
- var money = () => extension.wire({ amount: z2__namespace._default(minorUnits(), 0), currency: campaignCurrency() });
76
- var timeWindow = () => extension.wire({ starts_at: z2__namespace.optional(z2__namespace.string()), ends_at: z2__namespace.optional(z2__namespace.string()) });
77
- var ratio = () => extension.wire({ decimal: z2__namespace.optional(z2__namespace.string()), basis_points: z2__namespace.optional(z2__namespace.number()), maximum_scale: count() });
119
+ // src/modules/bets.ts
120
+ var betFields = () => ({
121
+ id: z4__namespace.string(),
122
+ status: protoEnum("BET_STATUS_"),
123
+ stake: nonNegativeMinorUnits(),
124
+ potential_return: nonNegativeMinorUnits(),
125
+ total_odds: z4__namespace.number(),
126
+ created_at: optionalTimestamp()
127
+ });
128
+ var betSchema = /* @__PURE__ */ extension.lazy(() => extension.wire(betFields()));
129
+ var betDetailsSchema = /* @__PURE__ */ extension.lazy(
130
+ () => extension.wire({
131
+ ...betFields(),
132
+ selections: nullableList(
133
+ extension.wire({
134
+ event_name: z4__namespace.string(),
135
+ market_name: z4__namespace.string(),
136
+ selection_name: z4__namespace.string(),
137
+ odds: z4__namespace.number(),
138
+ result: protoEnum("SELECTION_RESULT_")
139
+ })
140
+ )
141
+ })
142
+ );
143
+ var offerSchema = /* @__PURE__ */ extension.lazy(
144
+ () => extension.wire({
145
+ bet_id: z4__namespace.string(),
146
+ available: z4__namespace.boolean(),
147
+ cashout_amount: nonNegativeMinorUnits(),
148
+ expires_at: optionalTimestamp()
149
+ })
150
+ );
151
+ var cashoutSchema = /* @__PURE__ */ extension.lazy(
152
+ () => extension.wire({ bet_id: z4__namespace.string(), cashout_amount: nonNegativeMinorUnits(), status: z4__namespace.string() })
153
+ );
154
+ var LIST_ROUTE = { method: "GET", path: "/bets" };
155
+ var GET_ROUTE = { method: "GET", path: "/bets/{betId}" };
156
+ var OFFER_ROUTE = { method: "GET", path: "/bets/{betId}/cashout" };
157
+ var CASHOUT_ROUTE = { method: "POST", path: "/bets/{betId}/cashout" };
158
+ var MAX_IDEMPOTENCY_KEY = 255;
159
+ function betIdProblem(name, input) {
160
+ if (typeof input !== "object" || input === null || Array.isArray(input)) return `${name}: input must be { betId }.`;
161
+ const { betId } = input;
162
+ return typeof betId === "string" && betId.trim() !== "" ? void 0 : `${name}: betId must be non-empty text.`;
163
+ }
164
+ function idempotencyKeyProblem(options) {
165
+ const key = options?.idempotencyKey;
166
+ if (key === void 0 || key === "") return void 0;
167
+ if (typeof key !== "string" || key !== key.trim() || key.length > MAX_IDEMPOTENCY_KEY)
168
+ return `bets.cashout: idempotencyKey must be text without surrounding spaces, up to ${MAX_IDEMPOTENCY_KEY} characters.`;
169
+ return void 0;
170
+ }
171
+ var betPath = (betId, suffix = "") => `/bets/${encodeURIComponent(betId)}${suffix}`;
172
+ function createBetsApi(transport) {
173
+ return {
174
+ list: (input, options) => {
175
+ const problem = pageInputProblem("bets.list", input);
176
+ if (problem !== void 0) return rejectInput(transport, problem, LIST_ROUTE);
177
+ return transport.requestPage({
178
+ ...LIST_ROUTE,
179
+ page: input?.page,
180
+ perPage: input?.perPage,
181
+ perPageParam: "limit",
182
+ auth: "required",
183
+ item: betSchema(),
184
+ options
185
+ });
186
+ },
187
+ get: (input, options) => {
188
+ const problem = betIdProblem("bets.get", input);
189
+ if (problem !== void 0) return rejectInput(transport, problem, GET_ROUTE);
190
+ return transport.request({
191
+ method: "GET",
192
+ path: betPath(input.betId),
193
+ auth: "required",
194
+ schema: betDetailsSchema(),
195
+ options
196
+ });
197
+ },
198
+ getCashoutOffer: (input, options) => {
199
+ const problem = betIdProblem("bets.getCashoutOffer", input);
200
+ if (problem !== void 0) return rejectInput(transport, problem, OFFER_ROUTE);
201
+ return transport.request({
202
+ method: "GET",
203
+ path: betPath(input.betId, "/cashout"),
204
+ auth: "required",
205
+ schema: offerSchema(),
206
+ options
207
+ });
208
+ },
209
+ cashout: (input, options) => {
210
+ const problem = betIdProblem("bets.cashout", input) ?? idempotencyKeyProblem(options);
211
+ if (problem !== void 0) return rejectInput(transport, problem, CASHOUT_ROUTE);
212
+ return transport.request({
213
+ method: "POST",
214
+ path: betPath(input.betId, "/cashout"),
215
+ auth: "required",
216
+ // No body: the gateway's idempotency middleware fingerprints the (empty) body, so a replay always matches.
217
+ idempotent: true,
218
+ schema: cashoutSchema(),
219
+ options
220
+ });
221
+ }
222
+ };
223
+ }
224
+ var campaignCurrency = () => z4__namespace._default(currencyOrEmpty(), "");
225
+ var money = () => extension.wire({ amount: z4__namespace._default(minorUnits(), 0), currency: campaignCurrency() });
226
+ var timeWindow = () => extension.wire({ starts_at: z4__namespace.optional(z4__namespace.string()), ends_at: z4__namespace.optional(z4__namespace.string()) });
227
+ var ratio = () => extension.wire({ decimal: z4__namespace.optional(z4__namespace.string()), basis_points: z4__namespace.optional(z4__namespace.number()), maximum_scale: count() });
78
228
  var empty = () => extension.wire({});
79
229
  var policy = (prefix) => extension.wire({ code: protoEnum(prefix), version: count() });
80
230
  var casinoSelector = () => extension.wire({
81
231
  provider_instance_id: text(),
82
- software_ids: list(z2__namespace.string()),
83
- game_ids: list(z2__namespace.string()),
84
- category_codes: list(z2__namespace.string())
232
+ software_ids: list(z4__namespace.string()),
233
+ game_ids: list(z4__namespace.string()),
234
+ category_codes: list(z4__namespace.string())
85
235
  });
86
236
  var sportsSelector = () => extension.wire({
87
- sport_codes: list(z2__namespace.string()),
88
- competition_ids: list(z2__namespace.string()),
89
- event_ids: list(z2__namespace.string()),
90
- market_codes: list(z2__namespace.string()),
91
- live: z2__namespace.optional(z2__namespace.boolean()),
237
+ sport_codes: list(z4__namespace.string()),
238
+ competition_ids: list(z4__namespace.string()),
239
+ event_ids: list(z4__namespace.string()),
240
+ market_codes: list(z4__namespace.string()),
241
+ live: z4__namespace.optional(z4__namespace.boolean()),
92
242
  bet_types: list(protoEnum("SPORTS_BET_TYPE_"))
93
243
  });
94
244
  var qualification = () => extension.wire({
95
245
  version: count(),
96
- immediate: z2__namespace.optional(empty()),
97
- user_event: z2__namespace.optional(
246
+ immediate: z4__namespace.optional(empty()),
247
+ user_event: z4__namespace.optional(
98
248
  extension.wire({
99
249
  event_code: text(),
100
250
  event_version: count(),
101
251
  source_authority: text(),
102
- identity_fields: list(z2__namespace.string())
252
+ identity_fields: list(z4__namespace.string())
103
253
  })
104
254
  ),
105
- deposit_settled: z2__namespace.optional(
255
+ deposit_settled: z4__namespace.optional(
106
256
  extension.wire({
107
257
  currency: campaignCurrency(),
108
- eligible_method_codes: list(z2__namespace.string()),
258
+ eligible_method_codes: list(z4__namespace.string()),
109
259
  first_deposit_policy: protoEnum("FIRST_DEPOSIT_POLICY_"),
110
- minimum_settled_net_amount: z2__namespace.optional(money()),
111
- maximum_settled_net_amount: z2__namespace.optional(money()),
260
+ minimum_settled_net_amount: z4__namespace.optional(money()),
261
+ maximum_settled_net_amount: z4__namespace.optional(money()),
112
262
  amount_basis: protoEnum("DEPOSIT_AMOUNT_BASIS_")
113
263
  })
114
264
  ),
115
- activity_aggregate: z2__namespace.optional(
265
+ activity_aggregate: z4__namespace.optional(
116
266
  extension.wire({
117
267
  basis: protoEnum("BASIS_"),
118
268
  product_scope: protoEnum("PRODUCT_SCOPE_"),
119
269
  currency: campaignCurrency(),
120
- window: z2__namespace.optional(durationSeconds()),
270
+ window: z4__namespace.optional(durationSeconds()),
121
271
  timezone: text(),
122
- late_event_grace: z2__namespace.optional(durationSeconds()),
123
- casino: z2__namespace.optional(casinoSelector()),
124
- sportsbook: z2__namespace.optional(sportsSelector())
272
+ late_event_grace: z4__namespace.optional(durationSeconds()),
273
+ casino: z4__namespace.optional(casinoSelector()),
274
+ sportsbook: z4__namespace.optional(sportsSelector())
125
275
  })
126
276
  )
127
277
  });
128
278
  var validity = () => extension.wire({
129
- no_expiry: z2__namespace.optional(empty()),
130
- absolute_expiry: z2__namespace.optional(extension.wire({ expires_at: z2__namespace.optional(z2__namespace.string()) })),
131
- duration_from_grant: z2__namespace.optional(extension.wire({ duration: z2__namespace.optional(durationSeconds()) }))
279
+ no_expiry: z4__namespace.optional(empty()),
280
+ absolute_expiry: z4__namespace.optional(extension.wire({ expires_at: z4__namespace.optional(z4__namespace.string()) })),
281
+ duration_from_grant: z4__namespace.optional(extension.wire({ duration: z4__namespace.optional(durationSeconds()) }))
132
282
  });
133
283
  var rounding = () => protoEnum("ROUNDING_MODE_");
134
284
  var proceedsClass = () => protoEnum("PROCEEDS_CLASS_");
135
285
  var percent = () => extension.wire({
136
- percentage: z2__namespace.optional(ratio()),
286
+ percentage: z4__namespace.optional(ratio()),
137
287
  rounding: rounding(),
138
- minimum_reward: z2__namespace.optional(money()),
139
- maximum_reward: z2__namespace.optional(money())
288
+ minimum_reward: z4__namespace.optional(money()),
289
+ maximum_reward: z4__namespace.optional(money())
140
290
  });
141
291
  var balanceCredit = () => extension.wire({
142
- fixed_amount: z2__namespace.optional(extension.wire({ amount: z2__namespace.optional(money()) })),
143
- percent_of_source_amount: z2__namespace.optional(percent()),
144
- aggregate_rebate: z2__namespace.optional(
292
+ fixed_amount: z4__namespace.optional(extension.wire({ amount: z4__namespace.optional(money()) })),
293
+ percent_of_source_amount: z4__namespace.optional(percent()),
294
+ aggregate_rebate: z4__namespace.optional(
145
295
  extension.wire({
146
- percentage: z2__namespace.optional(ratio()),
296
+ percentage: z4__namespace.optional(ratio()),
147
297
  rounding: rounding(),
148
- minimum_basis: z2__namespace.optional(money()),
149
- maximum_reward: z2__namespace.optional(money())
298
+ minimum_basis: z4__namespace.optional(money()),
299
+ maximum_reward: z4__namespace.optional(money())
150
300
  })
151
301
  ),
152
302
  balance_class: protoEnum("BALANCE_CLASS_"),
153
303
  proceeds_class: proceedsClass(),
154
- validity: z2__namespace.optional(validity())
304
+ validity: z4__namespace.optional(validity())
155
305
  });
156
- var maximumBet = () => extension.wire({ mode: protoEnum("MAXIMUM_BET_MODE_"), campaign_maximum: z2__namespace.optional(money()) });
306
+ var maximumBet = () => extension.wire({ mode: protoEnum("MAXIMUM_BET_MODE_"), campaign_maximum: z4__namespace.optional(money()) });
157
307
  var oddsPolicy = () => extension.wire({
158
308
  mode: protoEnum("MODE_"),
159
- minimum_total_odds_decimal: z2__namespace.optional(z2__namespace.string()),
160
- minimum_odds_per_leg_decimal: z2__namespace.optional(z2__namespace.string()),
161
- minimum_legs: z2__namespace.optional(z2__namespace.number()),
162
- maximum_legs: z2__namespace.optional(z2__namespace.number())
309
+ minimum_total_odds_decimal: z4__namespace.optional(z4__namespace.string()),
310
+ minimum_odds_per_leg_decimal: z4__namespace.optional(z4__namespace.string()),
311
+ minimum_legs: z4__namespace.optional(z4__namespace.number()),
312
+ maximum_legs: z4__namespace.optional(z4__namespace.number())
163
313
  });
164
314
  var cashoutMode = () => protoEnum("RESTRICTED_CASHOUT_MODE_");
165
315
  var usePolicy = () => extension.wire({
166
316
  version: count(),
167
- funds_consumption: z2__namespace.optional(policy("FUNDS_CONSUMPTION_POLICY_CODE_")),
168
- casino: z2__namespace.optional(extension.wire({ allowed_scopes: list(casinoSelector()), maximum_bet: z2__namespace.optional(maximumBet()) })),
169
- sportsbook: z2__namespace.optional(
317
+ funds_consumption: z4__namespace.optional(policy("FUNDS_CONSUMPTION_POLICY_CODE_")),
318
+ casino: z4__namespace.optional(extension.wire({ allowed_scopes: list(casinoSelector()), maximum_bet: z4__namespace.optional(maximumBet()) })),
319
+ sportsbook: z4__namespace.optional(
170
320
  extension.wire({
171
321
  allowed_scopes: list(sportsSelector()),
172
322
  excluded_scopes: list(sportsSelector()),
173
- maximum_bet: z2__namespace.optional(maximumBet()),
174
- funding_odds: z2__namespace.optional(oddsPolicy()),
323
+ maximum_bet: z4__namespace.optional(maximumBet()),
324
+ funding_odds: z4__namespace.optional(oddsPolicy()),
175
325
  cashout_mode: cashoutMode()
176
326
  })
177
327
  ),
178
- casino_and_sportsbook: z2__namespace.optional(
328
+ casino_and_sportsbook: z4__namespace.optional(
179
329
  extension.wire({
180
330
  allowed_casino_scopes: list(casinoSelector()),
181
331
  allowed_sportsbook_scopes: list(sportsSelector()),
182
332
  excluded_sportsbook_scopes: list(sportsSelector()),
183
- maximum_casino_bet: z2__namespace.optional(maximumBet()),
184
- maximum_sportsbook_bet: z2__namespace.optional(maximumBet()),
185
- sportsbook_funding_odds: z2__namespace.optional(oddsPolicy()),
333
+ maximum_casino_bet: z4__namespace.optional(maximumBet()),
334
+ maximum_sportsbook_bet: z4__namespace.optional(maximumBet()),
335
+ sportsbook_funding_odds: z4__namespace.optional(oddsPolicy()),
186
336
  sportsbook_cashout_mode: cashoutMode()
187
337
  })
188
338
  ),
189
- payout_allocation: z2__namespace.optional(policy("PAYOUT_ALLOCATION_POLICY_CODE_"))
339
+ payout_allocation: z4__namespace.optional(policy("PAYOUT_ALLOCATION_POLICY_CODE_"))
190
340
  });
191
341
  var wageringPolicy = () => extension.wire({
192
342
  version: count(),
193
- none: z2__namespace.optional(empty()),
194
- multiplier: z2__namespace.optional(
343
+ none: z4__namespace.optional(empty()),
344
+ multiplier: z4__namespace.optional(
195
345
  extension.wire({
196
346
  requirement_basis: protoEnum("REQUIREMENT_BASIS_"),
197
- multiplier: z2__namespace.optional(ratio()),
347
+ multiplier: z4__namespace.optional(ratio()),
198
348
  contribution_rates: list(
199
349
  extension.wire({
200
- casino: z2__namespace.optional(casinoSelector()),
201
- sportsbook: z2__namespace.optional(sportsSelector()),
202
- rate: z2__namespace.optional(ratio())
350
+ casino: z4__namespace.optional(casinoSelector()),
351
+ sportsbook: z4__namespace.optional(sportsSelector()),
352
+ rate: z4__namespace.optional(ratio())
203
353
  })
204
354
  ),
205
- deadline: z2__namespace.optional(validity()),
355
+ deadline: z4__namespace.optional(validity()),
206
356
  rounding: rounding(),
207
- sportsbook_contribution_odds: z2__namespace.optional(oddsPolicy()),
208
- maximum_conversion: z2__namespace.optional(money())
357
+ sportsbook_contribution_odds: z4__namespace.optional(oddsPolicy()),
358
+ maximum_conversion: z4__namespace.optional(money())
209
359
  })
210
360
  )
211
361
  });
212
362
  var stackingPolicy = () => extension.wire({
213
363
  version: count(),
214
- exclusive_in_group: z2__namespace.optional(extension.wire({ stacking_group_key: text() })),
215
- multiple_in_group: z2__namespace.optional(extension.wire({ stacking_group_key: text(), maximum_active_per_player: count() }))
364
+ exclusive_in_group: z4__namespace.optional(extension.wire({ stacking_group_key: text() })),
365
+ multiple_in_group: z4__namespace.optional(extension.wire({ stacking_group_key: text(), maximum_active_per_player: count() }))
216
366
  });
217
367
  var reward = () => extension.wire({
218
368
  reward_key: text(),
@@ -220,83 +370,83 @@ var reward = () => extension.wire({
220
370
  reward_kind_version: count(),
221
371
  execution_profile_code: protoEnum("EXECUTION_PROFILE_CODE_"),
222
372
  execution_profile_version: count(),
223
- balance_credit: z2__namespace.optional(balanceCredit()),
224
- provider_managed_balance: z2__namespace.optional(extension.wire({ provider_code: text() })),
225
- casino_free_spins: z2__namespace.optional(
373
+ balance_credit: z4__namespace.optional(balanceCredit()),
374
+ provider_managed_balance: z4__namespace.optional(extension.wire({ provider_code: text() })),
375
+ casino_free_spins: z4__namespace.optional(
226
376
  extension.wire({
227
377
  provider_code: text(),
228
- casino_scope: z2__namespace.optional(casinoSelector()),
378
+ casino_scope: z4__namespace.optional(casinoSelector()),
229
379
  quantity: count(),
230
- denomination: z2__namespace.optional(money()),
380
+ denomination: z4__namespace.optional(money()),
231
381
  currency: campaignCurrency(),
232
- grant_window: z2__namespace.optional(timeWindow()),
382
+ grant_window: z4__namespace.optional(timeWindow()),
233
383
  proceeds_class: proceedsClass(),
234
- maximum_winnings: z2__namespace.optional(money())
384
+ maximum_winnings: z4__namespace.optional(money())
235
385
  })
236
386
  ),
237
- sports_bonus_bet: z2__namespace.optional(
387
+ sports_bonus_bet: z4__namespace.optional(
238
388
  extension.wire({
239
389
  provider_code: text(),
240
- sportsbook_scope: z2__namespace.optional(sportsSelector()),
241
- amount: z2__namespace.optional(money()),
390
+ sportsbook_scope: z4__namespace.optional(sportsSelector()),
391
+ amount: z4__namespace.optional(money()),
242
392
  quantity: count(),
243
- validity: z2__namespace.optional(validity())
393
+ validity: z4__namespace.optional(validity())
244
394
  })
245
395
  ),
246
- sports_bet_coverage: z2__namespace.optional(
396
+ sports_bet_coverage: z4__namespace.optional(
247
397
  extension.wire({
248
398
  provider_code: text(),
249
- qualifying_bet_scope: z2__namespace.optional(sportsSelector()),
250
- coverage_cap: z2__namespace.optional(money()),
251
- validity: z2__namespace.optional(validity())
399
+ qualifying_bet_scope: z4__namespace.optional(sportsSelector()),
400
+ coverage_cap: z4__namespace.optional(money()),
401
+ validity: z4__namespace.optional(validity())
252
402
  })
253
403
  ),
254
- use_policy: z2__namespace.optional(usePolicy()),
255
- wagering_policy: z2__namespace.optional(wageringPolicy()),
256
- stacking_policy: z2__namespace.optional(stackingPolicy()),
257
- restricted_position_selection_policy: z2__namespace.optional(
404
+ use_policy: z4__namespace.optional(usePolicy()),
405
+ wagering_policy: z4__namespace.optional(wageringPolicy()),
406
+ stacking_policy: z4__namespace.optional(stackingPolicy()),
407
+ restricted_position_selection_policy: z4__namespace.optional(
258
408
  extension.wire({
259
409
  version: count(),
260
- priority_then_earliest_expiry: z2__namespace.optional(extension.wire({ selection_priority: z2__namespace.optional(z2__namespace.number()) }))
410
+ priority_then_earliest_expiry: z4__namespace.optional(extension.wire({ selection_priority: z4__namespace.optional(z4__namespace.number()) }))
261
411
  })
262
412
  )
263
413
  });
264
414
  var localizedContent = () => extension.wire({ locale: text(), display_name: text(), description: text(), terms: text(), terms_revision: text() });
265
- var content = () => extension.wire({ default_locale: text(), supported_locales: list(z2__namespace.string()), localized_content: list(localizedContent()) });
266
- var offerSchema = /* @__PURE__ */ extension.lazy(
415
+ var content = () => extension.wire({ default_locale: text(), supported_locales: list(z4__namespace.string()), localized_content: list(localizedContent()) });
416
+ var offerSchema2 = /* @__PURE__ */ extension.lazy(
267
417
  () => extension.wire({
268
418
  campaign_id: text(),
269
419
  campaign_version_id: text(),
270
420
  publication_id: text(),
271
421
  product_scope: protoEnum("PRODUCT_SCOPE_"),
272
422
  timezone: text(),
273
- enrollment_window: z2__namespace.optional(timeWindow()),
274
- qualification_window: z2__namespace.optional(timeWindow()),
275
- claim_window: z2__namespace.optional(timeWindow()),
276
- entry_policy: z2__namespace.optional(policy("ENTRY_POLICY_CODE_")),
277
- reward_claim_policy: z2__namespace.optional(policy("REWARD_CLAIM_POLICY_CODE_")),
278
- qualification: z2__namespace.optional(qualification()),
279
- reward: z2__namespace.optional(reward()),
280
- publication_starts_at: z2__namespace.optional(z2__namespace.string()),
281
- publication_ends_at: z2__namespace.optional(z2__namespace.string()),
282
- content: z2__namespace.optional(content())
423
+ enrollment_window: z4__namespace.optional(timeWindow()),
424
+ qualification_window: z4__namespace.optional(timeWindow()),
425
+ claim_window: z4__namespace.optional(timeWindow()),
426
+ entry_policy: z4__namespace.optional(policy("ENTRY_POLICY_CODE_")),
427
+ reward_claim_policy: z4__namespace.optional(policy("REWARD_CLAIM_POLICY_CODE_")),
428
+ qualification: z4__namespace.optional(qualification()),
429
+ reward: z4__namespace.optional(reward()),
430
+ publication_starts_at: z4__namespace.optional(z4__namespace.string()),
431
+ publication_ends_at: z4__namespace.optional(z4__namespace.string()),
432
+ content: z4__namespace.optional(content())
283
433
  })
284
434
  );
285
435
  function grantMoney(value, currency) {
286
436
  return { amount: value?.amount ?? 0, currency: value?.currency || currency };
287
437
  }
288
- var rewardGrant = () => z2__namespace.pipe(
438
+ var rewardGrant = () => z4__namespace.pipe(
289
439
  extension.wire({
290
440
  state: protoEnum("CAMPAIGN_PLAYER_REWARD_GRANT_STATE_"),
291
- granted: z2__namespace.optional(money()),
292
- balance: z2__namespace.optional(money()),
293
- converted: z2__namespace.optional(money()),
294
- expires_at: z2__namespace.optional(z2__namespace.string()),
295
- wagering: z2__namespace.optional(
296
- extension.wire({ required: z2__namespace.optional(money()), accumulated: z2__namespace.optional(money()), completed_at: z2__namespace.optional(z2__namespace.string()) })
441
+ granted: z4__namespace.optional(money()),
442
+ balance: z4__namespace.optional(money()),
443
+ converted: z4__namespace.optional(money()),
444
+ expires_at: z4__namespace.optional(z4__namespace.string()),
445
+ wagering: z4__namespace.optional(
446
+ extension.wire({ required: z4__namespace.optional(money()), accumulated: z4__namespace.optional(money()), completed_at: z4__namespace.optional(z4__namespace.string()) })
297
447
  )
298
448
  }),
299
- z2__namespace.transform(({ state, granted, balance, converted, expiresAt, wagering }) => {
449
+ z4__namespace.transform(({ state, granted, balance, converted, expiresAt, wagering }) => {
300
450
  const currency = [granted, balance, converted, wagering?.required, wagering?.accumulated].find((m) => m?.currency)?.currency ?? "";
301
451
  const out = {
302
452
  state,
@@ -316,40 +466,40 @@ var rewardGrant = () => z2__namespace.pipe(
316
466
  })
317
467
  );
318
468
  var participationSchema = /* @__PURE__ */ extension.lazy(
319
- () => z2__namespace.pipe(
469
+ () => z4__namespace.pipe(
320
470
  extension.wire({
321
471
  id: text(),
322
472
  campaign_id: text(),
323
473
  campaign_version_id: text(),
324
474
  reward_key: text(),
325
- qualification_snapshot: z2__namespace.optional(qualification()),
475
+ qualification_snapshot: z4__namespace.optional(qualification()),
326
476
  // oneof `state`: only one of the cases is filled in.
327
- enrolled: z2__namespace.optional(empty()),
328
- qualifying: z2__namespace.optional(empty()),
329
- qualified: z2__namespace.optional(extension.wire({ qualified_at: z2__namespace.optional(z2__namespace.string()) })),
330
- reward_pending: z2__namespace.optional(empty()),
331
- completed: z2__namespace.optional(extension.wire({ completed_at: z2__namespace.optional(z2__namespace.string()) })),
332
- reward_failed: z2__namespace.optional(empty()),
333
- expired: z2__namespace.optional(extension.wire({ expired_at: z2__namespace.optional(z2__namespace.string()) })),
334
- cancelled: z2__namespace.optional(empty()),
335
- reward_grant: z2__namespace.optional(rewardGrant()),
336
- snapshot: z2__namespace.optional(
477
+ enrolled: z4__namespace.optional(empty()),
478
+ qualifying: z4__namespace.optional(empty()),
479
+ qualified: z4__namespace.optional(extension.wire({ qualified_at: z4__namespace.optional(z4__namespace.string()) })),
480
+ reward_pending: z4__namespace.optional(empty()),
481
+ completed: z4__namespace.optional(extension.wire({ completed_at: z4__namespace.optional(z4__namespace.string()) })),
482
+ reward_failed: z4__namespace.optional(empty()),
483
+ expired: z4__namespace.optional(extension.wire({ expired_at: z4__namespace.optional(z4__namespace.string()) })),
484
+ cancelled: z4__namespace.optional(empty()),
485
+ reward_grant: z4__namespace.optional(rewardGrant()),
486
+ snapshot: z4__namespace.optional(
337
487
  extension.wire({
338
- reward: z2__namespace.optional(reward()),
339
- content: z2__namespace.optional(content()),
340
- terms_acceptance: z2__namespace.optional(
488
+ reward: z4__namespace.optional(reward()),
489
+ content: z4__namespace.optional(content()),
490
+ terms_acceptance: z4__namespace.optional(
341
491
  extension.wire({
342
492
  locale: text(),
343
493
  terms_revision: text(),
344
494
  terms_digest_sha256_hex: text(),
345
- accepted_at: z2__namespace.optional(z2__namespace.string())
495
+ accepted_at: z4__namespace.optional(z4__namespace.string())
346
496
  })
347
497
  )
348
498
  })
349
499
  )
350
500
  }),
351
501
  // The oneof becomes `status` (+ the timestamp of the case); the oneof's keys are not passed on.
352
- z2__namespace.transform(
502
+ z4__namespace.transform(
353
503
  ({ enrolled, qualifying, qualified, rewardPending, completed, rewardFailed, expired, cancelled, ...rest }) => {
354
504
  const out = { ...rest, status: "unspecified" };
355
505
  if (enrolled) out.status = "enrolled";
@@ -371,77 +521,77 @@ var participationSchema = /* @__PURE__ */ extension.lazy(
371
521
  )
372
522
  )
373
523
  );
374
- var cursorPageSchema = (key, item) => extension.wire({ [key]: list(item), next_cursor: z2__namespace.optional(z2__namespace.string()) });
375
- var offersPage = /* @__PURE__ */ extension.lazy(() => cursorPageSchema("offers", offerSchema()));
524
+ var cursorPageSchema = (key, item) => extension.wire({ [key]: list(item), next_cursor: z4__namespace.optional(z4__namespace.string()) });
525
+ var offersPage = /* @__PURE__ */ extension.lazy(() => cursorPageSchema("offers", offerSchema2()));
376
526
  var participationsPage = /* @__PURE__ */ extension.lazy(() => cursorPageSchema("participations", participationSchema()));
377
- var offerEnvelope = /* @__PURE__ */ extension.lazy(() => extension.wire({ offer: offerSchema() }));
527
+ var offerEnvelope = /* @__PURE__ */ extension.lazy(() => extension.wire({ offer: offerSchema2() }));
378
528
  var participationEnvelope = /* @__PURE__ */ extension.lazy(() => extension.wire({ participation: participationSchema() }));
379
529
  var promoCodeOfferSchema = /* @__PURE__ */ extension.lazy(
380
- () => extension.wire({ offer: offerSchema(), localized_content: localizedContent() })
530
+ () => extension.wire({ offer: offerSchema2(), localized_content: localizedContent() })
381
531
  );
382
532
  function toCursorPage(key, data) {
383
533
  const page = { items: data[key] };
384
534
  if (data.nextCursor) page.nextCursor = data.nextCursor;
385
535
  return page;
386
536
  }
387
- var nullableDate = () => z2__namespace.pipe(
388
- z2__namespace.nullish(z2__namespace.string()),
389
- z2__namespace.transform((value) => value ?? void 0)
537
+ var nullableDate = () => z4__namespace.pipe(
538
+ z4__namespace.nullish(z4__namespace.string()),
539
+ z4__namespace.transform((value) => value ?? void 0)
390
540
  );
391
541
  function compact(value) {
392
542
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0));
393
543
  }
394
544
  var overviewSchema = /* @__PURE__ */ extension.lazy(
395
- () => z2__namespace.pipe(
545
+ () => z4__namespace.pipe(
396
546
  extension.wire({
397
547
  currencies: list(
398
- z2__namespace.pipe(
548
+ z4__namespace.pipe(
399
549
  extension.wire({
400
550
  currency: currencyOrEmpty(),
401
- decimal_places: z2__namespace.number(),
551
+ decimal_places: z4__namespace.number(),
402
552
  restricted_total: minorUnits(),
403
553
  expiring_7d: minorUnits(),
404
- open_positions: z2__namespace.number(),
554
+ open_positions: z4__namespace.number(),
405
555
  next_expires_at: nullableDate(),
406
556
  converted: minorUnits(),
407
- converted_campaigns: z2__namespace.number()
557
+ converted_campaigns: z4__namespace.number()
408
558
  }),
409
- z2__namespace.transform(compact)
559
+ z4__namespace.transform(compact)
410
560
  )
411
561
  ),
412
562
  as_of: nullableDate()
413
563
  }),
414
- z2__namespace.transform(compact)
564
+ z4__namespace.transform(compact)
415
565
  )
416
566
  );
417
567
  var positionsPage = /* @__PURE__ */ extension.lazy(
418
568
  () => extension.wire({
419
569
  rows: list(
420
- z2__namespace.pipe(
570
+ z4__namespace.pipe(
421
571
  extension.wire({
422
- position_id: z2__namespace.string(),
423
- campaign_id: z2__namespace.string(),
572
+ position_id: z4__namespace.string(),
573
+ campaign_id: z4__namespace.string(),
424
574
  currency: currencyOrEmpty(),
425
- decimal_places: z2__namespace.number(),
575
+ decimal_places: z4__namespace.number(),
426
576
  granted: minorUnits(),
427
577
  restricted: minorUnits(),
428
578
  converted: minorUnits(),
429
579
  required: minorUnits(),
430
580
  wagered: minorUnits(),
431
581
  remaining: minorUnits(),
432
- state: z2__namespace.string(),
582
+ state: z4__namespace.string(),
433
583
  // The gateway answers `null` for an action it does not know; known ones are uppercase (`CONVERT`).
434
- terminal_action: z2__namespace.pipe(
435
- z2__namespace.nullish(z2__namespace.string()),
436
- z2__namespace.transform((value) => value ? value.toLowerCase() : void 0)
584
+ terminal_action: z4__namespace.pipe(
585
+ z4__namespace.nullish(z4__namespace.string()),
586
+ z4__namespace.transform((value) => value ? value.toLowerCase() : void 0)
437
587
  ),
438
588
  expires_at: nullableDate(),
439
589
  created_at: nullableDate()
440
590
  }),
441
- z2__namespace.transform((row) => compact(row))
591
+ z4__namespace.transform((row) => compact(row))
442
592
  )
443
593
  ),
444
- next_cursor: z2__namespace.optional(z2__namespace.string())
594
+ next_cursor: z4__namespace.optional(z4__namespace.string())
445
595
  })
446
596
  );
447
597
  var terms = (acceptance) => acceptance && { locale: acceptance.locale, terms_revision: acceptance.termsRevision };
@@ -535,51 +685,51 @@ function createBonusApi(transport) {
535
685
  }
536
686
  var gameSchema = /* @__PURE__ */ extension.lazy(
537
687
  () => extension.wire({
538
- id: z2__namespace.string(),
539
- name: z2__namespace.string(),
540
- provider: z2__namespace.string(),
541
- category: z2__namespace.string(),
542
- type: z2__namespace.string(),
543
- thumbnail: z2__namespace.string(),
544
- is_new: z2__namespace.boolean(),
545
- is_popular: z2__namespace.boolean(),
546
- is_live: z2__namespace.boolean(),
547
- demo_available: z2__namespace.boolean(),
548
- rtp: z2__namespace.number(),
549
- volatility: z2__namespace.string(),
550
- priority: z2__namespace.number()
688
+ id: z4__namespace.string(),
689
+ name: z4__namespace.string(),
690
+ provider: z4__namespace.string(),
691
+ category: z4__namespace.string(),
692
+ type: z4__namespace.string(),
693
+ thumbnail: z4__namespace.string(),
694
+ is_new: z4__namespace.boolean(),
695
+ is_popular: z4__namespace.boolean(),
696
+ is_live: z4__namespace.boolean(),
697
+ demo_available: z4__namespace.boolean(),
698
+ rtp: z4__namespace.number(),
699
+ volatility: z4__namespace.string(),
700
+ priority: z4__namespace.number()
551
701
  })
552
702
  );
553
703
  var categoriesSchema = /* @__PURE__ */ extension.lazy(
554
- () => z2__namespace.array(
555
- extension.wire({ slug: z2__namespace.string(), name: z2__namespace.string(), icon: z2__namespace.string(), game_count: z2__namespace.number(), priority: z2__namespace.number() })
704
+ () => z4__namespace.array(
705
+ extension.wire({ slug: z4__namespace.string(), name: z4__namespace.string(), icon: z4__namespace.string(), game_count: z4__namespace.number(), priority: z4__namespace.number() })
556
706
  )
557
707
  );
558
708
  var providersSchema = /* @__PURE__ */ extension.lazy(
559
- () => z2__namespace.array(extension.wire({ id: z2__namespace.string(), name: z2__namespace.string(), game_count: z2__namespace.number() }))
709
+ () => z4__namespace.array(extension.wire({ id: z4__namespace.string(), name: z4__namespace.string(), game_count: z4__namespace.number() }))
560
710
  );
561
711
  var launchSchema = /* @__PURE__ */ extension.lazy(
562
- () => z2__namespace.pipe(
712
+ () => z4__namespace.pipe(
563
713
  extension.wire({
564
- session_id: z2__namespace.string().check(z2__namespace.minLength(1)),
565
- game_url: z2__namespace.string().check(z2__namespace.minLength(1)),
714
+ session_id: z4__namespace.string().check(z4__namespace.minLength(1)),
715
+ game_url: z4__namespace.string().check(z4__namespace.minLength(1)),
566
716
  // Any text: a target the SDK does not know yet must not fail the (strict) launch.
567
- launch_target: z2__namespace.optional(z2__namespace.string()),
568
- provider_code: z2__namespace.optional(z2__namespace.string()),
569
- expires_at: z2__namespace.optional(z2__namespace.string())
717
+ launch_target: z4__namespace.optional(z4__namespace.string()),
718
+ provider_code: z4__namespace.optional(z4__namespace.string()),
719
+ expires_at: z4__namespace.optional(z4__namespace.string())
570
720
  }),
571
721
  // Without a target (an older gateway, or a custom mock), the launch keeps the behavior the SDK documented
572
722
  // before the field existed: an iframe.
573
- z2__namespace.transform(({ launchTarget, ...rest }) => ({ ...rest, launchTarget: launchTarget || "iframe" }))
723
+ z4__namespace.transform(({ launchTarget, ...rest }) => ({ ...rest, launchTarget: launchTarget || "iframe" }))
574
724
  )
575
725
  );
576
726
  var sessionSchema = /* @__PURE__ */ extension.lazy(
577
727
  () => extension.wire({
578
- id: z2__namespace.string(),
579
- game_id: z2__namespace.string(),
580
- game_name: z2__namespace.string(),
581
- provider: z2__namespace.string(),
582
- start_time: z2__namespace.string(),
728
+ id: z4__namespace.string(),
729
+ game_id: z4__namespace.string(),
730
+ game_name: z4__namespace.string(),
731
+ provider: z4__namespace.string(),
732
+ start_time: z4__namespace.string(),
583
733
  total_bet: extension.money(),
584
734
  total_win: extension.money(),
585
735
  status: protoEnum("SESSION_STATUS_")
@@ -587,49 +737,155 @@ var sessionSchema = /* @__PURE__ */ extension.lazy(
587
737
  );
588
738
  var transactionSchema = /* @__PURE__ */ extension.lazy(
589
739
  () => extension.wire({
590
- id: z2__namespace.string(),
591
- game_id: z2__namespace.string(),
592
- game_name: z2__namespace.string(),
593
- round_id: z2__namespace.string(),
740
+ id: z4__namespace.string(),
741
+ game_id: z4__namespace.string(),
742
+ game_name: z4__namespace.string(),
743
+ round_id: z4__namespace.string(),
594
744
  type: protoEnum("CASINO_TRANSACTION_TYPE_"),
595
745
  amount: minorUnits(),
596
746
  currency: extension.currencyCode(),
597
747
  currency_decimal_places: extension.decimalPlaces(),
598
- created_at: z2__namespace.string()
748
+ created_at: z4__namespace.string()
599
749
  })
600
750
  );
601
751
  var winnersSchema = /* @__PURE__ */ extension.lazy(
602
- () => z2__namespace.array(
752
+ () => z4__namespace.array(
603
753
  extension.wire({
604
- player: z2__namespace.string(),
754
+ player: z4__namespace.string(),
605
755
  amount: minorUnits(),
606
756
  currency: extension.currencyCode(),
607
757
  currency_decimal_places: extension.decimalPlaces(),
608
- game_id: z2__namespace.string(),
609
- game_name: z2__namespace.string(),
610
- won_at: z2__namespace.string()
758
+ game_id: z4__namespace.string(),
759
+ game_name: z4__namespace.string(),
760
+ won_at: z4__namespace.string()
611
761
  })
612
762
  )
613
763
  );
764
+ var gamesEnvelopeSchema = /* @__PURE__ */ extension.lazy(
765
+ () => extension.wire({
766
+ availability: z4__namespace.pipe(
767
+ z4__namespace.nullish(
768
+ extension.wire({
769
+ // The gateway reports an unset status as `available`; the SDK does the same for an absent/empty one.
770
+ status: z4__namespace.pipe(
771
+ z4__namespace.nullish(z4__namespace.string()),
772
+ z4__namespace.transform((value) => value ? value.toLowerCase() : "available")
773
+ ),
774
+ primary_provider_code: optionalText(),
775
+ missing: nullableList(z4__namespace.string())
776
+ })
777
+ ),
778
+ z4__namespace.transform((value) => value ?? null)
779
+ )
780
+ })
781
+ );
782
+ var CURRENCY = /^[A-Z]{3}$/;
783
+ var DECIMAL_PLACES_MAX = 20;
784
+ var jackpotSchema = /* @__PURE__ */ extension.lazy(
785
+ () => z4__namespace.pipe(
786
+ z4__namespace.object({
787
+ id: z4__namespace.string().check(z4__namespace.refine((value) => value.trim() !== "")),
788
+ name: z4__namespace.string().check(z4__namespace.refine((value) => value.trim() !== "")),
789
+ currency: z4__namespace.string().check(z4__namespace.regex(CURRENCY)),
790
+ amount_minor: z4__namespace.union([
791
+ z4__namespace.string().check(z4__namespace.refine((value) => /^(0|[1-9]\d*)$/.test(value) && Number.isSafeInteger(Number(value)))),
792
+ z4__namespace.number().check(z4__namespace.refine((value) => Number.isSafeInteger(value) && value >= 0))
793
+ ]),
794
+ decimal_places: z4__namespace.number().check(z4__namespace.refine((value) => Number.isInteger(value) && value >= 0 && value <= DECIMAL_PLACES_MAX))
795
+ }),
796
+ z4__namespace.transform((raw) => ({
797
+ id: raw.id,
798
+ name: raw.name,
799
+ currency: raw.currency,
800
+ amount: Number(raw.amount_minor) || 0,
801
+ currencyDecimalPlaces: raw.decimal_places
802
+ }))
803
+ )
804
+ );
805
+ var jackpotsSchema = /* @__PURE__ */ extension.lazy(
806
+ () => extension.wire({ items: nullableList(z4__namespace.unknown()), featured_id: optionalText() })
807
+ );
808
+ var jackpotGamesSchema = /* @__PURE__ */ extension.lazy(
809
+ () => z4__namespace.pipe(
810
+ extension.wire({
811
+ games: nullableList(gameSchema()),
812
+ mode: z4__namespace.pipe(
813
+ z4__namespace.string(),
814
+ z4__namespace.transform((value) => value.toLowerCase())
815
+ ),
816
+ pagination: extension.wire({
817
+ page: z4__namespace.number(),
818
+ per_page: z4__namespace.number(),
819
+ has_next: z4__namespace.boolean(),
820
+ next_cursor: optionalText()
821
+ })
822
+ }),
823
+ z4__namespace.transform(({ games, mode, pagination }) => ({
824
+ items: games,
825
+ mode,
826
+ page: pagination.page,
827
+ perPage: pagination.perPage,
828
+ // A page that says there is more but has no cursor cannot be followed: it is the last one.
829
+ hasNext: pagination.hasNext && pagination.nextCursor !== null,
830
+ nextCursor: pagination.hasNext ? pagination.nextCursor : null
831
+ }))
832
+ )
833
+ );
834
+ var DEVICES = ["mobile", "desktop"];
835
+ var GAMES_ROUTE = { method: "GET", path: "/games" };
836
+ var JACKPOTS_ROUTE = { method: "GET", path: "/games/jackpots" };
837
+ var JACKPOT_GAMES_ROUTE = { method: "GET", path: "/games/jackpots/{jackpotId}/games" };
838
+ var JACKPOT_GAMES_MAX = 48;
839
+ function deviceProblem(name, device) {
840
+ return device === void 0 || DEVICES.includes(device) ? void 0 : `${name}: device must be 'mobile' or 'desktop' (or omitted).`;
841
+ }
842
+ function currencyProblem(name, currency) {
843
+ return typeof currency === "string" && CURRENCY.test(currency) ? void 0 : `${name}: currency must be an ISO 4217 code in uppercase (e.g. BRL).`;
844
+ }
845
+ function jackpotGamesProblem(input) {
846
+ const name = "casino.listJackpotGames";
847
+ if (typeof input !== "object" || input === null || Array.isArray(input))
848
+ return `${name}: input must be an object { jackpotId, currency }.`;
849
+ const { jackpotId, currency, device, page, perPage, cursor } = input;
850
+ if (typeof jackpotId !== "string" || jackpotId.trim() === "") return `${name}: jackpotId must be non-empty text.`;
851
+ const problem = currencyProblem(name, currency) ?? deviceProblem(name, device);
852
+ if (problem !== void 0) return problem;
853
+ if (page !== void 0 && (typeof page !== "number" || !Number.isSafeInteger(page) || page < 1))
854
+ return `${name}: page must be an integer \u2265 1.`;
855
+ if (perPage !== void 0 && (typeof perPage !== "number" || !Number.isInteger(perPage) || perPage < 1 || perPage > JACKPOT_GAMES_MAX))
856
+ return `${name}: perPage must be an integer from 1 to ${JACKPOT_GAMES_MAX}.`;
857
+ if (cursor !== void 0 && typeof cursor !== "string") return `${name}: cursor must be text.`;
858
+ if (typeof page === "number" && page > 1 && (cursor === void 0 || cursor === ""))
859
+ return `${name}: a page above 1 requires the previous page's nextCursor.`;
860
+ return void 0;
861
+ }
614
862
  function createCasinoApi(transport) {
615
863
  return {
616
- listGames: (input, options) => transport.requestPage({
617
- method: "GET",
618
- path: "/games",
619
- query: {
620
- category: input?.category,
621
- provider: input?.provider,
622
- search: input?.search,
623
- ids: input?.ids?.length ? input.ids.join(",") : void 0,
624
- sort: input?.sort
625
- },
626
- page: input?.page,
627
- perPage: input?.perPage,
628
- perPageParam: "limit",
629
- auth: "none",
630
- item: gameSchema(),
631
- options
632
- }),
864
+ listGames: async (input, options) => {
865
+ const problem = deviceProblem("casino.listGames", input?.device);
866
+ if (problem !== void 0) return rejectInput(transport, problem, GAMES_ROUTE);
867
+ const spec = {
868
+ ...GAMES_ROUTE,
869
+ query: {
870
+ category: input?.category,
871
+ provider: input?.provider,
872
+ search: input?.search,
873
+ ids: input?.ids?.length ? input.ids.join(",") : void 0,
874
+ sort: input?.sort,
875
+ device: input?.device
876
+ },
877
+ page: input?.page,
878
+ perPage: input?.perPage,
879
+ perPageParam: "limit",
880
+ auth: "none",
881
+ item: gameSchema(),
882
+ options
883
+ };
884
+ if (typeof transport.requestPageWithEnvelope !== "function")
885
+ return { ...await transport.requestPage(spec), availability: null };
886
+ const { page, envelope } = await transport.requestPageWithEnvelope({ ...spec, envelope: gamesEnvelopeSchema() });
887
+ return { ...page, availability: envelope.availability };
888
+ },
633
889
  listCategories: (_params, options) => transport.request({ method: "GET", path: "/games/categories", schema: categoriesSchema(), options }),
634
890
  listProviders: (_params, options) => transport.request({ method: "GET", path: "/games/providers", schema: providersSchema(), options }),
635
891
  getGame: ({ gameId }, options) => transport.request({
@@ -638,10 +894,16 @@ function createCasinoApi(transport) {
638
894
  schema: gameSchema(),
639
895
  options
640
896
  }),
641
- launchGame: ({ gameId, mode, isMobile, returnUrl, language }, options) => transport.request({
897
+ launchGame: ({ gameId, mode, isMobile, returnUrl, depositUrl, language }, options) => transport.request({
642
898
  method: "POST",
643
899
  path: `/games/${encodeURIComponent(gameId)}/launch`,
644
- body: { is_demo: mode === "demo", is_mobile: isMobile === true, return_url: returnUrl, language },
900
+ body: {
901
+ is_demo: mode === "demo",
902
+ is_mobile: isMobile === true,
903
+ return_url: returnUrl,
904
+ deposit_url: depositUrl,
905
+ language
906
+ },
645
907
  auth: "required",
646
908
  // The response carries the URL with the game session token: never through `warn` mode's recovery
647
909
  // (which would deliver a raw field and the response to `onValidationIssue`).
@@ -676,55 +938,57 @@ function createCasinoApi(transport) {
676
938
  auth: "required",
677
939
  schema: winnersSchema(),
678
940
  options
679
- })
941
+ }),
942
+ listJackpots: async (input, options) => {
943
+ const currency = input?.currency;
944
+ const problem = currencyProblem("casino.listJackpots", currency);
945
+ if (problem !== void 0) return rejectInput(transport, problem, JACKPOTS_ROUTE);
946
+ const raw = await transport.request({
947
+ ...JACKPOTS_ROUTE,
948
+ query: { currency },
949
+ auth: "none",
950
+ schema: jackpotsSchema(),
951
+ options
952
+ });
953
+ const items = [];
954
+ for (const entry of Array.isArray(raw.items) ? raw.items : []) {
955
+ const parsed = z4__namespace.safeParse(jackpotSchema(), entry);
956
+ if (!parsed.success || parsed.data.currency !== currency) continue;
957
+ if (items.some((item) => item.id === parsed.data.id)) continue;
958
+ items.push(parsed.data);
959
+ }
960
+ const featured = typeof raw.featuredId === "string" ? raw.featuredId : null;
961
+ return { items, featuredId: items.some((item) => item.id === featured) ? featured : null };
962
+ },
963
+ listJackpotGames: (input, options) => {
964
+ const problem = jackpotGamesProblem(input);
965
+ if (problem !== void 0) return rejectInput(transport, problem, JACKPOT_GAMES_ROUTE);
966
+ return transport.request({
967
+ method: "GET",
968
+ path: `/games/jackpots/${encodeURIComponent(input.jackpotId)}/games`,
969
+ query: {
970
+ currency: input.currency,
971
+ device: input.device,
972
+ page: input.page,
973
+ limit: input.perPage,
974
+ cursor: input.cursor === "" ? void 0 : input.cursor
975
+ },
976
+ auth: "none",
977
+ schema: jackpotGamesSchema(),
978
+ options
979
+ });
980
+ }
680
981
  };
681
982
  }
682
-
683
- // src/internal/input.ts
684
- function rejectInput(transport, message, route) {
685
- return Promise.reject(
686
- transport.reportError({ code: "CONFIGURATION_ERROR", message, status: 0 }, { ...route, attempt: 0 })
687
- );
688
- }
689
- function pageInputProblem(name, input) {
690
- if (input === void 0) return void 0;
691
- if (typeof input !== "object" || input === null || Array.isArray(input)) return `${name}: input must be an object.`;
692
- const { page, perPage } = input;
693
- if (page !== void 0 && (typeof page !== "number" || !Number.isSafeInteger(page) || page < 1))
694
- return `${name}: page must be an integer \u2265 1.`;
695
- if (perPage !== void 0 && (typeof perPage !== "number" || !Number.isInteger(perPage) || perPage < 1 || perPage > 100))
696
- return `${name}: perPage must be an integer from 1 to 100.`;
697
- return void 0;
698
- }
699
- function optionalTimestamp() {
700
- return z2__namespace.pipe(
701
- z2__namespace.nullish(z2__namespace.string().check(z2__namespace.refine((value) => value === "" || !Number.isNaN(Date.parse(value)), "invalid date"))),
702
- z2__namespace.transform((value) => value == null || value === "" || Date.parse(value) === 0 ? null : value)
703
- );
704
- }
705
- function optionalText() {
706
- return z2__namespace.pipe(
707
- z2__namespace.nullish(z2__namespace.string()),
708
- z2__namespace.transform((value) => value == null || value === "" ? null : value)
709
- );
710
- }
711
- function nullableList(item) {
712
- return z2__namespace.pipe(
713
- z2__namespace.nullish(z2__namespace.array(item)),
714
- z2__namespace.transform((value) => value ?? [])
715
- );
716
- }
717
-
718
- // src/modules/loyalty.ts
719
983
  var ParsedBenefits = class {
720
984
  constructor(value) {
721
985
  this.value = value;
722
986
  }
723
987
  value;
724
988
  };
725
- var tierBenefits = () => z2__namespace.pipe(
726
- z2__namespace.nullish(z2__namespace.string()),
727
- z2__namespace.transform((text2, ctx) => {
989
+ var tierBenefits = () => z4__namespace.pipe(
990
+ z4__namespace.nullish(z4__namespace.string()),
991
+ z4__namespace.transform((text2, ctx) => {
728
992
  if (text2 == null || text2.trim() === "") return null;
729
993
  let parsed;
730
994
  try {
@@ -738,43 +1002,43 @@ var tierBenefits = () => z2__namespace.pipe(
738
1002
  message: "tier_benefits_json is not a JSON object or array",
739
1003
  input: void 0
740
1004
  });
741
- return z2__namespace.NEVER;
1005
+ return z4__namespace.NEVER;
742
1006
  })
743
1007
  );
744
1008
  var loyaltySchema = /* @__PURE__ */ extension.lazy(
745
- () => z2__namespace.pipe(
1009
+ () => z4__namespace.pipe(
746
1010
  extension.wire({
747
1011
  total_points_earned: integerText(),
748
1012
  current_points: integerText(),
749
1013
  points_redeemed: integerText(),
750
1014
  current_tier: optionalText(),
751
1015
  tier_points: integerText(),
752
- lifetime_wagered: z2__namespace._default(minorUnits(), 0),
753
- lifetime_deposited: z2__namespace._default(minorUnits(), 0),
1016
+ lifetime_wagered: z4__namespace._default(minorUnits(), 0),
1017
+ lifetime_deposited: z4__namespace._default(minorUnits(), 0),
754
1018
  tier_benefits_json: tierBenefits(),
755
1019
  tier_expires_at: optionalTimestamp()
756
1020
  }),
757
- z2__namespace.transform(({ tierBenefitsJson, ...rest }) => {
1021
+ z4__namespace.transform(({ tierBenefitsJson, ...rest }) => {
758
1022
  const benefits = tierBenefitsJson instanceof ParsedBenefits ? tierBenefitsJson.value : null;
759
1023
  return { ...rest, tierBenefits: benefits };
760
1024
  })
761
1025
  )
762
1026
  );
763
1027
  var redeemSchema = /* @__PURE__ */ extension.lazy(
764
- () => z2__namespace.pipe(
1028
+ () => z4__namespace.pipe(
765
1029
  extension.wire({
766
- success: z2__namespace.optional(z2__namespace.boolean()),
767
- message: z2__namespace.optional(z2__namespace.string()),
1030
+ success: z4__namespace.optional(z4__namespace.boolean()),
1031
+ message: z4__namespace.optional(z4__namespace.string()),
768
1032
  redeemed_points: integerText(),
769
- value: z2__namespace.nullish(minorUnits()),
1033
+ value: z4__namespace.nullish(minorUnits()),
770
1034
  // Currency strict even in `'warn'`; absent, `null` and `''` still become `null`.
771
- currency: z2__namespace.pipe(
772
- z2__namespace.nullish(currencyOrEmpty()),
773
- z2__namespace.transform((value) => value == null || value === "" ? null : value)
1035
+ currency: z4__namespace.pipe(
1036
+ z4__namespace.nullish(currencyOrEmpty()),
1037
+ z4__namespace.transform((value) => value == null || value === "" ? null : value)
774
1038
  ),
775
1039
  bonus_id: optionalText()
776
1040
  }),
777
- z2__namespace.transform((data) => ({
1041
+ z4__namespace.transform((data) => ({
778
1042
  success: data.success,
779
1043
  message: data.message,
780
1044
  redeemedPoints: data.redeemedPoints,
@@ -818,12 +1082,12 @@ function createLoyaltyApi(transport) {
818
1082
  };
819
1083
  }
820
1084
  function openUnion(values) {
821
- return z2__namespace.pipe(
822
- z2__namespace.pipe(
823
- z2__namespace.string(),
824
- z2__namespace.transform((value) => value.toLowerCase())
1085
+ return z4__namespace.pipe(
1086
+ z4__namespace.pipe(
1087
+ z4__namespace.string(),
1088
+ z4__namespace.transform((value) => value.toLowerCase())
825
1089
  ),
826
- z2__namespace.enum(values)
1090
+ z4__namespace.enum(values)
827
1091
  );
828
1092
  }
829
1093
 
@@ -834,14 +1098,14 @@ var REWARD_TYPES = ["bonus", "free_spins", "points", "free_bet"];
834
1098
  var USER_MISSION_STATUSES = ["in_progress", "completed", "expired", "claimed"];
835
1099
  var missionSchema = /* @__PURE__ */ extension.lazy(
836
1100
  () => extension.wire({
837
- id: z2__namespace.string(),
838
- name: z2__namespace.string(),
839
- description: z2__namespace._default(z2__namespace.string(), ""),
1101
+ id: z4__namespace.string(),
1102
+ name: z4__namespace.string(),
1103
+ description: z4__namespace._default(z4__namespace.string(), ""),
840
1104
  mission_type: openUnion(MISSION_TYPES),
841
1105
  objective_type: openUnion(OBJECTIVE_TYPES),
842
1106
  target_value: integerText(),
843
1107
  target_game_category: optionalText(),
844
- target_games: nullableList(z2__namespace.string()),
1108
+ target_games: nullableList(z4__namespace.string()),
845
1109
  reward_type: openUnion(REWARD_TYPES),
846
1110
  reward_value: minorUnits(),
847
1111
  valid_from: optionalTimestamp(),
@@ -849,16 +1113,16 @@ var missionSchema = /* @__PURE__ */ extension.lazy(
849
1113
  })
850
1114
  );
851
1115
  var userMissionsSchema = /* @__PURE__ */ extension.lazy(
852
- () => z2__namespace.pipe(
1116
+ () => z4__namespace.pipe(
853
1117
  extension.wire({
854
1118
  missions: nullableList(
855
1119
  extension.wire({
856
- id: z2__namespace.string(),
857
- mission_id: z2__namespace.string(),
858
- mission_name: z2__namespace._default(z2__namespace.string(), ""),
1120
+ id: z4__namespace.string(),
1121
+ mission_id: z4__namespace.string(),
1122
+ mission_name: z4__namespace._default(z4__namespace.string(), ""),
859
1123
  current_progress: integerText(),
860
1124
  target_value: integerText(),
861
- progress_percentage: z2__namespace.number(),
1125
+ progress_percentage: z4__namespace.number(),
862
1126
  status: openUnion(USER_MISSION_STATUSES),
863
1127
  reward_type: openUnion(REWARD_TYPES),
864
1128
  reward_value: minorUnits(),
@@ -867,7 +1131,7 @@ var userMissionsSchema = /* @__PURE__ */ extension.lazy(
867
1131
  })
868
1132
  )
869
1133
  }),
870
- z2__namespace.transform((data) => data.missions)
1134
+ z4__namespace.transform((data) => data.missions)
871
1135
  )
872
1136
  );
873
1137
  function createMissionsApi(transport) {
@@ -897,25 +1161,25 @@ function createMissionsApi(transport) {
897
1161
  }
898
1162
  var DEFAULT_PER_PAGE = 20;
899
1163
  var HISTORY_PATH = "/referrals/history";
900
- var count2 = () => z2__namespace._default(z2__namespace.number().check(z2__namespace.refine((value) => Number.isSafeInteger(value) && value >= 0, "invalid counter")), 0);
901
- var money3 = () => z2__namespace.pipe(
902
- z2__namespace.nullish(extension.wire({ minor_units: minorUnits(), currency: z2__namespace._default(currencyOrEmpty(), "") })),
903
- z2__namespace.transform(
1164
+ var count2 = () => z4__namespace._default(z4__namespace.number().check(z4__namespace.refine((value) => Number.isSafeInteger(value) && value >= 0, "invalid counter")), 0);
1165
+ var money3 = () => z4__namespace.pipe(
1166
+ z4__namespace.nullish(extension.wire({ minor_units: minorUnits(), currency: z4__namespace._default(currencyOrEmpty(), "") })),
1167
+ z4__namespace.transform(
904
1168
  (value) => value == null ? null : { amount: value.minorUnits, currency: value.currency }
905
1169
  )
906
1170
  );
907
- var rulesSchema = () => z2__namespace.pipe(
908
- z2__namespace.nullish(
1171
+ var rulesSchema = () => z4__namespace.pipe(
1172
+ z4__namespace.nullish(
909
1173
  extension.wire({
910
1174
  reward: money3(),
911
1175
  minimum_real_net_loss: money3(),
912
1176
  referee_window_days: count2(),
913
1177
  hold_hours: count2(),
914
- wagering_multiplier: z2__namespace._default(z2__namespace.string(), ""),
1178
+ wagering_multiplier: z4__namespace._default(z4__namespace.string(), ""),
915
1179
  maximum_conversion: money3()
916
1180
  })
917
1181
  ),
918
- z2__namespace.transform((rules) => {
1182
+ z4__namespace.transform((rules) => {
919
1183
  if (rules == null || rules.reward === null || rules.minimumRealNetLoss === null) return null;
920
1184
  return {
921
1185
  reward: rules.reward,
@@ -928,12 +1192,12 @@ var rulesSchema = () => z2__namespace.pipe(
928
1192
  })
929
1193
  );
930
1194
  var infoSchema = /* @__PURE__ */ extension.lazy(
931
- () => z2__namespace.pipe(
1195
+ () => z4__namespace.pipe(
932
1196
  extension.wire({
933
- enabled: z2__namespace._default(z2__namespace.boolean(), false),
1197
+ enabled: z4__namespace._default(z4__namespace.boolean(), false),
934
1198
  referral_code: optionalText(),
935
1199
  rules: rulesSchema(),
936
- totals: z2__namespace._default(
1200
+ totals: z4__namespace._default(
937
1201
  extension.wire({
938
1202
  registered: count2(),
939
1203
  deposited: count2(),
@@ -946,7 +1210,7 @@ var infoSchema = /* @__PURE__ */ extension.lazy(
946
1210
  { registered: 0, deposited: 0, inHold: 0, paid: 0, notEligible: 0, expired: 0, cancelled: 0 }
947
1211
  )
948
1212
  }),
949
- z2__namespace.transform(
1213
+ z4__namespace.transform(
950
1214
  ({ enabled, referralCode, rules, totals }) => ({ enabled, code: referralCode, rules, totals })
951
1215
  )
952
1216
  )
@@ -955,16 +1219,16 @@ function remainingOf(target, loss) {
955
1219
  const missing = BigInt(target.amount) - BigInt(loss.amount);
956
1220
  return { amount: missing > 0n ? Number(missing) : 0, currency: target.currency };
957
1221
  }
958
- var progressSchema = () => z2__namespace.pipe(
959
- z2__namespace.nullish(
1222
+ var progressSchema = () => z4__namespace.pipe(
1223
+ z4__namespace.nullish(
960
1224
  extension.wire({
961
- deposit_done: z2__namespace._default(z2__namespace.boolean(), false),
1225
+ deposit_done: z4__namespace._default(z4__namespace.boolean(), false),
962
1226
  real_net_loss: money3(),
963
1227
  target: money3(),
964
1228
  remaining: money3()
965
1229
  })
966
1230
  ),
967
- z2__namespace.transform((progress) => {
1231
+ z4__namespace.transform((progress) => {
968
1232
  if (progress == null || progress.target === null) return null;
969
1233
  const { target } = progress;
970
1234
  const realNetLoss = progress.realNetLoss ?? { amount: 0, currency: target.currency };
@@ -981,9 +1245,9 @@ function statusOf(playerStatus, legacy) {
981
1245
  if (playerStatus !== null) return playerStatus.replace(/^CAMPAIGN_REFERRAL_STATUS_/, "").toLowerCase();
982
1246
  return LEGACY_STATUS[(legacy ?? "").toUpperCase()] ?? "registered";
983
1247
  }
984
- var referralSchema = () => z2__namespace.pipe(
1248
+ var referralSchema = () => z4__namespace.pipe(
985
1249
  extension.wire({
986
- id: z2__namespace.string(),
1250
+ id: z4__namespace.string(),
987
1251
  referee_name: optionalText(),
988
1252
  status: optionalText(),
989
1253
  player_status: optionalText(),
@@ -991,7 +1255,7 @@ var referralSchema = () => z2__namespace.pipe(
991
1255
  deadline_at: optionalTimestamp(),
992
1256
  progress: progressSchema()
993
1257
  }),
994
- z2__namespace.transform(
1258
+ z4__namespace.transform(
995
1259
  (r) => ({
996
1260
  id: r.id,
997
1261
  refereeName: r.refereeName,
@@ -1006,7 +1270,7 @@ var historySchema = /* @__PURE__ */ extension.lazy(
1006
1270
  () => extension.wire({
1007
1271
  referral_code: optionalText(),
1008
1272
  referrals: nullableList(referralSchema()),
1009
- pagination: z2__namespace.optional(extension.wire({ page: count2(), limit: count2(), total_items: count2() }))
1273
+ pagination: z4__namespace.optional(extension.wire({ page: count2(), limit: count2(), total_items: count2() }))
1010
1274
  })
1011
1275
  );
1012
1276
  var positiveInt = (value, fallback) => typeof value === "number" && Number.isSafeInteger(value) && value >= 1 ? value : fallback;
@@ -1046,12 +1310,12 @@ function createReferralsApi(transport) {
1046
1310
  }
1047
1311
  var HTTP_URL = "Expected an absolute http(s) URL";
1048
1312
  var sessionSchema2 = /* @__PURE__ */ extension.lazy(
1049
- () => z2__namespace.pipe(
1313
+ () => z4__namespace.pipe(
1050
1314
  extension.wire({
1051
1315
  // The separate token only exists on the wire: the schema declares it (strict contract) and the output drops it.
1052
- operator_token: z2__namespace.string(),
1053
- launch_url: z2__namespace.string().check(
1054
- z2__namespace.refine(
1316
+ operator_token: z4__namespace.string(),
1317
+ launch_url: z4__namespace.string().check(
1318
+ z4__namespace.refine(
1055
1319
  (value) => {
1056
1320
  try {
1057
1321
  const { protocol } = new URL(value);
@@ -1063,10 +1327,10 @@ var sessionSchema2 = /* @__PURE__ */ extension.lazy(
1063
1327
  { message: HTTP_URL }
1064
1328
  )
1065
1329
  ),
1066
- expires_in_seconds: z2__namespace.number().check(z2__namespace.refine((n) => Number.isFinite(n) && n > 0, { message: "Esperava > 0" }))
1330
+ expires_in_seconds: z4__namespace.number().check(z4__namespace.refine((n) => Number.isFinite(n) && n > 0, { message: "Esperava > 0" }))
1067
1331
  }),
1068
1332
  // The clock is read when the response is interpreted (= moment of the response).
1069
- z2__namespace.transform(({ launchUrl, expiresInSeconds }) => ({
1333
+ z4__namespace.transform(({ launchUrl, expiresInSeconds }) => ({
1070
1334
  launchUrl,
1071
1335
  expiresInSeconds,
1072
1336
  expiresAt: Date.now() + expiresInSeconds * 1e3
@@ -1097,7 +1361,8 @@ function createIgaming(client) {
1097
1361
  missions: createMissionsApi(transport),
1098
1362
  loyalty: createLoyaltyApi(transport),
1099
1363
  referrals: createReferralsApi(transport),
1100
- sportsbook: createSportsbookApi(transport)
1364
+ sportsbook: createSportsbookApi(transport),
1365
+ bets: createBetsApi(transport)
1101
1366
  };
1102
1367
  if (typeof extension__namespace.registerProductClient !== "function") {
1103
1368
  throw new sdk.EnginexError({