@clear-street/clearstreet 0.96.0 → 0.98.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.
Files changed (122) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/resources/v1/accounts.d.mts +13 -1
  4. package/resources/v1/accounts.d.mts.map +1 -1
  5. package/resources/v1/accounts.d.ts +13 -1
  6. package/resources/v1/accounts.d.ts.map +1 -1
  7. package/resources/v1/calendar.d.mts +7 -1
  8. package/resources/v1/calendar.d.mts.map +1 -1
  9. package/resources/v1/calendar.d.ts +7 -1
  10. package/resources/v1/calendar.d.ts.map +1 -1
  11. package/resources/v1/index.d.mts +3 -2
  12. package/resources/v1/index.d.mts.map +1 -1
  13. package/resources/v1/index.d.ts +3 -2
  14. package/resources/v1/index.d.ts.map +1 -1
  15. package/resources/v1/index.js +3 -1
  16. package/resources/v1/index.js.map +1 -1
  17. package/resources/v1/index.mjs +2 -1
  18. package/resources/v1/index.mjs.map +1 -1
  19. package/resources/v1/instrument-data/instrument-data.d.mts +12 -0
  20. package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -1
  21. package/resources/v1/instrument-data/instrument-data.d.ts +12 -0
  22. package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -1
  23. package/resources/v1/instrument-data/instrument-data.js +12 -0
  24. package/resources/v1/instrument-data/instrument-data.js.map +1 -1
  25. package/resources/v1/instrument-data/instrument-data.mjs +12 -0
  26. package/resources/v1/instrument-data/instrument-data.mjs.map +1 -1
  27. package/resources/v1/instrument-data/news.d.mts +3 -0
  28. package/resources/v1/instrument-data/news.d.mts.map +1 -1
  29. package/resources/v1/instrument-data/news.d.ts +3 -0
  30. package/resources/v1/instrument-data/news.d.ts.map +1 -1
  31. package/resources/v1/instrument-data/news.js +3 -0
  32. package/resources/v1/instrument-data/news.js.map +1 -1
  33. package/resources/v1/instrument-data/news.mjs +3 -0
  34. package/resources/v1/instrument-data/news.mjs.map +1 -1
  35. package/resources/v1/instruments.d.mts +5 -2
  36. package/resources/v1/instruments.d.mts.map +1 -1
  37. package/resources/v1/instruments.d.ts +5 -2
  38. package/resources/v1/instruments.d.ts.map +1 -1
  39. package/resources/v1/omni-feed.d.mts +173 -0
  40. package/resources/v1/omni-feed.d.mts.map +1 -0
  41. package/resources/v1/omni-feed.d.ts +173 -0
  42. package/resources/v1/omni-feed.d.ts.map +1 -0
  43. package/resources/v1/omni-feed.js +67 -0
  44. package/resources/v1/omni-feed.js.map +1 -0
  45. package/resources/v1/omni-feed.mjs +63 -0
  46. package/resources/v1/omni-feed.mjs.map +1 -0
  47. package/resources/v1/orders.d.mts +29 -4
  48. package/resources/v1/orders.d.mts.map +1 -1
  49. package/resources/v1/orders.d.ts +29 -4
  50. package/resources/v1/orders.d.ts.map +1 -1
  51. package/resources/v1/private-markets/companies.d.mts +368 -0
  52. package/resources/v1/private-markets/companies.d.mts.map +1 -0
  53. package/resources/v1/private-markets/companies.d.ts +368 -0
  54. package/resources/v1/private-markets/companies.d.ts.map +1 -0
  55. package/resources/v1/private-markets/companies.js +9 -0
  56. package/resources/v1/private-markets/companies.js.map +1 -0
  57. package/resources/v1/private-markets/companies.mjs +5 -0
  58. package/resources/v1/private-markets/companies.mjs.map +1 -0
  59. package/resources/v1/private-markets/index.d.mts +5 -2
  60. package/resources/v1/private-markets/index.d.mts.map +1 -1
  61. package/resources/v1/private-markets/index.d.ts +5 -2
  62. package/resources/v1/private-markets/index.d.ts.map +1 -1
  63. package/resources/v1/private-markets/index.js +7 -1
  64. package/resources/v1/private-markets/index.js.map +1 -1
  65. package/resources/v1/private-markets/index.mjs +4 -1
  66. package/resources/v1/private-markets/index.mjs.map +1 -1
  67. package/resources/v1/private-markets/iois.d.mts +64 -0
  68. package/resources/v1/private-markets/iois.d.mts.map +1 -0
  69. package/resources/v1/private-markets/iois.d.ts +64 -0
  70. package/resources/v1/private-markets/iois.d.ts.map +1 -0
  71. package/resources/v1/private-markets/iois.js +9 -0
  72. package/resources/v1/private-markets/iois.js.map +1 -0
  73. package/resources/v1/private-markets/iois.mjs +5 -0
  74. package/resources/v1/private-markets/iois.mjs.map +1 -0
  75. package/resources/v1/private-markets/offerings.d.mts +38 -1
  76. package/resources/v1/private-markets/offerings.d.mts.map +1 -1
  77. package/resources/v1/private-markets/offerings.d.ts +38 -1
  78. package/resources/v1/private-markets/offerings.d.ts.map +1 -1
  79. package/resources/v1/private-markets/private-markets.d.mts +217 -2
  80. package/resources/v1/private-markets/private-markets.d.mts.map +1 -1
  81. package/resources/v1/private-markets/private-markets.d.ts +217 -2
  82. package/resources/v1/private-markets/private-markets.d.ts.map +1 -1
  83. package/resources/v1/private-markets/private-markets.js +117 -0
  84. package/resources/v1/private-markets/private-markets.js.map +1 -1
  85. package/resources/v1/private-markets/private-markets.mjs +117 -0
  86. package/resources/v1/private-markets/private-markets.mjs.map +1 -1
  87. package/resources/v1/private-markets/spvs.d.mts +158 -0
  88. package/resources/v1/private-markets/spvs.d.mts.map +1 -0
  89. package/resources/v1/private-markets/spvs.d.ts +158 -0
  90. package/resources/v1/private-markets/spvs.d.ts.map +1 -0
  91. package/resources/v1/private-markets/spvs.js +9 -0
  92. package/resources/v1/private-markets/spvs.js.map +1 -0
  93. package/resources/v1/private-markets/spvs.mjs +5 -0
  94. package/resources/v1/private-markets/spvs.mjs.map +1 -0
  95. package/resources/v1/v1.d.mts +8 -4
  96. package/resources/v1/v1.d.mts.map +1 -1
  97. package/resources/v1/v1.d.ts +8 -4
  98. package/resources/v1/v1.d.ts.map +1 -1
  99. package/resources/v1/v1.js +4 -0
  100. package/resources/v1/v1.js.map +1 -1
  101. package/resources/v1/v1.mjs +5 -1
  102. package/resources/v1/v1.mjs.map +1 -1
  103. package/src/resources/v1/accounts.ts +16 -0
  104. package/src/resources/v1/calendar.ts +8 -1
  105. package/src/resources/v1/index.ts +26 -1
  106. package/src/resources/v1/instrument-data/instrument-data.ts +12 -0
  107. package/src/resources/v1/instrument-data/news.ts +3 -0
  108. package/src/resources/v1/instruments.ts +5 -2
  109. package/src/resources/v1/omni-feed.ts +218 -0
  110. package/src/resources/v1/orders.ts +38 -4
  111. package/src/resources/v1/private-markets/companies.ts +483 -0
  112. package/src/resources/v1/private-markets/index.ts +55 -1
  113. package/src/resources/v1/private-markets/iois.ts +91 -0
  114. package/src/resources/v1/private-markets/offerings.ts +46 -0
  115. package/src/resources/v1/private-markets/private-markets.ts +374 -0
  116. package/src/resources/v1/private-markets/spvs.ts +201 -0
  117. package/src/resources/v1/v1.ts +56 -2
  118. package/src/version.ts +1 -1
  119. package/version.d.mts +1 -1
  120. package/version.d.ts +1 -1
  121. package/version.js +1 -1
  122. package/version.mjs +1 -1
