@arken/seer-protocol 0.1.1 → 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 (118) hide show
  1. package/.rush/temp/shrinkwrap-deps.json +778 -53
  2. package/area/area.models.ts +15 -0
  3. package/area/area.router.ts +74 -0
  4. package/area/area.schema.ts +22 -0
  5. package/area/area.types.ts +25 -0
  6. package/area/index.ts +4 -0
  7. package/asset/asset.models.ts +59 -0
  8. package/asset/asset.router.ts +55 -0
  9. package/asset/asset.schema.ts +30 -0
  10. package/asset/asset.types.ts +21 -0
  11. package/asset/index.ts +4 -0
  12. package/chain/chain.models.ts +50 -0
  13. package/chain/chain.router.ts +104 -0
  14. package/chain/chain.schema.ts +67 -0
  15. package/chain/chain.types.ts +23 -0
  16. package/chain/index.ts +4 -0
  17. package/character/character.models.ts +174 -0
  18. package/character/character.router.ts +314 -0
  19. package/character/character.schema.ts +150 -0
  20. package/character/character.types.ts +63 -0
  21. package/character/index.ts +4 -0
  22. package/chat/chat.models.ts +43 -0
  23. package/chat/chat.router.ts +67 -0
  24. package/chat/chat.schema.ts +39 -0
  25. package/chat/chat.types.ts +19 -0
  26. package/chat/index.ts +4 -0
  27. package/collection/collection.models.ts +76 -0
  28. package/collection/collection.router.ts +91 -0
  29. package/collection/collection.schema.ts +90 -0
  30. package/collection/collection.types.ts +35 -0
  31. package/collection/index.ts +4 -0
  32. package/core/core.models.ts +1380 -0
  33. package/core/core.router.ts +1781 -0
  34. package/core/core.schema.ts +940 -0
  35. package/core/core.types.ts +339 -0
  36. package/core/index.ts +4 -0
  37. package/evolution/evolution.models.ts +1 -1
  38. package/evolution/evolution.router.ts +19 -19
  39. package/evolution/evolution.schema.ts +1 -1
  40. package/evolution/evolution.types.ts +2 -3
  41. package/evolution/index.ts +0 -1
  42. package/game/game.models.ts +53 -0
  43. package/game/game.router.ts +110 -0
  44. package/game/game.schema.ts +23 -0
  45. package/game/game.types.ts +27 -0
  46. package/game/index.ts +4 -0
  47. package/index.ts +43 -6
  48. package/infinite/index.ts +0 -1
  49. package/infinite/infinite.models.ts +1 -1
  50. package/infinite/infinite.router.ts +9 -9
  51. package/infinite/infinite.schema.ts +1 -1
  52. package/infinite/infinite.types.ts +2 -3
  53. package/interface/index.ts +4 -0
  54. package/interface/interface.canonicalize.ts +279 -0
  55. package/interface/interface.models.ts +40 -0
  56. package/interface/interface.router.ts +175 -0
  57. package/interface/interface.schema.ts +59 -0
  58. package/interface/interface.types.ts +24 -0
  59. package/isles/index.ts +0 -1
  60. package/isles/isles.models.ts +1 -1
  61. package/isles/isles.router.ts +9 -9
  62. package/isles/isles.schema.ts +1 -1
  63. package/isles/isles.types.ts +2 -3
  64. package/item/index.ts +4 -0
  65. package/item/item.models.ts +124 -0
  66. package/item/item.router.ts +103 -0
  67. package/item/item.schema.ts +150 -0
  68. package/item/item.types.ts +73 -0
  69. package/job/index.ts +4 -0
  70. package/job/job.models.ts +14 -0
  71. package/job/job.router.ts +44 -0
  72. package/job/job.schema.ts +9 -0
  73. package/job/job.types.ts +22 -0
  74. package/market/index.ts +4 -0
  75. package/market/market.models.ts +113 -0
  76. package/market/market.router.ts +73 -0
  77. package/market/market.schema.ts +149 -0
  78. package/market/market.types.ts +55 -0
  79. package/oasis/index.ts +0 -1
  80. package/oasis/oasis.models.ts +1 -1
  81. package/oasis/oasis.router.ts +5 -6
  82. package/oasis/oasis.schema.ts +1 -1
  83. package/oasis/oasis.types.ts +2 -3
  84. package/package.json +17 -4
  85. package/product/index.ts +4 -0
  86. package/product/product.models.ts +166 -0
  87. package/product/product.router.ts +93 -0
  88. package/product/product.schema.ts +186 -0
  89. package/product/product.types.ts +32 -0
  90. package/profile/index.ts +4 -0
  91. package/profile/profile.models.ts +214 -0
  92. package/profile/profile.router.ts +72 -0
  93. package/profile/profile.schema.ts +219 -0
  94. package/profile/profile.types.ts +21 -0
  95. package/raffle/index.ts +4 -0
  96. package/raffle/raffle.models.ts +44 -0
  97. package/raffle/raffle.router.ts +90 -0
  98. package/raffle/raffle.schema.ts +32 -0
  99. package/raffle/raffle.types.ts +29 -0
  100. package/router.ts +23 -29
  101. package/schema.ts +321 -0
  102. package/skill/index.ts +4 -0
  103. package/skill/skill.models.ts +16 -0
  104. package/skill/skill.router.ts +201 -0
  105. package/skill/skill.schema.ts +52 -0
  106. package/skill/skill.types.ts +32 -0
  107. package/trek/index.ts +0 -1
  108. package/trek/trek.models.ts +1 -1
  109. package/trek/trek.router.ts +2 -2
  110. package/trek/trek.schema.ts +1 -1
  111. package/trek/trek.types.ts +1 -1
  112. package/tsconfig.json +25 -17
  113. package/types.ts +174 -26
  114. package/video/index.ts +4 -0
  115. package/video/video.models.ts +25 -0
  116. package/video/video.router.ts +143 -0
  117. package/video/video.schema.ts +46 -0
  118. package/video/video.types.ts +32 -0
