@openora/core 0.4.1-canary.60 → 0.4.1-canary.63
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/.tsbuildinfo +1 -1
- package/dist/admin-console/plugin.d.ts +2 -0
- package/dist/admin-console/plugin.d.ts.map +1 -1
- package/dist/analytics/plugin.d.ts +2 -0
- package/dist/analytics/plugin.d.ts.map +1 -1
- package/dist/audit/plugin.d.ts +2 -0
- package/dist/audit/plugin.d.ts.map +1 -1
- package/dist/audit/plugin.js +13 -0
- package/dist/audit/plugin.js.map +1 -1
- package/dist/casino/gaming/plugin.d.ts +2 -0
- package/dist/casino/gaming/plugin.d.ts.map +1 -1
- package/dist/casino/lobby/plugin.d.ts +2 -0
- package/dist/casino/lobby/plugin.d.ts.map +1 -1
- package/dist/cms/plugin.d.ts +2 -0
- package/dist/cms/plugin.d.ts.map +1 -1
- package/dist/compliance/plugin.d.ts +2 -0
- package/dist/compliance/plugin.d.ts.map +1 -1
- package/dist/contracts/adapters/audit.d.ts +1 -1
- package/dist/contracts/adapters/audit.d.ts.map +1 -1
- package/dist/contracts/adapters/audit.js.map +1 -1
- package/dist/contracts/adapters/chat-system-writer.d.ts +7 -1
- package/dist/contracts/adapters/chat-system-writer.d.ts.map +1 -1
- package/dist/contracts/adapters/chat-system-writer.js.map +1 -1
- package/dist/contracts/adapters/gift-commands.d.ts +58 -0
- package/dist/contracts/adapters/gift-commands.d.ts.map +1 -0
- package/dist/contracts/adapters/gift-commands.js +11 -0
- package/dist/contracts/adapters/gift-commands.js.map +1 -0
- package/dist/contracts/adapters/index.d.ts +5 -1
- package/dist/contracts/adapters/index.d.ts.map +1 -1
- package/dist/contracts/adapters/index.js +2 -0
- package/dist/contracts/adapters/index.js.map +1 -1
- package/dist/contracts/adapters/rain-commands.d.ts +27 -0
- package/dist/contracts/adapters/rain-commands.d.ts.map +1 -0
- package/dist/contracts/adapters/rain-commands.js +12 -0
- package/dist/contracts/adapters/rain-commands.js.map +1 -0
- package/dist/contracts/schemas/chat-command-metadata.d.ts +26 -0
- package/dist/contracts/schemas/chat-command-metadata.d.ts.map +1 -1
- package/dist/contracts/schemas/chat-command-metadata.js +25 -0
- package/dist/contracts/schemas/chat-command-metadata.js.map +1 -1
- package/dist/contracts/schemas/chat-command.d.ts +126 -0
- package/dist/contracts/schemas/chat-command.d.ts.map +1 -1
- package/dist/contracts/schemas/chat-command.js +19 -1
- package/dist/contracts/schemas/chat-command.js.map +1 -1
- package/dist/contracts/schemas/events.d.ts +15 -3
- package/dist/contracts/schemas/events.d.ts.map +1 -1
- package/dist/contracts/schemas/events.js +17 -6
- package/dist/contracts/schemas/events.js.map +1 -1
- package/dist/contracts/schemas/identity.d.ts +2 -1
- package/dist/contracts/schemas/identity.d.ts.map +1 -1
- package/dist/contracts/schemas/identity.js +5 -1
- package/dist/contracts/schemas/identity.js.map +1 -1
- package/dist/engagement/chat/__tests__/chat.service.int.test.js +211 -8
- package/dist/engagement/chat/__tests__/chat.service.int.test.js.map +1 -1
- package/dist/engagement/chat/contract/index.d.ts +719 -40
- package/dist/engagement/chat/contract/index.d.ts.map +1 -1
- package/dist/engagement/chat/contract/index.js +51 -5
- package/dist/engagement/chat/contract/index.js.map +1 -1
- package/dist/engagement/chat/drizzle/migrations/0004_panoramic_robin_chapel.sql +6 -0
- package/dist/engagement/chat/drizzle/migrations/meta/0004_snapshot.json +666 -0
- package/dist/engagement/chat/drizzle/migrations/meta/_journal.json +7 -0
- package/dist/engagement/chat/plugin.d.ts +2 -0
- package/dist/engagement/chat/plugin.d.ts.map +1 -1
- package/dist/engagement/chat/router/index.d.ts +608 -34
- package/dist/engagement/chat/router/index.d.ts.map +1 -1
- package/dist/engagement/chat/router/index.js +10 -2
- package/dist/engagement/chat/router/index.js.map +1 -1
- package/dist/engagement/chat/schema/index.d.ts +72 -0
- package/dist/engagement/chat/schema/index.d.ts.map +1 -1
- package/dist/engagement/chat/schema/index.js +15 -3
- package/dist/engagement/chat/schema/index.js.map +1 -1
- package/dist/engagement/chat/service/chat.service.d.ts +421 -34
- package/dist/engagement/chat/service/chat.service.d.ts.map +1 -1
- package/dist/engagement/chat/service/chat.service.js +155 -40
- package/dist/engagement/chat/service/chat.service.js.map +1 -1
- package/dist/engagement/chat-commands/contract/index.d.ts +181 -73
- package/dist/engagement/chat-commands/contract/index.d.ts.map +1 -1
- package/dist/engagement/chat-commands/contract/index.js +50 -72
- package/dist/engagement/chat-commands/contract/index.js.map +1 -1
- package/dist/engagement/chat-commands/plugin.d.ts +3 -1
- package/dist/engagement/chat-commands/plugin.d.ts.map +1 -1
- package/dist/engagement/chat-commands/plugin.js +4 -4
- package/dist/engagement/chat-commands/plugin.js.map +1 -1
- package/dist/engagement/chat-commands/router/index.d.ts +185 -83
- package/dist/engagement/chat-commands/router/index.d.ts.map +1 -1
- package/dist/engagement/chat-commands/router/index.js +35 -25
- package/dist/engagement/chat-commands/router/index.js.map +1 -1
- package/dist/engagement/chat-commands/seed/index.d.ts.map +1 -1
- package/dist/engagement/chat-commands/seed/index.js +12 -0
- package/dist/engagement/chat-commands/seed/index.js.map +1 -1
- package/dist/engagement/chat-commands/service/__tests__/chat-commands.service.test.js +205 -733
- package/dist/engagement/chat-commands/service/__tests__/chat-commands.service.test.js.map +1 -1
- package/dist/engagement/chat-commands/service/chat-commands.service.d.ts +44 -68
- package/dist/engagement/chat-commands/service/chat-commands.service.d.ts.map +1 -1
- package/dist/engagement/chat-commands/service/chat-commands.service.js +143 -571
- package/dist/engagement/chat-commands/service/chat-commands.service.js.map +1 -1
- package/dist/engagement/contracts.d.ts +1 -0
- package/dist/engagement/contracts.d.ts.map +1 -1
- package/dist/engagement/contracts.js +1 -0
- package/dist/engagement/contracts.js.map +1 -1
- package/dist/engagement/index.d.ts +1 -0
- package/dist/engagement/index.d.ts.map +1 -1
- package/dist/engagement/index.js +1 -0
- package/dist/engagement/index.js.map +1 -1
- package/dist/engagement/notifications/plugin.d.ts +2 -0
- package/dist/engagement/notifications/plugin.d.ts.map +1 -1
- package/dist/engagement/server.d.ts +1 -0
- package/dist/engagement/server.d.ts.map +1 -1
- package/dist/engagement/server.js +1 -0
- package/dist/engagement/server.js.map +1 -1
- package/dist/engagement/social-transfers/contract/index.d.ts +85 -0
- package/dist/engagement/social-transfers/contract/index.d.ts.map +1 -0
- package/dist/engagement/social-transfers/contract/index.js +21 -0
- package/dist/engagement/social-transfers/contract/index.js.map +1 -0
- package/dist/engagement/social-transfers/drizzle/migrations/0000_clammy_rattler.sql +46 -0
- package/dist/engagement/social-transfers/drizzle/migrations/meta/0000_snapshot.json +287 -0
- package/dist/engagement/social-transfers/drizzle/migrations/meta/_journal.json +13 -0
- package/dist/engagement/social-transfers/drizzle.config.d.ts +4 -0
- package/dist/engagement/social-transfers/drizzle.config.d.ts.map +1 -0
- package/dist/engagement/social-transfers/drizzle.config.js +21 -0
- package/dist/engagement/social-transfers/drizzle.config.js.map +1 -0
- package/dist/engagement/social-transfers/index.d.ts +3 -0
- package/dist/engagement/social-transfers/index.d.ts.map +1 -0
- package/dist/engagement/social-transfers/index.js +6 -0
- package/dist/engagement/social-transfers/index.js.map +1 -0
- package/dist/engagement/social-transfers/migrate.d.ts +5 -0
- package/dist/engagement/social-transfers/migrate.d.ts.map +1 -0
- package/dist/engagement/social-transfers/migrate.js +17 -0
- package/dist/engagement/social-transfers/migrate.js.map +1 -0
- package/dist/engagement/social-transfers/plugin.d.ts +111 -0
- package/dist/engagement/social-transfers/plugin.d.ts.map +1 -0
- package/dist/engagement/social-transfers/plugin.js +24 -0
- package/dist/engagement/social-transfers/plugin.js.map +1 -0
- package/dist/engagement/social-transfers/router/index.d.ts +77 -0
- package/dist/engagement/social-transfers/router/index.d.ts.map +1 -0
- package/dist/engagement/social-transfers/router/index.js +25 -0
- package/dist/engagement/social-transfers/router/index.js.map +1 -0
- package/dist/engagement/social-transfers/schema/index.d.ts +609 -0
- package/dist/engagement/social-transfers/schema/index.d.ts.map +1 -0
- package/dist/engagement/social-transfers/schema/index.js +61 -0
- package/dist/engagement/social-transfers/schema/index.js.map +1 -0
- package/dist/engagement/social-transfers/service/__tests__/social-transfers.service.test.d.ts +2 -0
- package/dist/engagement/social-transfers/service/__tests__/social-transfers.service.test.d.ts.map +1 -0
- package/dist/engagement/social-transfers/service/__tests__/social-transfers.service.test.js +757 -0
- package/dist/engagement/social-transfers/service/__tests__/social-transfers.service.test.js.map +1 -0
- package/dist/engagement/social-transfers/service/social-transfers.service.d.ts +75 -0
- package/dist/engagement/social-transfers/service/social-transfers.service.d.ts.map +1 -0
- package/dist/engagement/social-transfers/service/social-transfers.service.js +789 -0
- package/dist/engagement/social-transfers/service/social-transfers.service.js.map +1 -0
- package/dist/iam/plugin.d.ts +2 -0
- package/dist/iam/plugin.d.ts.map +1 -1
- package/dist/iam/service/iam.service.d.ts +1 -1
- package/dist/pam/identity/__tests__/identity.service.int.test.js +47 -2
- package/dist/pam/identity/__tests__/identity.service.int.test.js.map +1 -1
- package/dist/pam/identity/__tests__/phone-login.service.int.test.js +23 -2
- package/dist/pam/identity/__tests__/phone-login.service.int.test.js.map +1 -1
- package/dist/pam/identity/plugin.d.ts +2 -0
- package/dist/pam/identity/plugin.d.ts.map +1 -1
- package/dist/pam/identity/service/identity.service.d.ts.map +1 -1
- package/dist/pam/identity/service/identity.service.js +29 -1
- package/dist/pam/identity/service/identity.service.js.map +1 -1
- package/dist/pam/identity/service/phone-login.service.d.ts.map +1 -1
- package/dist/pam/identity/service/phone-login.service.js +23 -0
- package/dist/pam/identity/service/phone-login.service.js.map +1 -1
- package/dist/pam/player-management/__tests__/player.router.int.test.js +27 -4
- package/dist/pam/player-management/__tests__/player.router.int.test.js.map +1 -1
- package/dist/pam/player-management/__tests__/player.service.int.test.js +159 -6
- package/dist/pam/player-management/__tests__/player.service.int.test.js.map +1 -1
- package/dist/pam/player-management/contract/index.d.ts +39 -0
- package/dist/pam/player-management/contract/index.d.ts.map +1 -1
- package/dist/pam/player-management/contract/index.js +33 -1
- package/dist/pam/player-management/contract/index.js.map +1 -1
- package/dist/pam/player-management/plugin.d.ts +3 -1
- package/dist/pam/player-management/plugin.d.ts.map +1 -1
- package/dist/pam/player-management/plugin.js +3 -3
- package/dist/pam/player-management/plugin.js.map +1 -1
- package/dist/pam/player-management/router/index.d.ts +21 -0
- package/dist/pam/player-management/router/index.d.ts.map +1 -1
- package/dist/pam/player-management/router/index.js +12 -2
- package/dist/pam/player-management/router/index.js.map +1 -1
- package/dist/pam/player-management/service/player.service.d.ts +10 -3
- package/dist/pam/player-management/service/player.service.d.ts.map +1 -1
- package/dist/pam/player-management/service/player.service.js +66 -3
- package/dist/pam/player-management/service/player.service.js.map +1 -1
- package/dist/pam/player-note/__tests__/player-note.router.int.test.d.ts +2 -0
- package/dist/pam/player-note/__tests__/player-note.router.int.test.d.ts.map +1 -0
- package/dist/pam/player-note/__tests__/player-note.router.int.test.js +52 -0
- package/dist/pam/player-note/__tests__/player-note.router.int.test.js.map +1 -0
- package/dist/pam/player-note/plugin.d.ts +49 -46
- package/dist/pam/player-note/plugin.d.ts.map +1 -1
- package/dist/pam/player-note/plugin.js +3 -1
- package/dist/pam/player-note/plugin.js.map +1 -1
- package/dist/pam/player-note/router/index.d.ts +2 -1
- package/dist/pam/player-note/router/index.d.ts.map +1 -1
- package/dist/pam/player-note/router/index.js +13 -2
- package/dist/pam/player-note/router/index.js.map +1 -1
- package/dist/pam/profile/plugin.d.ts +2 -0
- package/dist/pam/profile/plugin.d.ts.map +1 -1
- package/dist/pam/tag/plugin.d.ts +2 -0
- package/dist/pam/tag/plugin.d.ts.map +1 -1
- package/dist/server/auth/permissions.d.ts +24 -0
- package/dist/server/auth/permissions.d.ts.map +1 -1
- package/dist/server/auth/permissions.js +4 -0
- package/dist/server/auth/permissions.js.map +1 -1
- package/dist/server/runtime/core-token-catalog.d.ts +2 -0
- package/dist/server/runtime/core-token-catalog.d.ts.map +1 -1
- package/dist/server/runtime/core-token-catalog.js +3 -1
- package/dist/server/runtime/core-token-catalog.js.map +1 -1
- package/dist/wallet/__tests__/wallet.service.int.test.js +7 -0
- package/dist/wallet/__tests__/wallet.service.int.test.js.map +1 -1
- package/dist/wallet/plugin.d.ts +2 -0
- package/dist/wallet/plugin.d.ts.map +1 -1
- package/dist/wallet/router/index.js +1 -1
- package/dist/wallet/router/index.js.map +1 -1
- package/dist/wallet/service/wallet.service.d.ts.map +1 -1
- package/dist/wallet/service/wallet.service.js +16 -0
- package/dist/wallet/service/wallet.service.js.map +1 -1
- package/package.json +21 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { SystemChatMessageSchema } from '@openora/core/contracts';
|
|
3
|
-
export declare const CHAT_COMMAND_TYPES: readonly ["mention", "profile", "gift", "rain", "donate", "block", "ignore"];
|
|
2
|
+
import { SystemChatMessageSchema, CommandChatMessageSchema } from '@openora/core/contracts';
|
|
3
|
+
export declare const CHAT_COMMAND_TYPES: readonly ["mention", "profile", "gift", "rain", "donate", "block", "unblock", "ignore", "unignore"];
|
|
4
4
|
export declare const ChatCommandTypeSchema: z.ZodEnum<{
|
|
5
5
|
block: "block";
|
|
6
6
|
gift: "gift";
|
|
7
7
|
rain: "rain";
|
|
8
8
|
profile: "profile";
|
|
9
|
+
unblock: "unblock";
|
|
9
10
|
ignore: "ignore";
|
|
11
|
+
unignore: "unignore";
|
|
10
12
|
donate: "donate";
|
|
11
13
|
mention: "mention";
|
|
12
14
|
}>;
|
|
@@ -23,7 +25,9 @@ export declare const ChatCommandDescriptorSchema: z.ZodObject<{
|
|
|
23
25
|
gift: "gift";
|
|
24
26
|
rain: "rain";
|
|
25
27
|
profile: "profile";
|
|
28
|
+
unblock: "unblock";
|
|
26
29
|
ignore: "ignore";
|
|
30
|
+
unignore: "unignore";
|
|
27
31
|
donate: "donate";
|
|
28
32
|
mention: "mention";
|
|
29
33
|
}>;
|
|
@@ -35,14 +39,40 @@ export declare const ChatCommandDescriptorSchema: z.ZodObject<{
|
|
|
35
39
|
minAmount: z.ZodOptional<z.ZodString>;
|
|
36
40
|
maxRecipients: z.ZodOptional<z.ZodNumber>;
|
|
37
41
|
}, z.core.$strip>>;
|
|
42
|
+
updatedAt: z.ZodISODateTime;
|
|
38
43
|
}, z.core.$strip>;
|
|
39
44
|
export type ChatCommandDescriptor = z.infer<typeof ChatCommandDescriptorSchema>;
|
|
45
|
+
export declare const AdminCommandSortByValues: readonly ["key", "updatedAt"];
|
|
46
|
+
export declare const AdminCommandSortBySchema: z.ZodDefault<z.ZodEnum<{
|
|
47
|
+
updatedAt: "updatedAt";
|
|
48
|
+
key: "key";
|
|
49
|
+
}>>;
|
|
50
|
+
export type AdminCommandSortBy = z.infer<typeof AdminCommandSortBySchema>;
|
|
40
51
|
export declare const MentionResultSchema: z.ZodObject<{
|
|
41
52
|
userId: z.ZodUUID;
|
|
42
53
|
username: z.ZodString;
|
|
43
54
|
}, z.core.$strip>;
|
|
44
55
|
export type MentionResult = z.infer<typeof MentionResultSchema>;
|
|
45
|
-
export { SystemChatMessageSchema };
|
|
56
|
+
export { SystemChatMessageSchema, CommandChatMessageSchema };
|
|
57
|
+
export declare const PostGiftInputSchema: z.ZodObject<{
|
|
58
|
+
amount: z.ZodString;
|
|
59
|
+
roomId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"__global">]>, z.ZodTransform<string | null, string>>;
|
|
60
|
+
idempotencyKey: z.ZodUUID;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PostGiftInput = z.infer<typeof PostGiftInputSchema>;
|
|
63
|
+
export declare const PostRainInputSchema: z.ZodObject<{
|
|
64
|
+
amount: z.ZodString;
|
|
65
|
+
recipientCount: z.ZodNumber;
|
|
66
|
+
roomId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"__global">]>, z.ZodTransform<string | null, string>>;
|
|
67
|
+
idempotencyKey: z.ZodUUID;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type PostRainInput = z.infer<typeof PostRainInputSchema>;
|
|
70
|
+
export declare const ClaimGiftOutputSchema: z.ZodObject<{
|
|
71
|
+
claimedBy: z.ZodUUID;
|
|
72
|
+
claimedByUsername: z.ZodString;
|
|
73
|
+
claimedAt: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type ClaimGiftOutput = z.infer<typeof ClaimGiftOutputSchema>;
|
|
46
76
|
export declare const GiftStateSchema: z.ZodObject<{
|
|
47
77
|
id: z.ZodUUID;
|
|
48
78
|
senderId: z.ZodUUID;
|
|
@@ -55,30 +85,6 @@ export declare const GiftStateSchema: z.ZodObject<{
|
|
|
55
85
|
createdAt: z.ZodString;
|
|
56
86
|
}, z.core.$strip>;
|
|
57
87
|
export type GiftState = z.infer<typeof GiftStateSchema>;
|
|
58
|
-
export declare const ClaimGiftOutputSchema: z.ZodObject<{
|
|
59
|
-
claimedBy: z.ZodUUID;
|
|
60
|
-
claimedByUsername: z.ZodString;
|
|
61
|
-
claimedAt: z.ZodString;
|
|
62
|
-
}, z.core.$strip>;
|
|
63
|
-
export type ClaimGiftOutput = z.infer<typeof ClaimGiftOutputSchema>;
|
|
64
|
-
export declare const PlayerSearchResultSchema: z.ZodObject<{
|
|
65
|
-
userId: z.ZodUUID;
|
|
66
|
-
username: z.ZodString;
|
|
67
|
-
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
68
|
-
level: z.ZodNumber;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
export type PlayerSearchResult = z.infer<typeof PlayerSearchResultSchema>;
|
|
71
|
-
export declare const PlayerProfileCardSchema: z.ZodObject<{
|
|
72
|
-
userId: z.ZodUUID;
|
|
73
|
-
username: z.ZodString;
|
|
74
|
-
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
75
|
-
level: z.ZodNumber;
|
|
76
|
-
joinedAt: z.ZodNullable<z.ZodString>;
|
|
77
|
-
totalWagered: z.ZodNullable<z.ZodString>;
|
|
78
|
-
totalBets: z.ZodNullable<z.ZodNumber>;
|
|
79
|
-
currency: z.ZodNullable<z.ZodString>;
|
|
80
|
-
}, z.core.$strip>;
|
|
81
|
-
export type PlayerProfileCard = z.infer<typeof PlayerProfileCardSchema>;
|
|
82
88
|
export declare const chatCommandsContract: {
|
|
83
89
|
listCommands: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
84
90
|
key: z.ZodEnum<{
|
|
@@ -86,7 +92,9 @@ export declare const chatCommandsContract: {
|
|
|
86
92
|
gift: "gift";
|
|
87
93
|
rain: "rain";
|
|
88
94
|
profile: "profile";
|
|
95
|
+
unblock: "unblock";
|
|
89
96
|
ignore: "ignore";
|
|
97
|
+
unignore: "unignore";
|
|
90
98
|
donate: "donate";
|
|
91
99
|
mention: "mention";
|
|
92
100
|
}>;
|
|
@@ -98,37 +106,20 @@ export declare const chatCommandsContract: {
|
|
|
98
106
|
minAmount: z.ZodOptional<z.ZodString>;
|
|
99
107
|
maxRecipients: z.ZodOptional<z.ZodNumber>;
|
|
100
108
|
}, z.core.$strip>>;
|
|
109
|
+
updatedAt: z.ZodISODateTime;
|
|
101
110
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
102
|
-
|
|
103
|
-
type: z.ZodLiteral<"gift">;
|
|
104
|
-
amount: z.ZodString;
|
|
105
|
-
roomId: z.ZodUUID;
|
|
106
|
-
idempotencyKey: z.ZodUUID;
|
|
107
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
-
type: z.ZodLiteral<"rain">;
|
|
109
|
-
amount: z.ZodString;
|
|
110
|
-
recipientCount: z.ZodNumber;
|
|
111
|
-
roomId: z.ZodUUID;
|
|
112
|
-
idempotencyKey: z.ZodUUID;
|
|
113
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
-
type: z.ZodLiteral<"donate">;
|
|
115
|
-
targetUsername: z.ZodString;
|
|
111
|
+
postGift: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
116
112
|
amount: z.ZodString;
|
|
117
|
-
roomId: z.
|
|
113
|
+
roomId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"__global">]>, z.ZodTransform<string | null, string>>;
|
|
118
114
|
idempotencyKey: z.ZodUUID;
|
|
119
115
|
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
-
type: z.ZodLiteral<"block">;
|
|
121
|
-
targetUsername: z.ZodString;
|
|
122
|
-
roomId: z.ZodNullable<z.ZodUUID>;
|
|
123
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
-
type: z.ZodLiteral<"ignore">;
|
|
125
|
-
targetUsername: z.ZodString;
|
|
126
|
-
roomId: z.ZodNullable<z.ZodUUID>;
|
|
127
|
-
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
128
116
|
id: z.ZodUUID;
|
|
129
117
|
roomId: z.ZodNullable<z.ZodUUID>;
|
|
130
118
|
actorId: z.ZodUUID;
|
|
119
|
+
userId: z.ZodUUID;
|
|
120
|
+
username: z.ZodString;
|
|
131
121
|
content: z.ZodString;
|
|
122
|
+
type: z.ZodLiteral<"system">;
|
|
132
123
|
metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
124
|
command: z.ZodLiteral<"profile">;
|
|
134
125
|
targetUserId: z.ZodUUID;
|
|
@@ -141,30 +132,60 @@ export declare const chatCommandsContract: {
|
|
|
141
132
|
senderUsername: z.ZodString;
|
|
142
133
|
amount: z.ZodString;
|
|
143
134
|
currency: z.ZodString;
|
|
135
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
available: "available";
|
|
137
|
+
claimed: "claimed";
|
|
138
|
+
}>>;
|
|
139
|
+
claimedBy: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
140
|
+
claimedByUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
claimedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
142
|
}, z.core.$strip>, z.ZodObject<{
|
|
145
143
|
command: z.ZodLiteral<"rain">;
|
|
146
144
|
fromUserId: z.ZodUUID;
|
|
145
|
+
fromUsername: z.ZodOptional<z.ZodString>;
|
|
147
146
|
amount: z.ZodString;
|
|
148
147
|
currency: z.ZodString;
|
|
149
148
|
recipientCount: z.ZodNumber;
|
|
150
149
|
perRecipient: z.ZodString;
|
|
150
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
+
userId: z.ZodUUID;
|
|
152
|
+
username: z.ZodString;
|
|
153
|
+
}, z.core.$strip>>>;
|
|
151
154
|
}, z.core.$strip>, z.ZodObject<{
|
|
152
155
|
command: z.ZodLiteral<"block">;
|
|
153
156
|
targetUserId: z.ZodUUID;
|
|
154
157
|
displayName: z.ZodString;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
command: z.ZodLiteral<"unblock">;
|
|
160
|
+
targetUserId: z.ZodUUID;
|
|
161
|
+
displayName: z.ZodString;
|
|
155
162
|
}, z.core.$strip>, z.ZodObject<{
|
|
156
163
|
command: z.ZodLiteral<"ignore">;
|
|
157
164
|
targetUserId: z.ZodUUID;
|
|
158
165
|
displayName: z.ZodString;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
command: z.ZodLiteral<"unignore">;
|
|
168
|
+
targetUserId: z.ZodUUID;
|
|
169
|
+
displayName: z.ZodString;
|
|
159
170
|
}, z.core.$strip>, z.ZodObject<{
|
|
160
171
|
command: z.ZodLiteral<"donate">;
|
|
172
|
+
senderId: z.ZodOptional<z.ZodUUID>;
|
|
173
|
+
senderUsername: z.ZodOptional<z.ZodString>;
|
|
161
174
|
recipientId: z.ZodUUID;
|
|
162
175
|
recipientUsername: z.ZodString;
|
|
163
176
|
amount: z.ZodString;
|
|
164
177
|
currency: z.ZodString;
|
|
165
178
|
}, z.core.$strip>], "command">;
|
|
179
|
+
isDeleted: z.ZodBoolean;
|
|
166
180
|
createdAt: z.ZodString;
|
|
167
181
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
182
|
+
claimGift: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
183
|
+
id: z.ZodUUID;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
claimedBy: z.ZodUUID;
|
|
186
|
+
claimedByUsername: z.ZodString;
|
|
187
|
+
claimedAt: z.ZodString;
|
|
188
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
168
189
|
getGift: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
169
190
|
id: z.ZodUUID;
|
|
170
191
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -178,12 +199,77 @@ export declare const chatCommandsContract: {
|
|
|
178
199
|
claimedAt: z.ZodNullable<z.ZodString>;
|
|
179
200
|
createdAt: z.ZodString;
|
|
180
201
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
181
|
-
|
|
182
|
-
|
|
202
|
+
postRain: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
203
|
+
amount: z.ZodString;
|
|
204
|
+
recipientCount: z.ZodNumber;
|
|
205
|
+
roomId: z.ZodPipe<z.ZodUnion<readonly [z.ZodUUID, z.ZodLiteral<"__global">]>, z.ZodTransform<string | null, string>>;
|
|
206
|
+
idempotencyKey: z.ZodUUID;
|
|
183
207
|
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
208
|
+
id: z.ZodUUID;
|
|
209
|
+
roomId: z.ZodNullable<z.ZodUUID>;
|
|
210
|
+
actorId: z.ZodUUID;
|
|
211
|
+
userId: z.ZodUUID;
|
|
212
|
+
username: z.ZodString;
|
|
213
|
+
content: z.ZodString;
|
|
214
|
+
type: z.ZodLiteral<"system">;
|
|
215
|
+
metadata: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
216
|
+
command: z.ZodLiteral<"profile">;
|
|
217
|
+
targetUserId: z.ZodUUID;
|
|
218
|
+
displayName: z.ZodString;
|
|
219
|
+
level: z.ZodNumber;
|
|
220
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
221
|
+
command: z.ZodLiteral<"gift">;
|
|
222
|
+
giftId: z.ZodUUID;
|
|
223
|
+
senderId: z.ZodUUID;
|
|
224
|
+
senderUsername: z.ZodString;
|
|
225
|
+
amount: z.ZodString;
|
|
226
|
+
currency: z.ZodString;
|
|
227
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
available: "available";
|
|
229
|
+
claimed: "claimed";
|
|
230
|
+
}>>;
|
|
231
|
+
claimedBy: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
232
|
+
claimedByUsername: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
claimedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
command: z.ZodLiteral<"rain">;
|
|
236
|
+
fromUserId: z.ZodUUID;
|
|
237
|
+
fromUsername: z.ZodOptional<z.ZodString>;
|
|
238
|
+
amount: z.ZodString;
|
|
239
|
+
currency: z.ZodString;
|
|
240
|
+
recipientCount: z.ZodNumber;
|
|
241
|
+
perRecipient: z.ZodString;
|
|
242
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
243
|
+
userId: z.ZodUUID;
|
|
244
|
+
username: z.ZodString;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
command: z.ZodLiteral<"block">;
|
|
248
|
+
targetUserId: z.ZodUUID;
|
|
249
|
+
displayName: z.ZodString;
|
|
250
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
|
+
command: z.ZodLiteral<"unblock">;
|
|
252
|
+
targetUserId: z.ZodUUID;
|
|
253
|
+
displayName: z.ZodString;
|
|
254
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
255
|
+
command: z.ZodLiteral<"ignore">;
|
|
256
|
+
targetUserId: z.ZodUUID;
|
|
257
|
+
displayName: z.ZodString;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
command: z.ZodLiteral<"unignore">;
|
|
260
|
+
targetUserId: z.ZodUUID;
|
|
261
|
+
displayName: z.ZodString;
|
|
262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
263
|
+
command: z.ZodLiteral<"donate">;
|
|
264
|
+
senderId: z.ZodOptional<z.ZodUUID>;
|
|
265
|
+
senderUsername: z.ZodOptional<z.ZodString>;
|
|
266
|
+
recipientId: z.ZodUUID;
|
|
267
|
+
recipientUsername: z.ZodString;
|
|
268
|
+
amount: z.ZodString;
|
|
269
|
+
currency: z.ZodString;
|
|
270
|
+
}, z.core.$strip>], "command">;
|
|
271
|
+
isDeleted: z.ZodBoolean;
|
|
272
|
+
createdAt: z.ZodString;
|
|
187
273
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
188
274
|
mentionSearch: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
189
275
|
q: z.ZodString;
|
|
@@ -192,26 +278,43 @@ export declare const chatCommandsContract: {
|
|
|
192
278
|
userId: z.ZodUUID;
|
|
193
279
|
username: z.ZodString;
|
|
194
280
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
195
|
-
|
|
196
|
-
|
|
281
|
+
adminListCommands: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
282
|
+
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
283
|
+
updatedAt: "updatedAt";
|
|
284
|
+
key: "key";
|
|
285
|
+
}>>;
|
|
286
|
+
sortOrder: z.ZodDefault<z.ZodEnum<{
|
|
287
|
+
asc: "asc";
|
|
288
|
+
desc: "desc";
|
|
289
|
+
}>>;
|
|
290
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
197
291
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
198
|
-
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
199
|
-
userId: z.ZodUUID;
|
|
200
|
-
username: z.ZodString;
|
|
201
|
-
avatarUrl: z.ZodNullable<z.ZodString>;
|
|
202
|
-
level: z.ZodNumber;
|
|
203
|
-
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
204
|
-
playerProfile: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
205
|
-
userId: z.ZodUUID;
|
|
206
292
|
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
293
|
+
items: z.ZodArray<z.ZodObject<{
|
|
294
|
+
key: z.ZodEnum<{
|
|
295
|
+
block: "block";
|
|
296
|
+
gift: "gift";
|
|
297
|
+
rain: "rain";
|
|
298
|
+
profile: "profile";
|
|
299
|
+
unblock: "unblock";
|
|
300
|
+
ignore: "ignore";
|
|
301
|
+
unignore: "unignore";
|
|
302
|
+
donate: "donate";
|
|
303
|
+
mention: "mention";
|
|
304
|
+
}>;
|
|
305
|
+
enabled: z.ZodBoolean;
|
|
306
|
+
label: z.ZodString;
|
|
307
|
+
description: z.ZodNullable<z.ZodString>;
|
|
308
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
309
|
+
maxAmount: z.ZodOptional<z.ZodString>;
|
|
310
|
+
minAmount: z.ZodOptional<z.ZodString>;
|
|
311
|
+
maxRecipients: z.ZodOptional<z.ZodNumber>;
|
|
312
|
+
}, z.core.$strip>>;
|
|
313
|
+
updatedAt: z.ZodISODateTime;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
total: z.ZodNumber;
|
|
316
|
+
page: z.ZodNumber;
|
|
317
|
+
limit: z.ZodNumber;
|
|
215
318
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
216
319
|
adminUpdateCommand: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
217
320
|
key: z.ZodEnum<{
|
|
@@ -219,7 +322,9 @@ export declare const chatCommandsContract: {
|
|
|
219
322
|
gift: "gift";
|
|
220
323
|
rain: "rain";
|
|
221
324
|
profile: "profile";
|
|
325
|
+
unblock: "unblock";
|
|
222
326
|
ignore: "ignore";
|
|
327
|
+
unignore: "unignore";
|
|
223
328
|
donate: "donate";
|
|
224
329
|
mention: "mention";
|
|
225
330
|
}>;
|
|
@@ -235,7 +340,9 @@ export declare const chatCommandsContract: {
|
|
|
235
340
|
gift: "gift";
|
|
236
341
|
rain: "rain";
|
|
237
342
|
profile: "profile";
|
|
343
|
+
unblock: "unblock";
|
|
238
344
|
ignore: "ignore";
|
|
345
|
+
unignore: "unignore";
|
|
239
346
|
donate: "donate";
|
|
240
347
|
mention: "mention";
|
|
241
348
|
}>;
|
|
@@ -247,6 +354,7 @@ export declare const chatCommandsContract: {
|
|
|
247
354
|
minAmount: z.ZodOptional<z.ZodString>;
|
|
248
355
|
maxRecipients: z.ZodOptional<z.ZodNumber>;
|
|
249
356
|
}, z.core.$strip>>;
|
|
357
|
+
updatedAt: z.ZodISODateTime;
|
|
250
358
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
251
359
|
};
|
|
252
360
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/engagement/chat-commands/contract/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/engagement/chat-commands/contract/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAGL,uBAAuB,EACvB,wBAA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;;iBAU1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEhC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { oc } from '@orpc/contract';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { UuidSchema, MoneyAmountSchema, SystemChatMessageSchema } from '@openora/core/contracts';
|
|
3
|
+
import { UuidSchema, MoneyAmountSchema, SystemChatMessageSchema, CommandChatMessageSchema, ChatRoomIdSchema, TimestampSchema, } from '@openora/core/contracts';
|
|
4
|
+
import { PageQuerySchema, SortOrderSchema, paginated } from '@openora/core/contracts/kit';
|
|
4
5
|
export const CHAT_COMMAND_TYPES = [
|
|
5
6
|
'mention',
|
|
6
7
|
'profile',
|
|
@@ -8,7 +9,9 @@ export const CHAT_COMMAND_TYPES = [
|
|
|
8
9
|
'rain',
|
|
9
10
|
'donate',
|
|
10
11
|
'block',
|
|
12
|
+
'unblock',
|
|
11
13
|
'ignore',
|
|
14
|
+
'unignore',
|
|
12
15
|
];
|
|
13
16
|
export const ChatCommandTypeSchema = z.enum(CHAT_COMMAND_TYPES);
|
|
14
17
|
export const CommandConfigSchema = z.object({
|
|
@@ -22,12 +25,31 @@ export const ChatCommandDescriptorSchema = z.object({
|
|
|
22
25
|
label: z.string(),
|
|
23
26
|
description: z.string().nullable(),
|
|
24
27
|
config: CommandConfigSchema.nullable(),
|
|
28
|
+
updatedAt: TimestampSchema,
|
|
25
29
|
});
|
|
30
|
+
export const AdminCommandSortByValues = ['key', 'updatedAt'];
|
|
31
|
+
export const AdminCommandSortBySchema = z.enum(AdminCommandSortByValues).default('key');
|
|
26
32
|
export const MentionResultSchema = z.object({
|
|
27
33
|
userId: UuidSchema,
|
|
28
34
|
username: z.string(),
|
|
29
35
|
});
|
|
30
|
-
export { SystemChatMessageSchema };
|
|
36
|
+
export { SystemChatMessageSchema, CommandChatMessageSchema };
|
|
37
|
+
export const PostGiftInputSchema = z.object({
|
|
38
|
+
amount: MoneyAmountSchema,
|
|
39
|
+
roomId: ChatRoomIdSchema,
|
|
40
|
+
idempotencyKey: UuidSchema,
|
|
41
|
+
});
|
|
42
|
+
export const PostRainInputSchema = z.object({
|
|
43
|
+
amount: MoneyAmountSchema,
|
|
44
|
+
recipientCount: z.number().int().positive(),
|
|
45
|
+
roomId: ChatRoomIdSchema,
|
|
46
|
+
idempotencyKey: UuidSchema,
|
|
47
|
+
});
|
|
48
|
+
export const ClaimGiftOutputSchema = z.object({
|
|
49
|
+
claimedBy: UuidSchema,
|
|
50
|
+
claimedByUsername: z.string(),
|
|
51
|
+
claimedAt: z.string(),
|
|
52
|
+
});
|
|
31
53
|
export const GiftStateSchema = z.object({
|
|
32
54
|
id: UuidSchema,
|
|
33
55
|
senderId: UuidSchema,
|
|
@@ -39,75 +61,34 @@ export const GiftStateSchema = z.object({
|
|
|
39
61
|
claimedAt: z.string().nullable(),
|
|
40
62
|
createdAt: z.string(),
|
|
41
63
|
});
|
|
42
|
-
export const ClaimGiftOutputSchema = z.object({
|
|
43
|
-
claimedBy: UuidSchema,
|
|
44
|
-
claimedByUsername: z.string(),
|
|
45
|
-
claimedAt: z.string(),
|
|
46
|
-
});
|
|
47
|
-
export const PlayerSearchResultSchema = z.object({
|
|
48
|
-
userId: UuidSchema,
|
|
49
|
-
username: z.string(),
|
|
50
|
-
avatarUrl: z.string().nullable(),
|
|
51
|
-
level: z.number().int(),
|
|
52
|
-
});
|
|
53
|
-
export const PlayerProfileCardSchema = z.object({
|
|
54
|
-
userId: UuidSchema,
|
|
55
|
-
username: z.string(),
|
|
56
|
-
avatarUrl: z.string().nullable(),
|
|
57
|
-
level: z.number().int(),
|
|
58
|
-
joinedAt: z.string().nullable(),
|
|
59
|
-
totalWagered: MoneyAmountSchema.nullable(),
|
|
60
|
-
totalBets: z.number().int().nullable(),
|
|
61
|
-
currency: z.string().nullable(),
|
|
62
|
-
});
|
|
63
64
|
export const chatCommandsContract = {
|
|
64
65
|
listCommands: oc
|
|
65
66
|
.route({ method: 'GET', path: '/chat-command/commands' })
|
|
66
67
|
.input(z.object({}))
|
|
67
68
|
.output(z.array(ChatCommandDescriptorSchema)),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
idempotencyKey: UuidSchema,
|
|
76
|
-
}),
|
|
77
|
-
z.object({
|
|
78
|
-
type: z.literal('rain'),
|
|
79
|
-
amount: MoneyAmountSchema,
|
|
80
|
-
recipientCount: z.number().int().positive(),
|
|
81
|
-
roomId: UuidSchema,
|
|
82
|
-
idempotencyKey: UuidSchema,
|
|
83
|
-
}),
|
|
84
|
-
z.object({
|
|
85
|
-
type: z.literal('donate'),
|
|
86
|
-
targetUsername: z.string().min(1),
|
|
87
|
-
amount: MoneyAmountSchema,
|
|
88
|
-
roomId: UuidSchema.nullable(),
|
|
89
|
-
idempotencyKey: UuidSchema,
|
|
90
|
-
}),
|
|
91
|
-
z.object({
|
|
92
|
-
type: z.literal('block'),
|
|
93
|
-
targetUsername: z.string().min(1),
|
|
94
|
-
roomId: UuidSchema.nullable(),
|
|
95
|
-
}),
|
|
96
|
-
z.object({
|
|
97
|
-
type: z.literal('ignore'),
|
|
98
|
-
targetUsername: z.string().min(1),
|
|
99
|
-
roomId: UuidSchema.nullable(),
|
|
100
|
-
}),
|
|
101
|
-
]))
|
|
102
|
-
.output(SystemChatMessageSchema),
|
|
103
|
-
getGift: oc
|
|
104
|
-
.route({ method: 'GET', path: '/chat-command/gift/{id}' })
|
|
105
|
-
.input(z.object({ id: UuidSchema }))
|
|
106
|
-
.output(GiftStateSchema),
|
|
69
|
+
// Dedicated gift-send operation - money/limit/idempotency logic lives in the
|
|
70
|
+
// social-transfers module behind the GIFT_COMMANDS port; this module only
|
|
71
|
+
// wires the route. See AGENTS.md.
|
|
72
|
+
postGift: oc
|
|
73
|
+
.route({ method: 'POST', path: '/chat-command/gift' })
|
|
74
|
+
.input(PostGiftInputSchema)
|
|
75
|
+
.output(CommandChatMessageSchema),
|
|
107
76
|
claimGift: oc
|
|
108
77
|
.route({ method: 'POST', path: '/chat-command/gift/{id}/claim' })
|
|
109
78
|
.input(z.object({ id: UuidSchema }))
|
|
110
79
|
.output(ClaimGiftOutputSchema),
|
|
80
|
+
getGift: oc
|
|
81
|
+
.route({ method: 'GET', path: '/chat-command/gift/{id}' })
|
|
82
|
+
.input(z.object({ id: UuidSchema }))
|
|
83
|
+
.output(GiftStateSchema),
|
|
84
|
+
// Dedicated rain-send operation - this module resolves the online recipient
|
|
85
|
+
// list (it owns presence lookups for the chat command surface) and hands it
|
|
86
|
+
// to the RAIN_COMMANDS port; money/limit/idempotency logic lives in
|
|
87
|
+
// social-transfers. See AGENTS.md.
|
|
88
|
+
postRain: oc
|
|
89
|
+
.route({ method: 'POST', path: '/chat-command/rain' })
|
|
90
|
+
.input(PostRainInputSchema)
|
|
91
|
+
.output(CommandChatMessageSchema),
|
|
111
92
|
mentionSearch: oc
|
|
112
93
|
.route({ method: 'GET', path: '/chat-command/mention-search' })
|
|
113
94
|
.input(z.object({
|
|
@@ -115,19 +96,16 @@ export const chatCommandsContract = {
|
|
|
115
96
|
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
116
97
|
}))
|
|
117
98
|
.output(z.array(MentionResultSchema)),
|
|
118
|
-
|
|
119
|
-
.route({ method: 'GET', path: '/chat-command/
|
|
99
|
+
adminListCommands: oc
|
|
100
|
+
.route({ method: 'GET', path: '/backoffice/chat-command/commands' })
|
|
120
101
|
.input(z.object({
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
...PageQuerySchema.shape,
|
|
103
|
+
sortBy: AdminCommandSortBySchema,
|
|
104
|
+
sortOrder: SortOrderSchema.default('asc'),
|
|
123
105
|
}))
|
|
124
|
-
.output(
|
|
125
|
-
playerProfile: oc
|
|
126
|
-
.route({ method: 'GET', path: '/chat-command/player-profile/{userId}' })
|
|
127
|
-
.input(z.object({ userId: UuidSchema }))
|
|
128
|
-
.output(PlayerProfileCardSchema),
|
|
106
|
+
.output(paginated(ChatCommandDescriptorSchema)),
|
|
129
107
|
adminUpdateCommand: oc
|
|
130
|
-
.route({ method: 'PATCH', path: '/chat-command/
|
|
108
|
+
.route({ method: 'PATCH', path: '/backoffice/chat-command/commands/{key}' })
|
|
131
109
|
.input(z.object({
|
|
132
110
|
key: ChatCommandTypeSchema,
|
|
133
111
|
enabled: z.boolean(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/engagement/chat-commands/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/engagement/chat-commands/contract/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,6BAA6B,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,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;KAC3D,CAAC,CACH;SACA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAEvC,iBAAiB,EAAE,EAAE;SAClB,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mCAAmC,EAAE,CAAC;SACnE,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,eAAe,CAAC,KAAK;QACxB,MAAM,EAAE,wBAAwB;QAChC,SAAS,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC;KAC1C,CAAC,CACH;SACA,MAAM,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC;IAEjD,kBAAkB,EAAE,EAAE;SACnB,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,yCAAyC,EAAE,CAAC;SAC3E,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,GAAG,EAAE,qBAAqB;QAC1B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;QACpB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,EAAE;KACvC,CAAC,CACH;SACA,MAAM,CAAC,2BAA2B,CAAC;CACvC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
readonly id: "chat-commands";
|
|
3
|
-
readonly dependsOn: readonly ["chat", "
|
|
3
|
+
readonly dependsOn: readonly ["chat", "social-transfers", "audit"];
|
|
4
4
|
readonly register: (ctx: import("@openora/core/server").PluginContext<{
|
|
5
5
|
ADMIN_GAME_REPORTING: import("@openora/core/contracts").Token<import("@openora/core/contracts").AdminGameReporting>;
|
|
6
6
|
ADMIN_GUARD: import("@openora/core/contracts").Token<import("@openora/core/server").AdminGuard>;
|
|
@@ -22,6 +22,7 @@ declare const _default: {
|
|
|
22
22
|
EVENT_BUS: import("@openora/core/contracts").Token<import("@openora/core/server").EventBus>;
|
|
23
23
|
GAME_ADAPTER: import("@openora/core/contracts").Token<import("@openora/core/contracts").GameAdapter>;
|
|
24
24
|
GEO_IP_ADAPTER: import("@openora/core/contracts").Token<import("@openora/core/contracts").GeoIpAdapter>;
|
|
25
|
+
GIFT_COMMANDS: import("@openora/core/contracts").Token<import("@openora/core/contracts").GiftCommands>;
|
|
25
26
|
IDENTITY_OPTIONS: import("@openora/core/contracts").Token<import("@openora/core/contracts").IdentityServiceOptions>;
|
|
26
27
|
IDENTITY_READER: import("@openora/core/contracts").Token<import("@openora/core/contracts").IdentityReader, string>;
|
|
27
28
|
IGAMING_CONFIG: import("@openora/core/contracts").Token<{
|
|
@@ -93,6 +94,7 @@ declare const _default: {
|
|
|
93
94
|
}, string>;
|
|
94
95
|
PLAYER_TAGS: import("@openora/core/contracts").Token<import("@openora/core/contracts").PlayerTags>;
|
|
95
96
|
PLAY_ELIGIBILITY: import("@openora/core/contracts").Token<import("@openora/core/contracts").PlayEligibilityPort>;
|
|
97
|
+
RAIN_COMMANDS: import("@openora/core/contracts").Token<import("@openora/core/contracts").RainCommands>;
|
|
96
98
|
RATE_LIMITER: import("@openora/core/contracts").Token<import("@openora/core/contracts").RateLimiterAdapter<`register:${string}` | `login:${string}` | `enable2fa:${string}` | `verify2fa:${string}` | `disable2fa:${string}` | `pwreset-req:${string}` | `pwreset-verify:${string}` | `pwreset:${string}` | `change-password:${string}` | `email-verify:${string}` | `verify-email:${string}` | `wallet-mutation:${string}` | `chat-room-join:${string}` | `chat-send:${string}` | `report-access-denied:${string}`>>;
|
|
97
99
|
REALTIME_CLIENT_AUTHORIZER: import("@openora/core/contracts").Token<import("@openora/core/contracts").RealtimeClientAuthorizer>;
|
|
98
100
|
REALTIME_TRANSPORT: import("@openora/core/contracts").Token<import("@openora/core/contracts").RealtimeTransport>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/engagement/chat-commands/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/engagement/chat-commands/plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,wBAiB8C"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { DRIZZLE,
|
|
2
|
-
import {
|
|
1
|
+
import { DRIZZLE, ADMIN_GUARD } from '@openora/core/server';
|
|
2
|
+
import { ADMIN_USER_DIRECTORY, CHAT_BLOCK_WRITER, CHAT_REALTIME_TRANSPORT, GIFT_COMMANDS, RAIN_COMMANDS, AUDIT_WRITER, } from '@openora/core/contracts';
|
|
3
3
|
import { ChatCommandsService } from './service/chat-commands.service.js';
|
|
4
4
|
import { createChatCommandsRouter } from './router/index.js';
|
|
5
5
|
export default {
|
|
6
6
|
id: 'chat-commands',
|
|
7
|
-
dependsOn: ['chat', '
|
|
7
|
+
dependsOn: ['chat', 'social-transfers', 'audit'],
|
|
8
8
|
register(ctx) {
|
|
9
9
|
ctx.routers.add('chat-commands', (c) => {
|
|
10
|
-
const svc = new ChatCommandsService(c.get(DRIZZLE), c.get(
|
|
10
|
+
const svc = new ChatCommandsService(c.get(DRIZZLE), c.get(ADMIN_USER_DIRECTORY), c.get(CHAT_BLOCK_WRITER), c.get(GIFT_COMMANDS), c.get(RAIN_COMMANDS), c.get(CHAT_REALTIME_TRANSPORT), c.get(AUDIT_WRITER));
|
|
11
11
|
return createChatCommandsRouter(svc, c.get(ADMIN_GUARD));
|
|
12
12
|
});
|
|
13
13
|
},
|