@arken/seer-protocol 0.1.0

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 (41) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintrc +123 -0
  3. package/.prettierrc +12 -0
  4. package/.rush/temp/shrinkwrap-deps.json +420 -0
  5. package/LICENSE +21 -0
  6. package/README.md +3 -0
  7. package/package.json +25 -0
  8. package/src/index.ts +22 -0
  9. package/src/modules/evolution/evolution.models.ts +3 -0
  10. package/src/modules/evolution/evolution.router.ts +3738 -0
  11. package/src/modules/evolution/evolution.schema.ts +1 -0
  12. package/src/modules/evolution/evolution.service.ts +2000 -0
  13. package/src/modules/evolution/evolution.types.ts +20 -0
  14. package/src/modules/evolution/index.ts +5 -0
  15. package/src/modules/infinite/index.ts +5 -0
  16. package/src/modules/infinite/infinite.models.ts +3 -0
  17. package/src/modules/infinite/infinite.router.ts +3648 -0
  18. package/src/modules/infinite/infinite.schema.ts +1 -0
  19. package/src/modules/infinite/infinite.service.ts +40 -0
  20. package/src/modules/infinite/infinite.types.ts +20 -0
  21. package/src/modules/isles/index.ts +5 -0
  22. package/src/modules/isles/isles.models.ts +3 -0
  23. package/src/modules/isles/isles.router.ts +3648 -0
  24. package/src/modules/isles/isles.schema.ts +1 -0
  25. package/src/modules/isles/isles.service.ts +40 -0
  26. package/src/modules/isles/isles.types.ts +20 -0
  27. package/src/modules/oasis/index.ts +5 -0
  28. package/src/modules/oasis/oasis.models.ts +3 -0
  29. package/src/modules/oasis/oasis.router.ts +68 -0
  30. package/src/modules/oasis/oasis.schema.ts +1 -0
  31. package/src/modules/oasis/oasis.service.ts +38 -0
  32. package/src/modules/oasis/oasis.types.ts +20 -0
  33. package/src/modules/trek/index.ts +5 -0
  34. package/src/modules/trek/trek.models.ts +1 -0
  35. package/src/modules/trek/trek.router.ts +78 -0
  36. package/src/modules/trek/trek.schema.ts +1 -0
  37. package/src/modules/trek/trek.service.ts +1031 -0
  38. package/src/modules/trek/trek.types.ts +1 -0
  39. package/src/router.ts +130 -0
  40. package/src/types.ts +106 -0
  41. package/tsconfig.json +25 -0
@@ -0,0 +1 @@
1
+ import { z, ObjectId, Entity } from '@arken/node/schema';
@@ -0,0 +1,40 @@
1
+ import type { RouterContext, RouterInput, RouterOutput } from './infinite.types';
2
+ import { getFilter } from '@arken/node/util/api';
3
+ import { ARXError } from '@arken/node/util/rpc';
4
+ import * as Arken from '@arken/node';
5
+
6
+ export class Service {
7
+ async saveRound(input: RouterInput['saveRound'], ctx: RouterContext): Promise<RouterOutput['saveRound']> {
8
+ console.log('Evolution.Service.saveRound', input);
9
+ }
10
+
11
+ async interact(input: RouterInput['interact'], ctx: RouterContext): Promise<RouterOutput['interact']> {
12
+ console.log('Evolution.Service.interact', input);
13
+ }
14
+
15
+ async getScene(input: RouterInput['getScene'], ctx: RouterContext): Promise<RouterOutput['getScene']> {
16
+ if (!input) throw new Error('Input should not be void');
17
+ console.log('Evolution.Service.getScene', input);
18
+
19
+ let data = {};
20
+
21
+ if (input.data.applicationId === '668e4e805f9a03927caf883b') {
22
+ data = {
23
+ ...data,
24
+ objects: [
25
+ {
26
+ id: 'adsad',
27
+ file: 'asdasdas.fbx',
28
+ position: {
29
+ x: 1000,
30
+ y: 1000,
31
+ z: 1000,
32
+ },
33
+ },
34
+ ] as Arken.Core.Types.Object,
35
+ };
36
+ }
37
+
38
+ return data;
39
+ }
40
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ import { Model, Document } from '@arken/node/util/mongo';
3
+ import * as schema from './infinite.schema';
4
+
5
+ export type * from './infinite.router';
6
+ export type * from './infinite.service';
7
+ export type { RouterContext } from '../../types';
8
+
9
+ // // Define types based on the schema
10
+ // export type Game = z.infer<typeof schema.Game>;
11
+ // export type GameDocument = Game & Document;
12
+
13
+ // export type GameStat = z.infer<typeof schema.GameStat>;
14
+ // export type GameStatDocument = GameStat & Document;
15
+
16
+ // export type Era = z.infer<typeof schema.Era>;
17
+ // export type EraDocument = Era & Document;
18
+
19
+ // Mappings for MongoDB models
20
+ export type Mappings = {};
@@ -0,0 +1,5 @@
1
+ export type * as Types from './isles.types';
2
+ export * as Models from './isles.models';
3
+ export * as Schemas from './isles.schema';
4
+ export * from './isles.router';
5
+ export * from './isles.service';
@@ -0,0 +1,3 @@
1
+ import * as mongo from '@arken/node/util/mongo';
2
+
3
+ const { addTagVirtuals, addApplicationVirtual } = mongo;