adaptic-backend 1.0.68 → 1.0.69

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 (136) hide show
  1. package/README.md +1 -1
  2. package/generated/typeStrings/Account.cjs +10 -78
  3. package/generated/typeStrings/Account.d.ts +1 -1
  4. package/generated/typeStrings/Account.d.ts.map +1 -1
  5. package/generated/typeStrings/Account.js.map +1 -1
  6. package/generated/typeStrings/Action.cjs +7 -71
  7. package/generated/typeStrings/Action.d.ts +1 -1
  8. package/generated/typeStrings/Action.d.ts.map +1 -1
  9. package/generated/typeStrings/Action.js.map +1 -1
  10. package/generated/typeStrings/Alert.cjs +10 -84
  11. package/generated/typeStrings/Alert.d.ts +1 -1
  12. package/generated/typeStrings/Alert.d.ts.map +1 -1
  13. package/generated/typeStrings/Alert.js.map +1 -1
  14. package/generated/typeStrings/AlpacaAccount.cjs +12 -88
  15. package/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  16. package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  17. package/generated/typeStrings/AlpacaAccount.js.map +1 -1
  18. package/generated/typeStrings/Asset.cjs +9 -85
  19. package/generated/typeStrings/Asset.d.ts +1 -1
  20. package/generated/typeStrings/Asset.d.ts.map +1 -1
  21. package/generated/typeStrings/Asset.js.map +1 -1
  22. package/generated/typeStrings/Authenticator.cjs +10 -78
  23. package/generated/typeStrings/Authenticator.d.ts +1 -1
  24. package/generated/typeStrings/Authenticator.d.ts.map +1 -1
  25. package/generated/typeStrings/Authenticator.js.map +1 -1
  26. package/generated/typeStrings/Customer.cjs +10 -78
  27. package/generated/typeStrings/Customer.d.ts +1 -1
  28. package/generated/typeStrings/Customer.d.ts.map +1 -1
  29. package/generated/typeStrings/Customer.js.map +1 -1
  30. package/generated/typeStrings/EconomicEvent.cjs +1 -7
  31. package/generated/typeStrings/EconomicEvent.d.ts +1 -1
  32. package/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
  33. package/generated/typeStrings/EconomicEvent.js.map +1 -1
  34. package/generated/typeStrings/NewsArticle.cjs +6 -46
  35. package/generated/typeStrings/NewsArticle.d.ts +1 -1
  36. package/generated/typeStrings/NewsArticle.d.ts.map +1 -1
  37. package/generated/typeStrings/NewsArticle.js.map +1 -1
  38. package/generated/typeStrings/NewsArticleAssetSentiment.cjs +6 -58
  39. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  40. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  41. package/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  42. package/generated/typeStrings/Order.cjs +11 -85
  43. package/generated/typeStrings/Order.d.ts +1 -1
  44. package/generated/typeStrings/Order.d.ts.map +1 -1
  45. package/generated/typeStrings/Order.js.map +1 -1
  46. package/generated/typeStrings/Position.cjs +7 -55
  47. package/generated/typeStrings/Position.d.ts +1 -1
  48. package/generated/typeStrings/Position.d.ts.map +1 -1
  49. package/generated/typeStrings/Position.js.map +1 -1
  50. package/generated/typeStrings/Session.cjs +10 -78
  51. package/generated/typeStrings/Session.d.ts +1 -1
  52. package/generated/typeStrings/Session.d.ts.map +1 -1
  53. package/generated/typeStrings/Session.js.map +1 -1
  54. package/generated/typeStrings/Trade.cjs +11 -85
  55. package/generated/typeStrings/Trade.d.ts +1 -1
  56. package/generated/typeStrings/Trade.d.ts.map +1 -1
  57. package/generated/typeStrings/Trade.js.map +1 -1
  58. package/generated/typeStrings/User.cjs +10 -84
  59. package/generated/typeStrings/User.d.ts +1 -1
  60. package/generated/typeStrings/User.d.ts.map +1 -1
  61. package/generated/typeStrings/User.js.map +1 -1
  62. package/generated/typeStrings/VerificationToken.cjs +1 -3
  63. package/generated/typeStrings/VerificationToken.d.ts +1 -1
  64. package/generated/typeStrings/VerificationToken.d.ts.map +1 -1
  65. package/generated/typeStrings/VerificationToken.js.map +1 -1
  66. package/generated/typeStrings/index.d.ts +16 -16
  67. package/generated/typeStrings/index.d.ts.map +1 -1
  68. package/generated/typeStrings/index.js.map +1 -1
  69. package/package.json +1 -1
  70. package/server/generated/typeStrings/Account.d.ts +1 -1
  71. package/server/generated/typeStrings/Account.d.ts.map +1 -1
  72. package/server/generated/typeStrings/Account.js.map +1 -1
  73. package/server/generated/typeStrings/Account.mjs +10 -78
  74. package/server/generated/typeStrings/Action.d.ts +1 -1
  75. package/server/generated/typeStrings/Action.d.ts.map +1 -1
  76. package/server/generated/typeStrings/Action.js.map +1 -1
  77. package/server/generated/typeStrings/Action.mjs +7 -71
  78. package/server/generated/typeStrings/Alert.d.ts +1 -1
  79. package/server/generated/typeStrings/Alert.d.ts.map +1 -1
  80. package/server/generated/typeStrings/Alert.js.map +1 -1
  81. package/server/generated/typeStrings/Alert.mjs +10 -84
  82. package/server/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  83. package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  84. package/server/generated/typeStrings/AlpacaAccount.js.map +1 -1
  85. package/server/generated/typeStrings/AlpacaAccount.mjs +12 -88
  86. package/server/generated/typeStrings/Asset.d.ts +1 -1
  87. package/server/generated/typeStrings/Asset.d.ts.map +1 -1
  88. package/server/generated/typeStrings/Asset.js.map +1 -1
  89. package/server/generated/typeStrings/Asset.mjs +9 -85
  90. package/server/generated/typeStrings/Authenticator.d.ts +1 -1
  91. package/server/generated/typeStrings/Authenticator.d.ts.map +1 -1
  92. package/server/generated/typeStrings/Authenticator.js.map +1 -1
  93. package/server/generated/typeStrings/Authenticator.mjs +10 -78
  94. package/server/generated/typeStrings/Customer.d.ts +1 -1
  95. package/server/generated/typeStrings/Customer.d.ts.map +1 -1
  96. package/server/generated/typeStrings/Customer.js.map +1 -1
  97. package/server/generated/typeStrings/Customer.mjs +10 -78
  98. package/server/generated/typeStrings/EconomicEvent.d.ts +1 -1
  99. package/server/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
  100. package/server/generated/typeStrings/EconomicEvent.js.map +1 -1
  101. package/server/generated/typeStrings/EconomicEvent.mjs +1 -7
  102. package/server/generated/typeStrings/NewsArticle.d.ts +1 -1
  103. package/server/generated/typeStrings/NewsArticle.d.ts.map +1 -1
  104. package/server/generated/typeStrings/NewsArticle.js.map +1 -1
  105. package/server/generated/typeStrings/NewsArticle.mjs +6 -46
  106. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  107. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  108. package/server/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  109. package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +6 -58
  110. package/server/generated/typeStrings/Order.d.ts +1 -1
  111. package/server/generated/typeStrings/Order.d.ts.map +1 -1
  112. package/server/generated/typeStrings/Order.js.map +1 -1
  113. package/server/generated/typeStrings/Order.mjs +11 -85
  114. package/server/generated/typeStrings/Position.d.ts +1 -1
  115. package/server/generated/typeStrings/Position.d.ts.map +1 -1
  116. package/server/generated/typeStrings/Position.js.map +1 -1
  117. package/server/generated/typeStrings/Position.mjs +7 -55
  118. package/server/generated/typeStrings/Session.d.ts +1 -1
  119. package/server/generated/typeStrings/Session.d.ts.map +1 -1
  120. package/server/generated/typeStrings/Session.js.map +1 -1
  121. package/server/generated/typeStrings/Session.mjs +10 -78
  122. package/server/generated/typeStrings/Trade.d.ts +1 -1
  123. package/server/generated/typeStrings/Trade.d.ts.map +1 -1
  124. package/server/generated/typeStrings/Trade.js.map +1 -1
  125. package/server/generated/typeStrings/Trade.mjs +11 -85
  126. package/server/generated/typeStrings/User.d.ts +1 -1
  127. package/server/generated/typeStrings/User.d.ts.map +1 -1
  128. package/server/generated/typeStrings/User.js.map +1 -1
  129. package/server/generated/typeStrings/User.mjs +10 -84
  130. package/server/generated/typeStrings/VerificationToken.d.ts +1 -1
  131. package/server/generated/typeStrings/VerificationToken.d.ts.map +1 -1
  132. package/server/generated/typeStrings/VerificationToken.js.map +1 -1
  133. package/server/generated/typeStrings/VerificationToken.mjs +1 -3
  134. package/server/generated/typeStrings/index.d.ts +16 -16
  135. package/server/generated/typeStrings/index.d.ts.map +1 -1
  136. package/server/generated/typeStrings/index.js.map +1 -1
