gambling-bot-shared 1.0.0 → 1.0.2
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/atm/atmRequest.mongoose.d.ts +147 -0
- package/dist/atm/index.d.ts +2 -0
- package/dist/atm/index.js +0 -3
- package/dist/atm/schemas/atm.forms.d.ts +5 -0
- package/dist/atm/types/atmRequest.d.ts +17 -0
- package/dist/blackjack/index.d.ts +2 -0
- package/dist/blackjack/index.js +0 -3
- package/dist/bonus/constants/bonusLimits.d.ts +4 -0
- package/dist/bonus/index.d.ts +7 -0
- package/dist/bonus/schemas/bonus.forms.d.ts +16 -0
- package/dist/bonus/types/bonus.d.ts +13 -0
- package/dist/bonus/utils/bonusStreak.d.ts +7 -0
- package/dist/bonus/utils/calculateBonusReward.d.ts +14 -0
- package/dist/bonus/utils/generateBonusPreview.d.ts +11 -0
- package/dist/bonus/utils/normalizeBonusSettings.d.ts +6 -0
- package/dist/casino/blackjackGame.mongoose.d.ts +129 -0
- package/dist/casino/constants/blackjack.d.ts +41 -0
- package/dist/casino/constants/casinoGames.d.ts +3 -0
- package/dist/casino/constants/defaultConfig.d.ts +108 -0
- package/dist/casino/constants/index.d.ts +7 -0
- package/dist/casino/constants/lotteryConfig.d.ts +2 -0
- package/dist/casino/constants/maxSimulations.d.ts +5 -0
- package/dist/casino/constants/plinkoConfig.d.ts +15 -0
- package/dist/casino/constants/rouletteConfig.d.ts +1 -0
- package/dist/casino/index.d.ts +11 -0
- package/dist/casino/index.js +0 -3
- package/dist/casino/schemas/casino.forms.d.ts +80 -0
- package/dist/casino/services/casinoBet.service.d.ts +41 -0
- package/dist/casino/types/blackjackGame.d.ts +30 -0
- package/dist/casino/types/casinoSettings.d.ts +2 -0
- package/dist/casino/utils/calculateRTP.d.ts +2 -0
- package/dist/casino/utils/normalizeCasinoSettings.d.ts +2 -0
- package/dist/casino/utils/validateBetAmount.d.ts +8 -0
- package/dist/casino/utils/winAnnouncements.d.ts +4 -0
- package/dist/common/formatters.d.ts +16 -0
- package/dist/common/generateId.d.ts +1 -0
- package/dist/common/index.d.ts +4 -0
- package/dist/common/parseTimeToSeconds.d.ts +1 -0
- package/dist/common/zod.d.ts +2 -0
- package/dist/guild/constants/commonTimezones.d.ts +4 -0
- package/dist/guild/constants/defaultGlobalSettings.d.ts +20 -0
- package/dist/guild/guildConfiguration.mongoose.d.ts +227 -0
- package/dist/guild/index.d.ts +7 -0
- package/dist/guild/index.js +0 -3
- package/dist/guild/schemas/guild.forms.d.ts +68 -0
- package/dist/guild/types/guildConfiguration.d.ts +35 -0
- package/dist/guild/utils/globalSettings.d.ts +6 -0
- package/dist/guild/utils/guildTimezone.d.ts +6 -0
- package/dist/guild/utils/normalizeGlobalSettings.d.ts +2 -0
- package/dist/mongoose/index.d.ts +8 -0
- package/dist/predictions/index.d.ts +10 -0
- package/dist/predictions/index.js +0 -3
- package/dist/predictions/prediction.mongoose.d.ts +102 -0
- package/dist/predictions/schemas/prediction.forms.d.ts +20 -0
- package/dist/predictions/services/normalizePredictionInput.d.ts +6 -0
- package/dist/predictions/services/parsePredictionAutolock.d.ts +9 -0
- package/dist/predictions/services/parsePredictionChoices.d.ts +11 -0
- package/dist/predictions/services/prediction.db.d.ts +55 -0
- package/dist/predictions/services/predictionLifecycle.service.d.ts +25 -0
- package/dist/predictions/services/predictionSummary.d.ts +30 -0
- package/dist/predictions/services/types.d.ts +27 -0
- package/dist/predictions/types/prediction.d.ts +21 -0
- package/dist/predictions/utils/validatePredictionBet.d.ts +13 -0
- package/dist/raffle/index.d.ts +5 -0
- package/dist/raffle/index.js +0 -3
- package/dist/raffle/raffle.mongoose.d.ts +138 -0
- package/dist/raffle/schemas/raffle.forms.d.ts +11 -0
- package/dist/raffle/services/raffle.db.d.ts +51 -0
- package/dist/raffle/services/raffleLifecycle.service.d.ts +15 -0
- package/dist/raffle/services/types.d.ts +27 -0
- package/dist/raffle/types/raffle.d.ts +21 -0
- package/dist/transactions/constants/gameRecordFields.d.ts +8 -0
- package/dist/transactions/constants/index.d.ts +2 -0
- package/dist/transactions/constants/transaction.d.ts +2 -0
- package/dist/transactions/index.d.ts +4 -0
- package/dist/transactions/transaction.mongoose.d.ts +93 -0
- package/dist/transactions/types/transaction.d.ts +15 -0
- package/dist/user/index.d.ts +1 -0
- package/dist/user/index.js +0 -3
- package/dist/user/types/user.d.ts +11 -0
- package/dist/user/user.mongoose.d.ts +93 -0
- package/dist/vip/index.d.ts +2 -0
- package/dist/vip/index.js +0 -3
- package/dist/vip/schemas/vip.forms.d.ts +10 -0
- package/dist/vip/types/vipRoom.d.ts +9 -0
- package/dist/vip/vipRoom.mongoose.d.ts +75 -0
- package/package.json +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { TAtmRequest } from './types/atmRequest';
|
|
3
|
+
export declare const AtmRequestSchema: Schema<TAtmRequest, import("mongoose").Model<TAtmRequest, any, any, any, any, any, TAtmRequest>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
4
|
+
id: string;
|
|
5
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
6
|
+
_id: import("mongoose").Types.ObjectId;
|
|
7
|
+
} & {
|
|
8
|
+
__v: number;
|
|
9
|
+
}, "id"> & {
|
|
10
|
+
id: string;
|
|
11
|
+
}, {
|
|
12
|
+
requestId?: import("mongoose").SchemaDefinitionProperty<string, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
13
|
+
id: string;
|
|
14
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}, "id"> & {
|
|
19
|
+
id: string;
|
|
20
|
+
}> | undefined;
|
|
21
|
+
guildId?: import("mongoose").SchemaDefinitionProperty<string, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
22
|
+
id: string;
|
|
23
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
} & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}, "id"> & {
|
|
28
|
+
id: string;
|
|
29
|
+
}> | undefined;
|
|
30
|
+
userId?: import("mongoose").SchemaDefinitionProperty<string, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
31
|
+
id: string;
|
|
32
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
33
|
+
_id: import("mongoose").Types.ObjectId;
|
|
34
|
+
} & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, "id"> & {
|
|
37
|
+
id: string;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
type?: import("mongoose").SchemaDefinitionProperty<"deposit" | "withdraw", TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
40
|
+
id: string;
|
|
41
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
42
|
+
_id: import("mongoose").Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}, "id"> & {
|
|
46
|
+
id: string;
|
|
47
|
+
}> | undefined;
|
|
48
|
+
amount?: import("mongoose").SchemaDefinitionProperty<number, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
49
|
+
id: string;
|
|
50
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
51
|
+
_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}, "id"> & {
|
|
55
|
+
id: string;
|
|
56
|
+
}> | undefined;
|
|
57
|
+
account?: import("mongoose").SchemaDefinitionProperty<string, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
58
|
+
id: string;
|
|
59
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
60
|
+
_id: import("mongoose").Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}, "id"> & {
|
|
64
|
+
id: string;
|
|
65
|
+
}> | undefined;
|
|
66
|
+
status?: import("mongoose").SchemaDefinitionProperty<"pending" | "approved" | "rejected", TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
67
|
+
id: string;
|
|
68
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
69
|
+
_id: import("mongoose").Types.ObjectId;
|
|
70
|
+
} & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}, "id"> & {
|
|
73
|
+
id: string;
|
|
74
|
+
}> | undefined;
|
|
75
|
+
handledBy?: import("mongoose").SchemaDefinitionProperty<string | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
76
|
+
id: string;
|
|
77
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
78
|
+
_id: import("mongoose").Types.ObjectId;
|
|
79
|
+
} & {
|
|
80
|
+
__v: number;
|
|
81
|
+
}, "id"> & {
|
|
82
|
+
id: string;
|
|
83
|
+
}> | undefined;
|
|
84
|
+
handledAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
85
|
+
id: string;
|
|
86
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
87
|
+
_id: import("mongoose").Types.ObjectId;
|
|
88
|
+
} & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, "id"> & {
|
|
91
|
+
id: string;
|
|
92
|
+
}> | undefined;
|
|
93
|
+
notes?: import("mongoose").SchemaDefinitionProperty<string | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
94
|
+
id: string;
|
|
95
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
96
|
+
_id: import("mongoose").Types.ObjectId;
|
|
97
|
+
} & {
|
|
98
|
+
__v: number;
|
|
99
|
+
}, "id"> & {
|
|
100
|
+
id: string;
|
|
101
|
+
}> | undefined;
|
|
102
|
+
logChannelId?: import("mongoose").SchemaDefinitionProperty<string | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
103
|
+
id: string;
|
|
104
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
105
|
+
_id: import("mongoose").Types.ObjectId;
|
|
106
|
+
} & {
|
|
107
|
+
__v: number;
|
|
108
|
+
}, "id"> & {
|
|
109
|
+
id: string;
|
|
110
|
+
}> | undefined;
|
|
111
|
+
logMessageId?: import("mongoose").SchemaDefinitionProperty<string | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
112
|
+
id: string;
|
|
113
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
114
|
+
_id: import("mongoose").Types.ObjectId;
|
|
115
|
+
} & {
|
|
116
|
+
__v: number;
|
|
117
|
+
}, "id"> & {
|
|
118
|
+
id: string;
|
|
119
|
+
}> | undefined;
|
|
120
|
+
meta?: import("mongoose").SchemaDefinitionProperty<Record<string, unknown> | undefined, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
121
|
+
id: string;
|
|
122
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
123
|
+
_id: import("mongoose").Types.ObjectId;
|
|
124
|
+
} & {
|
|
125
|
+
__v: number;
|
|
126
|
+
}, "id"> & {
|
|
127
|
+
id: string;
|
|
128
|
+
}> | undefined;
|
|
129
|
+
createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
130
|
+
id: string;
|
|
131
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
132
|
+
_id: import("mongoose").Types.ObjectId;
|
|
133
|
+
} & {
|
|
134
|
+
__v: number;
|
|
135
|
+
}, "id"> & {
|
|
136
|
+
id: string;
|
|
137
|
+
}> | undefined;
|
|
138
|
+
updatedAt?: import("mongoose").SchemaDefinitionProperty<Date, TAtmRequest, import("mongoose").Document<unknown, {}, TAtmRequest, {
|
|
139
|
+
id: string;
|
|
140
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TAtmRequest & {
|
|
141
|
+
_id: import("mongoose").Types.ObjectId;
|
|
142
|
+
} & {
|
|
143
|
+
__v: number;
|
|
144
|
+
}, "id"> & {
|
|
145
|
+
id: string;
|
|
146
|
+
}> | undefined;
|
|
147
|
+
}, TAtmRequest>;
|
package/dist/atm/index.js
CHANGED
|
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AtmRequestSchema = void 0;
|
|
18
17
|
__exportStar(require("./types/atmRequest"), exports);
|
|
19
|
-
var atmRequest_mongoose_1 = require("./atmRequest.mongoose");
|
|
20
|
-
Object.defineProperty(exports, "AtmRequestSchema", { enumerable: true, get: function () { return atmRequest_mongoose_1.AtmRequestSchema; } });
|
|
21
18
|
__exportStar(require("./schemas/atm.forms"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TAtmRequest = {
|
|
2
|
+
requestId: string;
|
|
3
|
+
guildId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
type: 'deposit' | 'withdraw';
|
|
6
|
+
amount: number;
|
|
7
|
+
account: string;
|
|
8
|
+
status: 'pending' | 'approved' | 'rejected';
|
|
9
|
+
handledBy?: string;
|
|
10
|
+
handledAt?: Date;
|
|
11
|
+
notes?: string;
|
|
12
|
+
logChannelId?: string;
|
|
13
|
+
logMessageId?: string;
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
};
|
package/dist/blackjack/index.js
CHANGED
|
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.BlackjackGameSchema = void 0;
|
|
18
17
|
__exportStar(require("../casino/constants/blackjack"), exports);
|
|
19
18
|
__exportStar(require("../casino/types/blackjackGame"), exports);
|
|
20
|
-
var blackjackGame_mongoose_1 = require("../casino/blackjackGame.mongoose");
|
|
21
|
-
Object.defineProperty(exports, "BlackjackGameSchema", { enumerable: true, get: function () { return blackjackGame_mongoose_1.BlackjackGameSchema; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Max currency amount for any single bonus field (base, cap, milestones, increment). */
|
|
2
|
+
export declare const BONUS_MAX_AMOUNT = 10000000;
|
|
3
|
+
/** Max daily streak multiplier in exponential mode (prevents Math.pow overflow). */
|
|
4
|
+
export declare const BONUS_MAX_STREAK_MULTIPLIER = 10;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './constants/bonusLimits';
|
|
2
|
+
export * from './types/bonus';
|
|
3
|
+
export * from './utils/bonusStreak';
|
|
4
|
+
export * from './utils/calculateBonusReward';
|
|
5
|
+
export * from './utils/generateBonusPreview';
|
|
6
|
+
export * from './utils/normalizeBonusSettings';
|
|
7
|
+
export * from './schemas/bonus.forms';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const bonusFormSchema: z.ZodObject<{
|
|
3
|
+
rewardMode: z.ZodEnum<{
|
|
4
|
+
linear: "linear";
|
|
5
|
+
exponential: "exponential";
|
|
6
|
+
}>;
|
|
7
|
+
baseReward: z.ZodNumber;
|
|
8
|
+
streakIncrement: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
streakMultiplier: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>, z.ZodTransform<number | undefined, string | number | undefined>>, z.ZodOptional<z.ZodNumber>>;
|
|
10
|
+
maxReward: z.ZodNumber;
|
|
11
|
+
resetOnMax: z.ZodBoolean;
|
|
12
|
+
milestoneBonus: z.ZodObject<{
|
|
13
|
+
weekly: z.ZodNumber;
|
|
14
|
+
monthly: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RewardMode } from '../../guild/types/guildConfiguration';
|
|
2
|
+
export type BonusSettings = {
|
|
3
|
+
rewardMode: RewardMode;
|
|
4
|
+
baseReward: number;
|
|
5
|
+
streakIncrement?: number;
|
|
6
|
+
streakMultiplier?: number;
|
|
7
|
+
maxReward: number;
|
|
8
|
+
resetOnMax: boolean;
|
|
9
|
+
milestoneBonus: {
|
|
10
|
+
weekly: number;
|
|
11
|
+
monthly: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const canClaimDailyBonus: (lastClaim: Date | null, now: Date) => boolean;
|
|
2
|
+
export declare const getStreakAfterClaim: (lastClaim: Date | null, now: Date, currentStreak: number) => number;
|
|
3
|
+
export declare const getEffectiveStreak: (lastClaim: Date | null, now: Date, storedStreak: number) => number;
|
|
4
|
+
export declare const getStreakDisplay: (lastClaim: Date | null, now: Date, streak: number) => {
|
|
5
|
+
currentStreak: number;
|
|
6
|
+
nextStreak: number;
|
|
7
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BonusSettings } from '../types/bonus';
|
|
2
|
+
export type CalculateBonusRewardInput = {
|
|
3
|
+
streak: number;
|
|
4
|
+
settings: BonusSettings;
|
|
5
|
+
};
|
|
6
|
+
export type CalculateBonusRewardResult = {
|
|
7
|
+
reward: number;
|
|
8
|
+
base: number;
|
|
9
|
+
weekly: number;
|
|
10
|
+
monthly: number;
|
|
11
|
+
isReset: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const getBonusCycleLength: (rewardMode: BonusSettings["rewardMode"], baseReward: number, maxReward: number, streakIncrement: number, streakMultiplier: number) => number;
|
|
14
|
+
export declare const calculateBonusReward: ({ streak, settings }: CalculateBonusRewardInput) => CalculateBonusRewardResult;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BonusSettings } from '../types/bonus';
|
|
2
|
+
export declare const PREVIEW_DAYS = 60;
|
|
3
|
+
export type PreviewDay = {
|
|
4
|
+
day: number;
|
|
5
|
+
reward: number;
|
|
6
|
+
base: number;
|
|
7
|
+
weekly: number;
|
|
8
|
+
monthly: number;
|
|
9
|
+
isReset: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const generateBonusPreview: (settings: BonusSettings, days?: number) => PreviewDay[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BonusSettings } from '../types/bonus';
|
|
2
|
+
export declare const normalizeBonusSettings: (settings: BonusSettings) => BonusSettings;
|
|
3
|
+
/** Parse admin integer inputs (digits only) and clamp to the bonus amount cap. */
|
|
4
|
+
export declare const parseBonusAmountInput: (raw: string) => number;
|
|
5
|
+
/** Parse streak multiplier text and clamp to the allowed range. */
|
|
6
|
+
export declare const parseBonusMultiplierInput: (raw: string) => number | undefined;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { TBlackjackGame, TBlackjackHand } from './types/blackjackGame';
|
|
3
|
+
export declare const BlackjackGameSchema: Schema<TBlackjackGame, import("mongoose").Model<TBlackjackGame, any, any, any, any, any, TBlackjackGame>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
4
|
+
id: string;
|
|
5
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
6
|
+
_id: import("mongoose").Types.ObjectId;
|
|
7
|
+
} & {
|
|
8
|
+
__v: number;
|
|
9
|
+
}, "id"> & {
|
|
10
|
+
id: string;
|
|
11
|
+
}, {
|
|
12
|
+
userId?: import("mongoose").SchemaDefinitionProperty<string, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
13
|
+
id: string;
|
|
14
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}, "id"> & {
|
|
19
|
+
id: string;
|
|
20
|
+
}> | undefined;
|
|
21
|
+
guildId?: import("mongoose").SchemaDefinitionProperty<string, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
22
|
+
id: string;
|
|
23
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
} & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}, "id"> & {
|
|
28
|
+
id: string;
|
|
29
|
+
}> | undefined;
|
|
30
|
+
channelId?: import("mongoose").SchemaDefinitionProperty<string, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
31
|
+
id: string;
|
|
32
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
33
|
+
_id: import("mongoose").Types.ObjectId;
|
|
34
|
+
} & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, "id"> & {
|
|
37
|
+
id: string;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
messageId?: import("mongoose").SchemaDefinitionProperty<string, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
40
|
+
id: string;
|
|
41
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
42
|
+
_id: import("mongoose").Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}, "id"> & {
|
|
46
|
+
id: string;
|
|
47
|
+
}> | undefined;
|
|
48
|
+
betId?: import("mongoose").SchemaDefinitionProperty<string, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
49
|
+
id: string;
|
|
50
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
51
|
+
_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}, "id"> & {
|
|
55
|
+
id: string;
|
|
56
|
+
}> | undefined;
|
|
57
|
+
deck?: import("mongoose").SchemaDefinitionProperty<import("./types/blackjackGame").Card[], TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
58
|
+
id: string;
|
|
59
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
60
|
+
_id: import("mongoose").Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}, "id"> & {
|
|
64
|
+
id: string;
|
|
65
|
+
}> | undefined;
|
|
66
|
+
deckIndex?: import("mongoose").SchemaDefinitionProperty<number, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
67
|
+
id: string;
|
|
68
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
69
|
+
_id: import("mongoose").Types.ObjectId;
|
|
70
|
+
} & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}, "id"> & {
|
|
73
|
+
id: string;
|
|
74
|
+
}> | undefined;
|
|
75
|
+
hands?: import("mongoose").SchemaDefinitionProperty<TBlackjackHand[], TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
76
|
+
id: string;
|
|
77
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
78
|
+
_id: import("mongoose").Types.ObjectId;
|
|
79
|
+
} & {
|
|
80
|
+
__v: number;
|
|
81
|
+
}, "id"> & {
|
|
82
|
+
id: string;
|
|
83
|
+
}> | undefined;
|
|
84
|
+
activeHandIndex?: import("mongoose").SchemaDefinitionProperty<number, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
85
|
+
id: string;
|
|
86
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
87
|
+
_id: import("mongoose").Types.ObjectId;
|
|
88
|
+
} & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, "id"> & {
|
|
91
|
+
id: string;
|
|
92
|
+
}> | undefined;
|
|
93
|
+
phase?: import("mongoose").SchemaDefinitionProperty<import("./types/blackjackGame").GamePhase, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
94
|
+
id: string;
|
|
95
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
96
|
+
_id: import("mongoose").Types.ObjectId;
|
|
97
|
+
} & {
|
|
98
|
+
__v: number;
|
|
99
|
+
}, "id"> & {
|
|
100
|
+
id: string;
|
|
101
|
+
}> | undefined;
|
|
102
|
+
dealerCards?: import("mongoose").SchemaDefinitionProperty<import("./types/blackjackGame").Card[], TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
103
|
+
id: string;
|
|
104
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
105
|
+
_id: import("mongoose").Types.ObjectId;
|
|
106
|
+
} & {
|
|
107
|
+
__v: number;
|
|
108
|
+
}, "id"> & {
|
|
109
|
+
id: string;
|
|
110
|
+
}> | undefined;
|
|
111
|
+
createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
112
|
+
id: string;
|
|
113
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
114
|
+
_id: import("mongoose").Types.ObjectId;
|
|
115
|
+
} & {
|
|
116
|
+
__v: number;
|
|
117
|
+
}, "id"> & {
|
|
118
|
+
id: string;
|
|
119
|
+
}> | undefined;
|
|
120
|
+
updatedAt?: import("mongoose").SchemaDefinitionProperty<Date, TBlackjackGame, import("mongoose").Document<unknown, {}, TBlackjackGame, {
|
|
121
|
+
id: string;
|
|
122
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<TBlackjackGame & {
|
|
123
|
+
_id: import("mongoose").Types.ObjectId;
|
|
124
|
+
} & {
|
|
125
|
+
__v: number;
|
|
126
|
+
}, "id"> & {
|
|
127
|
+
id: string;
|
|
128
|
+
}> | undefined;
|
|
129
|
+
}, TBlackjackGame>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SUITES: readonly ["♠️", "♣️", "♥️", "♦️"];
|
|
2
|
+
export declare const VALUES: readonly [{
|
|
3
|
+
readonly label: "A";
|
|
4
|
+
readonly value: 11;
|
|
5
|
+
}, {
|
|
6
|
+
readonly label: "2";
|
|
7
|
+
readonly value: 2;
|
|
8
|
+
}, {
|
|
9
|
+
readonly label: "3";
|
|
10
|
+
readonly value: 3;
|
|
11
|
+
}, {
|
|
12
|
+
readonly label: "4";
|
|
13
|
+
readonly value: 4;
|
|
14
|
+
}, {
|
|
15
|
+
readonly label: "5";
|
|
16
|
+
readonly value: 5;
|
|
17
|
+
}, {
|
|
18
|
+
readonly label: "6";
|
|
19
|
+
readonly value: 6;
|
|
20
|
+
}, {
|
|
21
|
+
readonly label: "7";
|
|
22
|
+
readonly value: 7;
|
|
23
|
+
}, {
|
|
24
|
+
readonly label: "8";
|
|
25
|
+
readonly value: 8;
|
|
26
|
+
}, {
|
|
27
|
+
readonly label: "9";
|
|
28
|
+
readonly value: 9;
|
|
29
|
+
}, {
|
|
30
|
+
readonly label: "10";
|
|
31
|
+
readonly value: 10;
|
|
32
|
+
}, {
|
|
33
|
+
readonly label: "J";
|
|
34
|
+
readonly value: 10;
|
|
35
|
+
}, {
|
|
36
|
+
readonly label: "Q";
|
|
37
|
+
readonly value: 10;
|
|
38
|
+
}, {
|
|
39
|
+
readonly label: "K";
|
|
40
|
+
readonly value: 10;
|
|
41
|
+
}];
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare const readableGameValueNames: {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const readableGameNames: {
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const defaultCasinoSettings: {
|
|
10
|
+
dice: {
|
|
11
|
+
winMultiplier: number;
|
|
12
|
+
maxBet: number;
|
|
13
|
+
minBet: number;
|
|
14
|
+
};
|
|
15
|
+
coinflip: {
|
|
16
|
+
winMultiplier: number;
|
|
17
|
+
maxBet: number;
|
|
18
|
+
minBet: number;
|
|
19
|
+
};
|
|
20
|
+
slots: {
|
|
21
|
+
winMultipliers: {
|
|
22
|
+
'\uD83C\uDF52\uD83C\uDF52\uD83C\uDF52': number;
|
|
23
|
+
'\uD83E\uDED0\uD83E\uDED0\uD83E\uDED0': number;
|
|
24
|
+
'\uD83C\uDF49\uD83C\uDF49\uD83C\uDF49': number;
|
|
25
|
+
'\uD83D\uDD14\uD83D\uDD14\uD83D\uDD14': number;
|
|
26
|
+
'7\uFE0F\u20E37\uFE0F\u20E37\uFE0F\u20E3': number;
|
|
27
|
+
};
|
|
28
|
+
symbolWeights: {
|
|
29
|
+
'\uD83C\uDF52': number;
|
|
30
|
+
'\uD83E\uDED0': number;
|
|
31
|
+
'\uD83C\uDF49': number;
|
|
32
|
+
'\uD83D\uDD14': number;
|
|
33
|
+
'7\uFE0F\u20E3': number;
|
|
34
|
+
};
|
|
35
|
+
maxBet: number;
|
|
36
|
+
minBet: number;
|
|
37
|
+
};
|
|
38
|
+
lottery: {
|
|
39
|
+
winMultipliers: {
|
|
40
|
+
4: number;
|
|
41
|
+
3: number;
|
|
42
|
+
2: number;
|
|
43
|
+
1: number;
|
|
44
|
+
0: number;
|
|
45
|
+
};
|
|
46
|
+
maxBet: number;
|
|
47
|
+
minBet: number;
|
|
48
|
+
};
|
|
49
|
+
roulette: {
|
|
50
|
+
winMultipliers: {
|
|
51
|
+
number: number;
|
|
52
|
+
color: number;
|
|
53
|
+
parity: number;
|
|
54
|
+
range: number;
|
|
55
|
+
dozen: number;
|
|
56
|
+
column: number;
|
|
57
|
+
};
|
|
58
|
+
maxBet: number;
|
|
59
|
+
minBet: number;
|
|
60
|
+
};
|
|
61
|
+
rps: {
|
|
62
|
+
casinoCut: number;
|
|
63
|
+
maxBet: number;
|
|
64
|
+
minBet: number;
|
|
65
|
+
};
|
|
66
|
+
goldenJackpot: {
|
|
67
|
+
winMultiplier: number;
|
|
68
|
+
oneInChance: number;
|
|
69
|
+
maxBet: number;
|
|
70
|
+
minBet: number;
|
|
71
|
+
};
|
|
72
|
+
blackjack: {
|
|
73
|
+
maxBet: number;
|
|
74
|
+
minBet: number;
|
|
75
|
+
};
|
|
76
|
+
prediction: {
|
|
77
|
+
maxBet: number;
|
|
78
|
+
minBet: number;
|
|
79
|
+
};
|
|
80
|
+
raffle: {
|
|
81
|
+
casinoCut: number;
|
|
82
|
+
};
|
|
83
|
+
plinko: {
|
|
84
|
+
binMultipliers: {
|
|
85
|
+
1: number;
|
|
86
|
+
2: number;
|
|
87
|
+
3: number;
|
|
88
|
+
4: number;
|
|
89
|
+
5: number;
|
|
90
|
+
6: number;
|
|
91
|
+
7: number;
|
|
92
|
+
8: number;
|
|
93
|
+
9: number;
|
|
94
|
+
};
|
|
95
|
+
maxBet: number;
|
|
96
|
+
minBet: number;
|
|
97
|
+
};
|
|
98
|
+
winAnnouncements: {
|
|
99
|
+
plinkoMinMultiplier: number;
|
|
100
|
+
goldenJackpotMinMultiplier: number;
|
|
101
|
+
slotsMinMultiplier: number;
|
|
102
|
+
lotteryMinMultiplier: number;
|
|
103
|
+
rouletteMinMultiplier: number;
|
|
104
|
+
blackjackMinMultiplier: number;
|
|
105
|
+
diceMinMultiplier: number;
|
|
106
|
+
coinflipMinMultiplier: number;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const DICE_MAX_SIMULATE_ROLLS = 100000000;
|
|
2
|
+
export declare const COINFLIP_MAX_SIMULATE_FLIPS = 200000000;
|
|
3
|
+
export declare const SLOT_MAX_SIMULATE_SPINS = 50000000;
|
|
4
|
+
export declare const LOTTERY_MAX_SIMULATE_ENTRIES = 999999500000;
|
|
5
|
+
export declare const GOLDEN_JACKPOT_MAX_SIMULATE_ENTRIES = 100000000;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defaultCasinoSettings } from './defaultConfig';
|
|
2
|
+
export declare const PLINKO_BIN_COUNT = 9;
|
|
3
|
+
export declare const PLINKO_ROW_COUNT: number;
|
|
4
|
+
export declare const PLINKO_CENTER_BIN = 5;
|
|
5
|
+
export declare const PLINKO_EDITABLE_BINS: readonly [1, 2, 3, 4, 5];
|
|
6
|
+
export type PlinkoEditableBin = (typeof PLINKO_EDITABLE_BINS)[number];
|
|
7
|
+
export type PlinkoBinMultipliers = (typeof defaultCasinoSettings)['plinko']['binMultipliers'];
|
|
8
|
+
export declare const getPlinkoMirrorBin: (bin: number) => number;
|
|
9
|
+
export declare const pathIndexToPlinkoBin: (pathIndex: number) => number;
|
|
10
|
+
export declare const plinkoBinToPathIndex: (bin: number) => number;
|
|
11
|
+
export declare const expandPlinkoBinMultipliers: (editable: Record<string | number, number | string>) => PlinkoBinMultipliers;
|
|
12
|
+
/** Migrate legacy 0-indexed bins and enforce symmetric 1–9 layout. */
|
|
13
|
+
export declare const normalizePlinkoBinMultipliers: (input: Record<string | number, number | string> | null | undefined) => PlinkoBinMultipliers;
|
|
14
|
+
export declare const getPlinkoMultiplierAtPathIndex: (binMultipliers: Record<string | number, number | string>, pathIndex: number) => number;
|
|
15
|
+
export declare const formatPlinkoBinMultipliersForDisplay: (binMultipliers: Record<string | number, number | string>) => Record<string, number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MINI_NUMBERS: Record<string, 'red' | 'black' | 'green'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export * from './types/casinoSettings';
|
|
3
|
+
export * from './types/blackjackGame';
|
|
4
|
+
export * from './utils/calculateRTP';
|
|
5
|
+
export * from './utils/validateBetAmount';
|
|
6
|
+
export * from './utils/normalizeCasinoSettings';
|
|
7
|
+
export * from './utils/winAnnouncements';
|
|
8
|
+
export * from './services/casinoBet.service';
|
|
9
|
+
export * from './schemas/casino.forms';
|
|
10
|
+
export * from './constants/plinkoConfig';
|
|
11
|
+
export * from '../transactions/constants/gameRecordFields';
|
package/dist/casino/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.BlackjackGameSchema = void 0;
|
|
18
17
|
__exportStar(require("./constants"), exports);
|
|
19
18
|
__exportStar(require("./types/casinoSettings"), exports);
|
|
20
19
|
__exportStar(require("./types/blackjackGame"), exports);
|
|
@@ -24,7 +23,5 @@ __exportStar(require("./utils/normalizeCasinoSettings"), exports);
|
|
|
24
23
|
__exportStar(require("./utils/winAnnouncements"), exports);
|
|
25
24
|
__exportStar(require("./services/casinoBet.service"), exports);
|
|
26
25
|
__exportStar(require("./schemas/casino.forms"), exports);
|
|
27
|
-
var blackjackGame_mongoose_1 = require("./blackjackGame.mongoose");
|
|
28
|
-
Object.defineProperty(exports, "BlackjackGameSchema", { enumerable: true, get: function () { return blackjackGame_mongoose_1.BlackjackGameSchema; } });
|
|
29
26
|
__exportStar(require("./constants/plinkoConfig"), exports);
|
|
30
27
|
__exportStar(require("../transactions/constants/gameRecordFields"), exports);
|