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.
Files changed (87) hide show
  1. package/dist/atm/atmRequest.mongoose.d.ts +147 -0
  2. package/dist/atm/index.d.ts +2 -0
  3. package/dist/atm/index.js +0 -3
  4. package/dist/atm/schemas/atm.forms.d.ts +5 -0
  5. package/dist/atm/types/atmRequest.d.ts +17 -0
  6. package/dist/blackjack/index.d.ts +2 -0
  7. package/dist/blackjack/index.js +0 -3
  8. package/dist/bonus/constants/bonusLimits.d.ts +4 -0
  9. package/dist/bonus/index.d.ts +7 -0
  10. package/dist/bonus/schemas/bonus.forms.d.ts +16 -0
  11. package/dist/bonus/types/bonus.d.ts +13 -0
  12. package/dist/bonus/utils/bonusStreak.d.ts +7 -0
  13. package/dist/bonus/utils/calculateBonusReward.d.ts +14 -0
  14. package/dist/bonus/utils/generateBonusPreview.d.ts +11 -0
  15. package/dist/bonus/utils/normalizeBonusSettings.d.ts +6 -0
  16. package/dist/casino/blackjackGame.mongoose.d.ts +129 -0
  17. package/dist/casino/constants/blackjack.d.ts +41 -0
  18. package/dist/casino/constants/casinoGames.d.ts +3 -0
  19. package/dist/casino/constants/defaultConfig.d.ts +108 -0
  20. package/dist/casino/constants/index.d.ts +7 -0
  21. package/dist/casino/constants/lotteryConfig.d.ts +2 -0
  22. package/dist/casino/constants/maxSimulations.d.ts +5 -0
  23. package/dist/casino/constants/plinkoConfig.d.ts +15 -0
  24. package/dist/casino/constants/rouletteConfig.d.ts +1 -0
  25. package/dist/casino/index.d.ts +11 -0
  26. package/dist/casino/index.js +0 -3
  27. package/dist/casino/schemas/casino.forms.d.ts +80 -0
  28. package/dist/casino/services/casinoBet.service.d.ts +41 -0
  29. package/dist/casino/types/blackjackGame.d.ts +30 -0
  30. package/dist/casino/types/casinoSettings.d.ts +2 -0
  31. package/dist/casino/utils/calculateRTP.d.ts +2 -0
  32. package/dist/casino/utils/normalizeCasinoSettings.d.ts +2 -0
  33. package/dist/casino/utils/validateBetAmount.d.ts +8 -0
  34. package/dist/casino/utils/winAnnouncements.d.ts +4 -0
  35. package/dist/common/formatters.d.ts +16 -0
  36. package/dist/common/generateId.d.ts +1 -0
  37. package/dist/common/index.d.ts +4 -0
  38. package/dist/common/parseTimeToSeconds.d.ts +1 -0
  39. package/dist/common/zod.d.ts +2 -0
  40. package/dist/guild/constants/commonTimezones.d.ts +4 -0
  41. package/dist/guild/constants/defaultGlobalSettings.d.ts +20 -0
  42. package/dist/guild/guildConfiguration.mongoose.d.ts +227 -0
  43. package/dist/guild/index.d.ts +7 -0
  44. package/dist/guild/index.js +0 -3
  45. package/dist/guild/schemas/guild.forms.d.ts +68 -0
  46. package/dist/guild/types/guildConfiguration.d.ts +35 -0
  47. package/dist/guild/utils/globalSettings.d.ts +6 -0
  48. package/dist/guild/utils/guildTimezone.d.ts +6 -0
  49. package/dist/guild/utils/normalizeGlobalSettings.d.ts +2 -0
  50. package/dist/mongoose/index.d.ts +8 -0
  51. package/dist/predictions/index.d.ts +10 -0
  52. package/dist/predictions/index.js +0 -3
  53. package/dist/predictions/prediction.mongoose.d.ts +102 -0
  54. package/dist/predictions/schemas/prediction.forms.d.ts +20 -0
  55. package/dist/predictions/services/normalizePredictionInput.d.ts +6 -0
  56. package/dist/predictions/services/parsePredictionAutolock.d.ts +9 -0
  57. package/dist/predictions/services/parsePredictionChoices.d.ts +11 -0
  58. package/dist/predictions/services/prediction.db.d.ts +55 -0
  59. package/dist/predictions/services/predictionLifecycle.service.d.ts +25 -0
  60. package/dist/predictions/services/predictionSummary.d.ts +30 -0
  61. package/dist/predictions/services/types.d.ts +27 -0
  62. package/dist/predictions/types/prediction.d.ts +21 -0
  63. package/dist/predictions/utils/validatePredictionBet.d.ts +13 -0
  64. package/dist/raffle/index.d.ts +5 -0
  65. package/dist/raffle/index.js +0 -3
  66. package/dist/raffle/raffle.mongoose.d.ts +138 -0
  67. package/dist/raffle/schemas/raffle.forms.d.ts +11 -0
  68. package/dist/raffle/services/raffle.db.d.ts +51 -0
  69. package/dist/raffle/services/raffleLifecycle.service.d.ts +15 -0
  70. package/dist/raffle/services/types.d.ts +27 -0
  71. package/dist/raffle/types/raffle.d.ts +21 -0
  72. package/dist/transactions/constants/gameRecordFields.d.ts +8 -0
  73. package/dist/transactions/constants/index.d.ts +2 -0
  74. package/dist/transactions/constants/transaction.d.ts +2 -0
  75. package/dist/transactions/index.d.ts +4 -0
  76. package/dist/transactions/transaction.mongoose.d.ts +93 -0
  77. package/dist/transactions/types/transaction.d.ts +15 -0
  78. package/dist/user/index.d.ts +1 -0
  79. package/dist/user/index.js +0 -3
  80. package/dist/user/types/user.d.ts +11 -0
  81. package/dist/user/user.mongoose.d.ts +93 -0
  82. package/dist/vip/index.d.ts +2 -0
  83. package/dist/vip/index.js +0 -3
  84. package/dist/vip/schemas/vip.forms.d.ts +10 -0
  85. package/dist/vip/types/vipRoom.d.ts +9 -0
  86. package/dist/vip/vipRoom.mongoose.d.ts +75 -0
  87. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ export * from './constants';
