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
@@ -6,9 +6,7 @@ Your response should adhere to the following type definition for the "Alert" typ
6
6
 
7
7
  Importantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).
8
8
 
9
- export interface Alert {
10
- // Unique identifier for the alert.
11
- id: string;
9
+ export type Alert = {
12
10
  // Reference to the Alpaca account associated with the alert.
13
11
  alpacaAccountId: string;
14
12
  // Message content of the alert.
@@ -17,10 +15,6 @@ export interface Alert {
17
15
  type: AlertType;
18
16
  // Indicates whether the alert has been read by the user.
19
17
  isRead: boolean;
20
- // Timestamp when the alert was created.
21
- createdAt: Date;
22
- // Timestamp when the alert was last updated.
23
- updatedAt: Date;
24
18
  // Relation to the AlpacaAccount model.
25
19
  alpacaAccount: AlpacaAccount;
26
20
  }
@@ -49,9 +43,7 @@ export enum SubscriptionPlan {
49
43
  BUSINESS = "BUSINESS"
50
44
  }
51
45
 
52
- export interface Customer {
53
- // Unique identifier for the customer.
54
- id: number;
46
+ export type Customer = {
55
47
  // Reference to the authenticated user associated with the customer.
56
48
  authUserId: string;
57
49
  // Name of the customer.
@@ -66,17 +58,11 @@ export interface Customer {
66
58
  stripePriceId?: string;
67
59
  // End date of the current billing period in Stripe.
68
60
  stripeCurrentPeriodEnd?: Date;
69
- // Timestamp when the customer was created.
70
- createdAt: Date;
71
- // Timestamp when the customer was last updated.
72
- updatedAt: Date;
73
61
  // List of users associated with the customer.
74
62
  users: User[];
75
63
  }
76
64
 
77
- export interface Account {
78
- // Unique identifier for the account.
79
- id: string;
65
+ export type Account = {
80
66
  // Reference to the user who owns this account.
81
67
  userId: string;
82
68
  // Type of the account (e.g., OAuth provider).
@@ -99,17 +85,11 @@ export interface Account {
99
85
  id_token?: string;
100
86
  // State of the session associated with the account.
101
87
  session_state?: string;
102
- // Timestamp when the account was created.
103
- createdAt: Date;
104
- // Timestamp when the account was last updated.
105
- updatedAt: Date;
106
88
  // Relation to the User model.
107
89
  user: User;
108
90
  }
109
91
 
110
- export interface Session {
111
- // Unique identifier for the session.
112
- id: string;
92
+ export type Session = {
113
93
  // Token associated with the session for authentication.
114
94
  sessionToken: string;
115
95
  // Reference to the user who owns this session.
@@ -118,15 +98,9 @@ export interface Session {
118
98
  expires: Date;
119
99
  // Relation to the User model.
120
100
  user: User;
121
- // Timestamp when the session was created.
122
- createdAt: Date;
123
- // Timestamp when the session was last updated.
124
- updatedAt: Date;
125
101
  }
126
102
 
127
- export interface Authenticator {
128
- // Unique identifier for the authenticator.
129
- id: string;
103
+ export type Authenticator = {
130
104
  // Reference to the user who owns this authenticator.
131
105
  userId: string;
132
106
  // Unique credential ID for the authenticator.
@@ -137,15 +111,9 @@ export interface Authenticator {
137
111
  counter: number;
138
112
  // Relation to the User model.
139
113
  user: User;
140
- // Timestamp when the authenticator was created.
141
- createdAt: Date;
142
- // Timestamp when the authenticator was last updated.
143
- updatedAt: Date;
144
114
  }
145
115
 
146
- export interface User {
147
- // Unique identifier for the user.
148
- id: string;
116
+ export type User = {
149
117
  // The user's full name.
150
118
  name?: string;
151
119
  // The user's email address, must be unique.
@@ -154,10 +122,6 @@ export interface User {
154
122
  emailVerified?: Date;
155
123
  // URL to the user's profile image.
156
124
  image?: string;
157
- // Timestamp when the user account was created.
158
- createdAt: Date;
159
- // Timestamp when the user account was last updated.
160
- updatedAt: Date;
161
125
  // The role assigned to the user, determining permissions.
162
126
  role: UserRole;
163
127
  // A short biography or description of the user.
@@ -213,27 +177,7 @@ export enum AssetType {
213
177
  OTHER = "OTHER"
214
178
  }
215
179
 
216
- // Simplified reference to Order.
217
- export interface Order {
218
- // Unique identifier for the order.
219
- id: string;
220
- }
221
-
222
- // Simplified reference to Position.
223
- export interface Position {
224
- // Unique identifier for the position.
225
- id: string;
226
- }
227
-
228
- // Simplified reference to NewsArticleAssetSentiment.
229
- export interface NewsArticleAssetSentiment {
230
- // Unique identifier for the sentiment record.
231
- id: string;
232
- }
233
-
234
- export interface Asset {
235
- // Unique identifier for the asset.
236
- id: string;
180
+ export type Asset = {
237
181
  // Ticker symbol of the asset, must be unique.
238
182
  symbol: string;
239
183
  // Full name of the asset, must be unique.
@@ -344,10 +288,6 @@ export interface Asset {
344
288
  sellPrice?: string;
345
289
  // Last buy price of the asset.
346
290
  buyPrice?: string;
347
- // Timestamp when the asset was created in the database.
348
- createdAt: Date;
349
- // Timestamp when the asset was last updated in the database.
350
- updatedAt: Date;
351
291
  // List of trades involving this asset.
352
292
  trades: Trade[];
353
293
  // List of orders involving this asset.
@@ -379,9 +319,7 @@ export enum ActionStatus {
379
319
  COMPLETED = "COMPLETED"
380
320
  }
381
321
 
382
- export interface Action {
383
- // Unique identifier for the action.
384
- id: string;
322
+ export type Action = {
385
323
  // Sequence number of the action within the trade.
386
324
  sequence: number;
387
325
  // Reference to the trade this action is part of.
@@ -402,9 +340,7 @@ export interface Action {
402
340
  order?: Order;
403
341
  }
404
342
 
405
- export interface Trade {
406
- // Unique identifier for the trade.
407
- id: string;
343
+ export type Trade = {
408
344
  // Reference to the Alpaca account used for the trade.
409
345
  alpacaAccountId: string;
410
346
  // Reference to the asset being traded.
@@ -425,10 +361,6 @@ export interface Trade {
425
361
  confidence: number;
426
362
  // Timestamp when the trade was executed.
427
363
  timestamp: Date;
428
- // Timestamp when the trade record was created.
429
- createdAt: Date;
430
- // Timestamp when the trade record was last updated.
431
- updatedAt: Date;
432
364
  // Current status of the trade.
433
365
  status: TradeStatus;
434
366
  // Relation to the AlpacaAccount model.
@@ -441,9 +373,7 @@ export interface Trade {
441
373
  actions: Action[];
442
374
  }
443
375
 
444
- export interface AlpacaAccount {
445
- // Unique identifier for the Alpaca account.
446
- id: string;
376
+ export type AlpacaAccount = {
447
377
  // The type of Alpaca account (PAPER or LIVE).
448
378
  type: AlpacaAccountType;
449
379
  // API key for authenticating requests to Alpaca.
@@ -458,10 +388,6 @@ export interface AlpacaAccount {
458
388
  user: User;
459
389
  // Foreign key referencing the User.
460
390
  userId: string;
461
- // Timestamp when the Alpaca account was created.
462
- createdAt: Date;
463
- // Timestamp when the Alpaca account was last updated.
464
- updatedAt: Date;
465
391
  // List of trades executed through this Alpaca account.
466
392
  trades: Trade[];
467
393
  // List of orders placed through this Alpaca account.
@@ -1,2 +1,2 @@
1
- export declare const AlertTypeString = "\nYour response should adhere to the following type definition for the \"Alert\" type, and its nested object types (which include 'AlpacaAccount' type), as well as any ENUMS used by it (which include 'AlertType' enum).\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 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 enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\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 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 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 AlertTypeString = "\nYour response should adhere to the following type definition for the \"Alert\" type, and its nested object types (which include 'AlpacaAccount' type), as well as any ENUMS used by it (which include 'AlertType' enum).\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 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 enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\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 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 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=Alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,q6cAud3B,CAAC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,4pYA6Y3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAud9B,CAAC"}
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Y9B,CAAC"}
@@ -6,9 +6,7 @@ Your response should adhere to the following type definition for the "AlpacaAcco
6
6
 
7
7
  Importantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).
8
8
 
9
- export interface AlpacaAccount {
10
- // Unique identifier for the Alpaca account.
11
- id: string;
9
+ export type AlpacaAccount = {
12
10
  // The type of Alpaca account (PAPER or LIVE).
13
11
  type: AlpacaAccountType;
14
12
  // API key for authenticating requests to Alpaca.
@@ -23,10 +21,6 @@ export interface AlpacaAccount {
23
21
  user: User;
24
22
  // Foreign key referencing the User.
25
23
  userId: string;
26
- // Timestamp when the Alpaca account was created.
27
- createdAt: Date;
28
- // Timestamp when the Alpaca account was last updated.
29
- updatedAt: Date;
30
24
  // List of trades executed through this Alpaca account.
31
25
  trades: Trade[];
32
26
  // List of orders placed through this Alpaca account.
@@ -54,9 +48,7 @@ export enum SubscriptionPlan {
54
48
  BUSINESS = "BUSINESS"
55
49
  }
56
50
 
57
- export interface Customer {
58
- // Unique identifier for the customer.
59
- id: number;
51
+ export type Customer = {
60
52
  // Reference to the authenticated user associated with the customer.
61
53
  authUserId: string;
62
54
  // Name of the customer.
@@ -71,17 +63,11 @@ export interface Customer {
71
63
  stripePriceId?: string;
72
64
  // End date of the current billing period in Stripe.
73
65
  stripeCurrentPeriodEnd?: Date;
74
- // Timestamp when the customer was created.
75
- createdAt: Date;
76
- // Timestamp when the customer was last updated.
77
- updatedAt: Date;
78
66
  // List of users associated with the customer.
79
67
  users: User[];
80
68
  }
81
69
 
82
- export interface Account {
83
- // Unique identifier for the account.
84
- id: string;
70
+ export type Account = {
85
71
  // Reference to the user who owns this account.
86
72
  userId: string;
87
73
  // Type of the account (e.g., OAuth provider).
@@ -104,17 +90,11 @@ export interface Account {
104
90
  id_token?: string;
105
91
  // State of the session associated with the account.
106
92
  session_state?: string;
107
- // Timestamp when the account was created.
108
- createdAt: Date;
109
- // Timestamp when the account was last updated.
110
- updatedAt: Date;
111
93
  // Relation to the User model.
112
94
  user: User;
113
95
  }
114
96
 
115
- export interface Session {
116
- // Unique identifier for the session.
117
- id: string;
97
+ export type Session = {
118
98
  // Token associated with the session for authentication.
119
99
  sessionToken: string;
120
100
  // Reference to the user who owns this session.
@@ -123,15 +103,9 @@ export interface Session {
123
103
  expires: Date;
124
104
  // Relation to the User model.
125
105
  user: User;
126
- // Timestamp when the session was created.
127
- createdAt: Date;
128
- // Timestamp when the session was last updated.
129
- updatedAt: Date;
130
106
  }
131
107
 
132
- export interface Authenticator {
133
- // Unique identifier for the authenticator.
134
- id: string;
108
+ export type Authenticator = {
135
109
  // Reference to the user who owns this authenticator.
136
110
  userId: string;
137
111
  // Unique credential ID for the authenticator.
@@ -142,15 +116,9 @@ export interface Authenticator {
142
116
  counter: number;
143
117
  // Relation to the User model.
144
118
  user: User;
145
- // Timestamp when the authenticator was created.
146
- createdAt: Date;
147
- // Timestamp when the authenticator was last updated.
148
- updatedAt: Date;
149
119
  }
150
120
 
151
- export interface User {
152
- // Unique identifier for the user.
153
- id: string;
121
+ export type User = {
154
122
  // The user's full name.
155
123
  name?: string;
156
124
  // The user's email address, must be unique.
@@ -159,10 +127,6 @@ export interface User {
159
127
  emailVerified?: Date;
160
128
  // URL to the user's profile image.
161
129
  image?: string;
162
- // Timestamp when the user account was created.
163
- createdAt: Date;
164
- // Timestamp when the user account was last updated.
165
- updatedAt: Date;
166
130
  // The role assigned to the user, determining permissions.
167
131
  role: UserRole;
168
132
  // A short biography or description of the user.
@@ -237,15 +201,7 @@ export enum OrderStatus {
237
201
  REJECTED = "REJECTED"
238
202
  }
239
203
 
240
- // Simplified reference to Action.
241
- export interface Action {
242
- // Unique identifier for the action.
243
- id: string;
244
- }
245
-
246
- export interface Order {
247
- // Unique identifier for the order.
248
- id: string;
204
+ export type Order = {
249
205
  // Reference to the Alpaca account used for the order.
250
206
  alpacaAccountId: string;
251
207
  // Reference to the asset being ordered.
@@ -263,10 +219,6 @@ export interface Order {
263
219
  stopLoss?: number;
264
220
  // Current status of the order, defined by OrderStatus enum.
265
221
  status: OrderStatus;
266
- // Timestamp when the order was created.
267
- createdAt: Date;
268
- // Timestamp when the order was last updated.
269
- updatedAt: Date;
270
222
  // Timestamp when the action was executed.
271
223
  executionTime?: Date;
272
224
  // The Alpaca account this order is associated with.
@@ -279,9 +231,7 @@ export interface Order {
279
231
  fee?: number;
280
232
  }
281
233
 
282
- export interface Position {
283
- // Unique identifier for the position.
284
- id: string;
234
+ export type Position = {
285
235
  // Reference to the associated asset.
286
236
  assetId: string;
287
237
  // Relation to the Asset model.
@@ -318,15 +268,7 @@ export interface Position {
318
268
  alpacaAccountId: string;
319
269
  }
320
270
 
321
- // Simplified reference to NewsArticle.
322
- export interface NewsArticle {
323
- // Unique identifier for the news article.
324
- id: string;
325
- }
326
-
327
- export interface NewsArticleAssetSentiment {
328
- // Unique identifier for the sentiment record.
329
- id: string;
271
+ export type NewsArticleAssetSentiment = {
330
272
  // Reference to the associated asset.
331
273
  assetId: string;
332
274
  // Reference to the associated news article.
@@ -345,9 +287,7 @@ export interface NewsArticleAssetSentiment {
345
287
  sentimentLabel?: string;
346
288
  }
347
289
 
348
- export interface Asset {
349
- // Unique identifier for the asset.
350
- id: string;
290
+ export type Asset = {
351
291
  // Ticker symbol of the asset, must be unique.
352
292
  symbol: string;
353
293
  // Full name of the asset, must be unique.
@@ -458,10 +398,6 @@ export interface Asset {
458
398
  sellPrice?: string;
459
399
  // Last buy price of the asset.
460
400
  buyPrice?: string;
461
- // Timestamp when the asset was created in the database.
462
- createdAt: Date;
463
- // Timestamp when the asset was last updated in the database.
464
- updatedAt: Date;
465
401
  // List of trades involving this asset.
466
402
  trades: Trade[];
467
403
  // List of orders involving this asset.
@@ -477,9 +413,7 @@ export enum OptionContractType {
477
413
  PUT = "PUT"
478
414
  }
479
415
 
480
- export interface Trade {
481
- // Unique identifier for the trade.
482
- id: string;
416
+ export type Trade = {
483
417
  // Reference to the Alpaca account used for the trade.
484
418
  alpacaAccountId: string;
485
419
  // Reference to the asset being traded.
@@ -500,10 +434,6 @@ export interface Trade {
500
434
  confidence: number;
501
435
  // Timestamp when the trade was executed.
502
436
  timestamp: Date;
503
- // Timestamp when the trade record was created.
504
- createdAt: Date;
505
- // Timestamp when the trade record was last updated.
506
- updatedAt: Date;
507
437
  // Current status of the trade.
508
438
  status: TradeStatus;
509
439
  // Relation to the AlpacaAccount model.
@@ -523,9 +453,7 @@ export enum AlertType {
523
453
  INFO = "INFO"
524
454
  }
525
455
 
526
- export interface Alert {
527
- // Unique identifier for the alert.
528
- id: string;
456
+ export type Alert = {
529
457
  // Reference to the Alpaca account associated with the alert.
530
458
  alpacaAccountId: string;
531
459
  // Message content of the alert.
@@ -534,10 +462,6 @@ export interface Alert {
534
462
  type: AlertType;
535
463
  // Indicates whether the alert has been read by the user.
536
464
  isRead: boolean;
537
- // Timestamp when the alert was created.
538
- createdAt: Date;
539
- // Timestamp when the alert was last updated.
540
- updatedAt: Date;
541
465
  // Relation to the AlpacaAccount model.
542
466
  alpacaAccount: AlpacaAccount;
543
467
  }
@@ -1,2 +1,2 @@
1
- export declare const AlpacaAccountTypeString = "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type, and its nested object types (which include 'User', 'Trade', 'Order', 'Position', 'Alert' types), as well as any ENUMS used by it (which include 'AlpacaAccountType' enum).\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 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 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 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 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\n// Simplified reference to Action.\nexport interface Action {\n// Unique identifier for the action.\n id: string;\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 interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\n// Simplified reference to NewsArticle.\nexport interface NewsArticle {\n// Unique identifier for the news article.\n id: string;\n}\n\nexport interface NewsArticleAssetSentiment {\n // Unique identifier for the sentiment record.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: 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 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\n";
1
+ export declare const AlpacaAccountTypeString = "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type, and its nested object types (which include 'User', 'Trade', 'Order', 'Position', 'Alert' types), as well as any ENUMS used by it (which include 'AlpacaAccountType' enum).\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 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 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 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 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 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 type Position = {\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport type NewsArticleAssetSentiment = {\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\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 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\n";
2
2
  //# sourceMappingURL=AlpacaAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,gthBA6hBnC,CAAC"}
1
+ {"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,+1cAidnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlpacaAccount.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6hBtC,CAAC"}
1
+ {"version":3,"file":"AlpacaAccount.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAidtC,CAAC"}