Fix new build for dont need node_module in server

This commit is contained in:
mahmood
2026-09-10 23:51:52 +03:30
parent d7881543c9
commit 18415d50c6
263 changed files with 196377 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
export * from "./index"
+1
View File
@@ -0,0 +1 @@
module.exports = { ...require('.') }
+1
View File
@@ -0,0 +1 @@
export * from "./default"
File diff suppressed because one or more lines are too long
+423
View File
@@ -0,0 +1,423 @@
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.AdminScalarFieldEnum = {
id: 'id',
name: 'name',
mobile: 'mobile',
email: 'email',
passwordHash: 'passwordHash',
role: 'role',
status: 'status',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
name: 'name',
status: 'status',
lastLoginAt: 'lastLoginAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.OtpCodeScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
code: 'code',
userId: 'userId',
attempts: 'attempts',
consumed: 'consumed',
expiresAt: 'expiresAt',
createdAt: 'createdAt'
};
exports.Prisma.CampaignScalarFieldEnum = {
id: 'id',
title: 'title',
slug: 'slug',
description: 'description',
image: 'image',
banner: 'banner',
logo: 'logo',
startAt: 'startAt',
endAt: 'endAt',
status: 'status',
defaultChances: 'defaultChances',
rules: 'rules',
ctaText: 'ctaText',
wheelDesign: 'wheelDesign',
settings: 'settings',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.PrizeScalarFieldEnum = {
id: 'id',
campaignId: 'campaignId',
title: 'title',
description: 'description',
image: 'image',
type: 'type',
stockType: 'stockType',
initialStock: 'initialStock',
remainingStock: 'remainingStock',
weight: 'weight',
status: 'status',
sortOrder: 'sortOrder',
segmentColor: 'segmentColor',
expiresAt: 'expiresAt',
smsTemplate: 'smsTemplate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserCampaignScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
totalChances: 'totalChances',
usedChances: 'usedChances',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ChanceTransactionScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
amount: 'amount',
type: 'type',
referenceType: 'referenceType',
referenceId: 'referenceId',
description: 'description',
createdById: 'createdById',
createdAt: 'createdAt'
};
exports.Prisma.SpinScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
status: 'status',
idempotencyKey: 'idempotencyKey',
ip: 'ip',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
exports.Prisma.UserPrizeScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
spinId: 'spinId',
code: 'code',
status: 'status',
wonAt: 'wonAt',
redeemedAt: 'redeemedAt'
};
exports.Prisma.SmsLogScalarFieldEnum = {
id: 'id',
userId: 'userId',
mobile: 'mobile',
type: 'type',
message: 'message',
provider: 'provider',
status: 'status',
providerResponse: 'providerResponse',
createdAt: 'createdAt'
};
exports.Prisma.AdminLogScalarFieldEnum = {
id: 'id',
adminId: 'adminId',
action: 'action',
entityType: 'entityType',
entityId: 'entityId',
oldValue: 'oldValue',
newValue: 'newValue',
ip: 'ip',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.AdminRole = exports.$Enums.AdminRole = {
SUPER_ADMIN: 'SUPER_ADMIN',
OPERATOR: 'OPERATOR',
SUPPORT: 'SUPPORT'
};
exports.AdminStatus = exports.$Enums.AdminStatus = {
ACTIVE: 'ACTIVE',
DISABLED: 'DISABLED'
};
exports.UserStatus = exports.$Enums.UserStatus = {
ACTIVE: 'ACTIVE',
BLOCKED: 'BLOCKED'
};
exports.CampaignStatus = exports.$Enums.CampaignStatus = {
DRAFT: 'DRAFT',
ACTIVE: 'ACTIVE',
PAUSED: 'PAUSED',
FINISHED: 'FINISHED'
};
exports.WheelDesign = exports.$Enums.WheelDesign = {
CLASSIC_CASINO: 'CLASSIC_CASINO',
NEON_CYBER: 'NEON_CYBER',
MINIMAL_FLAT: 'MINIMAL_FLAT',
LUXURY_GOLD: 'LUXURY_GOLD',
PLAYFUL_CARTOON: 'PLAYFUL_CARTOON'
};
exports.PrizeType = exports.$Enums.PrizeType = {
PHYSICAL: 'PHYSICAL',
DISCOUNT_CODE: 'DISCOUNT_CODE',
CREDIT: 'CREDIT',
CASH: 'CASH',
NO_PRIZE: 'NO_PRIZE',
OTHER: 'OTHER'
};
exports.StockType = exports.$Enums.StockType = {
LIMITED: 'LIMITED',
UNLIMITED: 'UNLIMITED'
};
exports.PrizeStatus = exports.$Enums.PrizeStatus = {
ACTIVE: 'ACTIVE',
INACTIVE: 'INACTIVE'
};
exports.ChanceTxnType = exports.$Enums.ChanceTxnType = {
SIGNUP_BONUS: 'SIGNUP_BONUS',
ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT',
SPIN_CONSUME: 'SPIN_CONSUME',
CAMPAIGN_BONUS: 'CAMPAIGN_BONUS',
REFUND: 'REFUND'
};
exports.SpinStatus = exports.$Enums.SpinStatus = {
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
DUPLICATE: 'DUPLICATE'
};
exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = {
NEW: 'NEW',
CONTACTED: 'CONTACTED',
DELIVERED: 'DELIVERED',
ACTIVE_CODE: 'ACTIVE_CODE',
USED: 'USED',
EXPIRED: 'EXPIRED'
};
exports.SmsType = exports.$Enums.SmsType = {
OTP: 'OTP',
WINNING: 'WINNING',
NO_PRIZE: 'NO_PRIZE',
PRIZE_REMINDER: 'PRIZE_REMINDER'
};
exports.SmsStatus = exports.$Enums.SmsStatus = {
PENDING: 'PENDING',
SENT: 'SENT',
FAILED: 'FAILED'
};
exports.Prisma.ModelName = {
Admin: 'Admin',
User: 'User',
OtpCode: 'OtpCode',
Campaign: 'Campaign',
Prize: 'Prize',
UserCampaign: 'UserCampaign',
ChanceTransaction: 'ChanceTransaction',
Spin: 'Spin',
UserPrize: 'UserPrize',
SmsLog: 'SmsLog',
AdminLog: 'AdminLog'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+97
View File
@@ -0,0 +1,97 @@
{
"name": "prisma-client-ca4856e808ffda8f016f7f4164a4ecdbebbeaffd43eaeb2ed8134bfd7023f3ae",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js",
"exports": {
"./package.json": "./package.json",
".": {
"require": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"import": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"default": "./index.js"
},
"./edge": {
"types": "./edge.d.ts",
"require": "./edge.js",
"import": "./edge.js",
"default": "./edge.js"
},
"./react-native": {
"types": "./react-native.d.ts",
"require": "./react-native.js",
"import": "./react-native.js",
"default": "./react-native.js"
},
"./extension": {
"types": "./extension.d.ts",
"require": "./extension.js",
"import": "./extension.js",
"default": "./extension.js"
},
"./index-browser": {
"types": "./index.d.ts",
"require": "./index-browser.js",
"import": "./index-browser.js",
"default": "./index-browser.js"
},
"./index": {
"types": "./index.d.ts",
"require": "./index.js",
"import": "./index.js",
"default": "./index.js"
},
"./wasm": {
"types": "./wasm.d.ts",
"require": "./wasm.js",
"import": "./wasm.js",
"default": "./wasm.js"
},
"./runtime/library": {
"types": "./runtime/library.d.ts",
"require": "./runtime/library.js",
"import": "./runtime/library.js",
"default": "./runtime/library.js"
},
"./runtime/binary": {
"types": "./runtime/binary.d.ts",
"require": "./runtime/binary.js",
"import": "./runtime/binary.js",
"default": "./runtime/binary.js"
},
"./generator-build": {
"require": "./generator-build/index.js",
"import": "./generator-build/index.js",
"default": "./generator-build/index.js"
},
"./sql": {
"require": {
"types": "./sql.d.ts",
"node": "./sql.js",
"default": "./sql.js"
},
"import": {
"types": "./sql.d.ts",
"node": "./sql.mjs",
"default": "./sql.mjs"
},
"default": "./sql.js"
},
"./*": "./*"
},
"version": "5.22.0",
"sideEffects": false
}
+315
View File
@@ -0,0 +1,315 @@
generator client {
provider = "prisma-client-js"
// native = ویندوز/مک لوکال؛ debian = ایمیج node:20-bookworm-slim در Docker
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// ==================== ENUMS ====================
enum AdminStatus {
ACTIVE
DISABLED
}
enum AdminRole {
SUPER_ADMIN
OPERATOR
SUPPORT
}
enum UserStatus {
ACTIVE
BLOCKED
}
enum CampaignStatus {
DRAFT
ACTIVE
PAUSED
FINISHED
}
enum PrizeType {
PHYSICAL
DISCOUNT_CODE
CREDIT
CASH
NO_PRIZE
OTHER
}
enum StockType {
LIMITED
UNLIMITED
}
enum PrizeStatus {
ACTIVE
INACTIVE
}
enum SpinStatus {
SUCCESS
FAILED
DUPLICATE
}
enum ChanceTxnType {
SIGNUP_BONUS
ADMIN_ADJUSTMENT
SPIN_CONSUME
CAMPAIGN_BONUS
REFUND
}
enum UserPrizeStatus {
NEW
CONTACTED
DELIVERED
ACTIVE_CODE
USED
EXPIRED
}
enum SmsType {
OTP
WINNING
NO_PRIZE
PRIZE_REMINDER
}
enum SmsStatus {
PENDING
SENT
FAILED
}
enum WheelDesign {
CLASSIC_CASINO
NEON_CYBER
MINIMAL_FLAT
LUXURY_GOLD
PLAYFUL_CARTOON
}
// ==================== MODELS ====================
model Admin {
id String @id @default(uuid())
name String
mobile String @unique
email String @unique
passwordHash String @map("password_hash")
role AdminRole @default(OPERATOR)
status AdminStatus @default(ACTIVE)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
auditLogs AdminLog[]
chanceTxns ChanceTransaction[] @relation("AdminCreatedTxn")
@@map("admins")
}
model User {
id String @id @default(uuid())
mobile String @unique
name String?
status UserStatus @default(ACTIVE)
lastLoginAt DateTime? @map("last_login_at")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
userCampaigns UserCampaign[]
chanceTransactions ChanceTransaction[]
spins Spin[]
userPrizes UserPrize[]
otpCodes OtpCode[]
smsLogs SmsLog[]
@@index([mobile])
@@map("users")
}
model OtpCode {
id String @id @default(uuid())
mobile String
code String
userId String? @map("user_id")
user User? @relation(fields: [userId], references: [id])
attempts Int @default(0)
consumed Boolean @default(false)
expiresAt DateTime @map("expires_at")
createdAt DateTime @default(now()) @map("created_at")
@@index([mobile, consumed])
@@map("otp_codes")
}
model Campaign {
id String @id @default(uuid())
title String
slug String @unique
description String?
image String?
banner String?
logo String?
startAt DateTime @map("start_at")
endAt DateTime @map("end_at")
status CampaignStatus @default(DRAFT)
defaultChances Int @default(0) @map("default_chances")
rules String?
ctaText String? @map("cta_text")
wheelDesign WheelDesign @default(CLASSIC_CASINO) @map("wheel_design")
settings Json? // primaryColor, secondaryColor, headerText, buttonText, headerImage, celebrationEffect...
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
prizes Prize[]
userCampaigns UserCampaign[]
chanceTxns ChanceTransaction[]
spins Spin[]
userPrizes UserPrize[]
@@index([status, startAt, endAt])
@@map("campaigns")
}
model Prize {
id String @id @default(uuid())
campaignId String @map("campaign_id")
campaign Campaign @relation(fields: [campaignId], references: [id], onDelete: Cascade)
title String
description String?
image String?
type PrizeType
stockType StockType @map("stock_type")
initialStock Int? @map("initial_stock")
remainingStock Int? @map("remaining_stock")
weight Int
status PrizeStatus @default(ACTIVE)
sortOrder Int @default(0) @map("sort_order")
segmentColor String @map("segment_color")
expiresAt DateTime? @map("expires_at")
smsTemplate String? @map("sms_template")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
spins Spin[]
userPrizes UserPrize[]
@@index([campaignId, status])
@@map("prizes")
}
model UserCampaign {
id String @id @default(uuid())
userId String @map("user_id")
user User @relation(fields: [userId], references: [id])
campaignId String @map("campaign_id")
campaign Campaign @relation(fields: [campaignId], references: [id])
totalChances Int @default(0) @map("total_chances")
usedChances Int @default(0) @map("used_chances")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@unique([userId, campaignId])
@@map("user_campaigns")
}
model ChanceTransaction {
id String @id @default(uuid())
userId String @map("user_id")
user User @relation(fields: [userId], references: [id])
campaignId String @map("campaign_id")
campaign Campaign @relation(fields: [campaignId], references: [id])
amount Int // مثبت یا منفی
type ChanceTxnType
referenceType String? @map("reference_type") // e.g. "spin", "manual"
referenceId String? @map("reference_id")
description String?
createdById String? @map("created_by") // admin id در صورت تغییر دستی
createdBy Admin? @relation("AdminCreatedTxn", fields: [createdById], references: [id])
createdAt DateTime @default(now()) @map("created_at")
@@index([userId, campaignId])
@@map("chance_transactions")
}
model Spin {
id String @id @default(uuid())
userId String @map("user_id")
user User @relation(fields: [userId], references: [id])
campaignId String @map("campaign_id")
campaign Campaign @relation(fields: [campaignId], references: [id])
prizeId String? @map("prize_id")
prize Prize? @relation(fields: [prizeId], references: [id])
status SpinStatus @default(SUCCESS)
idempotencyKey String @unique @map("idempotency_key")
ip String?
userAgent String? @map("user_agent")
createdAt DateTime @default(now()) @map("created_at")
userPrize UserPrize?
@@index([userId, campaignId])
@@index([campaignId, createdAt])
@@map("spins")
}
model UserPrize {
id String @id @default(uuid())
userId String @map("user_id")
user User @relation(fields: [userId], references: [id])
campaignId String @map("campaign_id")
campaign Campaign @relation(fields: [campaignId], references: [id])
prizeId String @map("prize_id")
prize Prize @relation(fields: [prizeId], references: [id])
spinId String @unique @map("spin_id")
spin Spin @relation(fields: [spinId], references: [id])
code String? @unique
status UserPrizeStatus @default(NEW)
wonAt DateTime @default(now()) @map("won_at")
redeemedAt DateTime? @map("redeemed_at")
@@index([userId])
@@index([status])
@@map("user_prizes")
}
model SmsLog {
id String @id @default(uuid())
userId String? @map("user_id")
user User? @relation(fields: [userId], references: [id])
mobile String
type SmsType
message String
provider String @default("raygansms")
status SmsStatus @default(PENDING)
providerResponse Json? @map("provider_response")
createdAt DateTime @default(now()) @map("created_at")
@@index([mobile, type])
@@map("sms_logs")
}
model AdminLog {
id String @id @default(uuid())
adminId String @map("admin_id")
admin Admin @relation(fields: [adminId], references: [id])
action String // e.g. "prize.update", "chance.add"
entityType String @map("entity_type")
entityId String @map("entity_id")
oldValue Json? @map("old_value")
newValue Json? @map("new_value")
ip String?
createdAt DateTime @default(now()) @map("created_at")
@@index([entityType, entityId])
@@map("admin_logs")
}
+1
View File
@@ -0,0 +1 @@
export * from "./index"
+423
View File
@@ -0,0 +1,423 @@
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.AdminScalarFieldEnum = {
id: 'id',
name: 'name',
mobile: 'mobile',
email: 'email',
passwordHash: 'passwordHash',
role: 'role',
status: 'status',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
name: 'name',
status: 'status',
lastLoginAt: 'lastLoginAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.OtpCodeScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
code: 'code',
userId: 'userId',
attempts: 'attempts',
consumed: 'consumed',
expiresAt: 'expiresAt',
createdAt: 'createdAt'
};
exports.Prisma.CampaignScalarFieldEnum = {
id: 'id',
title: 'title',
slug: 'slug',
description: 'description',
image: 'image',
banner: 'banner',
logo: 'logo',
startAt: 'startAt',
endAt: 'endAt',
status: 'status',
defaultChances: 'defaultChances',
rules: 'rules',
ctaText: 'ctaText',
wheelDesign: 'wheelDesign',
settings: 'settings',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.PrizeScalarFieldEnum = {
id: 'id',
campaignId: 'campaignId',
title: 'title',
description: 'description',
image: 'image',
type: 'type',
stockType: 'stockType',
initialStock: 'initialStock',
remainingStock: 'remainingStock',
weight: 'weight',
status: 'status',
sortOrder: 'sortOrder',
segmentColor: 'segmentColor',
expiresAt: 'expiresAt',
smsTemplate: 'smsTemplate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserCampaignScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
totalChances: 'totalChances',
usedChances: 'usedChances',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ChanceTransactionScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
amount: 'amount',
type: 'type',
referenceType: 'referenceType',
referenceId: 'referenceId',
description: 'description',
createdById: 'createdById',
createdAt: 'createdAt'
};
exports.Prisma.SpinScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
status: 'status',
idempotencyKey: 'idempotencyKey',
ip: 'ip',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
exports.Prisma.UserPrizeScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
spinId: 'spinId',
code: 'code',
status: 'status',
wonAt: 'wonAt',
redeemedAt: 'redeemedAt'
};
exports.Prisma.SmsLogScalarFieldEnum = {
id: 'id',
userId: 'userId',
mobile: 'mobile',
type: 'type',
message: 'message',
provider: 'provider',
status: 'status',
providerResponse: 'providerResponse',
createdAt: 'createdAt'
};
exports.Prisma.AdminLogScalarFieldEnum = {
id: 'id',
adminId: 'adminId',
action: 'action',
entityType: 'entityType',
entityId: 'entityId',
oldValue: 'oldValue',
newValue: 'newValue',
ip: 'ip',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.AdminRole = exports.$Enums.AdminRole = {
SUPER_ADMIN: 'SUPER_ADMIN',
OPERATOR: 'OPERATOR',
SUPPORT: 'SUPPORT'
};
exports.AdminStatus = exports.$Enums.AdminStatus = {
ACTIVE: 'ACTIVE',
DISABLED: 'DISABLED'
};
exports.UserStatus = exports.$Enums.UserStatus = {
ACTIVE: 'ACTIVE',
BLOCKED: 'BLOCKED'
};
exports.CampaignStatus = exports.$Enums.CampaignStatus = {
DRAFT: 'DRAFT',
ACTIVE: 'ACTIVE',
PAUSED: 'PAUSED',
FINISHED: 'FINISHED'
};
exports.WheelDesign = exports.$Enums.WheelDesign = {
CLASSIC_CASINO: 'CLASSIC_CASINO',
NEON_CYBER: 'NEON_CYBER',
MINIMAL_FLAT: 'MINIMAL_FLAT',
LUXURY_GOLD: 'LUXURY_GOLD',
PLAYFUL_CARTOON: 'PLAYFUL_CARTOON'
};
exports.PrizeType = exports.$Enums.PrizeType = {
PHYSICAL: 'PHYSICAL',
DISCOUNT_CODE: 'DISCOUNT_CODE',
CREDIT: 'CREDIT',
CASH: 'CASH',
NO_PRIZE: 'NO_PRIZE',
OTHER: 'OTHER'
};
exports.StockType = exports.$Enums.StockType = {
LIMITED: 'LIMITED',
UNLIMITED: 'UNLIMITED'
};
exports.PrizeStatus = exports.$Enums.PrizeStatus = {
ACTIVE: 'ACTIVE',
INACTIVE: 'INACTIVE'
};
exports.ChanceTxnType = exports.$Enums.ChanceTxnType = {
SIGNUP_BONUS: 'SIGNUP_BONUS',
ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT',
SPIN_CONSUME: 'SPIN_CONSUME',
CAMPAIGN_BONUS: 'CAMPAIGN_BONUS',
REFUND: 'REFUND'
};
exports.SpinStatus = exports.$Enums.SpinStatus = {
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
DUPLICATE: 'DUPLICATE'
};
exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = {
NEW: 'NEW',
CONTACTED: 'CONTACTED',
DELIVERED: 'DELIVERED',
ACTIVE_CODE: 'ACTIVE_CODE',
USED: 'USED',
EXPIRED: 'EXPIRED'
};
exports.SmsType = exports.$Enums.SmsType = {
OTP: 'OTP',
WINNING: 'WINNING',
NO_PRIZE: 'NO_PRIZE',
PRIZE_REMINDER: 'PRIZE_REMINDER'
};
exports.SmsStatus = exports.$Enums.SmsStatus = {
PENDING: 'PENDING',
SENT: 'SENT',
FAILED: 'FAILED'
};
exports.Prisma.ModelName = {
Admin: 'Admin',
User: 'User',
OtpCode: 'OtpCode',
Campaign: 'Campaign',
Prize: 'Prize',
UserCampaign: 'UserCampaign',
ChanceTransaction: 'ChanceTransaction',
Spin: 'Spin',
UserPrize: 'UserPrize',
SmsLog: 'SmsLog',
AdminLog: 'AdminLog'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)