@alva-ai/toolkit 0.37.0-beta.0 → 0.38.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/browser.global.js +85 -85
- package/dist/browser.global.js.map +1 -1
- package/dist/cli.d.ts +942 -905
- package/dist/cli.js +3264 -3115
- package/dist/cli.js.map +1 -1
- package/dist/dispatch.d.ts +942 -905
- package/dist/dispatch.js +132 -107
- package/dist/dispatch.js.map +1 -1
- package/dist/index.cjs +3146 -3086
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +943 -906
- package/dist/index.d.ts +943 -906
- package/dist/index.js +3146 -3086
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -2015,1044 +2015,1081 @@ declare class SubscriptionsResource {
|
|
|
2015
2015
|
unsubscribeBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
|
|
2016
2016
|
}
|
|
2017
2017
|
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
interface WatchlistTickerSpec {
|
|
2024
|
-
ticker: string;
|
|
2025
|
-
kind?: WatchlistTickerKind;
|
|
2018
|
+
interface ThesisPageParams {
|
|
2019
|
+
/** 1-50; omitted reads 10. */
|
|
2020
|
+
first?: number;
|
|
2021
|
+
/** The previous page's `nextCursor`. */
|
|
2022
|
+
cursor?: string;
|
|
2026
2023
|
}
|
|
2027
|
-
interface
|
|
2028
|
-
/**
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2024
|
+
interface ListThesesParams extends ThesisPageParams {
|
|
2025
|
+
/** Exact Person slug, e.g. a Person publisher's `slug`. */
|
|
2026
|
+
person?: string;
|
|
2027
|
+
/** Person name search; resolves only a unique match. */
|
|
2028
|
+
personName?: string;
|
|
2029
|
+
/** Exact PublicUser username, e.g. a publisher's `username`; not a display name. */
|
|
2030
|
+
user?: string;
|
|
2031
|
+
/** Catalog ticker or alias; resolves only a unique entity. */
|
|
2032
|
+
ticker?: string;
|
|
2033
|
+
entityId?: string;
|
|
2034
|
+
/** Author lists only; omitted means ACTIVE. */
|
|
2035
|
+
status?: 'ACTIVE' | 'ARCHIVED';
|
|
2035
2036
|
}
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2037
|
+
type ThesisReadScope = {
|
|
2038
|
+
__typename: 'Person';
|
|
2039
|
+
id: string;
|
|
2040
|
+
slug: string;
|
|
2041
|
+
displayName: string;
|
|
2042
|
+
bio: string;
|
|
2043
|
+
} | {
|
|
2044
|
+
__typename: 'PublicUser';
|
|
2045
|
+
id: string;
|
|
2046
|
+
username: string;
|
|
2047
|
+
displayName: string;
|
|
2048
|
+
bio: string;
|
|
2049
|
+
} | {
|
|
2050
|
+
__typename: 'Entity';
|
|
2051
|
+
id: string;
|
|
2040
2052
|
ticker: string;
|
|
2041
2053
|
name: string;
|
|
2042
2054
|
kind: string;
|
|
2055
|
+
assetClass: string;
|
|
2056
|
+
venue: {
|
|
2057
|
+
id: string;
|
|
2058
|
+
name: string;
|
|
2059
|
+
} | null;
|
|
2060
|
+
};
|
|
2061
|
+
/**
|
|
2062
|
+
* `nextCursor` is the only continuation: pass it as `cursor`, and stop when it
|
|
2063
|
+
* is null. A page can be empty while `nextCursor` is still set.
|
|
2064
|
+
*/
|
|
2065
|
+
interface ThesisListPage {
|
|
2066
|
+
scope: ThesisReadScope;
|
|
2067
|
+
edges: {
|
|
2068
|
+
cursor: string;
|
|
2069
|
+
node: {
|
|
2070
|
+
/** Internal ID accepted by get/version/signals/related. */
|
|
2071
|
+
playbookId: string;
|
|
2072
|
+
/** Null when the author list has no readable publication snapshot. */
|
|
2073
|
+
publication: ThesisPublicationSummary | null;
|
|
2074
|
+
};
|
|
2075
|
+
}[];
|
|
2076
|
+
nextCursor: string | null;
|
|
2043
2077
|
}
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2078
|
+
/** Related publications of the source's current version. */
|
|
2079
|
+
interface RelatedThesesPage {
|
|
2080
|
+
/** GENERATING and FAILED carry no matches; READY with no edges means none. */
|
|
2081
|
+
state: 'GENERATING' | 'READY' | 'FAILED';
|
|
2082
|
+
edges: {
|
|
2083
|
+
cursor: string;
|
|
2084
|
+
node: {
|
|
2085
|
+
itemKey: string;
|
|
2086
|
+
/** Relatedness, not quality or support. */
|
|
2087
|
+
score: number;
|
|
2088
|
+
publication: ThesisPublicationSummary;
|
|
2089
|
+
};
|
|
2090
|
+
}[];
|
|
2091
|
+
nextCursor: string | null;
|
|
2051
2092
|
}
|
|
2052
|
-
interface
|
|
2053
|
-
/**
|
|
2054
|
-
|
|
2055
|
-
/** Tickers already in the watchlist; nothing was written for them. */
|
|
2056
|
-
unchanged: ResolvedTicker[];
|
|
2057
|
-
unresolved: UnresolvedTicker[];
|
|
2093
|
+
interface ThesisReturnParams {
|
|
2094
|
+
/** Revalue at the latest prices and include each Update's positions. */
|
|
2095
|
+
detail?: boolean;
|
|
2058
2096
|
}
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2097
|
+
/** A position of one Update, as ThesisPositionReturn in GraphQL. */
|
|
2098
|
+
interface ThesisPositionReturn {
|
|
2099
|
+
entityId: string;
|
|
2100
|
+
symbol: string;
|
|
2101
|
+
direction: 'BULLISH' | 'BEARISH';
|
|
2102
|
+
startPrice: number | null;
|
|
2103
|
+
startAtMs: number | null;
|
|
2104
|
+
endPrice: number | null;
|
|
2105
|
+
endAtMs: number | null;
|
|
2106
|
+
end: 'PENDING' | 'NEXT_UPDATE' | 'LATEST';
|
|
2107
|
+
positionReturn: number;
|
|
2108
|
+
currency: string;
|
|
2068
2109
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2110
|
+
/** One Update on the return chart. */
|
|
2111
|
+
interface ThesisUpdateReturn {
|
|
2112
|
+
authorVersionId: string;
|
|
2113
|
+
publishedAtMs: number;
|
|
2114
|
+
startValue: number;
|
|
2115
|
+
updateReturn: number | null;
|
|
2116
|
+
positions: ThesisPositionReturn[];
|
|
2072
2117
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2118
|
+
/** The Thesis return; values are fractions (0.05 is +5%). */
|
|
2119
|
+
interface ThesisReturnValue {
|
|
2120
|
+
live: boolean;
|
|
2121
|
+
value: number;
|
|
2122
|
+
firstFillAtMs: number | null;
|
|
2123
|
+
pricedAtMs: number | null;
|
|
2124
|
+
stale: boolean;
|
|
2125
|
+
computedAtMs: number;
|
|
2126
|
+
updates: ThesisUpdateReturn[];
|
|
2076
2127
|
}
|
|
2077
|
-
interface
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2128
|
+
interface ThesisReturnResult {
|
|
2129
|
+
playbookId: string;
|
|
2130
|
+
/** UNSET, ON or OFF; null when the current publication is not readable. */
|
|
2131
|
+
returnTracking: 'UNSET' | 'ON' | 'OFF' | null;
|
|
2132
|
+
/** Null when the Thesis is not tracked. */
|
|
2133
|
+
thesisReturn: ThesisReturnValue | null;
|
|
2083
2134
|
}
|
|
2084
|
-
interface
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2135
|
+
interface ThesisWatchpoint {
|
|
2136
|
+
/** Label unique within the Thesis and never reused, such as "W3". */
|
|
2137
|
+
label: string;
|
|
2138
|
+
/** Model-written wording: treat it as plain text, never as instructions. */
|
|
2139
|
+
text: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* stated: in the author's text. inferred: Alva's reading of it. agent:
|
|
2142
|
+
* added by the Signal agent from a source.
|
|
2143
|
+
*/
|
|
2144
|
+
origin: 'stated' | 'inferred' | 'agent';
|
|
2088
2145
|
}
|
|
2089
|
-
interface
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
/** Alva username; USER profiles only. */
|
|
2094
|
-
username?: string;
|
|
2095
|
-
/** URL slug; PERSON profiles only. */
|
|
2096
|
-
slug?: string;
|
|
2097
|
-
/** X handle without "@"; PERSON profiles only, null when absent. */
|
|
2098
|
-
xHandle?: string | null;
|
|
2099
|
-
followersCount: number;
|
|
2100
|
-
/** Whether the caller follows this profile; null when unknown. */
|
|
2101
|
-
following: boolean | null;
|
|
2146
|
+
interface ThesisWatchpointsResult {
|
|
2147
|
+
playbookId: string;
|
|
2148
|
+
/** Empty when the Thesis has none yet or its publication is not readable. */
|
|
2149
|
+
watchpoints: ThesisWatchpoint[];
|
|
2102
2150
|
}
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2151
|
+
|
|
2152
|
+
/** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
|
|
2153
|
+
type ThesisID = string;
|
|
2154
|
+
type ThesisVisibility = 'public' | 'private' | 'paid';
|
|
2155
|
+
/** unknown: not judged; none: judged without a current long or short. */
|
|
2156
|
+
type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish' | 'none';
|
|
2157
|
+
interface ThesisEntityStance {
|
|
2158
|
+
entity_id: ThesisID;
|
|
2159
|
+
stance: ThesisAssetStance;
|
|
2160
|
+
/** Full direction in responses; stance reports none as unknown there. */
|
|
2161
|
+
direction?: ThesisAssetStance;
|
|
2107
2162
|
}
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2163
|
+
/** GraphQL direction, including NONE. */
|
|
2164
|
+
type ThesisDirection = 'UNKNOWN' | 'BULLISH' | 'BEARISH' | 'NONE';
|
|
2165
|
+
interface ThesisSelectedDirection {
|
|
2166
|
+
entityId: ThesisID;
|
|
2167
|
+
direction: ThesisDirection;
|
|
2111
2168
|
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2169
|
+
type ThesisReturnTracking = 'UNSET' | 'ON' | 'OFF';
|
|
2170
|
+
/** What publishing the selected entities with their directions would store. */
|
|
2171
|
+
interface ThesisReturnPreview {
|
|
2172
|
+
/** The Thesis's return switch now; UNSET for a new Thesis. */
|
|
2173
|
+
tracking: ThesisReturnTracking;
|
|
2174
|
+
/** Ask the author whether to keep the return on. */
|
|
2175
|
+
askSwitch: boolean;
|
|
2176
|
+
/** Directions publishing would store; UNKNOWN could not be judged. */
|
|
2177
|
+
directions: ThesisSelectedDirection[];
|
|
2178
|
+
/** Exits that keep the previous direction (last-leg rule). */
|
|
2179
|
+
keptEntityIds: ThesisID[];
|
|
2180
|
+
/** Publishing this draft fails with THESIS_RETURN_LAST_LEG. */
|
|
2181
|
+
lastLegRemoved: boolean;
|
|
2114
2182
|
}
|
|
2115
|
-
interface
|
|
2116
|
-
|
|
2117
|
-
|
|
2183
|
+
interface ThesisAssetCandidatesParams {
|
|
2184
|
+
/** Known catalog IDs to classify; with discover false, only these. */
|
|
2185
|
+
entityIds?: ThesisID[];
|
|
2186
|
+
/** The Thesis being updated: its current directions seed carried tickers. */
|
|
2187
|
+
thesisId?: ThesisID;
|
|
2188
|
+
/** False skips ticker discovery. Defaults to true. */
|
|
2189
|
+
discover?: boolean;
|
|
2118
2190
|
}
|
|
2119
|
-
interface
|
|
2120
|
-
|
|
2121
|
-
|
|
2191
|
+
interface ThesisAssetCandidate {
|
|
2192
|
+
entityId: ThesisID;
|
|
2193
|
+
ticker: string;
|
|
2194
|
+
name: string;
|
|
2195
|
+
kind: 'STOCK' | 'ETF' | 'CRYPTO' | 'INDEX';
|
|
2122
2196
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
*/
|
|
2130
|
-
declare class FollowsResource {
|
|
2131
|
-
private client;
|
|
2132
|
-
constructor(client: AlvaClient);
|
|
2133
|
-
/** Add tickers to the watchlist by exact symbol in one atomic batch. */
|
|
2134
|
-
addToWatchlist(params: WatchlistTickersParams): Promise<AddToWatchlistResult>;
|
|
2135
|
-
/** Remove tickers from the watchlist by exact symbol in one atomic batch. */
|
|
2136
|
-
removeFromWatchlist(params: WatchlistTickersParams): Promise<RemoveFromWatchlistResult>;
|
|
2137
|
-
/** One page of the watchlist, most recently added first. */
|
|
2138
|
-
watchlist(params?: FollowPageParams): Promise<WatchlistPage>;
|
|
2139
|
-
/** Search public profiles (Alva users and curated people). */
|
|
2140
|
-
searchProfiles(params: SearchProfilesParams): Promise<ProfilesPage>;
|
|
2141
|
-
/** One page of profiles the caller follows. */
|
|
2142
|
-
profiles(params?: FollowedProfilesParams): Promise<ProfilesPage>;
|
|
2143
|
-
/** Follow one profile. Idempotent. */
|
|
2144
|
-
followProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
|
|
2145
|
-
/** Unfollow one profile. Idempotent. */
|
|
2146
|
-
unfollowProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
|
|
2147
|
-
private profilesPage;
|
|
2148
|
-
private changeProfile;
|
|
2149
|
-
private changeWatchlist;
|
|
2150
|
-
private lookupTickers;
|
|
2151
|
-
private lookupTicker;
|
|
2197
|
+
interface ThesisAssetMention {
|
|
2198
|
+
quote: string;
|
|
2199
|
+
ticker: string;
|
|
2200
|
+
resolution: 'RESOLVED' | 'AMBIGUOUS' | 'UNRESOLVED';
|
|
2201
|
+
stance: 'UNKNOWN' | 'BULLISH' | 'BEARISH';
|
|
2202
|
+
candidates: ThesisAssetCandidate[];
|
|
2152
2203
|
}
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
*/
|
|
2158
|
-
declare class AlertsResource {
|
|
2159
|
-
private client;
|
|
2160
|
-
constructor(client: AlvaClient);
|
|
2161
|
-
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
2162
|
-
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
2163
|
-
enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
|
|
2164
|
-
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
2165
|
-
enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
|
|
2166
|
-
disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
|
|
2167
|
-
historyAutomation(params: NotificationListParams): Promise<FeedNotificationListResponse>;
|
|
2168
|
-
preferences(): Promise<NotificationPreferencesResponse>;
|
|
2169
|
-
updatePreference(params: NotificationPreferenceUpdateParams): Promise<NotificationPreferenceUpdateResponse>;
|
|
2204
|
+
interface ThesisAssetCandidatesResponse {
|
|
2205
|
+
mentions: ThesisAssetMention[];
|
|
2206
|
+
/** Null only from a server without the preview. */
|
|
2207
|
+
returnPreview: ThesisReturnPreview | null;
|
|
2170
2208
|
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
* unless the authenticated caller is that group's Alva admin.
|
|
2178
|
-
*/
|
|
2179
|
-
declare class ChannelGroupSubscriptionsResource {
|
|
2180
|
-
private client;
|
|
2181
|
-
constructor(client: AlvaClient);
|
|
2182
|
-
context(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionContextResponse>;
|
|
2183
|
-
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
2184
|
-
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
2185
|
-
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
2186
|
-
/**
|
|
2187
|
-
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
2188
|
-
* digest automation. Admin-gated: the authenticated caller must be that
|
|
2189
|
-
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
2190
|
-
* a `permalink` deep-link back to the original message for "jump to original".
|
|
2191
|
-
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
2192
|
-
*/
|
|
2193
|
-
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
2209
|
+
/** Canonical server-supported candidate rewrite operation. */
|
|
2210
|
+
type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
|
|
2211
|
+
interface ThesisMedia {
|
|
2212
|
+
type: 'image' | 'price_chart' | 'audio' | 'video';
|
|
2213
|
+
cover_url: string;
|
|
2214
|
+
url?: string | null;
|
|
2194
2215
|
}
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2216
|
+
interface Thesis {
|
|
2217
|
+
id: ThesisID;
|
|
2218
|
+
author_version_id: ThesisID;
|
|
2219
|
+
material_version_id: ThesisID;
|
|
2220
|
+
title: string;
|
|
2221
|
+
body: string;
|
|
2222
|
+
entity_ids: ThesisID[];
|
|
2223
|
+
entity_stances?: ThesisEntityStance[];
|
|
2224
|
+
visibility: ThesisVisibility;
|
|
2225
|
+
medias?: ThesisMedia[];
|
|
2226
|
+
closed: boolean;
|
|
2227
|
+
closing_note: string;
|
|
2228
|
+
author_kind: string;
|
|
2229
|
+
author_ref: string;
|
|
2230
|
+
archived: boolean;
|
|
2231
|
+
version_archived?: boolean;
|
|
2232
|
+
note?: string;
|
|
2233
|
+
/** `initial` for a Thesis's first publication, `material` for an Update. */
|
|
2234
|
+
change_kind?: string;
|
|
2200
2235
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
id: string | number;
|
|
2204
|
-
playbook_id: string | number;
|
|
2205
|
-
function_name: string;
|
|
2206
|
-
entry_script_path: string;
|
|
2207
|
-
created_at?: string;
|
|
2208
|
-
updated_at?: string;
|
|
2209
|
-
disabled?: boolean;
|
|
2210
|
-
params_schema?: string;
|
|
2211
|
-
allow_charges?: boolean;
|
|
2236
|
+
interface ThesisResponse {
|
|
2237
|
+
thesis: Thesis;
|
|
2212
2238
|
}
|
|
2213
|
-
interface
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
/**
|
|
2220
|
-
* Run invocations of this function under a restricted service-account
|
|
2221
|
-
* identity (an SA id owned by the caller) instead of the owner (#602).
|
|
2222
|
-
* Omitted ⇒ runs as the owner. A string: SA ids are snowflake int64s that
|
|
2223
|
-
* overflow JS number precision.
|
|
2224
|
-
*/
|
|
2225
|
-
run_as_user_id?: string;
|
|
2239
|
+
interface ThesisAuthor {
|
|
2240
|
+
id: ThesisID;
|
|
2241
|
+
kind: string;
|
|
2242
|
+
display_name: string;
|
|
2243
|
+
avatar_url: string;
|
|
2244
|
+
username: string;
|
|
2226
2245
|
}
|
|
2227
|
-
interface
|
|
2228
|
-
|
|
2246
|
+
interface ThesisEntity {
|
|
2247
|
+
id: ThesisID;
|
|
2248
|
+
ticker: string;
|
|
2249
|
+
name: string;
|
|
2250
|
+
icon_url: string;
|
|
2251
|
+
kind: string;
|
|
2229
2252
|
}
|
|
2230
|
-
interface
|
|
2231
|
-
|
|
2253
|
+
interface ThesisGetResponse extends ThesisResponse {
|
|
2254
|
+
author: ThesisAuthor;
|
|
2255
|
+
entities: ThesisEntity[];
|
|
2232
2256
|
}
|
|
2233
|
-
interface
|
|
2234
|
-
|
|
2257
|
+
interface ThesisResearchStatus {
|
|
2258
|
+
state: string;
|
|
2259
|
+
pending_work: number;
|
|
2260
|
+
read_complete: boolean;
|
|
2261
|
+
last_attempt_ms?: number;
|
|
2262
|
+
last_completed_ms?: number;
|
|
2235
2263
|
}
|
|
2236
|
-
interface
|
|
2237
|
-
|
|
2238
|
-
|
|
2264
|
+
interface ThesisSignalEvidenceExcerpt {
|
|
2265
|
+
text: string;
|
|
2266
|
+
omitted_before: boolean;
|
|
2267
|
+
omitted_after: boolean;
|
|
2239
2268
|
}
|
|
2240
|
-
interface
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2269
|
+
interface ThesisSignalSource {
|
|
2270
|
+
title: string;
|
|
2271
|
+
url?: string;
|
|
2272
|
+
published_at_ms?: number;
|
|
2244
2273
|
}
|
|
2245
|
-
interface
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2274
|
+
interface ThesisSignal {
|
|
2275
|
+
id: ThesisID;
|
|
2276
|
+
thesis_id: ThesisID;
|
|
2277
|
+
author_version_id: ThesisID;
|
|
2278
|
+
statement_snapshot: string;
|
|
2279
|
+
stance: string;
|
|
2280
|
+
explanation: string;
|
|
2281
|
+
information_kind: string;
|
|
2282
|
+
evidence_excerpt?: ThesisSignalEvidenceExcerpt;
|
|
2283
|
+
source: ThesisSignalSource;
|
|
2251
2284
|
}
|
|
2252
|
-
interface
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
amount: number;
|
|
2257
|
-
used: number;
|
|
2258
|
-
remaining: number;
|
|
2259
|
-
created_at_ms?: number;
|
|
2260
|
-
updated_at_ms?: number;
|
|
2285
|
+
interface ThesisSignalEntry {
|
|
2286
|
+
feed_entry_id: ThesisID;
|
|
2287
|
+
cursor: string;
|
|
2288
|
+
signal: ThesisSignal;
|
|
2261
2289
|
}
|
|
2262
|
-
interface
|
|
2263
|
-
|
|
2290
|
+
interface ListThesisSignalsParams {
|
|
2291
|
+
first?: number;
|
|
2292
|
+
cursor?: string;
|
|
2264
2293
|
}
|
|
2265
|
-
interface
|
|
2266
|
-
|
|
2294
|
+
interface ThesisSignalsResponse {
|
|
2295
|
+
research: ThesisResearchStatus;
|
|
2296
|
+
entries: ThesisSignalEntry[];
|
|
2297
|
+
next_cursor: string;
|
|
2267
2298
|
}
|
|
2268
|
-
interface
|
|
2269
|
-
|
|
2270
|
-
|
|
2299
|
+
interface CreateThesisParams {
|
|
2300
|
+
/** Public images already uploaded with the existing upload tool, in display order. */
|
|
2301
|
+
images?: string[];
|
|
2302
|
+
/** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
|
|
2303
|
+
request_id: string;
|
|
2304
|
+
body: string;
|
|
2305
|
+
title?: string;
|
|
2306
|
+
entity_ids?: ThesisID[];
|
|
2307
|
+
/** Author direction keyed by an entity ID also supplied in entity_ids. */
|
|
2308
|
+
entity_stances?: ThesisEntityStance[];
|
|
2309
|
+
/** Exact STOCK ticker symbols resolved by Backend during creation. */
|
|
2310
|
+
tickers?: string[];
|
|
2311
|
+
/** Omitted means public, as defined by the REST contract. */
|
|
2312
|
+
visibility?: 'public' | 'private';
|
|
2313
|
+
/** Thesis return switch; omitted keeps the default (on). */
|
|
2314
|
+
track_return?: boolean;
|
|
2271
2315
|
}
|
|
2272
|
-
interface
|
|
2273
|
-
|
|
2316
|
+
interface UpdateThesisParams {
|
|
2317
|
+
/** Full media replacement; pass current medias for a text-only update. */
|
|
2318
|
+
medias?: ThesisMedia[];
|
|
2319
|
+
/** Caller-supplied, stable non-zero UUID. Reuse it only to resolve ambiguity. */
|
|
2320
|
+
request_id: string;
|
|
2321
|
+
expected_author_version_id: ThesisID;
|
|
2322
|
+
body: string;
|
|
2323
|
+
title?: string;
|
|
2324
|
+
entity_ids?: ThesisID[];
|
|
2325
|
+
/** Full replacement: resubmit existing directions when only editing the body. */
|
|
2326
|
+
entity_stances?: ThesisEntityStance[];
|
|
2327
|
+
/** Required so an update cannot inadvertently publish a private thesis. */
|
|
2328
|
+
visibility: ThesisVisibility;
|
|
2329
|
+
archived?: boolean;
|
|
2330
|
+
note?: string;
|
|
2331
|
+
/** Thesis return switch; omitted keeps the current decision or default. */
|
|
2332
|
+
track_return?: boolean;
|
|
2274
2333
|
}
|
|
2275
|
-
interface
|
|
2276
|
-
|
|
2334
|
+
interface SetThesisArchivedParams {
|
|
2335
|
+
/** Caller-supplied, stable non-zero UUID for this archive transition. */
|
|
2336
|
+
request_id: string;
|
|
2337
|
+
archived: boolean;
|
|
2338
|
+
note?: string;
|
|
2277
2339
|
}
|
|
2278
|
-
interface
|
|
2279
|
-
|
|
2340
|
+
interface ThesisStarredResponse {
|
|
2341
|
+
thesis_id: ThesisID;
|
|
2342
|
+
star_count: number;
|
|
2343
|
+
is_starred: boolean;
|
|
2344
|
+
}
|
|
2345
|
+
interface ThesisSignalEnabledResponse {
|
|
2346
|
+
thesis_id: ThesisID;
|
|
2347
|
+
author_version_id: ThesisID;
|
|
2348
|
+
archived: boolean;
|
|
2349
|
+
research_paused: boolean;
|
|
2350
|
+
enabled: boolean;
|
|
2351
|
+
}
|
|
2352
|
+
interface SetThesisVisibilityParams {
|
|
2353
|
+
visibility: 'public' | 'private';
|
|
2354
|
+
}
|
|
2355
|
+
interface RewriteThesisParams {
|
|
2356
|
+
body: string;
|
|
2357
|
+
/** Omitted selects the canonical `reformat` mode. */
|
|
2358
|
+
mode?: ThesisRewriteMode;
|
|
2359
|
+
}
|
|
2360
|
+
interface RewriteThesisResponse {
|
|
2361
|
+
body: string;
|
|
2280
2362
|
}
|
|
2281
2363
|
/**
|
|
2282
|
-
*
|
|
2283
|
-
*
|
|
2364
|
+
* Thesis CRUD and explicit text rewriting. This resource never retries,
|
|
2365
|
+
* starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
|
|
2284
2366
|
*/
|
|
2285
|
-
declare class
|
|
2367
|
+
declare class ThesesResource {
|
|
2286
2368
|
private client;
|
|
2287
2369
|
constructor(client: AlvaClient);
|
|
2288
|
-
|
|
2289
|
-
list(params:
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2370
|
+
/** One visible page; no automatic pagination or content truncation. */
|
|
2371
|
+
list(params: ListThesesParams): Promise<ThesisListPage>;
|
|
2372
|
+
/** Related publications always use the current source version. */
|
|
2373
|
+
related(id: ThesisID, params?: ThesisPageParams): Promise<RelatedThesesPage>;
|
|
2374
|
+
assetCandidates(text: string, params?: ThesisAssetCandidatesParams): Promise<ThesisAssetCandidatesResponse>;
|
|
2375
|
+
/** The Thesis return of a Playbook's current publication; detail revalues it. */
|
|
2376
|
+
thesisReturn(id: ThesisID, params?: ThesisReturnParams): Promise<ThesisReturnResult>;
|
|
2377
|
+
/**
|
|
2378
|
+
* List every watchpoint of a Thesis (its current set, in number order): the
|
|
2379
|
+
* things the Thesis depends on, or that would show it right or wrong.
|
|
2380
|
+
*/
|
|
2381
|
+
watchpoints(id: ThesisID): Promise<ThesisWatchpointsResult>;
|
|
2382
|
+
create(params: CreateThesisParams): Promise<ThesisResponse>;
|
|
2383
|
+
get(id: ThesisID): Promise<ThesisGetResponse>;
|
|
2384
|
+
getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
|
|
2385
|
+
/** Lists reader-visible Updates, with editorial revisions folded together. */
|
|
2386
|
+
listUpdates(id: ThesisID, params?: {
|
|
2387
|
+
first?: number;
|
|
2388
|
+
cursor?: string;
|
|
2389
|
+
}): Promise<{
|
|
2390
|
+
versions: Thesis[];
|
|
2391
|
+
next_cursor: string;
|
|
2392
|
+
}>;
|
|
2393
|
+
signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
|
|
2394
|
+
update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
|
|
2395
|
+
/**
|
|
2396
|
+
* Archive or unarchive the current version without asking callers to resend
|
|
2397
|
+
* its body. Unarchiving publishes the current content as a new Update; an
|
|
2398
|
+
* archived Thesis takes no other Update.
|
|
2399
|
+
*/
|
|
2400
|
+
setArchived(id: ThesisID, params: SetThesisArchivedParams): Promise<ThesisResponse>;
|
|
2401
|
+
setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
|
|
2402
|
+
setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
|
|
2403
|
+
setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
|
|
2404
|
+
rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
|
|
2296
2405
|
}
|
|
2297
2406
|
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2407
|
+
/** Market entity kinds that can be added to the watchlist. */
|
|
2408
|
+
type WatchlistTickerKind = 'STOCK' | 'ETF' | 'CRYPTO';
|
|
2409
|
+
/** Public profile kinds: USER is an Alva user, PERSON a curated person. */
|
|
2410
|
+
type FollowProfileKind = 'USER' | 'PERSON';
|
|
2411
|
+
/** One requested symbol with an optional kind for just that symbol. */
|
|
2412
|
+
interface WatchlistTickerSpec {
|
|
2413
|
+
ticker: string;
|
|
2414
|
+
kind?: WatchlistTickerKind;
|
|
2304
2415
|
}
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
generatedAtMs: number;
|
|
2314
|
-
narrative: string;
|
|
2315
|
-
peers: string;
|
|
2416
|
+
interface WatchlistTickersParams {
|
|
2417
|
+
/**
|
|
2418
|
+
* 1-50 ticker symbols, matched exactly (case-insensitive). A spec's own
|
|
2419
|
+
* kind overrides `kind`, so one call can mix kinds (NVDA and BTC:crypto).
|
|
2420
|
+
*/
|
|
2421
|
+
tickers: Array<string | WatchlistTickerSpec>;
|
|
2422
|
+
/** Default kind for tickers without their own kind. */
|
|
2423
|
+
kind?: WatchlistTickerKind;
|
|
2316
2424
|
}
|
|
2317
|
-
interface
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2425
|
+
interface ResolvedTicker {
|
|
2426
|
+
/** The symbol as the caller supplied it, normalized to upper case. */
|
|
2427
|
+
input: string;
|
|
2428
|
+
entityId: string;
|
|
2429
|
+
ticker: string;
|
|
2430
|
+
name: string;
|
|
2431
|
+
kind: string;
|
|
2321
2432
|
}
|
|
2322
|
-
interface
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2433
|
+
interface UnresolvedTicker {
|
|
2434
|
+
input: string;
|
|
2435
|
+
/** The kind the lookup was restricted to, when one was given. */
|
|
2436
|
+
kind?: WatchlistTickerKind;
|
|
2437
|
+
/** NOT_FOUND or FAILED_PRECONDITION (several entities share the symbol). */
|
|
2438
|
+
code: string;
|
|
2439
|
+
message: string;
|
|
2326
2440
|
}
|
|
2327
|
-
interface
|
|
2328
|
-
|
|
2329
|
-
|
|
2441
|
+
interface AddToWatchlistResult {
|
|
2442
|
+
/** Tickers newly added to the watchlist by this call. */
|
|
2443
|
+
added: ResolvedTicker[];
|
|
2444
|
+
/** Tickers already in the watchlist; nothing was written for them. */
|
|
2445
|
+
unchanged: ResolvedTicker[];
|
|
2446
|
+
unresolved: UnresolvedTicker[];
|
|
2330
2447
|
}
|
|
2331
|
-
interface
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2448
|
+
interface RemoveFromWatchlistResult {
|
|
2449
|
+
/** Tickers removed from the watchlist by this call. */
|
|
2450
|
+
removed: ResolvedTicker[];
|
|
2451
|
+
/**
|
|
2452
|
+
* Tickers that were not in the watchlist. The removal is still recorded, so
|
|
2453
|
+
* holdings sync will not add them later.
|
|
2454
|
+
*/
|
|
2455
|
+
unchanged: ResolvedTicker[];
|
|
2456
|
+
unresolved: UnresolvedTicker[];
|
|
2335
2457
|
}
|
|
2336
|
-
interface
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
label: string;
|
|
2340
|
-
fiscalDateEnding: string;
|
|
2341
|
-
earningsDate: string;
|
|
2342
|
-
session: CompanyEarningsSession | null;
|
|
2343
|
-
status: CompanyEarningsStatus;
|
|
2344
|
-
isDefault: boolean;
|
|
2458
|
+
interface FollowPageParams {
|
|
2459
|
+
first?: number;
|
|
2460
|
+
after?: string;
|
|
2345
2461
|
}
|
|
2346
|
-
interface
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
unresolvedEventCount: number;
|
|
2462
|
+
interface FollowPageInfo {
|
|
2463
|
+
endCursor: string;
|
|
2464
|
+
hasNextPage: boolean;
|
|
2350
2465
|
}
|
|
2351
|
-
interface
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
investorFocus: string[];
|
|
2358
|
-
consensusAndGuidance: string | null;
|
|
2359
|
-
stockSetup: string | null;
|
|
2360
|
-
eventRisk: string | null;
|
|
2361
|
-
whatWouldDriveUpside: string | null;
|
|
2362
|
-
bullCase: string | null;
|
|
2363
|
-
baseCase: string | null;
|
|
2364
|
-
bearCase: string | null;
|
|
2365
|
-
keyAsymmetry: string | null;
|
|
2366
|
-
consensusN: number | null;
|
|
2367
|
-
consensusObservedAt: string | null;
|
|
2466
|
+
interface WatchlistTicker {
|
|
2467
|
+
entityId: string;
|
|
2468
|
+
ticker: string;
|
|
2469
|
+
name: string;
|
|
2470
|
+
kind: string;
|
|
2471
|
+
addedAtMs: number;
|
|
2368
2472
|
}
|
|
2369
|
-
interface
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2473
|
+
interface WatchlistPage {
|
|
2474
|
+
totalCount: number;
|
|
2475
|
+
tickers: WatchlistTicker[];
|
|
2476
|
+
pageInfo: FollowPageInfo;
|
|
2373
2477
|
}
|
|
2374
|
-
interface
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2478
|
+
interface FollowProfile {
|
|
2479
|
+
kind: FollowProfileKind;
|
|
2480
|
+
id: string;
|
|
2481
|
+
displayName: string;
|
|
2482
|
+
/** Alva username; USER profiles only. */
|
|
2483
|
+
username?: string;
|
|
2484
|
+
/** URL slug; PERSON profiles only. */
|
|
2485
|
+
slug?: string;
|
|
2486
|
+
/** X handle without "@"; PERSON profiles only, null when absent. */
|
|
2487
|
+
xHandle?: string | null;
|
|
2488
|
+
followersCount: number;
|
|
2489
|
+
/** Whether the caller follows this profile; null when unknown. */
|
|
2490
|
+
following: boolean | null;
|
|
2378
2491
|
}
|
|
2379
|
-
interface
|
|
2380
|
-
|
|
2381
|
-
|
|
2492
|
+
interface SearchProfilesParams {
|
|
2493
|
+
query: string;
|
|
2494
|
+
kind?: FollowProfileKind;
|
|
2495
|
+
first?: number;
|
|
2382
2496
|
}
|
|
2383
|
-
interface
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
publishedAtMs: number | null;
|
|
2387
|
-
sections: CompanyEarningsTranscriptSection[];
|
|
2497
|
+
interface ProfileRefParams {
|
|
2498
|
+
kind: FollowProfileKind;
|
|
2499
|
+
id: string;
|
|
2388
2500
|
}
|
|
2389
|
-
interface
|
|
2390
|
-
|
|
2391
|
-
asOf: string | null;
|
|
2392
|
-
reportedCurrency: string | null;
|
|
2393
|
-
evidenceState: 'INITIAL_PRINT' | 'POST_CALL' | null;
|
|
2394
|
-
openingQuote: string | null;
|
|
2395
|
-
openingQuoteSpeaker: string | null;
|
|
2396
|
-
openingQuoteTitle: string | null;
|
|
2397
|
-
openingQuoteNote: string | null;
|
|
2398
|
-
buriedSignals: string[];
|
|
2399
|
-
whatYouShouldKnow: string[];
|
|
2400
|
-
consensusN: number | null;
|
|
2401
|
-
consensusObservedAt: string | null;
|
|
2501
|
+
interface FollowedProfilesParams extends FollowPageParams {
|
|
2502
|
+
kind?: FollowProfileKind;
|
|
2402
2503
|
}
|
|
2403
|
-
interface
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
preEarningsAnalysis: CompanyPreEarningsAnalysis;
|
|
2407
|
-
earningsRelease: CompanyEarningsRelease;
|
|
2408
|
-
earningsTranscript: CompanyEarningsTranscript;
|
|
2409
|
-
postEarningsSummary: CompanyPostEarningsSummary;
|
|
2504
|
+
interface ProfilesPage {
|
|
2505
|
+
profiles: FollowProfile[];
|
|
2506
|
+
pageInfo: FollowPageInfo;
|
|
2410
2507
|
}
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
} | {
|
|
2417
|
-
ticker: string;
|
|
2418
|
-
event?: never;
|
|
2419
|
-
fiscalYear: number;
|
|
2420
|
-
fiscalQuarter: CompanyFiscalQuarter;
|
|
2421
|
-
};
|
|
2422
|
-
declare class MarketsResource {
|
|
2423
|
-
private client;
|
|
2424
|
-
constructor(client: AlvaClient);
|
|
2425
|
-
narrative(ticker: string): Promise<CompanyNarrativeContext>;
|
|
2426
|
-
earningsPeriods(ticker: string): Promise<CompanyEarningsCatalog>;
|
|
2427
|
-
earnings(params: CompanyEarningsParams): Promise<CompanyEarningsContext>;
|
|
2428
|
-
private selectPeriod;
|
|
2429
|
-
private notFound;
|
|
2430
|
-
private graphql;
|
|
2508
|
+
interface FollowingThesesParams {
|
|
2509
|
+
/** The previous page's `next_cursor`; omitted starts 24 hours back. */
|
|
2510
|
+
cursor?: string;
|
|
2511
|
+
/** 1-100; omitted reads 20. */
|
|
2512
|
+
first?: number;
|
|
2431
2513
|
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
interval: string;
|
|
2441
|
-
} | {
|
|
2442
|
-
kind: 'cron';
|
|
2443
|
-
expression: string;
|
|
2444
|
-
timezone: string;
|
|
2445
|
-
};
|
|
2446
|
-
interface AgentScheduleBounds {
|
|
2447
|
-
startsAt?: string;
|
|
2448
|
-
until?: string;
|
|
2449
|
-
maxOccurrences?: number;
|
|
2514
|
+
/** The author of a Thesis in the following feed. */
|
|
2515
|
+
interface FollowingThesisAuthor {
|
|
2516
|
+
kind: 'user' | 'person';
|
|
2517
|
+
/** Set for a user. */
|
|
2518
|
+
username?: string;
|
|
2519
|
+
/** Set for a person. */
|
|
2520
|
+
slug?: string;
|
|
2521
|
+
display_name: string;
|
|
2450
2522
|
}
|
|
2451
|
-
interface
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
text: string;
|
|
2456
|
-
status: AgentScheduleStatus;
|
|
2457
|
-
failure?: {
|
|
2458
|
-
code: AgentScheduleFailureCode;
|
|
2459
|
-
at?: string;
|
|
2460
|
-
};
|
|
2461
|
-
occurrencesUsed: number;
|
|
2462
|
-
nextFireAt?: string;
|
|
2463
|
-
createdAt: string;
|
|
2464
|
-
updatedAt: string;
|
|
2523
|
+
interface FollowingThesisItem {
|
|
2524
|
+
thesis: Thesis;
|
|
2525
|
+
/** Null when the author's profile could not be read. */
|
|
2526
|
+
author: FollowingThesisAuthor | null;
|
|
2465
2527
|
}
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2528
|
+
/**
|
|
2529
|
+
* Thesis Updates by the profiles the caller follows, oldest arrival first.
|
|
2530
|
+
* `next_cursor` is always set: pass it back as `cursor`, also after an empty
|
|
2531
|
+
* page, and page on while `has_more`.
|
|
2532
|
+
*/
|
|
2533
|
+
interface FollowingThesesPage {
|
|
2534
|
+
items: FollowingThesisItem[];
|
|
2535
|
+
next_cursor: string;
|
|
2536
|
+
has_more: boolean;
|
|
2537
|
+
}
|
|
2538
|
+
interface ProfileFollowResult {
|
|
2539
|
+
following: boolean;
|
|
2540
|
+
profile: FollowProfile | null;
|
|
2541
|
+
}
|
|
2542
|
+
/**
|
|
2543
|
+
* The Alva App's ticker watchlist (add/remove) and people follows (Alva users
|
|
2544
|
+
* and curated people). Gateway stores watchlist entries as ticker follows.
|
|
2545
|
+
* Playbook follows stay in `client.subscriptions`; Thesis bookmarks are
|
|
2546
|
+
* Thesis star/unstar. The user always comes from the API key; there is no
|
|
2547
|
+
* identity override.
|
|
2548
|
+
*/
|
|
2549
|
+
declare class FollowsResource {
|
|
2486
2550
|
private client;
|
|
2487
2551
|
constructor(client: AlvaClient);
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2552
|
+
/** Add tickers to the watchlist by exact symbol in one atomic batch. */
|
|
2553
|
+
addToWatchlist(params: WatchlistTickersParams): Promise<AddToWatchlistResult>;
|
|
2554
|
+
/** Remove tickers from the watchlist by exact symbol in one atomic batch. */
|
|
2555
|
+
removeFromWatchlist(params: WatchlistTickersParams): Promise<RemoveFromWatchlistResult>;
|
|
2556
|
+
/** One page of the watchlist, most recently added first. */
|
|
2557
|
+
watchlist(params?: FollowPageParams): Promise<WatchlistPage>;
|
|
2558
|
+
/** Search public profiles (Alva users and curated people). */
|
|
2559
|
+
searchProfiles(params: SearchProfilesParams): Promise<ProfilesPage>;
|
|
2560
|
+
/** One page of profiles the caller follows. */
|
|
2561
|
+
profiles(params?: FollowedProfilesParams): Promise<ProfilesPage>;
|
|
2562
|
+
/**
|
|
2563
|
+
* Thesis Updates by the profiles the caller follows, in the order they
|
|
2564
|
+
* reached Alva. Keep `next_cursor` to read only what is new next time.
|
|
2565
|
+
*/
|
|
2566
|
+
theses(params?: FollowingThesesParams): Promise<FollowingThesesPage>;
|
|
2567
|
+
/** Follow one profile. Idempotent. */
|
|
2568
|
+
followProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
|
|
2569
|
+
/** Unfollow one profile. Idempotent. */
|
|
2570
|
+
unfollowProfile(params: ProfileRefParams): Promise<ProfileFollowResult>;
|
|
2571
|
+
private profilesPage;
|
|
2572
|
+
private changeProfile;
|
|
2573
|
+
private changeWatchlist;
|
|
2574
|
+
private lookupTickers;
|
|
2575
|
+
private lookupTicker;
|
|
2498
2576
|
}
|
|
2499
2577
|
|
|
2500
2578
|
/**
|
|
2501
|
-
*
|
|
2502
|
-
*
|
|
2503
|
-
* tool; the Backend resolves it to the caller's ready steward binding and
|
|
2504
|
-
* scopes every delivery to that binding's Channel.
|
|
2579
|
+
* Product-facing alert API. The current transport still calls the legacy
|
|
2580
|
+
* subscription and notification-history endpoints.
|
|
2505
2581
|
*/
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2582
|
+
declare class AlertsResource {
|
|
2583
|
+
private client;
|
|
2584
|
+
constructor(client: AlvaClient);
|
|
2585
|
+
list(params?: PushSubscriptionListParams): Promise<PushSubscriptionListResponse>;
|
|
2586
|
+
follows(params?: FollowsListParams): Promise<FollowsListResponse>;
|
|
2587
|
+
enableAutomation(params: SubscribeFeedParams): Promise<SubscribeFeedResponse>;
|
|
2588
|
+
disableAutomation(params: PushSubscriptionFeedParams): Promise<UnsubscribeResponse>;
|
|
2589
|
+
enableBatch(params: SubscribeBatchParams): Promise<SubscribeBatchResponse>;
|
|
2590
|
+
disableBatch(params: UnsubscribeBatchParams): Promise<UnsubscribeBatchResponse>;
|
|
2591
|
+
historyAutomation(params: NotificationListParams): Promise<FeedNotificationListResponse>;
|
|
2592
|
+
preferences(): Promise<NotificationPreferencesResponse>;
|
|
2593
|
+
updatePreference(params: NotificationPreferenceUpdateParams): Promise<NotificationPreferenceUpdateResponse>;
|
|
2509
2594
|
}
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2595
|
+
|
|
2596
|
+
/**
|
|
2597
|
+
* Group push subscriptions for an external channel session.
|
|
2598
|
+
*
|
|
2599
|
+
* These APIs subscribe the Telegram/Discord group attached to `session_id`
|
|
2600
|
+
* to feed push events the group admin may read. Mutations are idempotent no-ops
|
|
2601
|
+
* unless the authenticated caller is that group's Alva admin.
|
|
2602
|
+
*/
|
|
2603
|
+
declare class ChannelGroupSubscriptionsResource {
|
|
2604
|
+
private client;
|
|
2605
|
+
constructor(client: AlvaClient);
|
|
2606
|
+
context(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionContextResponse>;
|
|
2607
|
+
list(params: ChannelGroupSubscriptionSessionParams): Promise<ChannelGroupSubscriptionListResponse>;
|
|
2608
|
+
subscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
2609
|
+
unsubscribe(params: ChannelGroupSubscriptionMutationParams): Promise<ChannelGroupSubscriptionMutationResponse>;
|
|
2610
|
+
/**
|
|
2611
|
+
* Read a group's buffered chat messages in a time window, for the group-chat
|
|
2612
|
+
* digest automation. Admin-gated: the authenticated caller must be that
|
|
2613
|
+
* group's Alva admin (a digest feed runs as that admin). Each message carries
|
|
2614
|
+
* a `permalink` deep-link back to the original message for "jump to original".
|
|
2615
|
+
* `from_micros`/`to_micros` are message-origin timestamps in microseconds.
|
|
2616
|
+
*/
|
|
2617
|
+
getGroupChatHistory(params: ChannelGroupHistoryParams): Promise<ChannelGroupHistoryResponse>;
|
|
2514
2618
|
}
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2619
|
+
|
|
2620
|
+
declare class FeedbackResource {
|
|
2621
|
+
private client;
|
|
2622
|
+
constructor(client: AlvaClient);
|
|
2623
|
+
submit(params: SubmitFeedbackRequest): Promise<SubmitFeedbackResponse>;
|
|
2519
2624
|
}
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2625
|
+
|
|
2626
|
+
interface PlaybookFunction {
|
|
2627
|
+
id: string | number;
|
|
2628
|
+
playbook_id: string | number;
|
|
2629
|
+
function_name: string;
|
|
2630
|
+
entry_script_path: string;
|
|
2631
|
+
created_at?: string;
|
|
2632
|
+
updated_at?: string;
|
|
2633
|
+
disabled?: boolean;
|
|
2634
|
+
params_schema?: string;
|
|
2635
|
+
allow_charges?: boolean;
|
|
2525
2636
|
}
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
/**
|
|
2533
|
-
|
|
2534
|
-
|
|
2637
|
+
interface RegisterFunctionParams {
|
|
2638
|
+
playbook_id: number;
|
|
2639
|
+
function_name: string;
|
|
2640
|
+
entry_script_path: string;
|
|
2641
|
+
params_schema?: string;
|
|
2642
|
+
allow_charges?: boolean;
|
|
2643
|
+
/**
|
|
2644
|
+
* Run invocations of this function under a restricted service-account
|
|
2645
|
+
* identity (an SA id owned by the caller) instead of the owner (#602).
|
|
2646
|
+
* Omitted ⇒ runs as the owner. A string: SA ids are snowflake int64s that
|
|
2647
|
+
* overflow JS number precision.
|
|
2648
|
+
*/
|
|
2649
|
+
run_as_user_id?: string;
|
|
2535
2650
|
}
|
|
2536
|
-
interface
|
|
2537
|
-
|
|
2538
|
-
after?: string;
|
|
2651
|
+
interface RegisterFunctionResponse {
|
|
2652
|
+
function?: PlaybookFunction;
|
|
2539
2653
|
}
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
};
|
|
2543
|
-
interface StewardBriefedParams extends StewardTarget {
|
|
2544
|
-
deliveryIds: string[];
|
|
2545
|
-
digestRunId: string;
|
|
2654
|
+
interface ListFunctionsParams {
|
|
2655
|
+
playbook_id: number;
|
|
2546
2656
|
}
|
|
2547
|
-
interface
|
|
2548
|
-
|
|
2657
|
+
interface ListFunctionsResponse {
|
|
2658
|
+
functions: PlaybookFunction[];
|
|
2549
2659
|
}
|
|
2550
|
-
interface
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
/** Omit when complete reviewed coverage produces no useful Brief content. */
|
|
2554
|
-
body?: string;
|
|
2660
|
+
interface DeleteFunctionParams {
|
|
2661
|
+
playbook_id: number;
|
|
2662
|
+
function_name: string;
|
|
2555
2663
|
}
|
|
2556
|
-
interface
|
|
2557
|
-
|
|
2664
|
+
interface InvokeFunctionParams {
|
|
2665
|
+
playbook_id: number;
|
|
2666
|
+
function_name: string;
|
|
2667
|
+
parameters?: unknown;
|
|
2558
2668
|
}
|
|
2559
|
-
interface
|
|
2560
|
-
|
|
2561
|
-
|
|
2669
|
+
interface InvokeFunctionResponse<TResult = unknown> {
|
|
2670
|
+
result: TResult;
|
|
2671
|
+
logs: string;
|
|
2672
|
+
credits_used_total: number;
|
|
2673
|
+
credits_charged_owner: number;
|
|
2674
|
+
credits_charged_consumer: number;
|
|
2562
2675
|
}
|
|
2563
|
-
interface
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2676
|
+
interface CreditAllowance {
|
|
2677
|
+
id: string | number;
|
|
2678
|
+
consumer_uid: string | number;
|
|
2679
|
+
playbook_id: string | number;
|
|
2680
|
+
amount: number;
|
|
2681
|
+
used: number;
|
|
2682
|
+
remaining: number;
|
|
2683
|
+
created_at_ms?: number;
|
|
2684
|
+
updated_at_ms?: number;
|
|
2567
2685
|
}
|
|
2568
|
-
interface
|
|
2569
|
-
|
|
2570
|
-
feedEntryId: string;
|
|
2571
|
-
source: {
|
|
2572
|
-
kind: StewardSourceKind;
|
|
2573
|
-
id: string;
|
|
2574
|
-
};
|
|
2575
|
-
decisionReason: string;
|
|
2576
|
-
consumedAtMs: number;
|
|
2577
|
-
alertSnapshot?: string | null;
|
|
2686
|
+
interface GetAllowanceParams {
|
|
2687
|
+
playbook_id: number;
|
|
2578
2688
|
}
|
|
2579
|
-
interface
|
|
2580
|
-
|
|
2581
|
-
/** Cursor for the next page; `null` when this page was the last. */
|
|
2582
|
-
nextCursor: string | null;
|
|
2583
|
-
/** The window every page of this Brief was read with. */
|
|
2584
|
-
windowSinceMs: number;
|
|
2585
|
-
windowUntilMs: number;
|
|
2689
|
+
interface ListAllowancesResponse {
|
|
2690
|
+
allowances: CreditAllowance[];
|
|
2586
2691
|
}
|
|
2587
|
-
interface
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
windowSinceMs: number;
|
|
2591
|
-
windowUntilMs: number;
|
|
2692
|
+
interface CreateAllowanceParams {
|
|
2693
|
+
playbook_id: number;
|
|
2694
|
+
amount: number;
|
|
2592
2695
|
}
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
digestRunId: string;
|
|
2596
|
-
state: StewardDigestRunState;
|
|
2597
|
-
scheduleId: string;
|
|
2598
|
-
scheduleVersion: number;
|
|
2599
|
-
occurrenceIndex: number;
|
|
2600
|
-
windowSinceMs: number;
|
|
2601
|
-
windowUntilMs: number;
|
|
2602
|
-
scanCompletedAtMs?: number | null;
|
|
2603
|
-
bodySha256?: string | null;
|
|
2604
|
-
coverageSha256?: string | null;
|
|
2605
|
-
channelMessageId?: string | null;
|
|
2606
|
-
attempts: number;
|
|
2607
|
-
lastError: string;
|
|
2608
|
-
startedAtMs?: number | null;
|
|
2609
|
-
completedAtMs?: number | null;
|
|
2610
|
-
sendUncertainAtMs?: number | null;
|
|
2696
|
+
interface CreateAllowanceResponse {
|
|
2697
|
+
allowance: CreditAllowance;
|
|
2611
2698
|
}
|
|
2612
|
-
|
|
2699
|
+
interface RevokeAllowanceParams {
|
|
2700
|
+
playbook_id: number;
|
|
2701
|
+
}
|
|
2702
|
+
interface RevokeAllowanceResponse {
|
|
2703
|
+
ok: boolean;
|
|
2704
|
+
}
|
|
2705
|
+
/**
|
|
2706
|
+
* Playbook function management. These functions are registered by a playbook
|
|
2707
|
+
* creator and invoked by released playbook UI through the browser UDF runtime.
|
|
2708
|
+
*/
|
|
2709
|
+
declare class FunctionsResource {
|
|
2613
2710
|
private client;
|
|
2614
2711
|
constructor(client: AlvaClient);
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
pendingPage(params: StewardPendingPageParams): Promise<StewardPendingPage>;
|
|
2624
|
-
private pendingPageWithRetry;
|
|
2625
|
-
briefed(params: StewardBriefedParams): Promise<{
|
|
2626
|
-
ok: true;
|
|
2627
|
-
}>;
|
|
2628
|
-
digestRun(params: StewardDigestRunParams): Promise<StewardDigestRun>;
|
|
2629
|
-
digestRunPending(params: StewardDigestRunParams): Promise<StewardPendingItem[]>;
|
|
2630
|
-
sendDigestRun(params: StewardSendDigestRunParams): Promise<StewardDigestRun>;
|
|
2631
|
-
private graphql;
|
|
2712
|
+
register(params: RegisterFunctionParams): Promise<RegisterFunctionResponse>;
|
|
2713
|
+
list(params: ListFunctionsParams): Promise<ListFunctionsResponse>;
|
|
2714
|
+
delete(params: DeleteFunctionParams): Promise<void>;
|
|
2715
|
+
invoke<TResult = unknown>(params: InvokeFunctionParams): Promise<InvokeFunctionResponse<TResult>>;
|
|
2716
|
+
getAllowance(params: GetAllowanceParams): Promise<CreditAllowance | null>;
|
|
2717
|
+
listAllowances(): Promise<ListAllowancesResponse>;
|
|
2718
|
+
createAllowance(params: CreateAllowanceParams): Promise<CreateAllowanceResponse>;
|
|
2719
|
+
revokeAllowance(params: RevokeAllowanceParams): Promise<RevokeAllowanceResponse>;
|
|
2632
2720
|
}
|
|
2633
2721
|
|
|
2634
|
-
|
|
2635
|
-
/** Underlying ticker returned by the market catalog. */
|
|
2636
|
-
symbol: string;
|
|
2637
|
-
/** Complete canonical identity used by OHLCV, Altra, and orders. */
|
|
2638
|
-
tradingPair: string;
|
|
2639
|
-
market: string;
|
|
2640
|
-
instrumentType: string;
|
|
2641
|
-
underlyingType?: string;
|
|
2642
|
-
quote: string;
|
|
2643
|
-
type?: string;
|
|
2644
|
-
description?: string;
|
|
2645
|
-
feeRate?: number;
|
|
2646
|
-
symbolIconUrl?: string;
|
|
2647
|
-
}
|
|
2648
|
-
interface TradingPairSearchParams {
|
|
2649
|
-
symbol: string;
|
|
2650
|
-
market?: string;
|
|
2651
|
-
instrumentType?: string;
|
|
2652
|
-
underlyingType?: string;
|
|
2653
|
-
quote?: string;
|
|
2654
|
-
limit?: number;
|
|
2655
|
-
}
|
|
2656
|
-
interface TradingPairSearchResponse {
|
|
2657
|
-
query: string;
|
|
2658
|
-
candidates: TradingPairCandidate[];
|
|
2659
|
-
truncated?: boolean;
|
|
2660
|
-
}
|
|
2661
|
-
type TradingPairResolveFilters = Omit<TradingPairSearchParams, 'symbol' | 'limit'>;
|
|
2662
|
-
declare class TradingPairsResource {
|
|
2722
|
+
declare class CreditsResource {
|
|
2663
2723
|
private client;
|
|
2664
2724
|
constructor(client: AlvaClient);
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
} & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
|
|
2725
|
+
wallet(): Promise<CreditWallet>;
|
|
2726
|
+
items(params: CreditWalletItemsParams): Promise<CreditWalletItemsResponse>;
|
|
2727
|
+
private graphql;
|
|
2669
2728
|
}
|
|
2670
2729
|
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2730
|
+
type CompanyFiscalQuarter = 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
2731
|
+
type CompanyEarningsEvent = 'latest-completed' | 'next-confirmed';
|
|
2732
|
+
type CompanyEarningsStatus = 'UPCOMING' | 'COMPLETED';
|
|
2733
|
+
type CompanyEarningsContentStatus = 'AVAILABLE' | 'NOT_AVAILABLE_YET' | 'UNAVAILABLE';
|
|
2734
|
+
type CompanyEarningsSession = 'BEFORE_MARKET_OPEN' | 'AFTER_MARKET_CLOSE';
|
|
2735
|
+
interface CompanyNarrative {
|
|
2736
|
+
asOf: string;
|
|
2737
|
+
generatedAtMs: number;
|
|
2738
|
+
narrative: string;
|
|
2739
|
+
peers: string;
|
|
2676
2740
|
}
|
|
2677
|
-
interface
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
personName?: string;
|
|
2682
|
-
/** Exact PublicUser username, e.g. a publisher's `username`; not a display name. */
|
|
2683
|
-
user?: string;
|
|
2684
|
-
/** Catalog ticker or alias; resolves only a unique entity. */
|
|
2685
|
-
ticker?: string;
|
|
2686
|
-
entityId?: string;
|
|
2687
|
-
/** Author lists only; omitted means ACTIVE. */
|
|
2688
|
-
status?: 'ACTIVE' | 'ARCHIVED';
|
|
2741
|
+
interface CompanyNarrativeSnapshot {
|
|
2742
|
+
asOf: string;
|
|
2743
|
+
generatedAtMs: number;
|
|
2744
|
+
narrative: string;
|
|
2689
2745
|
}
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
displayName: string;
|
|
2695
|
-
bio: string;
|
|
2696
|
-
} | {
|
|
2697
|
-
__typename: 'PublicUser';
|
|
2698
|
-
id: string;
|
|
2699
|
-
username: string;
|
|
2700
|
-
displayName: string;
|
|
2701
|
-
bio: string;
|
|
2702
|
-
} | {
|
|
2703
|
-
__typename: 'Entity';
|
|
2704
|
-
id: string;
|
|
2705
|
-
ticker: string;
|
|
2706
|
-
name: string;
|
|
2707
|
-
kind: string;
|
|
2708
|
-
assetClass: string;
|
|
2709
|
-
venue: {
|
|
2710
|
-
id: string;
|
|
2711
|
-
name: string;
|
|
2712
|
-
} | null;
|
|
2713
|
-
};
|
|
2714
|
-
/**
|
|
2715
|
-
* `nextCursor` is the only continuation: pass it as `cursor`, and stop when it
|
|
2716
|
-
* is null. A page can be empty while `nextCursor` is still set.
|
|
2717
|
-
*/
|
|
2718
|
-
interface ThesisListPage {
|
|
2719
|
-
scope: ThesisReadScope;
|
|
2720
|
-
edges: {
|
|
2721
|
-
cursor: string;
|
|
2722
|
-
node: {
|
|
2723
|
-
/** Internal ID accepted by get/version/signals/related. */
|
|
2724
|
-
playbookId: string;
|
|
2725
|
-
/** Null when the author list has no readable publication snapshot. */
|
|
2726
|
-
publication: ThesisPublicationSummary | null;
|
|
2727
|
-
};
|
|
2728
|
-
}[];
|
|
2729
|
-
nextCursor: string | null;
|
|
2746
|
+
interface CompanyNarrativeChangeLogEntry {
|
|
2747
|
+
asOf: string;
|
|
2748
|
+
generatedAtMs: number;
|
|
2749
|
+
narrativeChangeLog: string | null;
|
|
2730
2750
|
}
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
state: 'GENERATING' | 'READY' | 'FAILED';
|
|
2735
|
-
edges: {
|
|
2736
|
-
cursor: string;
|
|
2737
|
-
node: {
|
|
2738
|
-
itemKey: string;
|
|
2739
|
-
/** Relatedness, not quality or support. */
|
|
2740
|
-
score: number;
|
|
2741
|
-
publication: ThesisPublicationSummary;
|
|
2742
|
-
};
|
|
2743
|
-
}[];
|
|
2744
|
-
nextCursor: string | null;
|
|
2751
|
+
interface CompanyNarrativeHistory {
|
|
2752
|
+
snapshots: CompanyNarrativeSnapshot[];
|
|
2753
|
+
changeLog: CompanyNarrativeChangeLogEntry[];
|
|
2745
2754
|
}
|
|
2746
|
-
interface
|
|
2747
|
-
|
|
2748
|
-
|
|
2755
|
+
interface CompanyNarrativeContext {
|
|
2756
|
+
ticker: string;
|
|
2757
|
+
current: CompanyNarrative | null;
|
|
2758
|
+
history: CompanyNarrativeHistory | null;
|
|
2749
2759
|
}
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
end: 'PENDING' | 'NEXT_UPDATE' | 'LATEST';
|
|
2760
|
-
positionReturn: number;
|
|
2761
|
-
currency: string;
|
|
2760
|
+
interface CompanyEarningsPeriod {
|
|
2761
|
+
fiscalYear: number;
|
|
2762
|
+
fiscalQuarter: CompanyFiscalQuarter;
|
|
2763
|
+
label: string;
|
|
2764
|
+
fiscalDateEnding: string;
|
|
2765
|
+
earningsDate: string;
|
|
2766
|
+
session: CompanyEarningsSession | null;
|
|
2767
|
+
status: CompanyEarningsStatus;
|
|
2768
|
+
isDefault: boolean;
|
|
2762
2769
|
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
startValue: number;
|
|
2768
|
-
updateReturn: number | null;
|
|
2769
|
-
positions: ThesisPositionReturn[];
|
|
2770
|
-
}
|
|
2771
|
-
/** The Thesis return; values are fractions (0.05 is +5%). */
|
|
2772
|
-
interface ThesisReturnValue {
|
|
2773
|
-
live: boolean;
|
|
2774
|
-
value: number;
|
|
2775
|
-
firstFillAtMs: number | null;
|
|
2776
|
-
pricedAtMs: number | null;
|
|
2777
|
-
stale: boolean;
|
|
2778
|
-
computedAtMs: number;
|
|
2779
|
-
updates: ThesisUpdateReturn[];
|
|
2780
|
-
}
|
|
2781
|
-
interface ThesisReturnResult {
|
|
2782
|
-
playbookId: string;
|
|
2783
|
-
/** UNSET, ON or OFF; null when the current publication is not readable. */
|
|
2784
|
-
returnTracking: 'UNSET' | 'ON' | 'OFF' | null;
|
|
2785
|
-
/** Null when the Thesis is not tracked. */
|
|
2786
|
-
thesisReturn: ThesisReturnValue | null;
|
|
2770
|
+
interface CompanyEarningsCatalog {
|
|
2771
|
+
periods: CompanyEarningsPeriod[];
|
|
2772
|
+
defaultPeriod: CompanyEarningsPeriod | null;
|
|
2773
|
+
unresolvedEventCount: number;
|
|
2787
2774
|
}
|
|
2788
|
-
interface
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2775
|
+
interface CompanyPreEarningsAnalysis {
|
|
2776
|
+
status: CompanyEarningsContentStatus;
|
|
2777
|
+
asOf: string | null;
|
|
2778
|
+
summary: string | null;
|
|
2779
|
+
whatWouldChangeView: string | null;
|
|
2780
|
+
mainQuestion: string | null;
|
|
2781
|
+
investorFocus: string[];
|
|
2782
|
+
consensusAndGuidance: string | null;
|
|
2783
|
+
stockSetup: string | null;
|
|
2784
|
+
eventRisk: string | null;
|
|
2785
|
+
whatWouldDriveUpside: string | null;
|
|
2786
|
+
bullCase: string | null;
|
|
2787
|
+
baseCase: string | null;
|
|
2788
|
+
bearCase: string | null;
|
|
2789
|
+
keyAsymmetry: string | null;
|
|
2790
|
+
consensusN: number | null;
|
|
2791
|
+
consensusObservedAt: string | null;
|
|
2798
2792
|
}
|
|
2799
|
-
interface
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2793
|
+
interface CompanyEarningsRelease {
|
|
2794
|
+
status: CompanyEarningsContentStatus;
|
|
2795
|
+
releaseDate: string | null;
|
|
2796
|
+
url: string | null;
|
|
2803
2797
|
}
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
/** unknown: not judged; none: judged without a current long or short. */
|
|
2809
|
-
type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish' | 'none';
|
|
2810
|
-
interface ThesisEntityStance {
|
|
2811
|
-
entity_id: ThesisID;
|
|
2812
|
-
stance: ThesisAssetStance;
|
|
2813
|
-
/** Full direction in responses; stance reports none as unknown there. */
|
|
2814
|
-
direction?: ThesisAssetStance;
|
|
2798
|
+
interface CompanyEarningsTranscriptEntry {
|
|
2799
|
+
speaker: string;
|
|
2800
|
+
title: string;
|
|
2801
|
+
content: string;
|
|
2815
2802
|
}
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
entityId: ThesisID;
|
|
2820
|
-
direction: ThesisDirection;
|
|
2803
|
+
interface CompanyEarningsTranscriptSection {
|
|
2804
|
+
name: string;
|
|
2805
|
+
entries: CompanyEarningsTranscriptEntry[];
|
|
2821
2806
|
}
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
/** Ask the author whether to keep the return on. */
|
|
2828
|
-
askSwitch: boolean;
|
|
2829
|
-
/** Directions publishing would store; UNKNOWN could not be judged. */
|
|
2830
|
-
directions: ThesisSelectedDirection[];
|
|
2831
|
-
/** Exits that keep the previous direction (last-leg rule). */
|
|
2832
|
-
keptEntityIds: ThesisID[];
|
|
2833
|
-
/** Publishing this draft fails with THESIS_RETURN_LAST_LEG. */
|
|
2834
|
-
lastLegRemoved: boolean;
|
|
2807
|
+
interface CompanyEarningsTranscript {
|
|
2808
|
+
status: CompanyEarningsContentStatus;
|
|
2809
|
+
date: string | null;
|
|
2810
|
+
publishedAtMs: number | null;
|
|
2811
|
+
sections: CompanyEarningsTranscriptSection[];
|
|
2835
2812
|
}
|
|
2836
|
-
interface
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2813
|
+
interface CompanyPostEarningsSummary {
|
|
2814
|
+
status: CompanyEarningsContentStatus;
|
|
2815
|
+
asOf: string | null;
|
|
2816
|
+
reportedCurrency: string | null;
|
|
2817
|
+
evidenceState: 'INITIAL_PRINT' | 'POST_CALL' | null;
|
|
2818
|
+
openingQuote: string | null;
|
|
2819
|
+
openingQuoteSpeaker: string | null;
|
|
2820
|
+
openingQuoteTitle: string | null;
|
|
2821
|
+
openingQuoteNote: string | null;
|
|
2822
|
+
buriedSignals: string[];
|
|
2823
|
+
whatYouShouldKnow: string[];
|
|
2824
|
+
consensusN: number | null;
|
|
2825
|
+
consensusObservedAt: string | null;
|
|
2843
2826
|
}
|
|
2844
|
-
interface
|
|
2845
|
-
entityId: ThesisID;
|
|
2827
|
+
interface CompanyEarningsContext {
|
|
2846
2828
|
ticker: string;
|
|
2847
|
-
|
|
2848
|
-
|
|
2829
|
+
period: CompanyEarningsPeriod;
|
|
2830
|
+
preEarningsAnalysis: CompanyPreEarningsAnalysis;
|
|
2831
|
+
earningsRelease: CompanyEarningsRelease;
|
|
2832
|
+
earningsTranscript: CompanyEarningsTranscript;
|
|
2833
|
+
postEarningsSummary: CompanyPostEarningsSummary;
|
|
2849
2834
|
}
|
|
2850
|
-
|
|
2851
|
-
quote: string;
|
|
2835
|
+
type CompanyEarningsParams = {
|
|
2852
2836
|
ticker: string;
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2837
|
+
event?: CompanyEarningsEvent;
|
|
2838
|
+
fiscalYear?: never;
|
|
2839
|
+
fiscalQuarter?: never;
|
|
2840
|
+
} | {
|
|
2841
|
+
ticker: string;
|
|
2842
|
+
event?: never;
|
|
2843
|
+
fiscalYear: number;
|
|
2844
|
+
fiscalQuarter: CompanyFiscalQuarter;
|
|
2845
|
+
};
|
|
2846
|
+
declare class MarketsResource {
|
|
2847
|
+
private client;
|
|
2848
|
+
constructor(client: AlvaClient);
|
|
2849
|
+
narrative(ticker: string): Promise<CompanyNarrativeContext>;
|
|
2850
|
+
earningsPeriods(ticker: string): Promise<CompanyEarningsCatalog>;
|
|
2851
|
+
earnings(params: CompanyEarningsParams): Promise<CompanyEarningsContext>;
|
|
2852
|
+
private selectPeriod;
|
|
2853
|
+
private notFound;
|
|
2854
|
+
private graphql;
|
|
2856
2855
|
}
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2856
|
+
|
|
2857
|
+
type AgentScheduleStatus = 'active' | 'paused' | 'completed' | 'failed';
|
|
2858
|
+
type AgentScheduleFailureCode = 'target_invalid' | 'delivery_exhausted' | 'payload_conflict';
|
|
2859
|
+
type AgentScheduleRule = {
|
|
2860
|
+
kind: 'at';
|
|
2861
|
+
timestamp: string;
|
|
2862
|
+
} | {
|
|
2863
|
+
kind: 'every';
|
|
2864
|
+
interval: string;
|
|
2865
|
+
} | {
|
|
2866
|
+
kind: 'cron';
|
|
2867
|
+
expression: string;
|
|
2868
|
+
timezone: string;
|
|
2869
|
+
};
|
|
2870
|
+
interface AgentScheduleBounds {
|
|
2871
|
+
startsAt?: string;
|
|
2872
|
+
until?: string;
|
|
2873
|
+
maxOccurrences?: number;
|
|
2861
2874
|
}
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2875
|
+
interface AgentSchedule {
|
|
2876
|
+
name: string;
|
|
2877
|
+
rule: AgentScheduleRule;
|
|
2878
|
+
bounds: AgentScheduleBounds;
|
|
2879
|
+
text: string;
|
|
2880
|
+
status: AgentScheduleStatus;
|
|
2881
|
+
failure?: {
|
|
2882
|
+
code: AgentScheduleFailureCode;
|
|
2883
|
+
at?: string;
|
|
2884
|
+
};
|
|
2885
|
+
occurrencesUsed: number;
|
|
2886
|
+
nextFireAt?: string;
|
|
2887
|
+
createdAt: string;
|
|
2888
|
+
updatedAt: string;
|
|
2868
2889
|
}
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2890
|
+
type AgentScheduleTarget = {
|
|
2891
|
+
channelId: string | number;
|
|
2892
|
+
inboxPath?: never;
|
|
2893
|
+
} | {
|
|
2894
|
+
inboxPath: string;
|
|
2895
|
+
channelId?: never;
|
|
2896
|
+
};
|
|
2897
|
+
type PutAgentScheduleParams = AgentScheduleTarget & {
|
|
2898
|
+
name: string;
|
|
2899
|
+
rule: AgentScheduleRule | {
|
|
2900
|
+
kind: 'after';
|
|
2901
|
+
duration: string;
|
|
2902
|
+
};
|
|
2903
|
+
bounds?: AgentScheduleBounds;
|
|
2904
|
+
text: string;
|
|
2905
|
+
};
|
|
2906
|
+
type ManageAgentScheduleParams = AgentScheduleTarget & {
|
|
2907
|
+
name: string;
|
|
2908
|
+
};
|
|
2909
|
+
declare class SchedulesResource {
|
|
2910
|
+
private client;
|
|
2911
|
+
constructor(client: AlvaClient);
|
|
2912
|
+
list(params: AgentScheduleTarget): Promise<AgentSchedule[]>;
|
|
2913
|
+
put(params: PutAgentScheduleParams): Promise<AgentSchedule>;
|
|
2914
|
+
pause(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
|
|
2915
|
+
resume(params: ManageAgentScheduleParams): Promise<AgentSchedule>;
|
|
2916
|
+
delete(params: ManageAgentScheduleParams): Promise<void>;
|
|
2917
|
+
/** Resolve the authenticated viewer's unique Agent Channel for CLI defaults. */
|
|
2918
|
+
agentChannelId(): Promise<string>;
|
|
2919
|
+
private manage;
|
|
2920
|
+
private update;
|
|
2921
|
+
private graphql;
|
|
2886
2922
|
}
|
|
2887
|
-
|
|
2888
|
-
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Push steward tool commands (mono-meta #935). Every call names the steward by
|
|
2926
|
+
* its own Session Inbox path, which the host supplies to the embedded `alva`
|
|
2927
|
+
* tool; the Backend resolves it to the caller's ready steward binding and
|
|
2928
|
+
* scopes every delivery to that binding's Channel.
|
|
2929
|
+
*/
|
|
2930
|
+
type StewardDecision = 'immediate' | 'digest' | 'suppress';
|
|
2931
|
+
interface StewardTarget {
|
|
2932
|
+
inboxPath: string;
|
|
2889
2933
|
}
|
|
2890
|
-
interface
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
avatar_url: string;
|
|
2895
|
-
username: string;
|
|
2934
|
+
interface StewardDecideParams extends StewardTarget {
|
|
2935
|
+
deliveryId: string;
|
|
2936
|
+
decision: StewardDecision;
|
|
2937
|
+
reason: string;
|
|
2896
2938
|
}
|
|
2897
|
-
interface
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
icon_url: string;
|
|
2902
|
-
kind: string;
|
|
2939
|
+
interface StewardForwardParams extends StewardTarget {
|
|
2940
|
+
deliveryId: string;
|
|
2941
|
+
/** Idempotency key; the CLI generates a UUID when omitted. */
|
|
2942
|
+
requestId?: string;
|
|
2903
2943
|
}
|
|
2904
|
-
interface
|
|
2905
|
-
|
|
2906
|
-
|
|
2944
|
+
interface StewardSendParams extends StewardTarget {
|
|
2945
|
+
body: string;
|
|
2946
|
+
/** Omit or pass [] for a For-You-only Brief that covers no ledger delivery. */
|
|
2947
|
+
deliveryIds?: string[];
|
|
2948
|
+
requestId?: string;
|
|
2949
|
+
}
|
|
2950
|
+
type StewardSourceKind = 'FEED' | 'MARKET_ENTITY' | 'THESIS_FEED';
|
|
2951
|
+
interface StewardPendingParams extends StewardTarget {
|
|
2952
|
+
/** @deprecated Use `pendingPage` for explicit single-page reads. */
|
|
2953
|
+
after?: string;
|
|
2954
|
+
/** First page only: lower bound on decision time. */
|
|
2955
|
+
sinceMs?: number;
|
|
2956
|
+
/** First page only: fixed upper bound of the Brief window (the digest_request's untilMs). */
|
|
2957
|
+
untilMs?: number;
|
|
2958
|
+
first?: number;
|
|
2907
2959
|
}
|
|
2908
|
-
interface
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
read_complete: boolean;
|
|
2912
|
-
last_attempt_ms?: number;
|
|
2913
|
-
last_completed_ms?: number;
|
|
2960
|
+
interface StewardPendingPageParams extends StewardPendingParams {
|
|
2961
|
+
/** Opaque cursor from the previous page's `nextCursor`; carries the window. */
|
|
2962
|
+
after?: string;
|
|
2914
2963
|
}
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2964
|
+
type StewardPendingFullParams = Omit<StewardPendingParams, 'after'> & {
|
|
2965
|
+
after?: undefined;
|
|
2966
|
+
};
|
|
2967
|
+
interface StewardBriefedParams extends StewardTarget {
|
|
2968
|
+
deliveryIds: string[];
|
|
2969
|
+
digestRunId: string;
|
|
2919
2970
|
}
|
|
2920
|
-
interface
|
|
2921
|
-
|
|
2922
|
-
url?: string;
|
|
2923
|
-
published_at_ms?: number;
|
|
2971
|
+
interface StewardDigestRunParams extends StewardTarget {
|
|
2972
|
+
digestRunId: string;
|
|
2924
2973
|
}
|
|
2925
|
-
interface
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
stance: string;
|
|
2931
|
-
explanation: string;
|
|
2932
|
-
information_kind: string;
|
|
2933
|
-
evidence_excerpt?: ThesisSignalEvidenceExcerpt;
|
|
2934
|
-
source: ThesisSignalSource;
|
|
2974
|
+
interface StewardSendDigestRunParams extends StewardDigestRunParams {
|
|
2975
|
+
/** Exact reviewed coverage; omit or pass [] for a For-You-only Brief. */
|
|
2976
|
+
deliveryIds?: string[];
|
|
2977
|
+
/** Omit when complete reviewed coverage produces no useful Brief content. */
|
|
2978
|
+
body?: string;
|
|
2935
2979
|
}
|
|
2936
|
-
interface
|
|
2937
|
-
|
|
2938
|
-
cursor: string;
|
|
2939
|
-
signal: ThesisSignal;
|
|
2980
|
+
interface StewardDecideResult {
|
|
2981
|
+
state: string;
|
|
2940
2982
|
}
|
|
2941
|
-
interface
|
|
2942
|
-
|
|
2943
|
-
|
|
2983
|
+
interface StewardForwardResult {
|
|
2984
|
+
channelMessageId: string;
|
|
2985
|
+
state: string;
|
|
2944
2986
|
}
|
|
2945
|
-
interface
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2987
|
+
interface StewardSendResult {
|
|
2988
|
+
channelMessageId: string;
|
|
2989
|
+
/** The idempotency key used; pass it as digestRunId to `briefed`. */
|
|
2990
|
+
requestId: string;
|
|
2949
2991
|
}
|
|
2950
|
-
interface
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
/** Exact STOCK ticker symbols resolved by Backend during creation. */
|
|
2961
|
-
tickers?: string[];
|
|
2962
|
-
/** Omitted means public, as defined by the REST contract. */
|
|
2963
|
-
visibility?: 'public' | 'private';
|
|
2964
|
-
/** Thesis return switch; omitted keeps the default (on). */
|
|
2965
|
-
track_return?: boolean;
|
|
2992
|
+
interface StewardPendingItem {
|
|
2993
|
+
deliveryId: string;
|
|
2994
|
+
feedEntryId: string;
|
|
2995
|
+
source: {
|
|
2996
|
+
kind: StewardSourceKind;
|
|
2997
|
+
id: string;
|
|
2998
|
+
};
|
|
2999
|
+
decisionReason: string;
|
|
3000
|
+
consumedAtMs: number;
|
|
3001
|
+
alertSnapshot?: string | null;
|
|
2966
3002
|
}
|
|
2967
|
-
interface
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
title?: string;
|
|
2975
|
-
entity_ids?: ThesisID[];
|
|
2976
|
-
/** Full replacement: resubmit existing directions when only editing the body. */
|
|
2977
|
-
entity_stances?: ThesisEntityStance[];
|
|
2978
|
-
/** Required so an update cannot inadvertently publish a private thesis. */
|
|
2979
|
-
visibility: ThesisVisibility;
|
|
2980
|
-
archived?: boolean;
|
|
2981
|
-
note?: string;
|
|
2982
|
-
/** Thesis return switch; omitted keeps the current decision or default. */
|
|
2983
|
-
track_return?: boolean;
|
|
3003
|
+
interface StewardPendingPage {
|
|
3004
|
+
items: StewardPendingItem[];
|
|
3005
|
+
/** Cursor for the next page; `null` when this page was the last. */
|
|
3006
|
+
nextCursor: string | null;
|
|
3007
|
+
/** The window every page of this Brief was read with. */
|
|
3008
|
+
windowSinceMs: number;
|
|
3009
|
+
windowUntilMs: number;
|
|
2984
3010
|
}
|
|
2985
|
-
interface
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3011
|
+
interface StewardPendingResult {
|
|
3012
|
+
items: StewardPendingItem[];
|
|
3013
|
+
/** The fixed window used for the complete read. */
|
|
3014
|
+
windowSinceMs: number;
|
|
3015
|
+
windowUntilMs: number;
|
|
2990
3016
|
}
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3017
|
+
type StewardDigestRunState = 'EXPECTED' | 'RUNNING' | 'SEND_UNCERTAIN' | 'SENT' | 'INTENTIONALLY_EMPTY' | 'FAILED_BEFORE_SEND' | 'FAILED' | 'FAILED_EXPIRED';
|
|
3018
|
+
interface StewardDigestRun {
|
|
3019
|
+
digestRunId: string;
|
|
3020
|
+
state: StewardDigestRunState;
|
|
3021
|
+
scheduleId: string;
|
|
3022
|
+
scheduleVersion: number;
|
|
3023
|
+
occurrenceIndex: number;
|
|
3024
|
+
windowSinceMs: number;
|
|
3025
|
+
windowUntilMs: number;
|
|
3026
|
+
scanCompletedAtMs?: number | null;
|
|
3027
|
+
bodySha256?: string | null;
|
|
3028
|
+
coverageSha256?: string | null;
|
|
3029
|
+
channelMessageId?: string | null;
|
|
3030
|
+
attempts: number;
|
|
3031
|
+
lastError: string;
|
|
3032
|
+
startedAtMs?: number | null;
|
|
3033
|
+
completedAtMs?: number | null;
|
|
3034
|
+
sendUncertainAtMs?: number | null;
|
|
2995
3035
|
}
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3036
|
+
declare class StewardResource {
|
|
3037
|
+
private client;
|
|
3038
|
+
constructor(client: AlvaClient);
|
|
3039
|
+
decide(params: StewardDecideParams): Promise<StewardDecideResult>;
|
|
3040
|
+
forward(params: StewardForwardParams): Promise<StewardForwardResult>;
|
|
3041
|
+
send(params: StewardSendParams): Promise<StewardSendResult>;
|
|
3042
|
+
pending(params: StewardPendingParams & {
|
|
3043
|
+
after: string;
|
|
3044
|
+
}): Promise<StewardPendingPage>;
|
|
3045
|
+
pending(params: StewardPendingFullParams): Promise<StewardPendingResult>;
|
|
3046
|
+
pending(params: StewardPendingParams): Promise<StewardPendingResult | StewardPendingPage>;
|
|
3047
|
+
pendingPage(params: StewardPendingPageParams): Promise<StewardPendingPage>;
|
|
3048
|
+
private pendingPageWithRetry;
|
|
3049
|
+
briefed(params: StewardBriefedParams): Promise<{
|
|
3050
|
+
ok: true;
|
|
3051
|
+
}>;
|
|
3052
|
+
digestRun(params: StewardDigestRunParams): Promise<StewardDigestRun>;
|
|
3053
|
+
digestRunPending(params: StewardDigestRunParams): Promise<StewardPendingItem[]>;
|
|
3054
|
+
sendDigestRun(params: StewardSendDigestRunParams): Promise<StewardDigestRun>;
|
|
3055
|
+
private graphql;
|
|
3002
3056
|
}
|
|
3003
|
-
|
|
3004
|
-
|
|
3057
|
+
|
|
3058
|
+
interface TradingPairCandidate {
|
|
3059
|
+
/** Underlying ticker returned by the market catalog. */
|
|
3060
|
+
symbol: string;
|
|
3061
|
+
/** Complete canonical identity used by OHLCV, Altra, and orders. */
|
|
3062
|
+
tradingPair: string;
|
|
3063
|
+
market: string;
|
|
3064
|
+
instrumentType: string;
|
|
3065
|
+
underlyingType?: string;
|
|
3066
|
+
quote: string;
|
|
3067
|
+
type?: string;
|
|
3068
|
+
description?: string;
|
|
3069
|
+
feeRate?: number;
|
|
3070
|
+
symbolIconUrl?: string;
|
|
3005
3071
|
}
|
|
3006
|
-
interface
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3072
|
+
interface TradingPairSearchParams {
|
|
3073
|
+
symbol: string;
|
|
3074
|
+
market?: string;
|
|
3075
|
+
instrumentType?: string;
|
|
3076
|
+
underlyingType?: string;
|
|
3077
|
+
quote?: string;
|
|
3078
|
+
limit?: number;
|
|
3010
3079
|
}
|
|
3011
|
-
interface
|
|
3012
|
-
|
|
3080
|
+
interface TradingPairSearchResponse {
|
|
3081
|
+
query: string;
|
|
3082
|
+
candidates: TradingPairCandidate[];
|
|
3083
|
+
truncated?: boolean;
|
|
3013
3084
|
}
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
* starts Signal/Alert setup, or invokes rewrite as a side effect of CRUD.
|
|
3017
|
-
*/
|
|
3018
|
-
declare class ThesesResource {
|
|
3085
|
+
type TradingPairResolveFilters = Omit<TradingPairSearchParams, 'symbol' | 'limit'>;
|
|
3086
|
+
declare class TradingPairsResource {
|
|
3019
3087
|
private client;
|
|
3020
3088
|
constructor(client: AlvaClient);
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
assetCandidates(text: string, params?: ThesisAssetCandidatesParams): Promise<ThesisAssetCandidatesResponse>;
|
|
3026
|
-
/** The Thesis return of a Playbook's current publication; detail revalues it. */
|
|
3027
|
-
thesisReturn(id: ThesisID, params?: ThesisReturnParams): Promise<ThesisReturnResult>;
|
|
3028
|
-
/**
|
|
3029
|
-
* List every watchpoint of a Thesis (its current set, in number order): the
|
|
3030
|
-
* things the Thesis depends on, or that would show it right or wrong.
|
|
3031
|
-
*/
|
|
3032
|
-
watchpoints(id: ThesisID): Promise<ThesisWatchpointsResult>;
|
|
3033
|
-
create(params: CreateThesisParams): Promise<ThesisResponse>;
|
|
3034
|
-
get(id: ThesisID): Promise<ThesisGetResponse>;
|
|
3035
|
-
getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
|
|
3036
|
-
/** Lists reader-visible Updates, with editorial revisions folded together. */
|
|
3037
|
-
listUpdates(id: ThesisID, params?: {
|
|
3038
|
-
first?: number;
|
|
3039
|
-
cursor?: string;
|
|
3040
|
-
}): Promise<{
|
|
3041
|
-
versions: Thesis[];
|
|
3042
|
-
next_cursor: string;
|
|
3043
|
-
}>;
|
|
3044
|
-
signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
|
|
3045
|
-
update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
|
|
3046
|
-
/**
|
|
3047
|
-
* Archive or unarchive the current version without asking callers to resend
|
|
3048
|
-
* its body. Unarchiving publishes the current content as a new Update; an
|
|
3049
|
-
* archived Thesis takes no other Update.
|
|
3050
|
-
*/
|
|
3051
|
-
setArchived(id: ThesisID, params: SetThesisArchivedParams): Promise<ThesisResponse>;
|
|
3052
|
-
setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
|
|
3053
|
-
setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
|
|
3054
|
-
setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
|
|
3055
|
-
rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
|
|
3089
|
+
search(params: TradingPairSearchParams): Promise<TradingPairSearchResponse>;
|
|
3090
|
+
resolve(params: ({
|
|
3091
|
+
pair: string;
|
|
3092
|
+
} & TradingPairResolveFilters) | Omit<TradingPairSearchParams, 'limit'>): Promise<TradingPairCandidate>;
|
|
3056
3093
|
}
|
|
3057
3094
|
|
|
3058
3095
|
interface CreateCompanyNewsParams {
|