2
+ export * from './constants/gameRecordFields';
3
+ export * from './types/transaction';
4
+ export * from './constants/transaction';
@@ -0,0 +1,93 @@
1
+ import { Schema } from 'mongoose';
2
+ import { TTransaction } from './types/transaction';
3
+ export declare const TransactionSchema: Schema<TTransaction, import("mongoose").Model<TTransaction, any, any, any, any, any, TTransaction>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
4
+ id: string;
5
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
6
+ _id: import("mongoose").Types.ObjectId;
7
+ } & {
8
+ __v: number;
9
+ }, "id"> & {
10
+ id: string;
11
+ }, {
12
+ userId?: import("mongoose").SchemaDefinitionProperty<string, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
13
+ id: string;
14
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
15
+ _id: import("mongoose").Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }, "id"> & {
19
+ id: string;
20
+ }> | undefined;
21
+ guildId?: import("mongoose").SchemaDefinitionProperty<string, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
22
+ id: string;
23
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ } & {
26
+ __v: number;
27
+ }, "id"> & {
28
+ id: string;
29
+ }> | undefined;
30
+ amount?: import("mongoose").SchemaDefinitionProperty<number, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
31
+ id: string;
32
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ } & {
35
+ __v: number;
36
+ }, "id"> & {
37
+ id: string;
38
+ }> | undefined;
39
+ type?: import("mongoose").SchemaDefinitionProperty<"deposit" | "withdraw" | "bet" | "win" | "refund" | "bonus" | "vip", TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
40
+ id: string;
41
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ } & {
44
+ __v: number;
45
+ }, "id"> & {
46
+ id: string;
47
+ }> | undefined;
48
+ source?: import("mongoose").SchemaDefinitionProperty<"command" | "manual" | "web" | "system" | "casino", TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
49
+ id: string;
50
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ } & {
53
+ __v: number;
54
+ }, "id"> & {
55
+ id: string;
56
+ }> | undefined;
57
+ meta?: import("mongoose").SchemaDefinitionProperty<import("./types/transaction").TransactionMeta | undefined, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
58
+ id: string;
59
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
60
+ _id: import("mongoose").Types.ObjectId;
61
+ } & {
62
+ __v: number;
63
+ }, "id"> & {
64
+ id: string;
65
+ }> | undefined;
66
+ betId?: import("mongoose").SchemaDefinitionProperty<string | undefined, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
67
+ id: string;
68
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
69
+ _id: import("mongoose").Types.ObjectId;
70
+ } & {
71
+ __v: number;
72
+ }, "id"> & {
73
+ id: string;
74
+ }> | undefined;
75
+ handledBy?: import("mongoose").SchemaDefinitionProperty<string | undefined, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
76
+ id: string;
77
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
78
+ _id: import("mongoose").Types.ObjectId;
79
+ } & {
80
+ __v: number;
81
+ }, "id"> & {
82
+ id: string;
83
+ }> | undefined;
84
+ createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TTransaction, import("mongoose").Document<unknown, {}, TTransaction, {
85
+ id: string;
86
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TTransaction & {
87
+ _id: import("mongoose").Types.ObjectId;
88
+ } & {
89
+ __v: number;
90
+ }, "id"> & {
91
+ id: string;
92
+ }> | undefined;
93
+ }, TTransaction>;
@@ -0,0 +1,15 @@
1
+ import type { CasinoGameId } from '../../casino/constants/casinoGames';
2
+ export type TransactionMeta = {
3
+ game?: CasinoGameId;
4
+ } & Record<string, unknown>;
5
+ export type TTransaction = {
6
+ userId: string;
7
+ guildId: string;
8
+ amount: number;
9
+ type: 'deposit' | 'withdraw' | 'bet' | 'win' | 'refund' | 'bonus' | 'vip';
10
+ source: 'command' | 'manual' | 'web' | 'system' | 'casino';
11
+ meta?: TransactionMeta;
12
+ betId?: string;
13
+ handledBy?: string;
14
+ createdAt: Date;
15
+ };
@@ -0,0 +1 @@
1
+ export * from './types/user';
@@ -14,7 +14,4 @@ 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.UserSchema = void 0;
18
17
  __exportStar(require("./types/user"), exports);