@@ -0,0 +1,218 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { buildHeaders } from '../../internal/headers';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+
9
+ /**
10
+ * Personalized feed of market stories: upcoming earnings, dividends, and splits, plus market news. Served per caller in a stable order; item ids double as pagination cursors, so any previously returned page can be re-read.
11
+ */
12
+ export class OmniFeed extends APIResource {
13
+ /**
14
+ * > **Alpha** — this endpoint is experimental and may change or be removed at any
15
+ * > time.
16
+ *
17
+ * Returns the caller's personalized feed of market stories: upcoming earnings,
18
+ * dividends, and splits, plus market news.
19
+ *
20
+ * The feed is a stable, append-only sequence per caller. Without a `cursor`, the
21
+ * response resumes from the caller's oldest unseen item and continues forward;
22
+ * passing the id of the last item received as `cursor` returns the items after it.
23
+ * Either way, when the known sequence runs short of `limit`, fresh stories are
24
+ * appended and included. Re-requesting an earlier cursor replays the same items in
25
+ * the same order.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const response = await client.v1.omniFeed.getFeed();
30
+ * ```
31
+ */
32
+ getFeed(
33
+ query: OmniFeedGetFeedParams | null | undefined = {},
34
+ options?: RequestOptions,
35
+ ): APIPromise<OmniFeedGetFeedResponse> {
36
+ return this._client.get('/v1/omni-ai/feed', { query, ...options });
37
+ }
38
+
39
+ /**
40
+ * > **Alpha** — this endpoint is experimental and may change or be removed at any
41
+ * > time.
42
+ *
43
+ * Records one of the caller's interactions with a feed item: the item rendered on
44
+ * screen (`seen`), expanded from its headline to its summary (`click`), or voted
45
+ * on (`upvote`, `downvote`). Marking an item `seen` excludes it from the caller's
46
+ * next feed response.
47
+ *
48
+ * Each request records a new event, so a request that is retried after a failure
49
+ * of unknown outcome may be recorded twice. That is harmless for `seen` and for
50
+ * votes — the first is a yes-or-no exclusion and the latest vote is the one that
51
+ * counts — so retry freely for those. The event is wrapped in an `event` field so
52
+ * that a future request may carry several at once without breaking this one.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * await client.v1.omniFeed.postFeedEvent({
57
+ * event: {
58
+ * item_id: '0198f3a2-4b3d-7c1e-9f2a-3b4c5d6e7f80',
59
+ * type: 'seen',
60
+ * },
61
+ * });
62
+ * ```
63
+ */
64
+ postFeedEvent(body: OmniFeedPostFeedEventParams, options?: RequestOptions): APIPromise<void> {
65
+ return this._client.post('/v1/omni-ai/feed/events', {
66
+ body,
67
+ ...options,
68
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
69
+ });
70
+ }
71
+ }
72
+
73
+ /**
74
+ * One item in the caller's feed.
75
+ */
76
+ export interface FeedItem {
77
+ /**
78
+ * Unique item id. Also the pagination cursor: pass it as `cursor` to fetch the
79
+ * items that follow it.
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * Headline text.
85
+ */
86
+ headline: string;
87
+
88
+ /**
89
+ * What the item is about.
90
+ */
91
+ kind: FeedItemKind;
92
+
93
+ /**
94
+ * When the item's content was published.
95
+ */
96
+ published_at: string;
97
+
98
+ /**
99
+ * Summary text.
100
+ */
101
+ summary: string;
102
+
103
+ /**
104
+ * The item's headline number. When a null/undefined value is observed, it
105
+ * indicates that there is no available data.
106
+ */
107
+ metric?: FeedItemMetric | null;
108
+
109
+ /**
110
+ * When the underlying event is expected to occur, for items about an upcoming
111
+ * event. When a null/undefined value is observed, it indicates it does not apply.
112
+ */
113
+ occurs_at?: string | null;
114
+ }
115
+
116
+ /**
117
+ * What a feed item is about; fixes the meaning of the item's `metric`.
118
+ */
119
+ export type FeedItemKind = 'earnings' | 'dividend' | 'split' | 'news' | 'omni';
120
+
121
+ /**
122
+ * A feed item's headline number.
123
+ */
124
+ export interface FeedItemMetric {
125
+ /**
126
+ * What the number measures.
127
+ */
128
+ type: FeedMetricType;
129
+
130
+ /**
131
+ * The number itself, as a decimal string.
132
+ */
133
+ value: string;
134
+ }
135
+
136
+ /**
137
+ * What a feed item's number measures.
138
+ */
139
+ export type FeedMetricType = 'eps_estimate' | 'dividend_amount' | 'split_ratio';
140
+
141
+ /**
142
+ * One page of the caller's feed.
143
+ */
144
+ export interface FeedPage {
145
+ /**
146
+ * Feed items, in feed order.
147
+ */
148
+ items: Array<FeedItem>;
149
+
150
+ /**
151
+ * Cursor for the page after this one: the last item's id. Absent only when there
152
+ * are no items to serve. When a null/undefined value is observed, it indicates
153
+ * that there is no available data.
154
+ */
155
+ next_cursor?: string | null;
156
+ }
157
+
158
+ export interface OmniFeedGetFeedResponse extends Shared.BaseResponse {
159
+ /**
160
+ * One page of the caller's feed.
161
+ */
162
+ data: FeedPage;
163
+ }
164
+
165
+ export interface OmniFeedGetFeedParams {
166
+ /**
167
+ * Trading account to serve as context. Optional — the feed works without one.
168
+ */
169
+ account_id?: number;
170
+
171
+ /**
172
+ * Id of the last item already received; the response continues from the item after
173
+ * it. Omit to resume from the oldest unseen item.
174
+ */
175
+ cursor?: string;
176
+
177
+ /**
178
+ * Maximum number of items to return (1–100, default 20).
179
+ */
180
+ limit?: number;
181
+ }
182
+
183
+ export interface OmniFeedPostFeedEventParams {
184
+ /**
185
+ * The event to record.
186
+ */
187
+ event: OmniFeedPostFeedEventParams.Event;
188
+ }
189
+
190
+ export namespace OmniFeedPostFeedEventParams {
191
+ /**
192
+ * The event to record.
193
+ */
194
+ export interface Event {
195
+ /**
196
+ * The feed item the event concerns.
197
+ */
198
+ item_id: string;
199
+
200
+ /**
201
+ * What happened.
202
+ */
203
+ type: 'seen' | 'click' | 'upvote' | 'downvote';
204
+ }
205
+ }
206
+
207
+ export declare namespace OmniFeed {
208
+ export {
209
+ type FeedItem as FeedItem,
210
+ type FeedItemKind as FeedItemKind,
211
+ type FeedItemMetric as FeedItemMetric,
212
+ type FeedMetricType as FeedMetricType,
213
+ type FeedPage as FeedPage,
214
+ type OmniFeedGetFeedResponse as OmniFeedGetFeedResponse,
215
+ type OmniFeedGetFeedParams as OmniFeedGetFeedParams,
216
+ type OmniFeedPostFeedEventParams as OmniFeedPostFeedEventParams,
217
+ };
218
+ }
@@ -520,6 +520,8 @@ export type OrderList = Array<Order>;
520
520
  */
