@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.
Files changed (104) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +246 -2
  2. package/area/area.models.ts +1 -1
  3. package/area/area.router.ts +3 -3
  4. package/area/area.schema.ts +1 -1
  5. package/area/area.types.ts +2 -3
  6. package/area/index.ts +0 -1
  7. package/asset/asset.models.ts +1 -1
  8. package/asset/asset.router.ts +2 -2
  9. package/asset/asset.schema.ts +5 -2
  10. package/asset/asset.types.ts +2 -3
  11. package/asset/index.ts +0 -1
  12. package/chain/chain.models.ts +1 -1
  13. package/chain/chain.router.ts +3 -3
  14. package/chain/chain.schema.ts +21 -6
  15. package/chain/chain.types.ts +2 -3
  16. package/chain/index.ts +0 -1
  17. package/character/character.models.ts +1 -1
  18. package/character/character.router.ts +3 -3
  19. package/character/character.schema.ts +5 -2
  20. package/character/character.types.ts +2 -3
  21. package/character/index.ts +0 -1
  22. package/chat/chat.models.ts +1 -1
  23. package/chat/chat.router.ts +2 -2
  24. package/chat/chat.schema.ts +5 -2
  25. package/chat/chat.types.ts +2 -3
  26. package/chat/index.ts +0 -1
  27. package/collection/collection.models.ts +1 -1
  28. package/collection/collection.router.ts +2 -2
  29. package/collection/collection.schema.ts +1 -1
  30. package/collection/collection.types.ts +2 -3
  31. package/collection/index.ts +0 -1
  32. package/core/core.models.ts +1 -1
  33. package/core/core.router.ts +4 -4
  34. package/core/core.schema.ts +123 -30
  35. package/core/core.types.ts +2 -3
  36. package/core/index.ts +0 -1
  37. package/evolution/evolution.router.ts +11 -11
  38. package/evolution/evolution.types.ts +1 -2
  39. package/evolution/index.ts +0 -1
  40. package/game/game.models.ts +1 -1
  41. package/game/game.router.ts +3 -3
  42. package/game/game.schema.ts +1 -1
  43. package/game/game.types.ts +2 -3
  44. package/game/index.ts +0 -1
  45. package/index.ts +39 -39
  46. package/infinite/index.ts +0 -1
  47. package/infinite/infinite.router.ts +1 -1
  48. package/infinite/infinite.types.ts +1 -2
  49. package/interface/index.ts +0 -1
  50. package/interface/interface.models.ts +1 -1
  51. package/interface/interface.router.ts +3 -3
  52. package/interface/interface.schema.ts +1 -1
  53. package/interface/interface.types.ts +2 -3
  54. package/isles/index.ts +0 -1
  55. package/isles/isles.router.ts +1 -1
  56. package/isles/isles.types.ts +1 -2
  57. package/item/index.ts +0 -1
  58. package/item/item.models.ts +1 -1
  59. package/item/item.router.ts +3 -3
  60. package/item/item.schema.ts +39 -9
  61. package/item/item.types.ts +2 -3
  62. package/job/index.ts +0 -1
  63. package/job/job.models.ts +1 -1
  64. package/job/job.router.ts +3 -3
  65. package/job/job.schema.ts +1 -1
  66. package/job/job.types.ts +2 -3
  67. package/market/index.ts +0 -1
  68. package/market/market.models.ts +1 -1
  69. package/market/market.router.ts +2 -2
  70. package/market/market.schema.ts +13 -4
  71. package/market/market.types.ts +2 -3
  72. package/oasis/index.ts +0 -1
  73. package/oasis/oasis.router.ts +3 -4
  74. package/oasis/oasis.types.ts +1 -2
  75. package/package.json +10 -4
  76. package/product/index.ts +0 -1
  77. package/product/product.models.ts +1 -1
  78. package/product/product.router.ts +2 -2
  79. package/product/product.schema.ts +50 -13
  80. package/product/product.types.ts +2 -3
  81. package/profile/index.ts +0 -1
  82. package/profile/profile.models.ts +1 -1
  83. package/profile/profile.router.ts +3 -3
  84. package/profile/profile.schema.ts +82 -19
  85. package/profile/profile.types.ts +2 -3
  86. package/raffle/index.ts +0 -1
  87. package/raffle/raffle.models.ts +1 -1
  88. package/raffle/raffle.router.ts +2 -2
  89. package/raffle/raffle.schema.ts +1 -1
  90. package/raffle/raffle.types.ts +2 -3
  91. package/skill/index.ts +0 -1
  92. package/skill/skill.models.ts +1 -1
  93. package/skill/skill.router.ts +3 -3
  94. package/skill/skill.schema.ts +17 -5
  95. package/skill/skill.types.ts +2 -3
  96. package/trek/index.ts +0 -1
  97. package/trek/trek.router.ts +1 -1
  98. package/tsconfig.json +25 -17
  99. package/types.ts +35 -54
  100. package/video/index.ts +0 -1
  101. package/video/video.models.ts +1 -1
  102. package/video/video.router.ts +3 -3
  103. package/video/video.schema.ts +1 -1
  104. package/video/video.types.ts +2 -3
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './area.types';
3
3
 