@@ -0,0 +1,9 @@
1
+ import { z, ObjectId, Entity } from '../schema';
2
+
3
+ export const Job = Entity.merge(
4
+ z.object({
5
+ mod: z.string(),
6
+ startDate: z.date().optional(),
7
+ expireDate: z.date().optional(),
8
+ })
9
+ );
@@ -0,0 +1,22 @@
1
+ // module/job.types.ts
2
+
3
+ import { z } from 'zod';
4
+ import * as schema from './job.schema';
5
+ import { Document, Model } from '@arken/node/mongo';
6
+ import type { RouterContext } from '../types';
7
+ import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
8
+ import type { Router } from './job.router';
9
+
10
+ export type * from './job.router';
11
+ export type { RouterContext };
12
+
13
+ export type Job = z.infer<typeof schema.Job>;
14
+
15
+ export type JobDocument = Job & Document;
16
+
17
+ export type Mappings = {
18
+ Job: Model<JobDocument>;
19
+ };
20
+
21
+ export type RouterInput = inferRouterInputs<Router>;
22
+ export type RouterOutput = inferRouterOutputs<Router>;
@@ -0,0 +1,4 @@
1
+ export * as Types from './market.types';
2
+ export * as Models from './market.models';
3
+ export * as Schemas from './market.schema';
4
+ export * from './market.router';
@@ -0,0 +1,113 @@
1
+ import * as mongo from '@arken/node/mongo';
2
+ import type * as Types from './market.types';
3
+
4
+ export const Market = mongo.createModel<Types.MarketDocument>('Market', {
5
+ value: { type: String, required: true },
6
+ });
7
+
8
+ export const MarketPair = mongo.createModel<Types.MarketPairDocument>('MarketPair', {
9
+ value: { type: String, required: true },
10
+ });
11
+
12
+ export const MarketExchange = mongo.createModel<Types.MarketExchangeDocument>('MarketExchange', {
13
+ value: { type: String },
14
+ });
15
+
16
+ export const MarketAnalysis = mongo.createModel<Types.MarketAnalysisDocument>('MarketAnalysis', {
17
+ action: { type: String, required: true },
18
+ asset: { type: String, required: true },
19
+ signalType: { type: String, required: true },
20
+ confidence: { type: Number, required: true },
21
+ riskLevel: { type: String, required: true },
22
+ timeFrame: { type: String, required: true },
23
+ source: { type: String, required: true },
24
+ summary: { type: String, required: true },
25
+ labels: {
26
+ sector: { type: String },
27
+ topic: { type: String },
28
+ sentiment: { type: String },
29
+ },
30
+ });
31
+
32
+ export const MarketInvestor = mongo.createModel<Types.MarketInvestorDocument>('MarketInvestor', {
33
+ portfolioIds: [{ type: mongo.Schema.Types.ObjectId, required: true }],
34
+ totalPnl: { type: Number },
35
+ });
36
+
37
+ export const MarketInvestmentPortfolio = mongo.createModel<Types.MarketInvestmentPortfolioDocument>(
38
+ 'MarketInvestmentPortfolio',
39
+ {
40
+ categoryGoals: [
41
+ {
42
+ category: { type: String, required: true },
43
+ goalPercentage: { type: Number, required: true },
44
+ currentPnL: { type: Number },
45
+ historicalPnL: { type: Number },
46
+ },
47
+ ],
48
+ investmentIds: [{ type: mongo.Schema.Types.ObjectId, required: true }],
49
+ totalPnl: { type: Number },
50
+ }
51
+ );
52
+
53
+ export const MarketInvestment = mongo.createModel<Types.MarketInvestmentDocument>('MarketInvestment', {
54
+ type: { type: String, required: true },
55
+ amount: { type: Number, required: true },
56
+ category: { type: String, required: true },
57
+ purchasePrice: { type: Number, required: true },
58
+ currentValue: { type: Number, required: true },
59
+ pnl: { type: Number, required: true },
60
+ transactions: [
61
+ {
62
+ date: { type: Date, required: true },
63
+ type: { type: String, required: true },
64
+ price: { type: Number, required: true },
65
+ quantity: { type: Number, required: true },
66
+ },
67
+ ],
68
+ stockId: { type: mongo.Schema.Types.ObjectId },
69
+ chainTokenId: { type: mongo.Schema.Types.ObjectId },
70
+ });
71
+
72
+ export const MarketStock = mongo.createModel<Types.MarketStockDocument>('MarketStock', {
73
+ ticker: { type: String, required: true },
74
+ companyId: { type: mongo.Schema.Types.ObjectId, required: true, ref: 'StockCompany' },
75
+ currentPrice: { type: Number, required: true },
76
+ marketCap: { type: Number },
77
+ volume: { type: Number },
78
+ currency: { type: String, required: true },
79
+ aum: { type: Number },
80
+ quoteType: { type: String },
81
+ dailyChange: { type: Number },
82
+ dailyChangePercent: { type: Number },
83
+ });
84
+
85
+ export const MarketToken = mongo.createModel<Types.MarketTokenDocument>('MarketToken', {
86
+ symbol: { type: String, required: true },
87
+ currentPrice: { type: Number, required: true },
88
+ });
89
+
90
+ export const MarketCompany = mongo.createModel<Types.MarketCompanyDocument>('MarketCompany', {
91
+ ticker: { type: String, required: true },
92
+ country: { type: String, required: true },
93
+ industry: { type: String, required: true },
94
+ sector: { type: String, required: true },
95
+ type: { type: String, required: true },
96
+ issuedETFs: [{ type: mongo.Schema.Types.ObjectId, ref: 'MarketETF' }],
97
+ });
98
+
99
+ export const MarketETF = mongo.createModel<Types.MarketETFDocument>('ETF', {
100
+ ticker: { type: String, required: true },
101
+ issuerId: { type: mongo.Schema.Types.ObjectId, required: true },
102
+ leverage: { type: Number, required: false },
103
+ });
104
+
105
+ export const MarketStockSentiment = mongo.createModel<Types.MarketStockSentimentDocument>('MarketStockSentiment', {
106
+ ticker: { type: String, required: true },
107
+ companyId: { type: mongo.Schema.Types.ObjectId, required: true, ref: 'StockCompany' },
108
+ sentiment: {
109
+ label: { type: String, required: true },
110
+ score: { type: Number, required: true },
111
+ },
112
+ confidence: { type: Number, required: true },
113
+ });
@@ -0,0 +1,73 @@
1
+ // module/market.router.ts
2
+
3
+ import { z as zod } from 'zod';
4
+ import { initTRPC, inferRouterInputs, inferRouterOutputs } from '@trpc/server';
5
+ import { customErrorFormatter, hasRole } from '@arken/node/rpc';
6
+ import type { RouterContext } from '../types';
7
+ import { Market, MarketPair, MarketExchange } from './market.schema';
8
+
9
+ export const z = zod;
10
+ export const t = initTRPC.context<RouterContext>().create();
11
+ export const router = t.router;
12
+ export const procedure = t.procedure;
13
+
14
+ export const createRouter = () =>
15
+ router({
16
+ getMarket: procedure
17
+ .use(hasRole('guest', t))
18
+ .use(customErrorFormatter(t))
19
+ .input(z.object({ marketId: z.string() }))
20
+ .query(({ input, ctx }) => (ctx.app.service.Market.getMarket as any)(input, ctx)),
21
+
22
+ createMarket: procedure
23
+ .use(hasRole('admin', t))
24
+ .use(customErrorFormatter(t))
25
+ .input(Market)
26
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.createMarket as any)(input, ctx)),
27
+
28
+ updateMarket: procedure
29
+ .use(hasRole('admin', t))
30
+ .use(customErrorFormatter(t))
31
+ .input(z.object({ marketId: z.string(), data: Market.partial() }))
32
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.updateMarket as any)(input, ctx)),
33
+
34
+ getMarketPair: procedure
35
+ .use(hasRole('guest', t))
36
+ .use(customErrorFormatter(t))
37
+ .input(z.object({ marketPairId: z.string() }))
38
+ .query(({ input, ctx }) => (ctx.app.service.Market.getMarketPair as any)(input, ctx)),
39
+
40
+ createMarketPair: procedure
41
+ .use(hasRole('admin', t))
42
+ .use(customErrorFormatter(t))
43
+ .input(MarketPair)
44
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.createMarketPair as any)(input, ctx)),
45
+
46
+ updateMarketPair: procedure
47
+ .use(hasRole('admin', t))
48
+ .use(customErrorFormatter(t))
49
+ .input(z.object({ marketPairId: z.string(), data: MarketPair.partial() }))
50
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.updateMarketPair as any)(input, ctx)),
51
+
52
+ getMarketExchange: procedure
53
+ .use(hasRole('guest', t))
54
+ .use(customErrorFormatter(t))
55
+ .input(z.object({ exchangeId: z.string() }))
56
+ .query(({ input, ctx }) => (ctx.app.service.Market.getMarketExchange as any)(input, ctx)),
57
+
58
+ createMarketExchange: procedure
59
+ .use(hasRole('admin', t))
60
+ .use(customErrorFormatter(t))
61
+ .input(MarketExchange)
62
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.createMarketExchange as any)(input, ctx)),
63
+
64
+ updateMarketExchange: procedure
65
+ .use(hasRole('admin', t))
66
+ .use(customErrorFormatter(t))
67
+ .input(z.object({ exchangeId: z.string(), data: MarketExchange.partial() }))
68
+ .mutation(({ input, ctx }) => (ctx.app.service.Market.updateMarketExchange as any)(input, ctx)),
69
+ });
70
+
71
+ export type Router = ReturnType<typeof createRouter>;
72
+ export type RouterInput = inferRouterInputs<Router>;
73
+ export type RouterOutput = inferRouterOutputs<Router>;
@@ -0,0 +1,149 @@
1
+ import { z, Entity, ObjectId } from '../schema';
2
+
3
+ export const Market = Entity.merge(
4
+ z.object({
5
+ value: z.string(),
6
+ })
7
+ );
8
+
9
+ export const MarketPair = Entity.merge(
10
+ z.object({
11
+ value: z.string(),
12
+ })
13
+ );
14
+
15
+ export const MarketExchange = Entity.merge(
16
+ z.object({
17
+ value: z.string(),
18
+ })
19
+ );
20
+
21
+ export const MarketAnalysis = Entity.merge(
22
+ z.object({
23
+ action: z.enum(['Buy', 'Sell']), // buy or sell action
24
+ asset: z.string().min(1), // the asset being traded (e.g., oil, Bitcoin)
25
+ signalType: z.string().min(1), // type of signal (e.g., news)
26
+ confidence: z
27
+ .number()
28
+ .min(0)
29
+ .max(100), // confidence level from 0 to 100
30
+ riskLevel: z.enum(['Low', 'Medium', 'High']), // risk level
31
+ timeFrame: z.enum(['Short-Term', 'Long-Term']), // investment time frame
32
+ source: z.string().min(1), // source of information (e.g., FinancialJuice, Ground News)
33
+ summary: z.string().min(1), // summary of the analysis
34
+ labels: z.object({
35
+ sector: z.string().optional(), // sector related to the asset (e.g., energy, aviation)
36
+ topic: z.string().optional(), // topic of the news (e.g., oil demand, job cuts)
37
+ sentiment: z.enum(['Positive', 'Neutral', 'Negative']).optional(), // sentiment of the news
38
+ }),
39
+ })
40
+ );
41
+
42
+ export const MarketInvestor = Entity.merge(
43
+ z.object({
44
+ portfolioIds: z.array(ObjectId), // Array of ObjectId references to InvestmentPortfolio
45
+ totalPnl: z.number().optional(), // Total profit and loss
46
+ })
47
+ );
48
+
49
+ export const MarketInvestmentPortfolio = Entity.merge(
50
+ z.object({
51
+ categoryGoals: z.array(
52
+ z.object({
53
+ category: z.string(), // Category name
54
+ goalPercentage: z.number(), // Goal percentage for this category
55
+ currentPnl: z.number().optional(), // Current P&L for this category
56
+ historicalPnL: z.number().optional(), // Historical P&L for this category
57
+ })
58
+ ), // Array of categories with goal percentages and P&L tracking
59
+ investmentIds: z.array(ObjectId), // Array of ObjectId references to Investment
60
+ totalPnl: z.number().optional(), // Total P&L for this portfolio
61
+ })
62
+ );
63
+
64
+ export const MarketInvestment = Entity.merge(
65
+ z.object({
66
+ type: z.enum(['Stock', 'ChainToken']),
67
+ category: z.enum(['Historically Safe', 'Economy Bull', 'Economy Bear', 'Custom']),
68
+ amount: z.number(), // Initial amount invested
69
+ purchasePrice: z.number(), // Price at which the investment was purchased
70
+ currentValue: z.number().optional(), // Current value of the investment
71
+ pnl: z.number().optional(), // Current P&L of the investment
72
+ transactions: z
73
+ .array(
74
+ z.object({
75
+ date: z.string(), // Date of transaction
76
+ type: z.enum(['Buy', 'Sell']),
77
+ price: z.number(), // Price at transaction
78
+ quantity: z.number(), // Quantity bought or sold
79
+ })
80
+ )
81
+ .optional(), // Optional array for detailed transaction history
82
+ stockId: ObjectId.optional(), // Reference to Stock if type is 'Stock'
83
+ chainTokenId: ObjectId.optional(), // Reference to ChainToken if type is 'ChainToken'
84
+ })
85
+ );
86
+
87
+ export const MarketStock = Entity.merge(
88
+ z.object({
89
+ ticker: z.string(),
90
+ companyId: ObjectId,
91
+ marketCap: z.number().optional(),
92
+ aum: z.number().optional(),
93
+ quoteType: z.string(),
94
+ currentPrice: z.number(),
95
+ dailyChange: z.number().optional(),
96
+ dailyChangePercent: z.number().optional(),
97
+ volume: z.number(),
98
+ currency: z.string(),
99
+ })
100
+ );
101
+
102
+ export const MarketToken = Entity.merge(
103
+ z.object({
104
+ symbol: z.string(),
105
+ currentPrice: z.number(),
106
+ })
107
+ );
108
+
109
+ export const MarketCompany = Entity.merge(
110
+ z.object({
111
+ ticker: z.string(), // Primary ticker, if applicable
112
+ type: z.enum(['Public Company', 'ETF Issuer', 'Both', 'Other']), // Categorize the company type
113
+ country: z.string().optional(), // Country where the company is based
114
+ industry: z.string().optional(), // Industry the company operates in
115
+ sector: z.string().optional(), // Sector the company belongs to
116
+ issuedETFs: z.array(ObjectId).optional(), // References to ETFs issued by this company
117
+ })
118
+ );
119
+
120
+ export const MarketETF = Entity.merge(
121
+ z.object({
122
+ ticker: z.string(),
123
+ issuerId: ObjectId, // Reference to the Company issuing the ETF
124
+ leverage: z.number().optional(), // Leverage factor if applicable (e.g., 3x)
125
+ country: z.string().optional(), // Country where the ETF is based
126
+ currency: z.string().optional(), // Currency the ETF is traded in
127
+ AUM: z.number().optional(), // Assets under management
128
+ industry: z.string().optional(), // Industry the ETF is focused on
129
+ sector: z.string().optional(), // Sector the ETF is focused on
130
+ })
131
+ );
132
+
133
+ export const MarketStockSentiment = Entity.merge(
134
+ z.object({
135
+ ticker: z.string(),
136
+ companyId: ObjectId,
137
+ sentiment: z.object({
138
+ label: z.enum(['Positive', 'Neutral', 'Negative']), // predefined sentiment labels
139
+ score: z
140
+ .number()
141
+ .min(0)
142
+ .max(1), // sentiment score as a confidence percentage
143
+ }),
144
+ confidence: z
145
+ .number()
146
+ .min(0)
147
+ .max(1), // overall confidence level for the analysis
148
+ })
149
+ );
@@ -0,0 +1,55 @@
1
+ // module/market.types.ts
2
+
3
+ import { z } from 'zod';
4
+ import * as schema from './market.schema';
5
+ import { Document, Model } from '@arken/node/mongo';
6
+ import type { RouterContext } from '../types';
7
+ import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
8
+ import type { Router } from './market.router';
9
+
10
+ export type * from './market.router';
11
+ export type { RouterContext };
12
+
13
+ export type Market = z.infer<typeof schema.Market>;
14
+ export type MarketPair = z.infer<typeof schema.MarketPair>;
15
+ export type MarketExchange = z.infer<typeof schema.MarketExchange>;
16
+ export type MarketAnalysis = z.infer<typeof schema.MarketAnalysis>;
17
+ export type MarketInvestor = z.infer<typeof schema.MarketInvestor>;
18
+ export type MarketInvestmentPortfolio = z.infer<typeof schema.MarketInvestmentPortfolio>;
19
+ export type MarketInvestment = z.infer<typeof schema.MarketInvestment>;
20
+ export type MarketStock = z.infer<typeof schema.MarketStock>;
21
+ export type MarketToken = z.infer<typeof schema.MarketToken>;
22
+ export type MarketCompany = z.infer<typeof schema.MarketCompany>;
23
+ export type MarketETF = z.infer<typeof schema.MarketETF>;
24
+ export type MarketStockSentiment = z.infer<typeof schema.MarketStockSentiment>;
25
+
26
+ export type MarketDocument = Market & Document;
27
+ export type MarketPairDocument = MarketPair & Document;
28
+ export type MarketExchangeDocument = MarketExchange & Document;
29
+ export type MarketAnalysisDocument = MarketAnalysis & Document;
30
+ export type MarketInvestorDocument = MarketInvestor & Document;
31
+ export type MarketInvestmentPortfolioDocument = MarketInvestmentPortfolio & Document;
32
+ export type MarketInvestmentDocument = MarketInvestment & Document;
33
+ export type MarketStockDocument = MarketStock & Document;
34
+ export type MarketTokenDocument = MarketToken & Document;
35
+ export type MarketCompanyDocument = MarketCompany & Document;
36
+ export type MarketETFDocument = MarketETF & Document;
37
+ export type MarketStockSentimentDocument = MarketStockSentiment & Document;
38
+
39
+ export type Mappings = {
40
+ Market: Model<MarketDocument>;
41
+ MarketPair: Model<MarketPairDocument>;
42
+ MarketExchange: Model<MarketExchangeDocument>;
43
+ MarketAnalysis: Model<MarketAnalysisDocument>;
44
+ MarketInvestor: Model<MarketInvestorDocument>;
45
+ MarketInvestmentPortfolio: Model<MarketInvestmentPortfolioDocument>;
46
+ MarketInvestment: Model<MarketInvestmentDocument>;
47
+ MarketStock: Model<MarketStockDocument>;
48
+ MarketToken: Model<MarketTokenDocument>;
49
+ MarketCompany: Model<MarketCompanyDocument>;
50
+ MarketETF: Model<MarketETFDocument>;
51
+ MarketStockSentiment: Model<MarketStockSentimentDocument>;
52
+ };
53
+
54
+ export type RouterInput = inferRouterInputs<Router>;
55
+ export type RouterOutput = inferRouterOutputs<Router>;
package/oasis/index.ts CHANGED
@@ -2,4 +2,3 @@ export type * as Types from './oasis.types';
2
2
  export * as Models from './oasis.models';