521
521
  export type OrderStatus =
522
522
  | 'PENDING_NEW'
523
+ | 'QUEUED'
524
+ | 'PENDING_TRIGGER'
523
525
  | 'NEW'
524
526
  | 'PARTIALLY_FILLED'
525
527
  | 'FILLED'
@@ -615,8 +617,8 @@ export type RequestTimeInForce =
615
617
  | 'IMMEDIATE_OR_CANCEL'
616
618
  | 'FILL_OR_KILL'
617
619
  | 'GOOD_TILL_DATE'
618
- | 'AT_THE_OPENING'
619
- | 'AT_THE_CLOSE';
620
+ | 'AT_OPEN'
621
+ | 'AT_CLOSE';
620
622
 
621
623
  /**
622
624
  * Side of the order (BUY or SELL).
@@ -632,8 +634,8 @@ export type TimeInForce =
632
634
  | 'IMMEDIATE_OR_CANCEL'
633
635
  | 'FILL_OR_KILL'
634
636
  | 'GOOD_TILL_DATE'
635
- | 'AT_THE_OPENING'
636
- | 'AT_THE_CLOSE'
637
+ | 'AT_OPEN'
638
+ | 'AT_CLOSE'
637
639
  | 'OTHER';
638
640
 
639
641
  /**
@@ -812,6 +814,8 @@ export interface OrderGetOrdersParams {
812
814
  */
