@arken/seer-protocol 0.1.2 → 0.1.3
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/.rush/temp/shrinkwrap-deps.json +246 -2
- package/area/area.models.ts +1 -1
- package/area/area.router.ts +3 -3
- package/area/area.schema.ts +1 -1
- package/area/area.types.ts +2 -3
- package/area/index.ts +0 -1
- package/asset/asset.models.ts +1 -1
- package/asset/asset.router.ts +2 -2
- package/asset/asset.schema.ts +5 -2
- package/asset/asset.types.ts +2 -3
- package/asset/index.ts +0 -1
- package/chain/chain.models.ts +1 -1
- package/chain/chain.router.ts +3 -3
- package/chain/chain.schema.ts +21 -6
- package/chain/chain.types.ts +2 -3
- package/chain/index.ts +0 -1
- package/character/character.models.ts +1 -1
- package/character/character.router.ts +3 -3
- package/character/character.schema.ts +5 -2
- package/character/character.types.ts +2 -3
- package/character/index.ts +0 -1
- package/chat/chat.models.ts +1 -1
- package/chat/chat.router.ts +2 -2
- package/chat/chat.schema.ts +5 -2
- package/chat/chat.types.ts +2 -3
- package/chat/index.ts +0 -1
- package/collection/collection.models.ts +1 -1
- package/collection/collection.router.ts +2 -2
- package/collection/collection.schema.ts +1 -1
- package/collection/collection.types.ts +2 -3
- package/collection/index.ts +0 -1
- package/core/core.models.ts +1 -1
- package/core/core.router.ts +4 -4
- package/core/core.schema.ts +123 -30
- package/core/core.types.ts +2 -3
- package/core/index.ts +0 -1
- package/evolution/evolution.router.ts +11 -11
- package/evolution/evolution.types.ts +1 -2
- package/evolution/index.ts +0 -1
- package/game/game.models.ts +1 -1
- package/game/game.router.ts +3 -3
- package/game/game.schema.ts +1 -1
- package/game/game.types.ts +2 -3
- package/game/index.ts +0 -1
- package/index.ts +39 -39
- package/infinite/index.ts +0 -1
- package/infinite/infinite.router.ts +1 -1
- package/infinite/infinite.types.ts +1 -2
- package/interface/index.ts +0 -1
- package/interface/interface.models.ts +1 -1
- package/interface/interface.router.ts +3 -3
- package/interface/interface.schema.ts +1 -1
- package/interface/interface.types.ts +2 -3
- package/isles/index.ts +0 -1
- package/isles/isles.router.ts +1 -1
- package/isles/isles.types.ts +1 -2
- package/item/index.ts +0 -1
- package/item/item.models.ts +1 -1
- package/item/item.router.ts +3 -3
- package/item/item.schema.ts +39 -9
- package/item/item.types.ts +2 -3
- package/job/index.ts +0 -1
- package/job/job.models.ts +1 -1
- package/job/job.router.ts +3 -3
- package/job/job.schema.ts +1 -1
- package/job/job.types.ts +2 -3
- package/market/index.ts +0 -1
- package/market/market.models.ts +1 -1
- package/market/market.router.ts +2 -2
- package/market/market.schema.ts +13 -4
- package/market/market.types.ts +2 -3
- package/oasis/index.ts +0 -1
- package/oasis/oasis.router.ts +3 -4
- package/oasis/oasis.types.ts +1 -2
- package/package.json +10 -4
- package/product/index.ts +0 -1
- package/product/product.models.ts +1 -1
- package/product/product.router.ts +2 -2
- package/product/product.schema.ts +50 -13
- package/product/product.types.ts +2 -3
- package/profile/index.ts +0 -1
- package/profile/profile.models.ts +1 -1
- package/profile/profile.router.ts +3 -3
- package/profile/profile.schema.ts +82 -19
- package/profile/profile.types.ts +2 -3
- package/raffle/index.ts +0 -1
- package/raffle/raffle.models.ts +1 -1
- package/raffle/raffle.router.ts +2 -2
- package/raffle/raffle.schema.ts +1 -1
- package/raffle/raffle.types.ts +2 -3
- package/skill/index.ts +0 -1
- package/skill/skill.models.ts +1 -1
- package/skill/skill.router.ts +3 -3
- package/skill/skill.schema.ts +17 -5
- package/skill/skill.types.ts +2 -3
- package/trek/index.ts +0 -1
- package/trek/trek.router.ts +1 -1
- package/tsconfig.json +25 -17
- package/types.ts +35 -54
- package/video/index.ts +0 -1
- package/video/video.models.ts +1 -1
- package/video/video.router.ts +3 -3
- package/video/video.schema.ts +1 -1
- package/video/video.types.ts +2 -3
package/core/core.schema.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
// node/modules/core/core.schema.ts
|
|
2
2
|
|
|
3
|
-
import { z, ObjectId, Entity } from '
|
|
3
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
4
4
|
import { Profile } from '../profile/profile.schema';
|
|
5
5
|
import { ProfileDocument } from '../profile/profile.types';
|
|
6
6
|
|
|
7
7
|
export const MerkleTree = Entity.merge(
|
|
8
8
|
z.object({
|
|
9
|
-
name: z
|
|
9
|
+
name: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.max(200)
|
|
13
|
+
.trim()
|
|
14
|
+
.default('global'),
|
|
10
15
|
root: z.string(),
|
|
11
16
|
depth: z.number().default(16), // log2(#leaves)
|
|
12
17
|
})
|
|
@@ -117,7 +122,11 @@ export const Conversation = Entity.merge(
|
|
|
117
122
|
profileId: ObjectId,
|
|
118
123
|
role: z.enum(['user', 'system', 'gm', 'npc']).default('user'),
|
|
119
124
|
lastReadAt: z.coerce.date().default(new Date(0)),
|
|
120
|
-
unreadCount: z
|
|
125
|
+
unreadCount: z
|
|
126
|
+
.number()
|
|
127
|
+
.int()
|
|
128
|
+
.min(0)
|
|
129
|
+
.default(0),
|
|
121
130
|
isMuted: z.boolean().default(false),
|
|
122
131
|
isPinned: z.boolean().default(false),
|
|
123
132
|
isArchived: z.boolean().default(false),
|
|
@@ -131,12 +140,24 @@ export const Conversation = Entity.merge(
|
|
|
131
140
|
|
|
132
141
|
title: z.string().optional(),
|
|
133
142
|
category: z.string().default('system'),
|
|
134
|
-
importance: z
|
|
143
|
+
importance: z
|
|
144
|
+
.number()
|
|
145
|
+
.int()
|
|
146
|
+
.min(0)
|
|
147
|
+
.max(2)
|
|
148
|
+
.default(0),
|
|
135
149
|
|
|
136
150
|
// ✅ use lastMessageDate consistently everywhere
|
|
137
|
-
lastMessageDate: z.coerce
|
|
151
|
+
lastMessageDate: z.coerce
|
|
152
|
+
.date()
|
|
153
|
+
.nullable()
|
|
154
|
+
.optional(),
|
|
138
155
|
lastMessagePreview: z.string().default(''),
|
|
139
|
-
messageCount: z
|
|
156
|
+
messageCount: z
|
|
157
|
+
.number()
|
|
158
|
+
.int()
|
|
159
|
+
.min(0)
|
|
160
|
+
.default(0),
|
|
140
161
|
})
|
|
141
162
|
);
|
|
142
163
|
|
|
@@ -162,14 +183,26 @@ export const ConversationMessage = Entity.merge(
|
|
|
162
183
|
isClaimable: z.boolean().default(false),
|
|
163
184
|
|
|
164
185
|
// ✅ align with Mongo: claimedDate (not claimedAt)
|
|
165
|
-
claimedDate: z.coerce
|
|
186
|
+
claimedDate: z.coerce
|
|
187
|
+
.date()
|
|
188
|
+
.nullable()
|
|
189
|
+
.optional(),
|
|
166
190
|
claimedByProfileId: ObjectId.nullable().optional(),
|
|
167
191
|
|
|
168
|
-
dedupeKey: z
|
|
192
|
+
dedupeKey: z
|
|
193
|
+
.string()
|
|
194
|
+
.nullable()
|
|
195
|
+
.optional(),
|
|
169
196
|
attachments: z.array(z.any()).default([]),
|
|
170
197
|
|
|
171
|
-
revokedDate: z.coerce
|
|
172
|
-
|
|
198
|
+
revokedDate: z.coerce
|
|
199
|
+
.date()
|
|
200
|
+
.nullable()
|
|
201
|
+
.optional(),
|
|
202
|
+
revokeReason: z
|
|
203
|
+
.string()
|
|
204
|
+
.nullable()
|
|
205
|
+
.optional(),
|
|
173
206
|
})
|
|
174
207
|
.default({ isClaimable: false, attachments: [] }),
|
|
175
208
|
})
|
|
@@ -205,8 +238,14 @@ export const Event = Entity.merge(z.object({}));
|
|
|
205
238
|
export const File = Entity.merge(
|
|
206
239
|
z.object({
|
|
207
240
|
content: z.string().optional(),
|
|
208
|
-
storageType: z
|
|
209
|
-
|
|
241
|
+
storageType: z
|
|
242
|
+
.string()
|
|
243
|
+
.max(100)
|
|
244
|
+
.optional(),
|
|
245
|
+
accessType: z
|
|
246
|
+
.string()
|
|
247
|
+
.max(100)
|
|
248
|
+
.optional(),
|
|
210
249
|
})
|
|
211
250
|
);
|
|
212
251
|
|
|
@@ -229,7 +268,10 @@ export const Guide = Entity.merge(
|
|
|
229
268
|
// Idea Schema
|
|
230
269
|
export const Idea = Entity.merge(
|
|
231
270
|
z.object({
|
|
232
|
-
type: z
|
|
271
|
+
type: z
|
|
272
|
+
.string()
|
|
273
|
+
.max(100)
|
|
274
|
+
.optional(),
|
|
233
275
|
communityId: ObjectId.optional(),
|
|
234
276
|
})
|
|
235
277
|
);
|
|
@@ -268,7 +310,10 @@ export const Message = Entity.merge(
|
|
|
268
310
|
z.object({
|
|
269
311
|
conversationId: ObjectId.optional(),
|
|
270
312
|
content: z.string().optional(),
|
|
271
|
-
type: z
|
|
313
|
+
type: z
|
|
314
|
+
.string()
|
|
315
|
+
.max(100)
|
|
316
|
+
.optional(),
|
|
272
317
|
replyToId: ObjectId.optional(),
|
|
273
318
|
parentId: ObjectId.optional(),
|
|
274
319
|
parent: ObjectId.optional(),
|
|
@@ -365,7 +410,10 @@ export const Poll = Entity.merge(z.object({}));
|
|
|
365
410
|
export const Project = Entity.merge(
|
|
366
411
|
z.object({
|
|
367
412
|
content: z.string().optional(),
|
|
368
|
-
contractStatus: z
|
|
413
|
+
contractStatus: z
|
|
414
|
+
.string()
|
|
415
|
+
.default('Pending')
|
|
416
|
+
.optional(),
|
|
369
417
|
parentId: ObjectId.optional(),
|
|
370
418
|
realmId: ObjectId.optional(),
|
|
371
419
|
communityId: ObjectId.optional(),
|
|
@@ -451,7 +499,10 @@ export const RealmShard = Entity.merge(
|
|
|
451
499
|
z.object({
|
|
452
500
|
endpoint: z.string().max(100),
|
|
453
501
|
realmId: ObjectId.optional(),
|
|
454
|
-
status: z
|
|
502
|
+
status: z
|
|
503
|
+
.string()
|
|
504
|
+
.default('Offline')
|
|
505
|
+
.optional(),
|
|
455
506
|
clientCount: z.number(),
|
|
456
507
|
})
|
|
457
508
|
);
|
|
@@ -475,12 +526,18 @@ export const RealmEvent = Entity.merge(
|
|
|
475
526
|
// Realm Schema
|
|
476
527
|
export const Realm = Entity.merge(
|
|
477
528
|
z.object({
|
|
478
|
-
endpoint: z
|
|
529
|
+
endpoint: z
|
|
530
|
+
.string()
|
|
531
|
+
.max(100)
|
|
532
|
+
.optional(),
|
|
479
533
|
realmShards: z.array(RealmShard).optional(),
|
|
480
534
|
realmEvents: z.array(RealmEvent).optional(),
|
|
481
535
|
realmTraits: z.array(RealmTrait).optional(),
|
|
482
536
|
gameId: ObjectId,
|
|
483
|
-
status: z
|
|
537
|
+
status: z
|
|
538
|
+
.string()
|
|
539
|
+
.default('Offline')
|
|
540
|
+
.optional(),
|
|
484
541
|
clientCount: z.number(),
|
|
485
542
|
regionCode: z.string(),
|
|
486
543
|
})
|
|
@@ -509,15 +566,30 @@ export const Stash = Entity.merge(z.object({}));
|
|
|
509
566
|
// Stock Schema
|
|
510
567
|
export const Stock = Entity.merge(
|
|
511
568
|
z.object({
|
|
512
|
-
rank: z
|
|
513
|
-
|
|
569
|
+
rank: z
|
|
570
|
+
.number()
|
|
571
|
+
.min(0)
|
|
572
|
+
.optional(),
|
|
573
|
+
price: z
|
|
574
|
+
.number()
|
|
575
|
+
.min(0)
|
|
576
|
+
.optional(),
|
|
514
577
|
hourChange: z.number().optional(),
|
|
515
578
|
dayChange: z.number().optional(),
|
|
516
579
|
weekChange: z.number().optional(),
|
|
517
|
-
marketCap: z
|
|
518
|
-
|
|
580
|
+
marketCap: z
|
|
581
|
+
.number()
|
|
582
|
+
.min(0)
|
|
583
|
+
.optional(),
|
|
584
|
+
volume: z
|
|
585
|
+
.number()
|
|
586
|
+
.min(0)
|
|
587
|
+
.optional(),
|
|
519
588
|
ticker: z.string(),
|
|
520
|
-
unusualActivity: z
|
|
589
|
+
unusualActivity: z
|
|
590
|
+
.number()
|
|
591
|
+
.min(0)
|
|
592
|
+
.optional(),
|
|
521
593
|
})
|
|
522
594
|
);
|
|
523
595
|
|
|
@@ -540,9 +612,18 @@ export const Team = Entity.merge(
|
|
|
540
612
|
z.object({
|
|
541
613
|
ratingId: ObjectId.optional(),
|
|
542
614
|
profiles: z.array(Profile).optional(), // TODO: convert to 'members'
|
|
543
|
-
limit: z
|
|
544
|
-
|
|
545
|
-
|
|
615
|
+
limit: z
|
|
616
|
+
.number()
|
|
617
|
+
.optional()
|
|
618
|
+
.default(50),
|
|
619
|
+
points: z
|
|
620
|
+
.number()
|
|
621
|
+
.optional()
|
|
622
|
+
.default(0),
|
|
623
|
+
memberCount: z
|
|
624
|
+
.number()
|
|
625
|
+
.optional()
|
|
626
|
+
.default(0),
|
|
546
627
|
})
|
|
547
628
|
);
|
|
548
629
|
|
|
@@ -572,7 +653,10 @@ export const Party = Entity.merge(
|
|
|
572
653
|
assistantIds: z.array(ObjectId).optional(), // have control over party even if not in party
|
|
573
654
|
pendingMemberIds: z.array(ObjectId).optional(),
|
|
574
655
|
blockedMemberIds: z.array(ObjectId).optional(),
|
|
575
|
-
members: z
|
|
656
|
+
members: z
|
|
657
|
+
.array(Profile)
|
|
658
|
+
.optional()
|
|
659
|
+
.default([]),
|
|
576
660
|
})
|
|
577
661
|
);
|
|
578
662
|
|
|
@@ -739,7 +823,10 @@ export const Prefab = Entity.merge(
|
|
|
739
823
|
z: z.number(),
|
|
740
824
|
})
|
|
741
825
|
.optional(),
|
|
742
|
-
scale: z
|
|
826
|
+
scale: z
|
|
827
|
+
.number()
|
|
828
|
+
.positive()
|
|
829
|
+
.default(1),
|
|
743
830
|
})
|
|
744
831
|
)
|
|
745
832
|
.optional(),
|
|
@@ -762,7 +849,10 @@ export const Object = Entity.merge(
|
|
|
762
849
|
z: z.number(),
|
|
763
850
|
})
|
|
764
851
|
.optional(),
|
|
765
|
-
scale: z
|
|
852
|
+
scale: z
|
|
853
|
+
.number()
|
|
854
|
+
.positive()
|
|
855
|
+
.default(1),
|
|
766
856
|
customizations: z.record(z.any()).optional(),
|
|
767
857
|
childInstances: z
|
|
768
858
|
.array(
|
|
@@ -780,7 +870,10 @@ export const Object = Entity.merge(
|
|
|
780
870
|
z: z.number(),
|
|
781
871
|
})
|
|
782
872
|
.optional(),
|
|
783
|
-
scale: z
|
|
873
|
+
scale: z
|
|
874
|
+
.number()
|
|
875
|
+
.positive()
|
|
876
|
+
.default(1),
|
|
784
877
|
})
|
|
785
878
|
)
|
|
786
879
|
.optional(),
|
package/core/core.types.ts
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { HydratedDocument } from 'mongoose';
|
|
5
5
|
import * as schema from './core.schema';
|
|
6
|
-
import { Document, Model } from '
|
|
6
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
7
7
|
|
|
8
8
|
// Export types from other modules if necessary
|
|
9
9
|
export type * from './core.router';
|
|
10
|
-
export type
|
|
11
|
-
export type { RouterContext } from '../../types';
|
|
10
|
+
export type { RouterContext } from '../types';
|
|
12
11
|
|
|
13
12
|
export type MerkleTree = z.infer<typeof schema.MerkleTree>;
|
|
14
13
|
export type MerkleTreeDocument = MerkleTree & Document;
|
package/core/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { initTRPC } from '@trpc/server';
|
|
|
3
3
|
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
4
|
import * as Arken from '@arken/node';
|
|
5
5
|
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '@arken/node/schema';
|
|
6
|
-
import { RouterContext } from '
|
|
6
|
+
import { RouterContext, Core } from '../types';
|
|
7
7
|
|
|
8
8
|
export const z = zod;
|
|
9
9
|
export const t = initTRPC.context<RouterContext>().create();
|
|
@@ -41,29 +41,29 @@ export const createRouter = () =>
|
|
|
41
41
|
getParties: procedure
|
|
42
42
|
.use(hasRole('user', t))
|
|
43
43
|
.use(customErrorFormatter(t))
|
|
44
|
-
.input(getQueryInput(
|
|
45
|
-
.output(z.array(
|
|
44
|
+
.input(getQueryInput(Core.Schemas.Party))
|
|
45
|
+
.output(z.array(Core.Schemas.Party))
|
|
46
46
|
.query(({ input, ctx }) => (ctx.app.service.Evolution.getParties as any)(input, ctx)),
|
|
47
47
|
|
|
48
48
|
createParty: procedure
|
|
49
49
|
.use(hasRole('user', t))
|
|
50
50
|
.use(customErrorFormatter(t))
|
|
51
|
-
.input(getQueryInput(
|
|
52
|
-
.output(
|
|
51
|
+
.input(getQueryInput(Core.Schemas.Party))
|
|
52
|
+
.output(Core.Schemas.Party.pick({ id: true }))
|
|
53
53
|
.mutation(({ input, ctx }) => (ctx.app.service.Evolution.createParty as any)(input, ctx)),
|
|
54
54
|
|
|
55
55
|
joinParty: procedure
|
|
56
56
|
.use(hasRole('user', t))
|
|
57
57
|
.use(customErrorFormatter(t))
|
|
58
|
-
.input(getQueryInput(
|
|
59
|
-
.output(
|
|
58
|
+
.input(getQueryInput(Core.Schemas.Party))
|
|
59
|
+
.output(Core.Schemas.Party.pick({ id: true }))
|
|
60
60
|
.mutation(({ input, ctx }) => (ctx.app.service.Evolution.joinParty as any)(input, ctx)),
|
|
61
61
|
|
|
62
62
|
leaveParty: procedure
|
|
63
63
|
.use(hasRole('user', t))
|
|
64
64
|
.use(customErrorFormatter(t))
|
|
65
|
-
.input(getQueryInput(
|
|
66
|
-
.output(
|
|
65
|
+
.input(getQueryInput(Core.Schemas.Party))
|
|
66
|
+
.output(Core.Schemas.Party.pick({ id: true }))
|
|
67
67
|
.mutation(({ input, ctx }) => (ctx.app.service.Evolution.leaveParty as any)(input, ctx)),
|
|
68
68
|
|
|
69
69
|
updateSettings: procedure
|
|
@@ -127,7 +127,7 @@ export const createRouter = () =>
|
|
|
127
127
|
clients: z.any(),
|
|
128
128
|
})
|
|
129
129
|
)
|
|
130
|
-
// .output(
|
|
130
|
+
// .output(Profile.Schemas.Profile)
|
|
131
131
|
.mutation(({ input, ctx }) => (ctx.app.service.Evolution.saveRound as any)(input, ctx)),
|
|
132
132
|
|
|
133
133
|
interact: t.procedure
|
|
@@ -1441,7 +1441,7 @@ export type RouterOutput = inferRouterOutputs<Router>;
|
|
|
1441
1441
|
// }),
|
|
1442
1442
|
|
|
1443
1443
|
// getProfile: t.procedure.input(z.string()).query(({ input, ctx }) => {
|
|
1444
|
-
// return { status: 1, data: {} as
|
|
1444
|
+
// return { status: 1, data: {} as Profile.Types.Profile };
|
|
1445
1445
|
// }),
|
|
1446
1446
|
|
|
1447
1447
|
// unbanClient: t.procedure
|
|
@@ -3,8 +3,7 @@ import { Model, Document } from '@arken/node/mongo';
|
|
|
3
3
|
import * as schema from './evolution.schema';
|
|
4
4
|
|
|
5
5
|
export type * from './evolution.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
// // Define types based on the schema
|
|
10
9
|
// export type Game = z.infer<typeof schema.Game>;
|
package/evolution/index.ts
CHANGED
package/game/game.models.ts
CHANGED
package/game/game.router.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z as zod } from 'zod';
|
|
2
2
|
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '
|
|
4
|
-
import type { RouterContext } from '
|
|
3
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
|
+
import type { RouterContext } from '../types';
|
|
5
5
|
import { Era, Game, GameStat } from './game.schema';
|
|
6
|
-
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '
|
|
6
|
+
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '../schema';
|
|
7
7
|
|
|
8
8
|
export const z = zod;
|
|
9
9
|
export const t = initTRPC.context<RouterContext>().create();
|
package/game/game.schema.ts
CHANGED
package/game/game.types.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { Model, Document } from '
|
|
2
|
+
import { Model, Document } from '@arken/node/mongo';
|
|
3
3
|
import * as schema from './game.schema';
|
|
4
4
|
|
|
5
5
|
export type * from './game.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
// Define types based on the schema
|
|
10
9
|
export type Game = z.infer<typeof schema.Game>;
|
package/game/index.ts
CHANGED
package/index.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import type * as Arken from '
|
|
1
|
+
import type * as Arken from './types';
|
|
2
2
|
import * as dotenv from 'dotenv';
|
|
3
3
|
import * as Schema from '@arken/node/schema';
|
|
4
4
|
import { createRouter as createRouter2 } from './router';
|
|
5
5
|
import type * as Types from './types';
|
|
6
6
|
|
|
7
7
|
// Imports
|
|
8
|
-
import * as Area from './
|
|
9
|
-
import * as Asset from './
|
|
10
|
-
import * as Chain from './
|
|
11
|
-
import * as Character from './
|
|
12
|
-
import * as Chat from './
|
|
13
|
-
import * as Collection from './
|
|
14
|
-
import * as Core from './
|
|
15
|
-
import * as Game from './
|
|
16
|
-
import * as Interface from './
|
|
17
|
-
import * as Item from './
|
|
18
|
-
import * as Job from './
|
|
19
|
-
import * as Market from './
|
|
20
|
-
import * as Product from './
|
|
21
|
-
import * as Profile from './
|
|
22
|
-
import * as Raffle from './
|
|
23
|
-
import * as Skill from './
|
|
24
|
-
import * as Video from './
|
|
8
|
+
import * as Area from './area';
|
|
9
|
+
import * as Asset from './asset';
|
|
10
|
+
import * as Chain from './chain';
|
|
11
|
+
import * as Character from './character';
|
|
12
|
+
import * as Chat from './chat';
|
|
13
|
+
import * as Collection from './collection';
|
|
14
|
+
import * as Core from './core';
|
|
15
|
+
import * as Game from './game';
|
|
16
|
+
import * as Interface from './interface';
|
|
17
|
+
import * as Item from './item';
|
|
18
|
+
import * as Job from './job';
|
|
19
|
+
import * as Market from './market';
|
|
20
|
+
import * as Product from './product';
|
|
21
|
+
import * as Profile from './profile';
|
|
22
|
+
import * as Raffle from './raffle';
|
|
23
|
+
import * as Skill from './skill';
|
|
24
|
+
import * as Video from './video';
|
|
25
25
|
|
|
26
26
|
// Exports
|
|
27
|
-
export * as Area from './
|
|
28
|
-
export * as Asset from './
|
|
29
|
-
export * as Chain from './
|
|
30
|
-
export * as Character from './
|
|
31
|
-
export * as Chat from './
|
|
32
|
-
export * as Collection from './
|
|
33
|
-
export * as Core from './
|
|
34
|
-
export * as Game from './
|
|
35
|
-
export * as Interface from './
|
|
36
|
-
export * as Item from './
|
|
37
|
-
export * as Job from './
|
|
38
|
-
export * as Market from './
|
|
39
|
-
export * as Product from './
|
|
40
|
-
export * as Profile from './
|
|
41
|
-
export * as Raffle from './
|
|
42
|
-
export * as Skill from './
|
|
43
|
-
export * as Video from './
|
|
44
|
-
export * as Trek from './
|
|
45
|
-
export * as Evolution from './
|
|
46
|
-
export * as Infinite from './
|
|
47
|
-
export * as Oasis from './
|
|
27
|
+
export * as Area from './area';
|
|
28
|
+
export * as Asset from './asset';
|
|
29
|
+
export * as Chain from './chain';
|
|
30
|
+
export * as Character from './character';
|
|
31
|
+
export * as Chat from './chat';
|
|
32
|
+
export * as Collection from './collection';
|
|
33
|
+
export * as Core from './core';
|
|
34
|
+
export * as Game from './game';
|
|
35
|
+
export * as Interface from './interface';
|
|
36
|
+
export * as Item from './item';
|
|
37
|
+
export * as Job from './job';
|
|
38
|
+
export * as Market from './market';
|
|
39
|
+
export * as Product from './product';
|
|
40
|
+
export * as Profile from './profile';
|
|
41
|
+
export * as Raffle from './raffle';
|
|
42
|
+
export * as Skill from './skill';
|
|
43
|
+
export * as Video from './video';
|
|
44
|
+
export * as Trek from './trek';
|
|
45
|
+
export * as Evolution from './evolution';
|
|
46
|
+
export * as Infinite from './infinite';
|
|
47
|
+
export * as Oasis from './oasis';
|
|
48
48
|
|
|
49
49
|
export { Application } from './types';
|
|
50
50
|
|
package/infinite/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { initTRPC } from '@trpc/server';
|
|
|
3
3
|
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
4
|
import * as Arken from '@arken/node';
|
|
5
5
|
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '@arken/node/schema';
|
|
6
|
-
import { RouterContext } from '
|
|
6
|
+
import { RouterContext } from '../types';
|
|
7
7
|
|
|
8
8
|
export const z = zod;
|
|
9
9
|
export const t = initTRPC.context<RouterContext>().create();
|
|
@@ -3,8 +3,7 @@ import { Model, Document } from '@arken/node/mongo';
|
|
|
3
3
|
import * as schema from './infinite.schema';
|
|
4
4
|
|
|
5
5
|
export type * from './infinite.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
// // Define types based on the schema
|
|
10
9
|
// export type Game = z.infer<typeof schema.Game>;
|
package/interface/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// arken/packages/node/modules/interface/interface.models.ts
|
|
2
2
|
//
|
|
3
|
-
import * as mongo from '
|
|
3
|
+
import * as mongo from '@arken/node/mongo';
|
|
4
4
|
import type * as Types from './interface.types';
|
|
5
5
|
|
|
6
6
|
export const Interface = mongo.createModel<Types.InterfaceDocument>('Interface', {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z as zod } from 'zod';
|
|
2
2
|
import { initTRPC, inferRouterInputs } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '
|
|
4
|
-
import type { RouterContext } from '
|
|
3
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
|
+
import type { RouterContext } from '../types';
|
|
5
5
|
import { Interface, InterfaceGroup, InterfaceComponent } from './interface.schema';
|
|
6
|
-
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '
|
|
6
|
+
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '../schema';
|
|
7
7
|
|
|
8
8
|
export const z = zod;
|
|
9
9
|
export const t = initTRPC.context<RouterContext>().create();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { z, Model, Document } from '
|
|
1
|
+
import { z, Model, Document } from '@arken/node/mongo';
|
|
2
2
|
import * as schema from './interface.schema';
|
|
3
3
|
|
|
4
4
|
export type * from './interface.router';
|
|
5
|
-
export type
|
|
6
|
-
export type { RouterContext } from '../../types';
|
|
5
|
+
export type { RouterContext } from '../types';
|
|
7
6
|
|
|
8
7
|
export type Interface = z.infer<typeof schema.Interface>;
|
|
9
8
|
export type InterfaceDocument = Interface & Document;
|
package/isles/index.ts
CHANGED
package/isles/isles.router.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { initTRPC } from '@trpc/server';
|
|
|
3
3
|
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
4
|
import * as Arken from '@arken/node';
|
|
5
5
|
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '@arken/node/schema';
|
|
6
|
-
import { RouterContext } from '
|
|
6
|
+
import { RouterContext } from '../types';
|
|
7
7
|
|
|
8
8
|
export const z = zod;
|
|
9
9
|
export const t = initTRPC.context<RouterContext>().create();
|
package/isles/isles.types.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { Model, Document } from '@arken/node/mongo';
|
|
|
3
3
|
import * as schema from './isles.schema';
|
|
4
4
|
|
|
5
5
|
export type * from './isles.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
// // Define types based on the schema
|
|
10
9
|
// export type Game = z.infer<typeof schema.Game>;
|
package/item/index.ts
CHANGED
package/item/item.models.ts
CHANGED
package/item/item.router.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z as zod } from 'zod';
|
|
2
2
|
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import { customErrorFormatter, hasRole } from '
|
|
4
|
-
import type { RouterContext } from '
|
|
5
|
-
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '
|
|
3
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
4
|
+
import type { RouterContext } from '../types';
|
|
5
|
+
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '../schema';
|
|
6
6
|
import {
|
|
7
7
|
Item,
|
|
8
8
|
ItemAttribute,
|