3
3
  export * as Schemas from './oasis.schema';
4
4
  export * from './oasis.router';
5
- export * from './oasis.service';
@@ -1,3 +1,3 @@
1
- import * as mongo from '@arken/mongo';
1
+ import * as mongo from '@arken/node/mongo';
2
2
 
3
3
  const { addTagVirtuals, addApplicationVirtual } = mongo;
@@ -1,9 +1,8 @@
1
1
  import { z as zod } from 'zod';
2
2
  import { initTRPC } from '@trpc/server';
3
- import { customErrorFormatter, hasRole } from '@arken/rpc';
4
- import * as Arken from '@arken/node';
5
- import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '@arken/schema';
6
- import { RouterContext } from '../../types';
3
+ import { customErrorFormatter, hasRole } from '@arken/node/rpc';
4
+ import { Query, getQueryInput, inferRouterOutputs, inferRouterInputs } from '@arken/node/schema';
5
+ import { RouterContext, Core, Profile } from '../types';
7
6
 
8
7
  export const z = zod;
9
8
  export const t = initTRPC.context<RouterContext>().create();
@@ -15,7 +14,7 @@ export const createRouter = () =>
15
14
  getPatrons: procedure
16
15
  .use(hasRole('guest', t))
17
16
  .use(customErrorFormatter(t))