813
815
  status?: Array<
814
816
  | 'PENDING_NEW'
817
+ | 'QUEUED'
818
+ | 'PENDING_TRIGGER'
815
819
  | 'NEW'
816
820
  | 'PARTIALLY_FILLED'
817
821
  | 'FILLED'
@@ -844,6 +848,36 @@ export interface OrderGetOrdersParams {
844
848
  * instruments.
845
849
  */
846
850
  underlying_instrument_ids?: Array<InstrumentIDOrSymbol>;
851
+
852
+ updated_at?: OrderGetOrdersParams.UpdatedAt;
853
+ }
854
+
855
+ export namespace OrderGetOrdersParams {
856
+ export interface UpdatedAt {
857
+ /**
858
+ * > **Alpha** — this parameter is experimental and may change or be removed at any
859
+ * > time.
860
+ */
861
+ gt?: string;
862
+
863
+ /**
864
+ * > **Alpha** — this parameter is experimental and may change or be removed at any
865
+ * > time.
866
+ */
867
+ gte?: string;
868
+
869
+ /**
870
+ * > **Alpha** — this parameter is experimental and may change or be removed at any
871
+ * > time.
872
+ */
873
+ lt?: string;
874
+
875
+ /**
876
+ * > **Alpha** — this parameter is experimental and may change or be removed at any
877
+ * > time.
878
+ */
879
+ lte?: string;
880
+ }
847
881
  }
848
882
 
849
883
  export interface OrderReplaceOrderParams {