4
4
  export const Area = mongo.createModel<Types.AreaDocument>('Area', {
@@ -1,9 +1,9 @@
1
1
  import { z as zod } from 'zod';
2
2
  import { initTRPC } from '@trpc/server';
3
- import { customErrorFormatter, hasRole } from '../../util/rpc';
4
- import type { RouterContext } from '../../types';
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 '../../schema';
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();
@@ -1,6 +1,6 @@
1
1
  // arken/packages/node/modules/area/area.schema.ts
2
2
  //
3
- import { z, ObjectId, Entity } from '../../schema';
3
+ import { z, ObjectId, Entity } from '../schema';
4
4
 
5
5
  export const Area = Entity.merge(
6
6
  z.object({
@@ -1,10 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import * as schema from './area.schema';
3
- import { Document, Model } from '../../util/mongo';
3
+ import { Document, Model } from '@arken/node/mongo';
4
4
 
5
5
  export type * from './area.router';
6
- export type * from './area.service';
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
@@ -2,4 +2,3 @@ export * as Types from './area.types';
2
2
  export * as Models from './area.models';
3
3
  export * as Schemas from './area.schema';
4
4
  export * from './area.router';
5
- export * from './area.service';
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './asset.types';
3
3
 
4
4
  export const AssetStandard = mongo.createModel<Types.AssetStandardDocument>(
@@ -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 '../../util/rpc';
6
- import type { RouterContext } from '../../types';
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;
@@ -1,4 +1,4 @@
1
- import { z, ObjectId, Entity } from '../../schema';
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.string().max(100).min(1),
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(),
@@ -1,10 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import * as schema from './asset.schema';
3
- import { Document, Model } from '../../util/mongo';
3
+ import { Document, Model } from '@arken/node/mongo';
4
4
 
5
5
  export type * from './asset.router';
6
- export type * from './asset.service';
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
@@ -2,4 +2,3 @@ export * as Types from './asset.types';
2
2
  export * as Models from './asset.models';
3
3
  export * as Schemas from './asset.schema';
4
4
  export * from './asset.router';
5
- export * from './asset.service';
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './chain.types';
3
3
 
4
4
  export const Chain = mongo.createModel<Types.ChainDocument>('Chain', {
@@ -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 '../../util/rpc';
6
- import type { RouterContext } from '../../types';
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 '../../schema';
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();
@@ -1,19 +1,31 @@
1
- import { z, ObjectId, Entity } from '../../schema';
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.string().max(100).min(1),
7
- standard: z.string().max(100).min(1),
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.string().min(1).optional(),
20
+ content: z
21
+ .string()
22
+ .min(1)
23
+ .optional(),
15
24
  address: z.string().max(100),
16
- type: z.string().max(100).min(1),
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.string().min(1).optional(),
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(),
@@ -1,10 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import * as schema from './chain.schema';
3
- import { Document, Model } from '../../util/mongo';
3
+ import { Document, Model } from '@arken/node/mongo';
4
4
 
5
5
  export type * from './chain.router';
6
- export type * from './chain.service';
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,4 +2,3 @@ export * as Types from './chain.types';
2
2
  export * as Models from './chain.models';
3
3
  export * as Schemas from './chain.schema';
4
4
  export * from './chain.router';
5
- export * from './chain.service';
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './character.types';
3
3
 
4
4
  const { addTagVirtuals, addApplicationVirtual } = mongo;
@@ -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 '../../util/rpc';
6
- import type { RouterContext } from '../../types';
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 '../../schema';
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 '../../schema';
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.string().min(1).optional(),
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 '../../util/mongo';
3
+ import { Document, Model } from '@arken/node/mongo';
4
4
 
5
5
  export type * from './character.router';
6
- export type * from './character.service';
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;
@@ -2,4 +2,3 @@ export * as Types from './character.types';
2
2
  export * as Models from './character.models';
3
3
  export * as Schemas from './character.schema';
4
4
  export * from './character.router';
5
- export * from './character.service';
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './chat.types';
3
3
 
4
4
  // ChatGroup
@@ -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 '../../util/rpc';
6
- import type { RouterContext } from '../../types';
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;
@@ -1,8 +1,11 @@
1
- import { z, ObjectId, Entity } from '../../schema';
1
+ import { z, ObjectId, Entity } from '../schema';
2
2
 
3
3
  export const ChatGroup = Entity.merge(
4
4
  z.object({
5
- name: z.string().max(100).min(1),
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(),
@@ -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 '../../util/mongo';
5
+ import { Document, Model } from '@arken/node/mongo';
6
6
 
7
7
  export type * from './chat.router';
8
- export type * from './chat.service';
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,4 +2,3 @@ export * as Types from './chat.types';
2
2
  export * as Models from './chat.models';
3
3
  export * as Schemas from './chat.schema';
4
4
  export * from './chat.router';
5
- export * from './chat.service';
@@ -1,4 +1,4 @@
1
- import * as mongo from '../../util/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
  import type * as Types from './collection.types';
3
3
 
4
4
  export const CollectibleCollection = mongo.createModel<Types.CollectibleCollectionDocument>('CollectibleCollection', {
@@ -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 '../../util/rpc';
6
- import type { RouterContext } from '../../types';
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;
@@ -1,4 +1,4 @@
1
- import { z, ObjectId, Entity } from '../../schema';
1
+ import { z, ObjectId, Entity } from '../schema';
2
2
 
3
3
  export const CollectibleCollection = Entity.merge(
4
4
  z.object({
@@ -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 '../../util/mongo';
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 * from './collection.service';
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>;
@@ -2,4 +2,3 @@ export * as Types from './collection.types';
2
2
  export * as Models from './collection.models';
3
3
  export * as Schemas from './collection.schema';
4
4
  export * from './collection.router';
5
- export * from './collection.service';
@@ -1,6 +1,6 @@
1
1
  // node/modules/core/core.models.ts
2
2
 
3
- import * as mongo from '../../util/mongo';
3
+ import * as mongo from '@arken/node/mongo';
4
4
  import type * as Types from './core.types';
5
5
 
6
6
  const { createModel, addTagVirtuals, addApplicationVirtual } = mongo;
@@ -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 '../../util/rpc';
6
- import { dateFromString } from '../../util/zod';
7
- import type { RouterContext } from '../../types';
8
- import { Query, getQueryInput, getQueryOutput, inferRouterOutputs } from '../../schema';
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,