@levrbet/shared 0.2.27 → 0.2.29
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/core/prisma/generated/edge.js +79 -4
- package/dist/core/prisma/generated/index-browser.js +72 -1
- package/dist/core/prisma/generated/index.d.ts +12636 -6702
- package/dist/core/prisma/generated/index.js +83 -4
- package/dist/core/prisma/generated/package.json +1 -1
- package/dist/core/prisma/generated/query_engine-windows.dll.node +0 -0
- package/dist/core/prisma/generated/schema.prisma +126 -25
- package/dist/core/prisma/generated/wasm.js +79 -4
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
generator client {
|
|
2
2
|
provider = "prisma-client-js"
|
|
3
|
-
binaryTargets = ["linux-musl-openssl-3.0.x"]
|
|
3
|
+
binaryTargets = ["linux-musl-openssl-3.0.x", "windows"]
|
|
4
4
|
output = "generated"
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -191,30 +191,29 @@ model Scores {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
model LevrGame {
|
|
194
|
-
objectId
|
|
195
|
-
gameId
|
|
196
|
-
txHash
|
|
197
|
-
chainId
|
|
198
|
-
seasonType
|
|
199
|
-
venue
|
|
200
|
-
eventName
|
|
201
|
-
location
|
|
202
|
-
venueLocation
|
|
203
|
-
gameClock
|
|
204
|
-
paused
|
|
205
|
-
fixtureDate
|
|
206
|
-
wentLiveAt
|
|
207
|
-
homeTeam
|
|
208
|
-
awayTeam
|
|
209
|
-
currentPeriod
|
|
210
|
-
actualDuration
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
sportGroup SportGroup
|
|
194
|
+
objectId String @id @default(auto()) @map("_id") @db.ObjectId
|
|
195
|
+
gameId Int @unique
|
|
196
|
+
txHash String @unique
|
|
197
|
+
chainId Int
|
|
198
|
+
seasonType String
|
|
199
|
+
venue String
|
|
200
|
+
eventName String
|
|
201
|
+
location String
|
|
202
|
+
venueLocation String
|
|
203
|
+
gameClock String
|
|
204
|
+
paused Boolean @default(false)
|
|
205
|
+
fixtureDate DateTime
|
|
206
|
+
wentLiveAt DateTime?
|
|
207
|
+
homeTeam Json // as defined in sample-data/lever/levr-game.json
|
|
208
|
+
awayTeam Json // as defined in sample-data/lever/levr-game.json
|
|
209
|
+
currentPeriod Int @default(0)
|
|
210
|
+
actualDuration Float @default(0) // in milliseconds
|
|
211
|
+
gamePhase GamePhase @default(PreGame)
|
|
212
|
+
levrFixtureId String
|
|
213
|
+
opticOddsFixtureId String?
|
|
214
|
+
lsportsFixtureId String?
|
|
215
|
+
gameProgressBps Int @default(0)
|
|
216
|
+
sportGroup SportGroup
|
|
218
217
|
|
|
219
218
|
fixtureObjectId String @db.ObjectId
|
|
220
219
|
fixture Fixture @relation(fields: [fixtureObjectId], references: [objectId])
|
|
@@ -302,11 +301,113 @@ model User {
|
|
|
302
301
|
preferredTimeZone DateTime
|
|
303
302
|
userOddsPreference UserOddsPreference
|
|
304
303
|
profileImageUrl String
|
|
304
|
+
referralCode String @unique
|
|
305
|
+
|
|
306
|
+
// Inverse relations (these fix your P1012 errors)
|
|
307
|
+
referralsMade Referral[] @relation("ReferrerRelations") // users they referred
|
|
308
|
+
referredBy Referral[] @relation("ReferredRelations") // who referred them
|
|
309
|
+
referralRewards ReferralReward[] @relation("UserRewards") // their reward entries
|
|
310
|
+
|
|
311
|
+
createdAt DateTime @default(now())
|
|
312
|
+
updatedAt DateTime @updatedAt
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
enum ReferralStatus {
|
|
316
|
+
Pending
|
|
317
|
+
Active
|
|
318
|
+
Suspended
|
|
319
|
+
Completed
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
model Referral {
|
|
323
|
+
objectId String @id @default(auto()) @map("_id") @db.ObjectId
|
|
324
|
+
referrerId String @db.ObjectId
|
|
325
|
+
referredId String @db.ObjectId
|
|
326
|
+
referralCode String
|
|
327
|
+
referralSource String? // e.g. campaign or link source
|
|
328
|
+
status ReferralStatus @default(Active)
|
|
329
|
+
|
|
330
|
+
// Relations
|
|
331
|
+
referrer User @relation("ReferrerRelations", fields: [referrerId], references: [objectId])
|
|
332
|
+
referred User @relation("ReferredRelations", fields: [referredId], references: [objectId])
|
|
333
|
+
|
|
334
|
+
createdAt DateTime @default(now())
|
|
335
|
+
updatedAt DateTime @updatedAt
|
|
336
|
+
|
|
337
|
+
@@index([referrerId])
|
|
338
|
+
@@index([referredId])
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
model ReferralEpoch {
|
|
342
|
+
objectId String @id @default(auto()) @map("_id") @db.ObjectId
|
|
343
|
+
periodId String @unique
|
|
344
|
+
periodStart DateTime
|
|
345
|
+
periodEnd DateTime
|
|
346
|
+
timezone String @default("America/Mexico_City")
|
|
347
|
+
status EpochStatus @default(Active)
|
|
348
|
+
|
|
349
|
+
// On-chain reward info (one root per epoch)
|
|
350
|
+
totalFeesUsd Float?
|
|
351
|
+
rewardPoolUsd Float?
|
|
352
|
+
merkleRoot String?
|
|
353
|
+
merkleTxHash String?
|
|
354
|
+
rootPublishedAt DateTime?
|
|
355
|
+
notes String?
|
|
356
|
+
|
|
357
|
+
ReferralRewards ReferralReward[]
|
|
305
358
|
|
|
306
359
|
createdAt DateTime @default(now())
|
|
307
360
|
updatedAt DateTime @updatedAt
|
|
308
361
|
}
|
|
309
362
|
|
|
363
|
+
enum EpochStatus {
|
|
364
|
+
Active
|
|
365
|
+
Processing
|
|
366
|
+
Completed
|
|
367
|
+
Failed
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
enum ReferralTier {
|
|
371
|
+
T1
|
|
372
|
+
T2
|
|
373
|
+
T3
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
model ReferralReward {
|
|
377
|
+
objectId String @id @default(auto()) @map("_id") @db.ObjectId
|
|
378
|
+
userId String @db.ObjectId
|
|
379
|
+
epochId String @db.ObjectId
|
|
380
|
+
periodId String // denormalized for readability (e.g. "2025W45")
|
|
381
|
+
|
|
382
|
+
// --- Aggregates ---
|
|
383
|
+
referredBetVolumeUsd Float @default(0.0)
|
|
384
|
+
referredFeeUsd Float @default(0.0)
|
|
385
|
+
tier ReferralTier @default(T1)
|
|
386
|
+
tierPercentage Float @default(0.025)
|
|
387
|
+
|
|
388
|
+
// --- Payouts ---
|
|
389
|
+
payoutBeforeScaleUsd Float @default(0.0)
|
|
390
|
+
payoutScaledUsd Float @default(0.0)
|
|
391
|
+
payoutTokenUnits String? // token base units (string for precision)
|
|
392
|
+
scaleFactor Float?
|
|
393
|
+
|
|
394
|
+
// --- Claim sync info ---
|
|
395
|
+
isClaimedOnChain Boolean @default(false)
|
|
396
|
+
claimedTxHash String?
|
|
397
|
+
lastSyncedFromChainAt DateTime?
|
|
398
|
+
|
|
399
|
+
createdAt DateTime @default(now())
|
|
400
|
+
updatedAt DateTime @updatedAt
|
|
401
|
+
|
|
402
|
+
// --- Relations ---
|
|
403
|
+
user User @relation("UserRewards", fields: [userId], references: [objectId])
|
|
404
|
+
epoch ReferralEpoch @relation(fields: [epochId], references: [objectId])
|
|
405
|
+
|
|
406
|
+
@@unique([userId, periodId])
|
|
407
|
+
@@index([epochId])
|
|
408
|
+
@@index([userId])
|
|
409
|
+
}
|
|
410
|
+
|
|
310
411
|
enum ApiKeyScope {
|
|
311
412
|
Read
|
|
312
413
|
Write
|
|
@@ -203,7 +203,6 @@ exports.Prisma.LevrGameScalarFieldEnum = {
|
|
|
203
203
|
awayTeam: 'awayTeam',
|
|
204
204
|
currentPeriod: 'currentPeriod',
|
|
205
205
|
actualDuration: 'actualDuration',
|
|
206
|
-
normalizationFactor: 'normalizationFactor',
|
|
207
206
|
gamePhase: 'gamePhase',
|
|
208
207
|
levrFixtureId: 'levrFixtureId',
|
|
209
208
|
opticOddsFixtureId: 'opticOddsFixtureId',
|
|
@@ -268,6 +267,55 @@ exports.Prisma.UserScalarFieldEnum = {
|
|
|
268
267
|
preferredTimeZone: 'preferredTimeZone',
|
|
269
268
|
userOddsPreference: 'userOddsPreference',
|
|
270
269
|
profileImageUrl: 'profileImageUrl',
|
|
270
|
+
referralCode: 'referralCode',
|
|
271
|
+
createdAt: 'createdAt',
|
|
272
|
+
updatedAt: 'updatedAt'
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
exports.Prisma.ReferralScalarFieldEnum = {
|
|
276
|
+
objectId: 'objectId',
|
|
277
|
+
referrerId: 'referrerId',
|
|
278
|
+
referredId: 'referredId',
|
|
279
|
+
referralCode: 'referralCode',
|
|
280
|
+
referralSource: 'referralSource',
|
|
281
|
+
status: 'status',
|
|
282
|
+
createdAt: 'createdAt',
|
|
283
|
+
updatedAt: 'updatedAt'
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
exports.Prisma.ReferralEpochScalarFieldEnum = {
|
|
287
|
+
objectId: 'objectId',
|
|
288
|
+
periodId: 'periodId',
|
|
289
|
+
periodStart: 'periodStart',
|
|
290
|
+
periodEnd: 'periodEnd',
|
|
291
|
+
timezone: 'timezone',
|
|
292
|
+
status: 'status',
|
|
293
|
+
totalFeesUsd: 'totalFeesUsd',
|
|
294
|
+
rewardPoolUsd: 'rewardPoolUsd',
|
|
295
|
+
merkleRoot: 'merkleRoot',
|
|
296
|
+
merkleTxHash: 'merkleTxHash',
|
|
297
|
+
rootPublishedAt: 'rootPublishedAt',
|
|
298
|
+
notes: 'notes',
|
|
299
|
+
createdAt: 'createdAt',
|
|
300
|
+
updatedAt: 'updatedAt'
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
exports.Prisma.ReferralRewardScalarFieldEnum = {
|
|
304
|
+
objectId: 'objectId',
|
|
305
|
+
userId: 'userId',
|
|
306
|
+
epochId: 'epochId',
|
|
307
|
+
periodId: 'periodId',
|
|
308
|
+
referredBetVolumeUsd: 'referredBetVolumeUsd',
|
|
309
|
+
referredFeeUsd: 'referredFeeUsd',
|
|
310
|
+
tier: 'tier',
|
|
311
|
+
tierPercentage: 'tierPercentage',
|
|
312
|
+
payoutBeforeScaleUsd: 'payoutBeforeScaleUsd',
|
|
313
|
+
payoutScaledUsd: 'payoutScaledUsd',
|
|
314
|
+
payoutTokenUnits: 'payoutTokenUnits',
|
|
315
|
+
scaleFactor: 'scaleFactor',
|
|
316
|
+
isClaimedOnChain: 'isClaimedOnChain',
|
|
317
|
+
claimedTxHash: 'claimedTxHash',
|
|
318
|
+
lastSyncedFromChainAt: 'lastSyncedFromChainAt',
|
|
271
319
|
createdAt: 'createdAt',
|
|
272
320
|
updatedAt: 'updatedAt'
|
|
273
321
|
};
|
|
@@ -362,6 +410,26 @@ exports.UserOddsPreference = exports.$Enums.UserOddsPreference = {
|
|
|
362
410
|
European: 'European'
|
|
363
411
|
};
|
|
364
412
|
|
|
413
|
+
exports.ReferralStatus = exports.$Enums.ReferralStatus = {
|
|
414
|
+
Pending: 'Pending',
|
|
415
|
+
Active: 'Active',
|
|
416
|
+
Suspended: 'Suspended',
|
|
417
|
+
Completed: 'Completed'
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
exports.EpochStatus = exports.$Enums.EpochStatus = {
|
|
421
|
+
Active: 'Active',
|
|
422
|
+
Processing: 'Processing',
|
|
423
|
+
Completed: 'Completed',
|
|
424
|
+
Failed: 'Failed'
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
exports.ReferralTier = exports.$Enums.ReferralTier = {
|
|
428
|
+
T1: 'T1',
|
|
429
|
+
T2: 'T2',
|
|
430
|
+
T3: 'T3'
|
|
431
|
+
};
|
|
432
|
+
|
|
365
433
|
exports.ApiKeyScope = exports.$Enums.ApiKeyScope = {
|
|
366
434
|
Read: 'Read',
|
|
367
435
|
Write: 'Write'
|
|
@@ -379,6 +447,9 @@ exports.Prisma.ModelName = {
|
|
|
379
447
|
Odds: 'Odds',
|
|
380
448
|
Market: 'Market',
|
|
381
449
|
User: 'User',
|
|
450
|
+
Referral: 'Referral',
|
|
451
|
+
ReferralEpoch: 'ReferralEpoch',
|
|
452
|
+
ReferralReward: 'ReferralReward',
|
|
382
453
|
ApiKey: 'ApiKey',
|
|
383
454
|
AuditLog: 'AuditLog'
|
|
384
455
|
};
|
|
@@ -403,6 +474,10 @@ const config = {
|
|
|
403
474
|
{
|
|
404
475
|
"fromEnvVar": null,
|
|
405
476
|
"value": "linux-musl-openssl-3.0.x"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"fromEnvVar": null,
|
|
480
|
+
"value": "windows"
|
|
406
481
|
}
|
|
407
482
|
],
|
|
408
483
|
"previewFeatures": [],
|
|
@@ -429,13 +504,13 @@ const config = {
|
|
|
429
504
|
}
|
|
430
505
|
}
|
|
431
506
|
},
|
|
432
|
-
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"linux-musl-openssl-3.0.x\"]\n output = \"generated\"\n}\n\ndatasource db {\n provider = \"mongodb\"\n url = env(\"MONGO_URI\")\n}\n\nenum GamePhase {\n PreGame\n LiveGame\n PostGame\n Cancelled\n}\n\nenum MarketTypes {\n FullTimeWinner\n OverUnder\n}\n\nenum MarketStatus {\n Open\n Closed\n Settled\n Refunded\n}\n\nenum ScoringType {\n Points\n Goals\n}\n\nenum FixtureStatus {\n Scheduled\n Cancelled\n}\n\nenum SportGroup {\n Football\n Basketball\n Baseball\n AmericanFootball\n}\n\nenum LevrService {\n Auth\n Orderbook\n OracleCore\n OraclePeriphery\n OracleProcessor\n Leaderboard\n Lab\n}\n\nmodel Provider {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n name String @unique\n providerUrl String @unique\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Tournament {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrTournamentId String @unique\n chainId Int\n name String\n description String\n bannerUrl String\n startDate DateTime\n endDate DateTime\n\n games LevrGame[]\n leagues League[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([chainId, name])\n @@unique([chainId, description])\n @@unique([chainId, bannerUrl])\n @@index([name])\n}\n\nmodel Sport {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrSportId String @unique\n name String @unique\n periodType String\n scoringType ScoringType\n standardDurationMs Int\n standardPeriods Int\n periodDuration Int?\n hasDrawMarket Boolean\n sportGroup SportGroup\n\n leagues League[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel League {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n name String @unique\n abbreviation String\n country String\n levrLeagueId String @unique\n opticOddsLeagueId String @unique\n lsportsLeagueId String @unique\n\n tournamentObjectId String @db.ObjectId\n tournament Tournament @relation(fields: [tournamentObjectId], references: [objectId])\n sportObjectId String @db.ObjectId\n sport Sport @relation(fields: [sportObjectId], references: [objectId])\n levrSportId String\n\n games LevrGame[]\n fixtures Fixture[]\n teams TeamData[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel TeamData {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrTeamName String\n levrTeamOfficialAbbreviation String\n lsportsTeamName String\n opticOddsTeamName String\n lsportsTeamId String @unique\n opticOddsTeamId String @unique\n levrTeamId String @unique\n opticOddsTeamLogoUrl String @unique\n levrTeamLogoUrlAsHome String @unique\n levrTeamLogoUrlAsAway String @unique\n leagueObjectId String @db.ObjectId\n levrleagueId String\n league League @relation(fields: [leagueObjectId], references: [objectId])\n\n @@unique([levrTeamId, levrTeamName, leagueObjectId])\n}\n\nmodel Fixture {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrFixtureId String @unique\n opticOddsFixtureId String? @unique\n lsportsFixtureId String? @unique\n seasonType String\n venue String\n eventName String\n location String\n venueLocation String\n fixtureDate DateTime\n lastUpdated DateTime\n homeTeam Json\n awayTeam Json\n fixtureStatus FixtureStatus\n registeredChainIds Int[] // list of chain IDs where this fixture is registered\n\n leagueObjectId String @db.ObjectId\n league League @relation(fields: [leagueObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n LevrGame LevrGame[]\n\n @@index([fixtureDate])\n @@index([leagueObjectId])\n @@index([eventName])\n}\n\nmodel Scores {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n scoresByPeriodHome Json\n scoresByPeriodAway Json\n totalScoresHome Float\n totalScoresAway Float\n chainId Int\n\n gameObjectId String @unique @db.ObjectId\n LevrGame LevrGame @relation(fields: [gameObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel LevrGame {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n gameId Int @unique\n txHash String @unique\n chainId Int\n seasonType String\n venue String\n eventName String\n location String\n venueLocation String\n gameClock String\n paused Boolean @default(false)\n fixtureDate DateTime\n wentLiveAt DateTime?\n homeTeam Json // as defined in sample-data/lever/levr-game.json\n awayTeam Json // as defined in sample-data/lever/levr-game.json\n currentPeriod Int @default(0)\n actualDuration Float @default(0) // in milliseconds\n normalizationFactor Float\n gamePhase GamePhase @default(PreGame)\n levrFixtureId String\n opticOddsFixtureId String?\n lsportsFixtureId String?\n gameProgressBps Int @default(0)\n sportGroup SportGroup\n\n fixtureObjectId String @db.ObjectId\n fixture Fixture @relation(fields: [fixtureObjectId], references: [objectId])\n tournamentObjectId String @db.ObjectId\n tournament Tournament @relation(fields: [tournamentObjectId], references: [objectId])\n leagueObjectId String @db.ObjectId\n league League @relation(fields: [leagueObjectId], references: [objectId])\n scores Scores?\n\n markets Market[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([chainId, levrFixtureId])\n @@unique([chainId, gameId])\n @@index([opticOddsFixtureId])\n @@index([lsportsFixtureId])\n @@index([eventName])\n @@index([fixtureDate])\n}\n\nmodel Odds {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n txHash String\n odds Json // define for the specific market type\n prices Json\n timestamp DateTime\n marketType MarketTypes\n details Json? // the unique details for the odds\n gamePhase GamePhase\n gamePeriod Int\n gameClock Int\n chainId Int\n marketPhase MarketStatus\n\n levrGameObjectId String @db.ObjectId\n marketObjectId String @db.ObjectId\n gameMarketId String\n market Market @relation(fields: [marketObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Market {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n chainId Int\n gameId Int\n levrMarketId String\n levrMarketContract String\n gameMarketId String @unique\n txHash String\n maturedAt DateTime?\n leveraged Boolean @default(false)\n isMatured Boolean @default(false)\n normalizationFactor Float\n marketDetails Json\n marketRiskAllocation Json\n providers Json\n activeProvider Json\n marketType MarketTypes\n status MarketStatus\n\n levrGameObjectId String @db.ObjectId // new unique identifier\n levrGame LevrGame @relation(fields: [levrGameObjectId], references: [objectId])\n\n odds Odds[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum UserOddsPreference {\n American\n Decimal\n European\n}\n\nmodel User {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n walletAddress String @unique\n userName String @unique\n timeZone DateTime\n preferredTimeZone DateTime\n userOddsPreference UserOddsPreference\n profileImageUrl String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ApiKeyScope {\n Read\n Write\n}\n\nmodel ApiKey {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n apiKeyId String @unique\n userId String\n ethAddress String?\n name String\n ciphertext String\n kmsKeyId String\n service LevrService? // Optional: restrict key to a specific service\n scopes ApiKeyScope[]\n isActive Boolean @default(true)\n expiresAt DateTime?\n lastUsedAt DateTime?\n usageCount Int @default(0)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([userId, isActive])\n @@index([service, isActive])\n}\n\nmodel AuditLog {\n objectId String @id @default(cuid()) @map(\"_id\")\n action String // e.g., \"api_key.created\", \"application.created\", \"token.validated\"\n resourceId String? // ID of the resource being acted upon\n metadata Json @default(\"{}\")\n ipAddress String?\n userAgent String?\n timestamp DateTime @default(now())\n // Relations\n userId String\n\n @@index([action])\n @@index([timestamp])\n @@index([userId])\n}\n",
|
|
433
|
-
"inlineSchemaHash": "
|
|
507
|
+
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n binaryTargets = [\"linux-musl-openssl-3.0.x\", \"windows\"]\n output = \"generated\"\n}\n\ndatasource db {\n provider = \"mongodb\"\n url = env(\"MONGO_URI\")\n}\n\nenum GamePhase {\n PreGame\n LiveGame\n PostGame\n Cancelled\n}\n\nenum MarketTypes {\n FullTimeWinner\n OverUnder\n}\n\nenum MarketStatus {\n Open\n Closed\n Settled\n Refunded\n}\n\nenum ScoringType {\n Points\n Goals\n}\n\nenum FixtureStatus {\n Scheduled\n Cancelled\n}\n\nenum SportGroup {\n Football\n Basketball\n Baseball\n AmericanFootball\n}\n\nenum LevrService {\n Auth\n Orderbook\n OracleCore\n OraclePeriphery\n OracleProcessor\n Leaderboard\n Lab\n}\n\nmodel Provider {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n name String @unique\n providerUrl String @unique\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Tournament {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrTournamentId String @unique\n chainId Int\n name String\n description String\n bannerUrl String\n startDate DateTime\n endDate DateTime\n\n games LevrGame[]\n leagues League[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([chainId, name])\n @@unique([chainId, description])\n @@unique([chainId, bannerUrl])\n @@index([name])\n}\n\nmodel Sport {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrSportId String @unique\n name String @unique\n periodType String\n scoringType ScoringType\n standardDurationMs Int\n standardPeriods Int\n periodDuration Int?\n hasDrawMarket Boolean\n sportGroup SportGroup\n\n leagues League[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel League {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n name String @unique\n abbreviation String\n country String\n levrLeagueId String @unique\n opticOddsLeagueId String @unique\n lsportsLeagueId String @unique\n\n tournamentObjectId String @db.ObjectId\n tournament Tournament @relation(fields: [tournamentObjectId], references: [objectId])\n sportObjectId String @db.ObjectId\n sport Sport @relation(fields: [sportObjectId], references: [objectId])\n levrSportId String\n\n games LevrGame[]\n fixtures Fixture[]\n teams TeamData[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel TeamData {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrTeamName String\n levrTeamOfficialAbbreviation String\n lsportsTeamName String\n opticOddsTeamName String\n lsportsTeamId String @unique\n opticOddsTeamId String @unique\n levrTeamId String @unique\n opticOddsTeamLogoUrl String @unique\n levrTeamLogoUrlAsHome String @unique\n levrTeamLogoUrlAsAway String @unique\n leagueObjectId String @db.ObjectId\n levrleagueId String\n league League @relation(fields: [leagueObjectId], references: [objectId])\n\n @@unique([levrTeamId, levrTeamName, leagueObjectId])\n}\n\nmodel Fixture {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n levrFixtureId String @unique\n opticOddsFixtureId String? @unique\n lsportsFixtureId String? @unique\n seasonType String\n venue String\n eventName String\n location String\n venueLocation String\n fixtureDate DateTime\n lastUpdated DateTime\n homeTeam Json\n awayTeam Json\n fixtureStatus FixtureStatus\n registeredChainIds Int[] // list of chain IDs where this fixture is registered\n\n leagueObjectId String @db.ObjectId\n league League @relation(fields: [leagueObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n LevrGame LevrGame[]\n\n @@index([fixtureDate])\n @@index([leagueObjectId])\n @@index([eventName])\n}\n\nmodel Scores {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n scoresByPeriodHome Json\n scoresByPeriodAway Json\n totalScoresHome Float\n totalScoresAway Float\n chainId Int\n\n gameObjectId String @unique @db.ObjectId\n LevrGame LevrGame @relation(fields: [gameObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel LevrGame {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n gameId Int @unique\n txHash String @unique\n chainId Int\n seasonType String\n venue String\n eventName String\n location String\n venueLocation String\n gameClock String\n paused Boolean @default(false)\n fixtureDate DateTime\n wentLiveAt DateTime?\n homeTeam Json // as defined in sample-data/lever/levr-game.json\n awayTeam Json // as defined in sample-data/lever/levr-game.json\n currentPeriod Int @default(0)\n actualDuration Float @default(0) // in milliseconds\n gamePhase GamePhase @default(PreGame)\n levrFixtureId String\n opticOddsFixtureId String?\n lsportsFixtureId String?\n gameProgressBps Int @default(0)\n sportGroup SportGroup\n\n fixtureObjectId String @db.ObjectId\n fixture Fixture @relation(fields: [fixtureObjectId], references: [objectId])\n tournamentObjectId String @db.ObjectId\n tournament Tournament @relation(fields: [tournamentObjectId], references: [objectId])\n leagueObjectId String @db.ObjectId\n league League @relation(fields: [leagueObjectId], references: [objectId])\n scores Scores?\n\n markets Market[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([chainId, levrFixtureId])\n @@unique([chainId, gameId])\n @@index([opticOddsFixtureId])\n @@index([lsportsFixtureId])\n @@index([eventName])\n @@index([fixtureDate])\n}\n\nmodel Odds {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n txHash String\n odds Json // define for the specific market type\n prices Json\n timestamp DateTime\n marketType MarketTypes\n details Json? // the unique details for the odds\n gamePhase GamePhase\n gamePeriod Int\n gameClock Int\n chainId Int\n marketPhase MarketStatus\n\n levrGameObjectId String @db.ObjectId\n marketObjectId String @db.ObjectId\n gameMarketId String\n market Market @relation(fields: [marketObjectId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Market {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n chainId Int\n gameId Int\n levrMarketId String\n levrMarketContract String\n gameMarketId String @unique\n txHash String\n maturedAt DateTime?\n leveraged Boolean @default(false)\n isMatured Boolean @default(false)\n normalizationFactor Float\n marketDetails Json\n marketRiskAllocation Json\n providers Json\n activeProvider Json\n marketType MarketTypes\n status MarketStatus\n\n levrGameObjectId String @db.ObjectId // new unique identifier\n levrGame LevrGame @relation(fields: [levrGameObjectId], references: [objectId])\n\n odds Odds[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum UserOddsPreference {\n American\n Decimal\n European\n}\n\nmodel User {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n walletAddress String @unique\n userName String @unique\n timeZone DateTime\n preferredTimeZone DateTime\n userOddsPreference UserOddsPreference\n profileImageUrl String\n referralCode String @unique\n\n // Inverse relations (these fix your P1012 errors)\n referralsMade Referral[] @relation(\"ReferrerRelations\") // users they referred\n referredBy Referral[] @relation(\"ReferredRelations\") // who referred them\n referralRewards ReferralReward[] @relation(\"UserRewards\") // their reward entries\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum ReferralStatus {\n Pending\n Active\n Suspended\n Completed\n}\n\nmodel Referral {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n referrerId String @db.ObjectId\n referredId String @db.ObjectId\n referralCode String\n referralSource String? // e.g. campaign or link source\n status ReferralStatus @default(Active)\n\n // Relations\n referrer User @relation(\"ReferrerRelations\", fields: [referrerId], references: [objectId])\n referred User @relation(\"ReferredRelations\", fields: [referredId], references: [objectId])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([referrerId])\n @@index([referredId])\n}\n\nmodel ReferralEpoch {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n periodId String @unique\n periodStart DateTime\n periodEnd DateTime\n timezone String @default(\"America/Mexico_City\")\n status EpochStatus @default(Active)\n\n // On-chain reward info (one root per epoch)\n totalFeesUsd Float?\n rewardPoolUsd Float?\n merkleRoot String?\n merkleTxHash String?\n rootPublishedAt DateTime?\n notes String?\n\n ReferralRewards ReferralReward[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum EpochStatus {\n Active\n Processing\n Completed\n Failed\n}\n\nenum ReferralTier {\n T1\n T2\n T3\n}\n\nmodel ReferralReward {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n userId String @db.ObjectId\n epochId String @db.ObjectId\n periodId String // denormalized for readability (e.g. \"2025W45\")\n\n // --- Aggregates ---\n referredBetVolumeUsd Float @default(0.0)\n referredFeeUsd Float @default(0.0)\n tier ReferralTier @default(T1)\n tierPercentage Float @default(0.025)\n\n // --- Payouts ---\n payoutBeforeScaleUsd Float @default(0.0)\n payoutScaledUsd Float @default(0.0)\n payoutTokenUnits String? // token base units (string for precision)\n scaleFactor Float?\n\n // --- Claim sync info ---\n isClaimedOnChain Boolean @default(false)\n claimedTxHash String?\n lastSyncedFromChainAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n // --- Relations ---\n user User @relation(\"UserRewards\", fields: [userId], references: [objectId])\n epoch ReferralEpoch @relation(fields: [epochId], references: [objectId])\n\n @@unique([userId, periodId])\n @@index([epochId])\n @@index([userId])\n}\n\nenum ApiKeyScope {\n Read\n Write\n}\n\nmodel ApiKey {\n objectId String @id @default(auto()) @map(\"_id\") @db.ObjectId\n apiKeyId String @unique\n userId String\n ethAddress String?\n name String\n ciphertext String\n kmsKeyId String\n service LevrService? // Optional: restrict key to a specific service\n scopes ApiKeyScope[]\n isActive Boolean @default(true)\n expiresAt DateTime?\n lastUsedAt DateTime?\n usageCount Int @default(0)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([userId, isActive])\n @@index([service, isActive])\n}\n\nmodel AuditLog {\n objectId String @id @default(cuid()) @map(\"_id\")\n action String // e.g., \"api_key.created\", \"application.created\", \"token.validated\"\n resourceId String? // ID of the resource being acted upon\n metadata Json @default(\"{}\")\n ipAddress String?\n userAgent String?\n timestamp DateTime @default(now())\n // Relations\n userId String\n\n @@index([action])\n @@index([timestamp])\n @@index([userId])\n}\n",
|
|
508
|
+
"inlineSchemaHash": "b31923b4b476a69508329d8c6c29232855464dd7f0fde0f2bdf8121f62513837",
|
|
434
509
|
"copyEngine": true
|
|
435
510
|
}
|
|
436
511
|
config.dirname = '/'
|
|
437
512
|
|
|
438
|
-
config.runtimeDataModel = JSON.parse("{\"models\":{\"Provider\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"providerUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Tournament\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrTournamentId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bannerUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"endDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToTournament\"},{\"name\":\"leagues\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToTournament\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Sport\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrSportId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periodType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scoringType\",\"kind\":\"enum\",\"type\":\"ScoringType\"},{\"name\":\"standardDurationMs\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"standardPeriods\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"periodDuration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hasDrawMarket\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"sportGroup\",\"kind\":\"enum\",\"type\":\"SportGroup\"},{\"name\":\"leagues\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToSport\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"League\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournamentObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournament\",\"kind\":\"object\",\"type\":\"Tournament\",\"relationName\":\"LeagueToTournament\"},{\"name\":\"sportObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sport\",\"kind\":\"object\",\"type\":\"Sport\",\"relationName\":\"LeagueToSport\"},{\"name\":\"levrSportId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LeagueToLevrGame\"},{\"name\":\"fixtures\",\"kind\":\"object\",\"type\":\"Fixture\",\"relationName\":\"FixtureToLeague\"},{\"name\":\"teams\",\"kind\":\"object\",\"type\":\"TeamData\",\"relationName\":\"LeagueToTeamData\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"TeamData\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamOfficialAbbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamLogoUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamLogoUrlAsHome\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamLogoUrlAsAway\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrleagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToTeamData\"}],\"dbName\":null},\"Fixture\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"seasonType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venueLocation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixtureDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lastUpdated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"homeTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"awayTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"fixtureStatus\",\"kind\":\"enum\",\"type\":\"FixtureStatus\"},{\"name\":\"registeredChainIds\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"FixtureToLeague\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"LevrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"FixtureToLevrGame\"}],\"dbName\":null},\"Scores\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"scoresByPeriodHome\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"scoresByPeriodAway\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"totalScoresHome\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalScoresAway\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"LevrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToScores\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"LevrGame\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"seasonType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venueLocation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameClock\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"paused\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"fixtureDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"wentLiveAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"homeTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"awayTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"currentPeriod\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"actualDuration\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"normalizationFactor\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"gamePhase\",\"kind\":\"enum\",\"type\":\"GamePhase\"},{\"name\":\"levrFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameProgressBps\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sportGroup\",\"kind\":\"enum\",\"type\":\"SportGroup\"},{\"name\":\"fixtureObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixture\",\"kind\":\"object\",\"type\":\"Fixture\",\"relationName\":\"FixtureToLevrGame\"},{\"name\":\"tournamentObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournament\",\"kind\":\"object\",\"type\":\"Tournament\",\"relationName\":\"LevrGameToTournament\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToLevrGame\"},{\"name\":\"scores\",\"kind\":\"object\",\"type\":\"Scores\",\"relationName\":\"LevrGameToScores\"},{\"name\":\"markets\",\"kind\":\"object\",\"type\":\"Market\",\"relationName\":\"LevrGameToMarket\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Odds\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"odds\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"prices\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"marketType\",\"kind\":\"enum\",\"type\":\"MarketTypes\"},{\"name\":\"details\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"gamePhase\",\"kind\":\"enum\",\"type\":\"GamePhase\"},{\"name\":\"gamePeriod\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameClock\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"marketPhase\",\"kind\":\"enum\",\"type\":\"MarketStatus\"},{\"name\":\"levrGameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"marketObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"market\",\"kind\":\"object\",\"type\":\"Market\",\"relationName\":\"MarketToOdds\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Market\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"levrMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrMarketContract\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"maturedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"leveraged\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isMatured\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"normalizationFactor\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"marketDetails\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"marketRiskAllocation\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"providers\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"activeProvider\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"marketType\",\"kind\":\"enum\",\"type\":\"MarketTypes\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"MarketStatus\"},{\"name\":\"levrGameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToMarket\"},{\"name\":\"odds\",\"kind\":\"object\",\"type\":\"Odds\",\"relationName\":\"MarketToOdds\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"User\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"walletAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timeZone\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"preferredTimeZone\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"userOddsPreference\",\"kind\":\"enum\",\"type\":\"UserOddsPreference\"},{\"name\":\"profileImageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ApiKey\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"apiKeyId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ethAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ciphertext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"kmsKeyId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"service\",\"kind\":\"enum\",\"type\":\"LevrService\"},{\"name\":\"scopes\",\"kind\":\"enum\",\"type\":\"ApiKeyScope\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lastUsedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"usageCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AuditLog\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"resourceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
|
513
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"Provider\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"providerUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Tournament\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrTournamentId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bannerUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"endDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToTournament\"},{\"name\":\"leagues\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToTournament\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Sport\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrSportId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periodType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scoringType\",\"kind\":\"enum\",\"type\":\"ScoringType\"},{\"name\":\"standardDurationMs\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"standardPeriods\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"periodDuration\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hasDrawMarket\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"sportGroup\",\"kind\":\"enum\",\"type\":\"SportGroup\"},{\"name\":\"leagues\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToSport\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"League\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"abbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsLeagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournamentObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournament\",\"kind\":\"object\",\"type\":\"Tournament\",\"relationName\":\"LeagueToTournament\"},{\"name\":\"sportObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sport\",\"kind\":\"object\",\"type\":\"Sport\",\"relationName\":\"LeagueToSport\"},{\"name\":\"levrSportId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LeagueToLevrGame\"},{\"name\":\"fixtures\",\"kind\":\"object\",\"type\":\"Fixture\",\"relationName\":\"FixtureToLeague\"},{\"name\":\"teams\",\"kind\":\"object\",\"type\":\"TeamData\",\"relationName\":\"LeagueToTeamData\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"TeamData\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamOfficialAbbreviation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsTeamLogoUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamLogoUrlAsHome\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrTeamLogoUrlAsAway\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrleagueId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToTeamData\"}],\"dbName\":null},\"Fixture\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"levrFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"seasonType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venueLocation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixtureDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lastUpdated\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"homeTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"awayTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"fixtureStatus\",\"kind\":\"enum\",\"type\":\"FixtureStatus\"},{\"name\":\"registeredChainIds\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"FixtureToLeague\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"LevrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"FixtureToLevrGame\"}],\"dbName\":null},\"Scores\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"scoresByPeriodHome\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"scoresByPeriodAway\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"totalScoresHome\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"totalScoresAway\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"LevrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToScores\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"LevrGame\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"seasonType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venue\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"eventName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"venueLocation\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameClock\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"paused\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"fixtureDate\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"wentLiveAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"homeTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"awayTeam\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"currentPeriod\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"actualDuration\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"gamePhase\",\"kind\":\"enum\",\"type\":\"GamePhase\"},{\"name\":\"levrFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"opticOddsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lsportsFixtureId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameProgressBps\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"sportGroup\",\"kind\":\"enum\",\"type\":\"SportGroup\"},{\"name\":\"fixtureObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"fixture\",\"kind\":\"object\",\"type\":\"Fixture\",\"relationName\":\"FixtureToLevrGame\"},{\"name\":\"tournamentObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"tournament\",\"kind\":\"object\",\"type\":\"Tournament\",\"relationName\":\"LevrGameToTournament\"},{\"name\":\"leagueObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"league\",\"kind\":\"object\",\"type\":\"League\",\"relationName\":\"LeagueToLevrGame\"},{\"name\":\"scores\",\"kind\":\"object\",\"type\":\"Scores\",\"relationName\":\"LevrGameToScores\"},{\"name\":\"markets\",\"kind\":\"object\",\"type\":\"Market\",\"relationName\":\"LevrGameToMarket\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Odds\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"odds\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"prices\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"marketType\",\"kind\":\"enum\",\"type\":\"MarketTypes\"},{\"name\":\"details\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"gamePhase\",\"kind\":\"enum\",\"type\":\"GamePhase\"},{\"name\":\"gamePeriod\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameClock\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"marketPhase\",\"kind\":\"enum\",\"type\":\"MarketStatus\"},{\"name\":\"levrGameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"marketObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"market\",\"kind\":\"object\",\"type\":\"Market\",\"relationName\":\"MarketToOdds\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Market\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"chainId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"levrMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrMarketContract\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"gameMarketId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"txHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"maturedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"leveraged\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isMatured\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"normalizationFactor\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"marketDetails\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"marketRiskAllocation\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"providers\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"activeProvider\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"marketType\",\"kind\":\"enum\",\"type\":\"MarketTypes\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"MarketStatus\"},{\"name\":\"levrGameObjectId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"levrGame\",\"kind\":\"object\",\"type\":\"LevrGame\",\"relationName\":\"LevrGameToMarket\"},{\"name\":\"odds\",\"kind\":\"object\",\"type\":\"Odds\",\"relationName\":\"MarketToOdds\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"User\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"walletAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timeZone\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"preferredTimeZone\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"userOddsPreference\",\"kind\":\"enum\",\"type\":\"UserOddsPreference\"},{\"name\":\"profileImageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referralCode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referralsMade\",\"kind\":\"object\",\"type\":\"Referral\",\"relationName\":\"ReferrerRelations\"},{\"name\":\"referredBy\",\"kind\":\"object\",\"type\":\"Referral\",\"relationName\":\"ReferredRelations\"},{\"name\":\"referralRewards\",\"kind\":\"object\",\"type\":\"ReferralReward\",\"relationName\":\"UserRewards\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Referral\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"referrerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referredId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referralCode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referralSource\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"ReferralStatus\"},{\"name\":\"referrer\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ReferrerRelations\"},{\"name\":\"referred\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ReferredRelations\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ReferralEpoch\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"periodId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periodStart\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"periodEnd\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"timezone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"EpochStatus\"},{\"name\":\"totalFeesUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"rewardPoolUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"merkleRoot\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"merkleTxHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"rootPublishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"notes\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ReferralRewards\",\"kind\":\"object\",\"type\":\"ReferralReward\",\"relationName\":\"ReferralEpochToReferralReward\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ReferralReward\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"epochId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"periodId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"referredBetVolumeUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"referredFeeUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"tier\",\"kind\":\"enum\",\"type\":\"ReferralTier\"},{\"name\":\"tierPercentage\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"payoutBeforeScaleUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"payoutScaledUsd\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"payoutTokenUnits\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"scaleFactor\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"isClaimedOnChain\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"claimedTxHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastSyncedFromChainAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"UserRewards\"},{\"name\":\"epoch\",\"kind\":\"object\",\"type\":\"ReferralEpoch\",\"relationName\":\"ReferralEpochToReferralReward\"}],\"dbName\":null},\"ApiKey\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"apiKeyId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ethAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ciphertext\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"kmsKeyId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"service\",\"kind\":\"enum\",\"type\":\"LevrService\"},{\"name\":\"scopes\",\"kind\":\"enum\",\"type\":\"ApiKeyScope\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"lastUsedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"usageCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"AuditLog\":{\"fields\":[{\"name\":\"objectId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"_id\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"resourceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"timestamp\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
|
439
514
|
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
|
440
515
|
config.engineWasm = {
|
|
441
516
|
getRuntime: async () => require('./query_engine_bg.js'),
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// Main entry point - exports everything from core by default
|
|
18
18
|
__exportStar(require("./core"), exports);
|
|
19
|
-
//
|
|
20
19
|
// Note: Server and React modules should be imported via specific paths:
|
|
21
20
|
// import { ... } from "@levrbet/shared/server"
|
|
22
21
|
// import { ... } from "@levrbet/shared/react"
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,yCAAsB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,yCAAsB;AAEtB,wEAAwE;AAExE,+CAA+C;AAC/C,8CAA8C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levrbet/shared",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -66,7 +66,9 @@
|
|
|
66
66
|
"@types/node": "24.9.1",
|
|
67
67
|
"@types/object-hash": "^3.0.6",
|
|
68
68
|
"@types/react": ">=18.0.0",
|
|
69
|
+
"cpx": "^1.5.0",
|
|
69
70
|
"cross-fetch": "^4.1.0",
|
|
71
|
+
"mkdirp": "^3.0.1",
|
|
70
72
|
"prisma": "^6.18.0",
|
|
71
73
|
"react": ">=18.0.0",
|
|
72
74
|
"tsx": "^4.20.6",
|