@@ -3,9 +3,7 @@ Your response should adhere to the following type definition for the "Session" t
3
3
 
4
4
  Importantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).
5
5
 
6
- export interface Session {
7
- // Unique identifier for the session.
8
- id: string;
6
+ export type Session = {
9
7
  // Token associated with the session for authentication.
10
8
  sessionToken: string;
11
9
  // Reference to the user who owns this session.
@@ -14,10 +12,6 @@ export interface Session {
14
12
  expires: Date;
15
13
  // Relation to the User model.
16
14
  user: User;
17
- // Timestamp when the session was created.
18
- createdAt: Date;
19
- // Timestamp when the session was last updated.
20
- updatedAt: Date;
21
15
  }
22
16
 
23
17
  export enum UserRole {
@@ -37,9 +31,7 @@ export enum SubscriptionPlan {
37
31
  BUSINESS = "BUSINESS"
38
32
  }
39
33
 
40
- export interface Customer {
41
- // Unique identifier for the customer.
42
- id: number;
34
+ export type Customer = {
43
35
  // Reference to the authenticated user associated with the customer.
44
36
  authUserId: string;
45
37
  // Name of the customer.
@@ -54,17 +46,11 @@ export interface Customer {
54
46
  stripePriceId?: string;
55
47
  // End date of the current billing period in Stripe.
56
48
  stripeCurrentPeriodEnd?: Date;
57
- // Timestamp when the customer was created.
58
- createdAt: Date;
59
- // Timestamp when the customer was last updated.
60
- updatedAt: Date;
61
49
  // List of users associated with the customer.
62
50
  users: User[];
63
51
  }
64
52
 
65
- export interface Account {
66
- // Unique identifier for the account.
67
- id: string;
53
+ export type Account = {
68
54
  // Reference to the user who owns this account.
69
55
  userId: string;
70
56
  // Type of the account (e.g., OAuth provider).
@@ -87,17 +73,11 @@ export interface Account {
87
73
  id_token?: string;
88
74
  // State of the session associated with the account.
89
75
  session_state?: string;
90
- // Timestamp when the account was created.
91
- createdAt: Date;
92
- // Timestamp when the account was last updated.
93
- updatedAt: Date;
94
76
  // Relation to the User model.
95
77
  user: User;
96
78
  }
97
79
 
98
- export interface Authenticator {
99
- // Unique identifier for the authenticator.
100
- id: string;
80
+ export type Authenticator = {
101
81
  // Reference to the user who owns this authenticator.
102
82
  userId: string;
103
83
  // Unique credential ID for the authenticator.
@@ -108,10 +88,6 @@ export interface Authenticator {
108
88
  counter: number;
109
89
  // Relation to the User model.
110
90
  user: User;
111
- // Timestamp when the authenticator was created.
112
- createdAt: Date;
113
- // Timestamp when the authenticator was last updated.
114
- updatedAt: Date;
115
91
  }
116
92
 
117
93
  export enum TradeStatus {
@@ -121,26 +97,12 @@ export enum TradeStatus {
121
97
  COMPLETED = "COMPLETED"
122
98
  }
123
99
 
124
- // Simplified reference to Asset.
125
- export interface Asset {
126
- // Unique identifier for the asset.
127
- id: string;
128
- }
129
-
130
100
  export enum OptionContractType {
131
101
  CALL = "CALL",
132
102
  PUT = "PUT"
133
103
  }
134
104
 
135
- // Simplified reference to Action.
136
- export interface Action {
137
- // Unique identifier for the action.
138
- id: string;
139
- }
140
-
141
- export interface Trade {
142
- // Unique identifier for the trade.
143
- id: string;
105
+ export type Trade = {
144
106
  // Reference to the Alpaca account used for the trade.
145
107
  alpacaAccountId: string;
146
108
  // Reference to the asset being traded.
@@ -161,10 +123,6 @@ export interface Trade {
161
123
  confidence: number;
162
124
  // Timestamp when the trade was executed.
163
125
  timestamp: Date;
164
- // Timestamp when the trade record was created.
165
- createdAt: Date;
166
- // Timestamp when the trade record was last updated.
167
- updatedAt: Date;
168
126
  // Current status of the trade.
169
127
  status: TradeStatus;
170
128
  // Relation to the AlpacaAccount model.
@@ -196,9 +154,7 @@ export enum OrderStatus {
196
154
  REJECTED = "REJECTED"
197
155
  }
198
156
 
199
- export interface Order {
200
- // Unique identifier for the order.
201
- id: string;
157
+ export type Order = {
202
158
  // Reference to the Alpaca account used for the order.
203
159
  alpacaAccountId: string;
204
160
  // Reference to the asset being ordered.
@@ -216,10 +172,6 @@ export interface Order {
216
172
  stopLoss?: number;
217
173
  // Current status of the order, defined by OrderStatus enum.
218
174
  status: OrderStatus;
219
- // Timestamp when the order was created.
220
- createdAt: Date;
221
- // Timestamp when the order was last updated.
222
- updatedAt: Date;
223
175
  // Timestamp when the action was executed.
224
176
  executionTime?: Date;
225
177
  // The Alpaca account this order is associated with.
@@ -232,9 +184,7 @@ export interface Order {
232
184
  fee?: number;
233
185
  }
234
186
 
235
- export interface Position {
236
- // Unique identifier for the position.
237
- id: string;
187
+ export type Position = {
238
188
  // Reference to the associated asset.
239
189
  assetId: string;
240
190
  // Relation to the Asset model.
@@ -278,9 +228,7 @@ export enum AlertType {
278
228
  INFO = "INFO"
279
229
  }
280
230
 
281
- export interface Alert {
282
- // Unique identifier for the alert.
283
- id: string;
231
+ export type Alert = {
284
232
  // Reference to the Alpaca account associated with the alert.
285
233
  alpacaAccountId: string;
286
234
  // Message content of the alert.
@@ -289,17 +237,11 @@ export interface Alert {
289
237
  type: AlertType;
290
238
  // Indicates whether the alert has been read by the user.
291
239
  isRead: boolean;
292
- // Timestamp when the alert was created.
293
- createdAt: Date;
294
- // Timestamp when the alert was last updated.
295
- updatedAt: Date;
296
240
  // Relation to the AlpacaAccount model.
297
241
  alpacaAccount: AlpacaAccount;
298
242
  }
299
243
 
300
- export interface AlpacaAccount {
301
- // Unique identifier for the Alpaca account.
302
- id: string;
244
+ export type AlpacaAccount = {
303
245
  // The type of Alpaca account (PAPER or LIVE).
304
246
  type: AlpacaAccountType;
305
247
  // API key for authenticating requests to Alpaca.
@@ -314,10 +256,6 @@ export interface AlpacaAccount {
314
256
  user: User;
315
257
  // Foreign key referencing the User.
316
258
  userId: string;
317
- // Timestamp when the Alpaca account was created.
318
- createdAt: Date;
319
- // Timestamp when the Alpaca account was last updated.
320
- updatedAt: Date;
321
259
  // List of trades executed through this Alpaca account.
322
260
  trades: Trade[];
323
261
  // List of orders placed through this Alpaca account.
@@ -328,9 +266,7 @@ export interface AlpacaAccount {
328
266
  alerts: Alert[];
329
267
  }
330
268
 
331
- export interface User {
332
- // Unique identifier for the user.
333
- id: string;
269
+ export type User = {
334
270
  // The user's full name.
335
271
  name?: string;
336
272
  // The user's email address, must be unique.
@@ -339,10 +275,6 @@ export interface User {
339
275
  emailVerified?: Date;
340
276
  // URL to the user's profile image.
341
277
  image?: string;
342
- // Timestamp when the user account was created.
343
- createdAt: Date;
344
- // Timestamp when the user account was last updated.
345
- updatedAt: Date;
346
278
  // The role assigned to the user, determining permissions.
347
279
  role: UserRole;
348
280
  // A short biography or description of the user.
@@ -1,2 +1,2 @@
1
- export declare const TradeTypeString = "\nYour response should adhere to the following type definition for the \"Trade\" type, and its nested object types (which include 'AlpacaAccount', 'Asset', 'Action' types), as well as any ENUMS used by it (which include 'TradeStatus', 'OptionContractType' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionContractType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Reference to the order ID associated with the action.\n orderId?: string;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of.\n trade: Trade;\n // The order associated with this action.\n order?: Order;\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n// Simplified reference to Position.\nexport interface Position {\n// Unique identifier for the position.\n id: string;\n}\n\n// Simplified reference to NewsArticleAssetSentiment.\nexport interface NewsArticleAssetSentiment {\n// Unique identifier for the sentiment record.\n id: string;\n}\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Last sell price of the asset.\n sellPrice?: string;\n // Last buy price of the asset.\n buyPrice?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Reference to the action associated with the order.\n actionId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n stopLoss?: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // The Alpaca account this order is associated with.\n alpacaAccount: AlpacaAccount;\n // The action this order is associated with.\n action: Action;\n // The asset this order is for.\n asset: Asset;\n // Fee associated with the order.\n fee?: number;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
1
+ export declare const TradeTypeString = "\nYour response should adhere to the following type definition for the \"Trade\" type, and its nested object types (which include 'AlpacaAccount', 'Asset', 'Action' types), as well as any ENUMS used by it (which include 'TradeStatus', 'OptionContractType' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport type Trade = {\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionContractType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport type Customer = {\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport type Account = {\n // Reference to the user who owns this account.\n userId: string;\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Relation to the User model.\n user: User;\n}\n\nexport type Session = {\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport type Authenticator = {\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n}\n\nexport type User = {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport type Action = {\n // Sequence number of the action within the trade.\n sequence: number;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Reference to the order ID associated with the action.\n orderId?: string;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of.\n trade: Trade;\n // The order associated with this action.\n order?: Order;\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport type Asset = {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Last sell price of the asset.\n sellPrice?: string;\n // Last buy price of the asset.\n buyPrice?: string;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport type Order = {\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Reference to the action associated with the order.\n actionId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n stopLoss?: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // The Alpaca account this order is associated with.\n alpacaAccount: AlpacaAccount;\n // The action this order is associated with.\n action: Action;\n // The asset this order is for.\n asset: Asset;\n // Fee associated with the order.\n fee?: number;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport type Alert = {\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport type AlpacaAccount = {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
2
2
  //# sourceMappingURL=Trade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,syfAwgB3B,CAAC"}
1
+ {"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,q9aA8b3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Trade.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwgB9B,CAAC"}
1
+ {"version":3,"file":"Trade.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8b9B,CAAC"}
@@ -3,9 +3,7 @@ Your response should adhere to the following type definition for the "Trade" typ
3
3
 
4
4
  Importantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).
5
5
 
6
- export interface Trade {
7
- // Unique identifier for the trade.
8
- id: string;
6
+ export type Trade = {
9
7
  // Reference to the Alpaca account used for the trade.
10
8
  alpacaAccountId: string;
11
9
  // Reference to the asset being traded.
@@ -26,10 +24,6 @@ export interface Trade {
26
24
  confidence: number;
27
25
  // Timestamp when the trade was executed.
28
26
  timestamp: Date;
29
- // Timestamp when the trade record was created.
30
- createdAt: Date;
31
- // Timestamp when the trade record was last updated.
32
- updatedAt: Date;
33
27
  // Current status of the trade.
34
28
  status: TradeStatus;
35
29
  // Relation to the AlpacaAccount model.
@@ -66,9 +60,7 @@ export enum SubscriptionPlan {
66
60
  BUSINESS = "BUSINESS"
67
61
  }
68
62
 
69
- export interface Customer {
70
- // Unique identifier for the customer.
71
- id: number;
63
+ export type Customer = {
72
64
  // Reference to the authenticated user associated with the customer.
73
65
  authUserId: string;
74
66
  // Name of the customer.
@@ -83,17 +75,11 @@ export interface Customer {
83
75
  stripePriceId?: string;
84
76
  // End date of the current billing period in Stripe.
85
77
  stripeCurrentPeriodEnd?: Date;
86
- // Timestamp when the customer was created.
87
- createdAt: Date;
88
- // Timestamp when the customer was last updated.
89
- updatedAt: Date;
90
78
  // List of users associated with the customer.
91
79
  users: User[];
92
80
  }
93
81
 
94
- export interface Account {
95
- // Unique identifier for the account.
96
- id: string;
82
+ export type Account = {
97
83
  // Reference to the user who owns this account.
98
84
  userId: string;
99
85
  // Type of the account (e.g., OAuth provider).
@@ -116,17 +102,11 @@ export interface Account {
116
102
  id_token?: string;
117
103
  // State of the session associated with the account.
118
104
  session_state?: string;
119
- // Timestamp when the account was created.
120
- createdAt: Date;
121
- // Timestamp when the account was last updated.
122
- updatedAt: Date;
123
105
  // Relation to the User model.
124
106
  user: User;
125
107
  }
126
108
 
127
- export interface Session {
128
- // Unique identifier for the session.
129
- id: string;
109
+ export type Session = {
130
110
  // Token associated with the session for authentication.
131
111
  sessionToken: string;
132
112
  // Reference to the user who owns this session.
@@ -135,15 +115,9 @@ export interface Session {
135
115
  expires: Date;
136
116
  // Relation to the User model.
137
117
  user: User;
138
- // Timestamp when the session was created.
139
- createdAt: Date;
140
- // Timestamp when the session was last updated.
141
- updatedAt: Date;
142
118
  }
143
119
 
144
- export interface Authenticator {
145
- // Unique identifier for the authenticator.
146
- id: string;
120
+ export type Authenticator = {
147
121
  // Reference to the user who owns this authenticator.
148
122
  userId: string;
149
123
  // Unique credential ID for the authenticator.
@@ -154,15 +128,9 @@ export interface Authenticator {
154
128
  counter: number;
155
129
  // Relation to the User model.
156
130
  user: User;
157
- // Timestamp when the authenticator was created.
158
- createdAt: Date;
159
- // Timestamp when the authenticator was last updated.
160
- updatedAt: Date;
161
131
  }
162
132
 
163
- export interface User {
164
- // Unique identifier for the user.
165
- id: string;
133
+ export type User = {
166
134
  // The user's full name.
167
135
  name?: string;
168
136
  // The user's email address, must be unique.
@@ -171,10 +139,6 @@ export interface User {
171
139
  emailVerified?: Date;
172
140
  // URL to the user's profile image.
173
141
  image?: string;
174
- // Timestamp when the user account was created.
175
- createdAt: Date;
176
- // Timestamp when the user account was last updated.
177
- updatedAt: Date;
178
142
  // The role assigned to the user, determining permissions.
179
143
  role: UserRole;
180
144
  // A short biography or description of the user.
@@ -234,9 +198,7 @@ export enum ActionStatus {
234
198
  COMPLETED = "COMPLETED"
235
199
  }
236
200
 
237
- export interface Action {
238
- // Unique identifier for the action.
239
- id: string;
201
+ export type Action = {
240
202
  // Sequence number of the action within the trade.
241
203
  sequence: number;
242
204
  // Reference to the trade this action is part of.
@@ -281,21 +243,7 @@ export enum AssetType {
281
243
  OTHER = "OTHER"
282
244
  }
283
245
 
284
- // Simplified reference to Position.
285
- export interface Position {
286
- // Unique identifier for the position.
287
- id: string;
288
- }
289
-
290
- // Simplified reference to NewsArticleAssetSentiment.
291
- export interface NewsArticleAssetSentiment {
292
- // Unique identifier for the sentiment record.
293
- id: string;
294
- }
295
-
296
- export interface Asset {
297
- // Unique identifier for the asset.
298
- id: string;
246
+ export type Asset = {
299
247
  // Ticker symbol of the asset, must be unique.
300
248
  symbol: string;
301
249
  // Full name of the asset, must be unique.
@@ -406,10 +354,6 @@ export interface Asset {
406
354
  sellPrice?: string;
407
355
  // Last buy price of the asset.
408
356
  buyPrice?: string;
409
- // Timestamp when the asset was created in the database.
410
- createdAt: Date;
411
- // Timestamp when the asset was last updated in the database.
412
- updatedAt: Date;
413
357
  // List of trades involving this asset.
414
358
  trades: Trade[];
415
359
  // List of orders involving this asset.
@@ -420,9 +364,7 @@ export interface Asset {
420
364
  newsMentions: NewsArticleAssetSentiment[];
421
365
  }
422
366
 
423
- export interface Order {
424
- // Unique identifier for the order.
425
- id: string;
367
+ export type Order = {
426
368
  // Reference to the Alpaca account used for the order.
427
369
  alpacaAccountId: string;
428
370
  // Reference to the asset being ordered.
@@ -440,10 +382,6 @@ export interface Order {
440
382
  stopLoss?: number;
441
383
  // Current status of the order, defined by OrderStatus enum.
442
384
  status: OrderStatus;
443
- // Timestamp when the order was created.
444
- createdAt: Date;
445
- // Timestamp when the order was last updated.
446
- updatedAt: Date;
447
385
  // Timestamp when the action was executed.
448
386
  executionTime?: Date;
449
387
  // The Alpaca account this order is associated with.
@@ -463,9 +401,7 @@ export enum AlertType {
463
401
  INFO = "INFO"
464
402
  }
465
403
 
466
- export interface Alert {
467
- // Unique identifier for the alert.
468
- id: string;
404
+ export type Alert = {
469
405
  // Reference to the Alpaca account associated with the alert.
470
406
  alpacaAccountId: string;
471
407
  // Message content of the alert.
@@ -474,17 +410,11 @@ export interface Alert {
474
410
  type: AlertType;
475
411
  // Indicates whether the alert has been read by the user.
476
412
  isRead: boolean;
477
- // Timestamp when the alert was created.
478
- createdAt: Date;
479
- // Timestamp when the alert was last updated.
480
- updatedAt: Date;
481
413
  // Relation to the AlpacaAccount model.
482
414
  alpacaAccount: AlpacaAccount;
483
415
  }
484
416
 
485
- export interface AlpacaAccount {
486
- // Unique identifier for the Alpaca account.
487
- id: string;
417
+ export type AlpacaAccount = {
488
418
  // The type of Alpaca account (PAPER or LIVE).
489
419
  type: AlpacaAccountType;
490
420
  // API key for authenticating requests to Alpaca.
@@ -499,10 +429,6 @@ export interface AlpacaAccount {
499
429
  user: User;
500
430
  // Foreign key referencing the User.
501
431
  userId: string;
502
- // Timestamp when the Alpaca account was created.
503
- createdAt: Date;
504
- // Timestamp when the Alpaca account was last updated.
505
- updatedAt: Date;
506
432
  // List of trades executed through this Alpaca account.
507
433
  trades: Trade[];
508
434
  // List of orders placed through this Alpaca account.
@@ -1,2 +1,2 @@
1
- export declare const UserTypeString = "\nYour response should adhere to the following type definition for the \"User\" type, and its nested object types (which include 'Customer', 'Account', 'Session', 'Authenticator', 'AlpacaAccount' types), as well as any ENUMS used by it (which include 'UserRole', 'AlpacaAccountType', 'SubscriptionPlan' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n// Simplified reference to Order.\nexport interface Order {\n// Unique identifier for the order.\n id: string;\n}\n\n// Simplified reference to Position.\nexport interface Position {\n// Unique identifier for the position.\n id: string;\n}\n\n// Simplified reference to NewsArticleAssetSentiment.\nexport interface NewsArticleAssetSentiment {\n// Unique identifier for the sentiment record.\n id: string;\n}\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Last sell price of the asset.\n sellPrice?: string;\n // Last buy price of the asset.\n buyPrice?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Reference to the order ID associated with the action.\n orderId?: string;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of.\n trade: Trade;\n // The order associated with this action.\n order?: Order;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionContractType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\n";
1
+ export declare const UserTypeString = "\nYour response should adhere to the following type definition for the \"User\" type, and its nested object types (which include 'Customer', 'Account', 'Session', 'Authenticator', 'AlpacaAccount' types), as well as any ENUMS used by it (which include 'UserRole', 'AlpacaAccountType', 'SubscriptionPlan' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport type User = {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport type Customer = {\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport type Account = {\n // Reference to the user who owns this account.\n userId: string;\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Relation to the User model.\n user: User;\n}\n\nexport type Session = {\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport type Authenticator = {\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport type Asset = {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Last sell price of the asset.\n sellPrice?: string;\n // Last buy price of the asset.\n buyPrice?: string;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport type Action = {\n // Sequence number of the action within the trade.\n sequence: number;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Reference to the order ID associated with the action.\n orderId?: string;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of.\n trade: Trade;\n // The order associated with this action.\n order?: Order;\n}\n\nexport type Trade = {\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionContractType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport type Alert = {\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport type AlpacaAccount = {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\n";
2
2
  //# sourceMappingURL=User.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,igdAud1B,CAAC"}
1
+ {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,wvYA6Y1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAud7B,CAAC"}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Y7B,CAAC"}