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.
- package/README.md +1 -1
- package/generated/typeStrings/Account.cjs +10 -78
- package/generated/typeStrings/Account.d.ts +1 -1
- package/generated/typeStrings/Account.d.ts.map +1 -1
- package/generated/typeStrings/Account.js.map +1 -1
- package/generated/typeStrings/Action.cjs +7 -71
- package/generated/typeStrings/Action.d.ts +1 -1
- package/generated/typeStrings/Action.d.ts.map +1 -1
- package/generated/typeStrings/Action.js.map +1 -1
- package/generated/typeStrings/Alert.cjs +10 -84
- package/generated/typeStrings/Alert.d.ts +1 -1
- package/generated/typeStrings/Alert.d.ts.map +1 -1
- package/generated/typeStrings/Alert.js.map +1 -1
- package/generated/typeStrings/AlpacaAccount.cjs +12 -88
- package/generated/typeStrings/AlpacaAccount.d.ts +1 -1
- package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
- package/generated/typeStrings/AlpacaAccount.js.map +1 -1
- package/generated/typeStrings/Asset.cjs +9 -85
- package/generated/typeStrings/Asset.d.ts +1 -1
- package/generated/typeStrings/Asset.d.ts.map +1 -1
- package/generated/typeStrings/Asset.js.map +1 -1
- package/generated/typeStrings/Authenticator.cjs +10 -78
- package/generated/typeStrings/Authenticator.d.ts +1 -1
- package/generated/typeStrings/Authenticator.d.ts.map +1 -1
- package/generated/typeStrings/Authenticator.js.map +1 -1
- package/generated/typeStrings/Customer.cjs +10 -78
- package/generated/typeStrings/Customer.d.ts +1 -1
- package/generated/typeStrings/Customer.d.ts.map +1 -1
- package/generated/typeStrings/Customer.js.map +1 -1
- package/generated/typeStrings/EconomicEvent.cjs +1 -7
- package/generated/typeStrings/EconomicEvent.d.ts +1 -1
- package/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
- package/generated/typeStrings/EconomicEvent.js.map +1 -1
- package/generated/typeStrings/NewsArticle.cjs +6 -46
- package/generated/typeStrings/NewsArticle.d.ts +1 -1
- package/generated/typeStrings/NewsArticle.d.ts.map +1 -1
- package/generated/typeStrings/NewsArticle.js.map +1 -1
- package/generated/typeStrings/NewsArticleAssetSentiment.cjs +6 -58
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
- package/generated/typeStrings/Order.cjs +11 -85
- package/generated/typeStrings/Order.d.ts +1 -1
- package/generated/typeStrings/Order.d.ts.map +1 -1
- package/generated/typeStrings/Order.js.map +1 -1
- package/generated/typeStrings/Position.cjs +7 -55
- package/generated/typeStrings/Position.d.ts +1 -1
- package/generated/typeStrings/Position.d.ts.map +1 -1
- package/generated/typeStrings/Position.js.map +1 -1
- package/generated/typeStrings/Session.cjs +10 -78
- package/generated/typeStrings/Session.d.ts +1 -1
- package/generated/typeStrings/Session.d.ts.map +1 -1
- package/generated/typeStrings/Session.js.map +1 -1
- package/generated/typeStrings/Trade.cjs +11 -85
- package/generated/typeStrings/Trade.d.ts +1 -1
- package/generated/typeStrings/Trade.d.ts.map +1 -1
- package/generated/typeStrings/Trade.js.map +1 -1
- package/generated/typeStrings/User.cjs +10 -84
- package/generated/typeStrings/User.d.ts +1 -1
- package/generated/typeStrings/User.d.ts.map +1 -1
- package/generated/typeStrings/User.js.map +1 -1
- package/generated/typeStrings/VerificationToken.cjs +1 -3
- package/generated/typeStrings/VerificationToken.d.ts +1 -1
- package/generated/typeStrings/VerificationToken.d.ts.map +1 -1
- package/generated/typeStrings/VerificationToken.js.map +1 -1
- package/generated/typeStrings/index.d.ts +16 -16
- package/generated/typeStrings/index.d.ts.map +1 -1
- package/generated/typeStrings/index.js.map +1 -1
- package/package.json +1 -1
- package/server/generated/typeStrings/Account.d.ts +1 -1
- package/server/generated/typeStrings/Account.d.ts.map +1 -1
- package/server/generated/typeStrings/Account.js.map +1 -1
- package/server/generated/typeStrings/Account.mjs +10 -78
- package/server/generated/typeStrings/Action.d.ts +1 -1
- package/server/generated/typeStrings/Action.d.ts.map +1 -1
- package/server/generated/typeStrings/Action.js.map +1 -1
- package/server/generated/typeStrings/Action.mjs +7 -71
- package/server/generated/typeStrings/Alert.d.ts +1 -1
- package/server/generated/typeStrings/Alert.d.ts.map +1 -1
- package/server/generated/typeStrings/Alert.js.map +1 -1
- package/server/generated/typeStrings/Alert.mjs +10 -84
- package/server/generated/typeStrings/AlpacaAccount.d.ts +1 -1
- package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
- package/server/generated/typeStrings/AlpacaAccount.js.map +1 -1
- package/server/generated/typeStrings/AlpacaAccount.mjs +12 -88
- package/server/generated/typeStrings/Asset.d.ts +1 -1
- package/server/generated/typeStrings/Asset.d.ts.map +1 -1
- package/server/generated/typeStrings/Asset.js.map +1 -1
- package/server/generated/typeStrings/Asset.mjs +9 -85
- package/server/generated/typeStrings/Authenticator.d.ts +1 -1
- package/server/generated/typeStrings/Authenticator.d.ts.map +1 -1
- package/server/generated/typeStrings/Authenticator.js.map +1 -1
- package/server/generated/typeStrings/Authenticator.mjs +10 -78
- package/server/generated/typeStrings/Customer.d.ts +1 -1
- package/server/generated/typeStrings/Customer.d.ts.map +1 -1
- package/server/generated/typeStrings/Customer.js.map +1 -1
- package/server/generated/typeStrings/Customer.mjs +10 -78
- package/server/generated/typeStrings/EconomicEvent.d.ts +1 -1
- package/server/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
- package/server/generated/typeStrings/EconomicEvent.js.map +1 -1
- package/server/generated/typeStrings/EconomicEvent.mjs +1 -7
- package/server/generated/typeStrings/NewsArticle.d.ts +1 -1
- package/server/generated/typeStrings/NewsArticle.d.ts.map +1 -1
- package/server/generated/typeStrings/NewsArticle.js.map +1 -1
- package/server/generated/typeStrings/NewsArticle.mjs +6 -46
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
- package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +6 -58
- package/server/generated/typeStrings/Order.d.ts +1 -1
- package/server/generated/typeStrings/Order.d.ts.map +1 -1
- package/server/generated/typeStrings/Order.js.map +1 -1
- package/server/generated/typeStrings/Order.mjs +11 -85
- package/server/generated/typeStrings/Position.d.ts +1 -1
- package/server/generated/typeStrings/Position.d.ts.map +1 -1
- package/server/generated/typeStrings/Position.js.map +1 -1
- package/server/generated/typeStrings/Position.mjs +7 -55
- package/server/generated/typeStrings/Session.d.ts +1 -1
- package/server/generated/typeStrings/Session.d.ts.map +1 -1
- package/server/generated/typeStrings/Session.js.map +1 -1
- package/server/generated/typeStrings/Session.mjs +10 -78
- package/server/generated/typeStrings/Trade.d.ts +1 -1
- package/server/generated/typeStrings/Trade.d.ts.map +1 -1
- package/server/generated/typeStrings/Trade.js.map +1 -1
- package/server/generated/typeStrings/Trade.mjs +11 -85
- package/server/generated/typeStrings/User.d.ts +1 -1
- package/server/generated/typeStrings/User.d.ts.map +1 -1
- package/server/generated/typeStrings/User.js.map +1 -1
- package/server/generated/typeStrings/User.mjs +10 -84
- package/server/generated/typeStrings/VerificationToken.d.ts +1 -1
- package/server/generated/typeStrings/VerificationToken.d.ts.map +1 -1
- package/server/generated/typeStrings/VerificationToken.js.map +1 -1
- package/server/generated/typeStrings/VerificationToken.mjs +1 -3
- package/server/generated/typeStrings/index.d.ts +16 -16
- package/server/generated/typeStrings/index.d.ts.map +1 -1
- package/server/generated/typeStrings/index.js.map +1 -1
@@ -3,9 +3,7 @@ Your response should adhere to the following type definition for the "Asset" 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
|
7
|
-
// Unique identifier for the asset.
|
8
|
-
id: string;
|
6
|
+
export type Asset = {
|
9
7
|
// Ticker symbol of the asset, must be unique.
|
10
8
|
symbol: string;
|
11
9
|
// Full name of the asset, must be unique.
|
@@ -116,10 +114,6 @@ export interface Asset {
|
|
116
114
|
sellPrice?: string;
|
117
115
|
// Last buy price of the asset.
|
118
116
|
buyPrice?: string;
|
119
|
-
// Timestamp when the asset was created in the database.
|
120
|
-
createdAt: Date;
|
121
|
-
// Timestamp when the asset was last updated in the database.
|
122
|
-
updatedAt: Date;
|
123
117
|
// List of trades involving this asset.
|
124
118
|
trades: Trade[];
|
125
119
|
// List of orders involving this asset.
|
@@ -172,39 +166,13 @@ export enum UserRole {
|
|
172
166
|
USER = "USER"
|
173
167
|
}
|
174
168
|
|
175
|
-
// Simplified reference to Customer.
|
176
|
-
export interface Customer {
|
177
|
-
// Unique identifier for the customer.
|
178
|
-
id: number;
|
179
|
-
}
|
180
|
-
|
181
|
-
// Simplified reference to Account.
|
182
|
-
export interface Account {
|
183
|
-
// Unique identifier for the account.
|
184
|
-
id: string;
|
185
|
-
}
|
186
|
-
|
187
|
-
// Simplified reference to Session.
|
188
|
-
export interface Session {
|
189
|
-
// Unique identifier for the session.
|
190
|
-
id: string;
|
191
|
-
}
|
192
|
-
|
193
|
-
// Simplified reference to Authenticator.
|
194
|
-
export interface Authenticator {
|
195
|
-
// Unique identifier for the authenticator.
|
196
|
-
id: string;
|
197
|
-
}
|
198
|
-
|
199
169
|
export enum SubscriptionPlan {
|
200
170
|
FREE = "FREE",
|
201
171
|
PRO = "PRO",
|
202
172
|
BUSINESS = "BUSINESS"
|
203
173
|
}
|
204
174
|
|
205
|
-
export
|
206
|
-
// Unique identifier for the user.
|
207
|
-
id: string;
|
175
|
+
export type User = {
|
208
176
|
// The user's full name.
|
209
177
|
name?: string;
|
210
178
|
// The user's email address, must be unique.
|
@@ -213,10 +181,6 @@ export interface User {
|
|
213
181
|
emailVerified?: Date;
|
214
182
|
// URL to the user's profile image.
|
215
183
|
image?: string;
|
216
|
-
// Timestamp when the user account was created.
|
217
|
-
createdAt: Date;
|
218
|
-
// Timestamp when the user account was last updated.
|
219
|
-
updatedAt: Date;
|
220
184
|
// The role assigned to the user, determining permissions.
|
221
185
|
role: UserRole;
|
222
186
|
// A short biography or description of the user.
|
@@ -260,15 +224,7 @@ export enum OrderStatus {
|
|
260
224
|
REJECTED = "REJECTED"
|
261
225
|
}
|
262
226
|
|
263
|
-
|
264
|
-
export interface Action {
|
265
|
-
// Unique identifier for the action.
|
266
|
-
id: string;
|
267
|
-
}
|
268
|
-
|
269
|
-
export interface Order {
|
270
|
-
// Unique identifier for the order.
|
271
|
-
id: string;
|
227
|
+
export type Order = {
|
272
228
|
// Reference to the Alpaca account used for the order.
|
273
229
|
alpacaAccountId: string;
|
274
230
|
// Reference to the asset being ordered.
|
@@ -286,10 +242,6 @@ export interface Order {
|
|
286
242
|
stopLoss?: number;
|
287
243
|
// Current status of the order, defined by OrderStatus enum.
|
288
244
|
status: OrderStatus;
|
289
|
-
// Timestamp when the order was created.
|
290
|
-
createdAt: Date;
|
291
|
-
// Timestamp when the order was last updated.
|
292
|
-
updatedAt: Date;
|
293
245
|
// Timestamp when the action was executed.
|
294
246
|
executionTime?: Date;
|
295
247
|
// The Alpaca account this order is associated with.
|
@@ -302,9 +254,7 @@ export interface Order {
|
|
302
254
|
fee?: number;
|
303
255
|
}
|
304
256
|
|
305
|
-
export
|
306
|
-
// Unique identifier for the position.
|
307
|
-
id: string;
|
257
|
+
export type Position = {
|
308
258
|
// Reference to the associated asset.
|
309
259
|
assetId: string;
|
310
260
|
// Relation to the Asset model.
|
@@ -348,9 +298,7 @@ export enum AlertType {
|
|
348
298
|
INFO = "INFO"
|
349
299
|
}
|
350
300
|
|
351
|
-
export
|
352
|
-
// Unique identifier for the alert.
|
353
|
-
id: string;
|
301
|
+
export type Alert = {
|
354
302
|
// Reference to the Alpaca account associated with the alert.
|
355
303
|
alpacaAccountId: string;
|
356
304
|
// Message content of the alert.
|
@@ -359,17 +307,11 @@ export interface Alert {
|
|
359
307
|
type: AlertType;
|
360
308
|
// Indicates whether the alert has been read by the user.
|
361
309
|
isRead: boolean;
|
362
|
-
// Timestamp when the alert was created.
|
363
|
-
createdAt: Date;
|
364
|
-
// Timestamp when the alert was last updated.
|
365
|
-
updatedAt: Date;
|
366
310
|
// Relation to the AlpacaAccount model.
|
367
311
|
alpacaAccount: AlpacaAccount;
|
368
312
|
}
|
369
313
|
|
370
|
-
export
|
371
|
-
// Unique identifier for the Alpaca account.
|
372
|
-
id: string;
|
314
|
+
export type AlpacaAccount = {
|
373
315
|
// The type of Alpaca account (PAPER or LIVE).
|
374
316
|
type: AlpacaAccountType;
|
375
317
|
// API key for authenticating requests to Alpaca.
|
@@ -384,10 +326,6 @@ export interface AlpacaAccount {
|
|
384
326
|
user: User;
|
385
327
|
// Foreign key referencing the User.
|
386
328
|
userId: string;
|
387
|
-
// Timestamp when the Alpaca account was created.
|
388
|
-
createdAt: Date;
|
389
|
-
// Timestamp when the Alpaca account was last updated.
|
390
|
-
updatedAt: Date;
|
391
329
|
// List of trades executed through this Alpaca account.
|
392
330
|
trades: Trade[];
|
393
331
|
// List of orders placed through this Alpaca account.
|
@@ -403,9 +341,7 @@ export enum OptionContractType {
|
|
403
341
|
PUT = "PUT"
|
404
342
|
}
|
405
343
|
|
406
|
-
export
|
407
|
-
// Unique identifier for the trade.
|
408
|
-
id: string;
|
344
|
+
export type Trade = {
|
409
345
|
// Reference to the Alpaca account used for the trade.
|
410
346
|
alpacaAccountId: string;
|
411
347
|
// Reference to the asset being traded.
|
@@ -426,10 +362,6 @@ export interface Trade {
|
|
426
362
|
confidence: number;
|
427
363
|
// Timestamp when the trade was executed.
|
428
364
|
timestamp: Date;
|
429
|
-
// Timestamp when the trade record was created.
|
430
|
-
createdAt: Date;
|
431
|
-
// Timestamp when the trade record was last updated.
|
432
|
-
updatedAt: Date;
|
433
365
|
// Current status of the trade.
|
434
366
|
status: TradeStatus;
|
435
367
|
// Relation to the AlpacaAccount model.
|
@@ -442,9 +374,7 @@ export interface Trade {
|
|
442
374
|
actions: Action[];
|
443
375
|
}
|
444
376
|
|
445
|
-
export
|
446
|
-
// Unique identifier for the news article.
|
447
|
-
id: string;
|
377
|
+
export type NewsArticle = {
|
448
378
|
// Title of the news article.
|
449
379
|
title: string;
|
450
380
|
// Full content of the news article.
|
@@ -471,17 +401,11 @@ export interface NewsArticle {
|
|
471
401
|
topics: string[];
|
472
402
|
// URL to the logo image of the news source.
|
473
403
|
logo?: string;
|
474
|
-
// Timestamp when the news article was added to the database.
|
475
|
-
createdAt: Date;
|
476
|
-
// Timestamp when the news article was last updated.
|
477
|
-
updatedAt: Date;
|
478
404
|
// List of asset sentiments associated with this news article.
|
479
405
|
assets: NewsArticleAssetSentiment[];
|
480
406
|
}
|
481
407
|
|
482
|
-
export
|
483
|
-
// Unique identifier for the sentiment record.
|
484
|
-
id: string;
|
408
|
+
export type NewsArticleAssetSentiment = {
|
485
409
|
// Reference to the associated asset.
|
486
410
|
assetId: string;
|
487
411
|
// Reference to the associated news article.
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const AuthenticatorTypeString = "\nYour response should adhere to the following type definition for the \"Authenticator\" type, and its nested object types (which include 'User' type).\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 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 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 enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n// Simplified reference to Action.\nexport interface Action {\n// Unique identifier for the action.\n id: string;\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 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 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\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 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\n";
|
1
|
+
export declare const AuthenticatorTypeString = "\nYour response should adhere to the following type definition for the \"Authenticator\" type, and its nested object types (which include 'User' type).\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 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 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 enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\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 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 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 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\n";
|
2
2
|
//# sourceMappingURL=Authenticator.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Authenticator.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Authenticator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,
|
1
|
+
{"version":3,"file":"Authenticator.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Authenticator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,67RA6SnC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Authenticator.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Authenticator.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG
|
1
|
+
{"version":3,"file":"Authenticator.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Authenticator.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6StC,CAAC"}
|
@@ -3,9 +3,7 @@ Your response should adhere to the following type definition for the "Authentica
|
|
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
|
7
|
-
// Unique identifier for the authenticator.
|
8
|
-
id: string;
|
6
|
+
export type Authenticator = {
|
9
7
|
// Reference to the user who owns this authenticator.
|
10
8
|
userId: string;
|
11
9
|
// Unique credential ID for the authenticator.
|
@@ -16,10 +14,6 @@ export interface Authenticator {
|
|
16
14
|
counter: number;
|
17
15
|
// Relation to the User model.
|
18
16
|
user: User;
|
19
|
-
// Timestamp when the authenticator was created.
|
20
|
-
createdAt: Date;
|
21
|
-
// Timestamp when the authenticator was last updated.
|
22
|
-
updatedAt: Date;
|
23
17
|
}
|
24
18
|
|
25
19
|
export enum UserRole {
|
@@ -39,9 +33,7 @@ export enum SubscriptionPlan {
|
|
39
33
|
BUSINESS = "BUSINESS"
|
40
34
|
}
|
41
35
|
|
42
|
-
export
|
43
|
-
// Unique identifier for the customer.
|
44
|
-
id: number;
|
36
|
+
export type Customer = {
|
45
37
|
// Reference to the authenticated user associated with the customer.
|
46
38
|
authUserId: string;
|
47
39
|
// Name of the customer.
|
@@ -56,17 +48,11 @@ export interface Customer {
|
|
56
48
|
stripePriceId?: string;
|
57
49
|
// End date of the current billing period in Stripe.
|
58
50
|
stripeCurrentPeriodEnd?: Date;
|
59
|
-
// Timestamp when the customer was created.
|
60
|
-
createdAt: Date;
|
61
|
-
// Timestamp when the customer was last updated.
|
62
|
-
updatedAt: Date;
|
63
51
|
// List of users associated with the customer.
|
64
52
|
users: User[];
|
65
53
|
}
|
66
54
|
|
67
|
-
export
|
68
|
-
// Unique identifier for the account.
|
69
|
-
id: string;
|
55
|
+
export type Account = {
|
70
56
|
// Reference to the user who owns this account.
|
71
57
|
userId: string;
|
72
58
|
// Type of the account (e.g., OAuth provider).
|
@@ -89,17 +75,11 @@ export interface Account {
|
|
89
75
|
id_token?: string;
|
90
76
|
// State of the session associated with the account.
|
91
77
|
session_state?: string;
|
92
|
-
// Timestamp when the account was created.
|
93
|
-
createdAt: Date;
|
94
|
-
// Timestamp when the account was last updated.
|
95
|
-
updatedAt: Date;
|
96
78
|
// Relation to the User model.
|
97
79
|
user: User;
|
98
80
|
}
|
99
81
|
|
100
|
-
export
|
101
|
-
// Unique identifier for the session.
|
102
|
-
id: string;
|
82
|
+
export type Session = {
|
103
83
|
// Token associated with the session for authentication.
|
104
84
|
sessionToken: string;
|
105
85
|
// Reference to the user who owns this session.
|
@@ -108,10 +88,6 @@ export interface Session {
|
|
108
88
|
expires: Date;
|
109
89
|
// Relation to the User model.
|
110
90
|
user: User;
|
111
|
-
// Timestamp when the session was created.
|
112
|
-
createdAt: Date;
|
113
|
-
// Timestamp when the session 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
|
-
|
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
|
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
|
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
|
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
|
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
|
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 CustomerTypeString = "\nYour response should adhere to the following type definition for the \"Customer\" type, and its nested object types (which include 'User' type), as well as any ENUMS used by it (which include 'SubscriptionPlan' 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 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 enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\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 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\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n// Simplified reference to Action.\nexport interface Action {\n// Unique identifier for the action.\n id: string;\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 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 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\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 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\n";
|
1
|
+
export declare const CustomerTypeString = "\nYour response should adhere to the following type definition for the \"Customer\" type, and its nested object types (which include 'User' type), as well as any ENUMS used by it (which include 'SubscriptionPlan' 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 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 enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\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 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 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 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 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 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\n";
|
2
2
|
//# sourceMappingURL=Customer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Customer.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Customer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"Customer.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Customer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,igSA6S9B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Customer.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Customer.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG
|
1
|
+
{"version":3,"file":"Customer.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Customer.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6SjC,CAAC"}
|