@arken/seer-protocol 0.1.2 → 0.1.4
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 -233
- 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/area/area.models.ts
CHANGED
package/area/area.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 { Area, AreaLandmark, AreaType } from './area.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/area/area.schema.ts
CHANGED
package/area/area.types.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as schema from './area.schema';
|
|
3
|
-
import { Document, Model } from '
|
|
3
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
4
4
|
|
|
5
5
|
export type * from './area.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
export type Area = z.infer<typeof schema.Area>;
|
|
10
9
|
export type AreaDocument = Area & Document;
|
package/area/index.ts
CHANGED
package/asset/asset.models.ts
CHANGED
package/asset/asset.router.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC, inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import type { RouterContext } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import type { RouterContext } from '../types';
|
|
7
7
|
import { Asset, AssetLicense } from './asset.schema';
|
|
8
8
|
|
|
9
9
|
export const z = zod;
|
package/asset/asset.schema.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z, ObjectId, Entity } from '
|
|
1
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
2
2
|
|
|
3
3
|
export const AssetStandard = Entity.merge(
|
|
4
4
|
z.object({
|
|
@@ -10,7 +10,10 @@ export const AssetStandard = Entity.merge(
|
|
|
10
10
|
export const Asset = Entity.merge(
|
|
11
11
|
z.object({
|
|
12
12
|
uri: z.string().min(1),
|
|
13
|
-
type: z
|
|
13
|
+
type: z
|
|
14
|
+
.string()
|
|
15
|
+
.max(100)
|
|
16
|
+
.min(1),
|
|
14
17
|
standards: z.array(ObjectId),
|
|
15
18
|
licenseId: ObjectId.optional(),
|
|
16
19
|
license: ObjectId.optional(),
|
package/asset/asset.types.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as schema from './asset.schema';
|
|
3
|
-
import { Document, Model } from '
|
|
3
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
4
4
|
|
|
5
5
|
export type * from './asset.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
export type Asset = z.infer<typeof schema.Asset>;
|
|
10
9
|
export type AssetDocument = Asset & Document;
|
package/asset/index.ts
CHANGED
package/chain/chain.models.ts
CHANGED
package/chain/chain.router.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC, inferRouterInputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import type { RouterContext } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import type { RouterContext } from '../types';
|
|
7
7
|
import { Chain, ChainContract, ChainToken, ChainTransaction } from './chain.schema';
|
|
8
|
-
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '
|
|
8
|
+
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '../schema';
|
|
9
9
|
|
|
10
10
|
export const z = zod;
|
|
11
11
|
export const t = initTRPC.context<RouterContext>().create();
|
package/chain/chain.schema.ts
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import { z, ObjectId, Entity } from '
|
|
1
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
2
2
|
|
|
3
3
|
export const Chain = Entity.merge(
|
|
4
4
|
z.object({
|
|
5
5
|
content: z.string().min(1),
|
|
6
|
-
type: z
|
|
7
|
-
|
|
6
|
+
type: z
|
|
7
|
+
.string()
|
|
8
|
+
.max(100)
|
|
9
|
+
.min(1),
|
|
10
|
+
standard: z
|
|
11
|
+
.string()
|
|
12
|
+
.max(100)
|
|
13
|
+
.min(1),
|
|
8
14
|
})
|
|
9
15
|
);
|
|
10
16
|
|
|
11
17
|
export const ChainContract = Entity.merge(
|
|
12
18
|
z.object({
|
|
13
19
|
chainId: ObjectId,
|
|
14
|
-
content: z
|
|
20
|
+
content: z
|
|
21
|
+
.string()
|
|
22
|
+
.min(1)
|
|
23
|
+
.optional(),
|
|
15
24
|
address: z.string().max(100),
|
|
16
|
-
type: z
|
|
25
|
+
type: z
|
|
26
|
+
.string()
|
|
27
|
+
.max(100)
|
|
28
|
+
.min(1),
|
|
17
29
|
standards: z.array(ObjectId),
|
|
18
30
|
})
|
|
19
31
|
);
|
|
@@ -26,7 +38,10 @@ export const ChainToken = Entity.merge(
|
|
|
26
38
|
decimals: z.number().optional(),
|
|
27
39
|
rank: z.number().optional(),
|
|
28
40
|
description: z.string().optional(),
|
|
29
|
-
content: z
|
|
41
|
+
content: z
|
|
42
|
+
.string()
|
|
43
|
+
.min(1)
|
|
44
|
+
.optional(),
|
|
30
45
|
price: z.number().optional(),
|
|
31
46
|
hourChange: z.number().optional(),
|
|
32
47
|
dayChange: z.number().optional(),
|
package/chain/chain.types.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as schema from './chain.schema';
|
|
3
|
-
import { Document, Model } from '
|
|
3
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
4
4
|
|
|
5
5
|
export type * from './chain.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
export type Chain = z.infer<typeof schema.Chain>;
|
|
10
9
|
export type ChainContract = z.infer<typeof schema.ChainContract>;
|
package/chain/index.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import type { RouterContext } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import type { RouterContext } from '../types';
|
|
7
7
|
import {
|
|
8
8
|
Character,
|
|
9
9
|
CharacterAbility,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CharacterFaction,
|
|
18
18
|
CharacterNameChoice,
|
|
19
19
|
} from './character.schema';
|
|
20
|
-
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '
|
|
20
|
+
import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '../schema';
|
|
21
21
|
|
|
22
22
|
export const z = zod;
|
|
23
23
|
export const t = initTRPC.context<RouterContext>().create();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// module/character.schema.ts
|
|
2
2
|
|
|
3
|
-
import { z, ObjectId, Entity } from '
|
|
3
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
4
4
|
import { Item } from '../item/item.schema';
|
|
5
5
|
|
|
6
6
|
export const CharacterEquipment = Entity.merge(
|
|
@@ -46,7 +46,10 @@ export const Character = Entity.merge(
|
|
|
46
46
|
factionId: ObjectId.optional(),
|
|
47
47
|
genderId: ObjectId.optional(),
|
|
48
48
|
guildId: ObjectId.optional(),
|
|
49
|
-
token: z
|
|
49
|
+
token: z
|
|
50
|
+
.string()
|
|
51
|
+
.min(1)
|
|
52
|
+
.optional(),
|
|
50
53
|
points: z.number().default(0),
|
|
51
54
|
isPrimary: z.boolean().default(false),
|
|
52
55
|
isBoss: z.boolean().default(false),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as schema from './character.schema';
|
|
3
|
-
import { Document, Model } from '
|
|
3
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
4
4
|
|
|
5
5
|
export type * from './character.router';
|
|
6
|
-
export type
|
|
7
|
-
export type { RouterContext } from '../../types';
|
|
6
|
+
export type { RouterContext } from '../types';
|
|
8
7
|
|
|
9
8
|
export type Character = z.infer<typeof schema.Character>;
|
|
10
9
|
export type CharacterDocument = Character & Document;
|
package/character/index.ts
CHANGED
package/chat/chat.models.ts
CHANGED
package/chat/chat.router.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC, inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import type { RouterContext } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import type { RouterContext } from '../types';
|
|
7
7
|
import { ChatGroup, ChatMessage } from './chat.schema';
|
|
8
8
|
|
|
9
9
|
export const z = zod;
|
package/chat/chat.schema.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { z, ObjectId, Entity } from '
|
|
1
|
+
import { z, ObjectId, Entity } from '../schema';
|
|
2
2
|
|
|
3
3
|
export const ChatGroup = Entity.merge(
|
|
4
4
|
z.object({
|
|
5
|
-
name: z
|
|
5
|
+
name: z
|
|
6
|
+
.string()
|
|
7
|
+
.max(100)
|
|
8
|
+
.min(1),
|
|
6
9
|
type: z.enum(['group', 'private']),
|
|
7
10
|
members: z.array(ObjectId),
|
|
8
11
|
externalId: z.string().optional(),
|
package/chat/chat.types.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as schema from './chat.schema';
|
|
5
|
-
import { Document, Model } from '
|
|
5
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
6
6
|
|
|
7
7
|
export type * from './chat.router';
|
|
8
|
-
export type
|
|
9
|
-
export type { RouterContext } from '../../types';
|
|
8
|
+
export type { RouterContext } from '../types';
|
|
10
9
|
|
|
11
10
|
export type ChatGroup = z.infer<typeof schema.ChatGroup>;
|
|
12
11
|
export type ChatGroupDocument = ChatGroup & Document;
|
package/chat/index.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC, inferRouterInputs, inferRouterOutputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import type { RouterContext } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import type { RouterContext } from '../types';
|
|
7
7
|
import { CollectibleCollection, CollectibleCardBox, CollectibleCardPack, CollectibleCard } from './collection.schema';
|
|
8
8
|
|
|
9
9
|
export const z = zod;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as schema from './collection.schema';
|
|
5
|
-
import { Document, Model } from '
|
|
5
|
+
import { Document, Model } from '@arken/node/mongo';
|
|
6
6
|
import exp from 'constants';
|
|
7
7
|
|
|
8
8
|
export type * from './collection.router';
|
|
9
|
-
export type
|
|
10
|
-
export type { RouterContext } from '../../types';
|
|
9
|
+
export type { RouterContext } from '../types';
|
|
11
10
|
|
|
12
11
|
export type CollectibleCollection = z.infer<typeof schema.CollectibleCollection>;
|
|
13
12
|
export type CollectibleCardBox = z.infer<typeof schema.CollectibleCardBox>;
|
package/collection/index.ts
CHANGED
package/core/core.models.ts
CHANGED
package/core/core.router.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { z as zod } from 'zod';
|
|
4
4
|
import { initTRPC, inferRouterInputs } from '@trpc/server';
|
|
5
|
-
import { customErrorFormatter, hasRole } from '
|
|
6
|
-
import { dateFromString } from '
|
|
7
|
-
import type { RouterContext } from '
|
|
8
|
-
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '
|
|
5
|
+
import { customErrorFormatter, hasRole } from '@arken/node/rpc';
|
|
6
|
+
import { dateFromString } from '@arken/node/zod';
|
|
7
|
+
import type { RouterContext } from '../types';
|
|
8
|
+
import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '../schema';
|
|
9
9
|
import {
|
|
10
10
|
Account,
|
|
11
11
|
Achievement,
|