18
- .output(z.array(Arken.Profile.Schemas.Profile))
17
+ .output(z.array(Profile.Schemas.Profile))
19
18
  .query(({ input, ctx }) => (ctx.app.service.Oasis.getPatrons as any)(input, ctx)),
20
19
 
21
20
  interact: t.procedure
@@ -55,7 +54,7 @@ export const createRouter = () =>
55
54
  z: 1000,
56
55
  },
57
56
  },
58
- ] as Arken.Core.Types.Object,
57
+ ] as Core.Types.Object,
59
58
  };
60
59
  }
61
60
 
@@ -1 +1 @@
1
- import { z, ObjectId, Entity } from '@arken/schema';
1
+ import { z, ObjectId, Entity } from '@arken/node/schema';
@@ -1,10 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { Model, Document } from '@arken/mongo';
2
+ import { Model, Document } from '@arken/node/mongo';
3
3
  import * as schema from './oasis.schema';
4
4
 
5
5
  export type * from './oasis.router';
6
- export type * from './oasis.service';
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/package.json CHANGED
@@ -1,16 +1,29 @@
1
1
  {
2
2
  "name": "@arken/seer-protocol",
3
- "version": "0.1.1",
4
- "main": "src/index.ts",
5
- "scripts": {},
3
+ "version": "0.1.3",
4
+ "main": "index.ts",
5
+ "scripts": {
6
+ "build": "npm-run-all dist",
7
+ "clean": "del-cli ./build && make-dir ./build",
8
+ "dist": "npm-run-all clean tsc:*",
9
+ "publish": "npm publish --access=public",
10
+ "tsc:1": "rm -rf ./build && mkdir ./build && cp package.json ./build && NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 tsc --listFiles"
11
+ },
6
12
  "dependencies": {
13
+ "@arken/node": "^1.5.3",
7
14
  "@arken/forge-protocol": "^0.1.1",
8
15
  "@trpc/client": "11.0.0-rc.660",
9
16
  "@trpc/server": "11.0.0-rc.660",
17
+ "make-dir-cli": "^3",
18
+ "jest": "^29",
19
+ "@types/jest": "^29",
20
+ "@types/node": "^20",
10
21
  "zod": "^3",
11
22
  "dotenv": "^16",
12
23
  "lodash": "^4",
13
24
  "dayjs": "^1"
14
25
  },
15
- "devDependencies": {}
26
+ "devDependencies": {
27
+ "del-cli": "^5"
28
+ }
16
29
  }
@@ -0,0 +1,4 @@
1
+ export * as Types from './product.types';
2
+ export * as Models from './product.models';
3
+ export * as Schemas from './product.schema';
4
+ export * from './product.router';