19
- var user_mongoose_1 = require("./user.mongoose");
20
- Object.defineProperty(exports, "UserSchema", { enumerable: true, get: function () { return user_mongoose_1.UserSchema; } });
@@ -0,0 +1,11 @@
1
+ export type TUser = {
2
+ userId: string;
3
+ guildId: string;
4
+ balance: number;
5
+ bonusBalance: number;
6
+ lockedBalance: number;
7
+ lastDailyClaim: Date | null;
8
+ dailyStreak: number;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ };
@@ -0,0 +1,93 @@
1
+ import { Schema } from 'mongoose';
2
+ import { TUser } from './types/user';
3
+ export declare const UserSchema: Schema<TUser, import("mongoose").Model<TUser, any, any, any, any, any, TUser>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TUser, import("mongoose").Document<unknown, {}, TUser, {
4
+ id: string;
5
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
6
+ _id: import("mongoose").Types.ObjectId;
7
+ } & {
8
+ __v: number;
9
+ }, "id"> & {
10
+ id: string;
11
+ }, {
12
+ userId?: import("mongoose").SchemaDefinitionProperty<string, TUser, import("mongoose").Document<unknown, {}, TUser, {
13
+ id: string;
14
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
15
+ _id: import("mongoose").Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }, "id"> & {
19
+ id: string;
20
+ }> | undefined;
21
+ guildId?: import("mongoose").SchemaDefinitionProperty<string, TUser, import("mongoose").Document<unknown, {}, TUser, {
22
+ id: string;
23
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ } & {
26
+ __v: number;
27
+ }, "id"> & {
28
+ id: string;
29
+ }> | undefined;
30
+ balance?: import("mongoose").SchemaDefinitionProperty<number, TUser, import("mongoose").Document<unknown, {}, TUser, {
31
+ id: string;
32
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ } & {
35
+ __v: number;
36
+ }, "id"> & {
37
+ id: string;
38
+ }> | undefined;
39
+ bonusBalance?: import("mongoose").SchemaDefinitionProperty<number, TUser, import("mongoose").Document<unknown, {}, TUser, {
40
+ id: string;
41
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ } & {
44
+ __v: number;
45
+ }, "id"> & {
46
+ id: string;
47
+ }> | undefined;
48
+ lockedBalance?: import("mongoose").SchemaDefinitionProperty<number, TUser, import("mongoose").Document<unknown, {}, TUser, {
49
+ id: string;
50
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ } & {
53
+ __v: number;
54
+ }, "id"> & {
55
+ id: string;
56
+ }> | undefined;
57
+ lastDailyClaim?: import("mongoose").SchemaDefinitionProperty<Date | null, TUser, import("mongoose").Document<unknown, {}, TUser, {
58
+ id: string;
59
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
60
+ _id: import("mongoose").Types.ObjectId;
61
+ } & {
62
+ __v: number;
63
+ }, "id"> & {
64
+ id: string;
65
+ }> | undefined;
66
+ dailyStreak?: import("mongoose").SchemaDefinitionProperty<number, TUser, import("mongoose").Document<unknown, {}, TUser, {
67
+ id: string;
68
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
69
+ _id: import("mongoose").Types.ObjectId;
70
+ } & {
71
+ __v: number;
72
+ }, "id"> & {
73
+ id: string;
74
+ }> | undefined;
75
+ createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TUser, import("mongoose").Document<unknown, {}, TUser, {
76
+ id: string;
77
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
78
+ _id: import("mongoose").Types.ObjectId;
79
+ } & {
80
+ __v: number;
81
+ }, "id"> & {
82
+ id: string;
83
+ }> | undefined;
84
+ updatedAt?: import("mongoose").SchemaDefinitionProperty<Date, TUser, import("mongoose").Document<unknown, {}, TUser, {
85
+ id: string;
86
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TUser & {
87
+ _id: import("mongoose").Types.ObjectId;
88
+ } & {
89
+ __v: number;
90
+ }, "id"> & {
91
+ id: string;
92
+ }> | undefined;
93
+ }, TUser>;
@@ -0,0 +1,2 @@
1
+ export * from './types/vipRoom';
2
+ export * from './schemas/vip.forms';
package/dist/vip/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.VipRoomSchema = void 0;
18
17
  __exportStar(require("./types/vipRoom"), exports);
19
- var vipRoom_mongoose_1 = require("./vipRoom.mongoose");
20
- Object.defineProperty(exports, "VipRoomSchema", { enumerable: true, get: function () { return vipRoom_mongoose_1.VipRoomSchema; } });
21
18
  __exportStar(require("./schemas/vip.forms"), exports);
@@ -0,0 +1,10 @@
1
+ import z from 'zod';
2
+ export declare const vipSettingsFormSchema: z.ZodObject<{
3
+ roleOwnerId: z.ZodString;
4
+ roleMemberId: z.ZodString;
5
+ pricePerDay: z.ZodNumber;
6
+ pricePerCreate: z.ZodNumber;
7
+ pricePerAdditionalMember: z.ZodNumber;
8
+ maxMembers: z.ZodNumber;
9
+ categoryId: z.ZodString;
10
+ }, z.core.$strip>;
@@ -0,0 +1,9 @@
1
+ export type TVipRoom = {
2
+ ownerId: string;
3
+ guildId: string;
4
+ channelId: string;
5
+ expiresAt: Date;
6
+ memberIds: string[];
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ };
@@ -0,0 +1,75 @@
1
+ import { Schema } from 'mongoose';
2
+ import { TVipRoom } from './types/vipRoom';
3
+ export declare const VipRoomSchema: Schema<TVipRoom, import("mongoose").Model<TVipRoom, any, any, any, any, any, TVipRoom>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
4
+ id: string;
5
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
6
+ _id: import("mongoose").Types.ObjectId;
7
+ } & {
8
+ __v: number;
9
+ }, "id"> & {
10
+ id: string;
11
+ }, {
12
+ ownerId?: import("mongoose").SchemaDefinitionProperty<string, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
13
+ id: string;
14
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
15
+ _id: import("mongoose").Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }, "id"> & {
19
+ id: string;
20
+ }> | undefined;
21
+ guildId?: import("mongoose").SchemaDefinitionProperty<string, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
22
+ id: string;
23
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ } & {
26
+ __v: number;
27
+ }, "id"> & {
28
+ id: string;
29
+ }> | undefined;
30
+ channelId?: import("mongoose").SchemaDefinitionProperty<string, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
31
+ id: string;
32
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
33
+ _id: import("mongoose").Types.ObjectId;
34
+ } & {
35
+ __v: number;
36
+ }, "id"> & {
37
+ id: string;
38
+ }> | undefined;
39
+ expiresAt?: import("mongoose").SchemaDefinitionProperty<Date, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
40
+ id: string;
41
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
42
+ _id: import("mongoose").Types.ObjectId;
43
+ } & {
44
+ __v: number;
45
+ }, "id"> & {
46
+ id: string;
47
+ }> | undefined;
48
+ memberIds?: import("mongoose").SchemaDefinitionProperty<string[], TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
49
+ id: string;
50
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
51
+ _id: import("mongoose").Types.ObjectId;
52
+ } & {
53
+ __v: number;
54
+ }, "id"> & {
55
+ id: string;
56
+ }> | undefined;
57
+ createdAt?: import("mongoose").SchemaDefinitionProperty<Date, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
58
+ id: string;
59
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
60
+ _id: import("mongoose").Types.ObjectId;
61
+ } & {
62
+ __v: number;
63
+ }, "id"> & {
64
+ id: string;
65
+ }> | undefined;
66
+ updatedAt?: import("mongoose").SchemaDefinitionProperty<Date, TVipRoom, import("mongoose").Document<unknown, {}, TVipRoom, {
67
+ id: string;
68
+ }, import("mongoose").DefaultSchemaOptions> & Omit<TVipRoom & {
69
+ _id: import("mongoose").Types.ObjectId;
70
+ } & {
71
+ __v: number;
72
+ }, "id"> & {
73
+ id: string;
74
+ }> | undefined;
75
+ }, TVipRoom>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gambling-bot-shared",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "type": "commonjs",
6
6
  "repository": {