sentisense 0.52.0 → 0.53.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 +21 -0
- package/dist/cli.cjs +9 -2
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +41 -3
- package/dist/index.d.ts +41 -3
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -241,6 +241,27 @@ client.documents.getStories({ limit: 10 })
|
|
|
241
241
|
client.documents.getStoryDetail("cluster_abc123")
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
+
A story's `cluster` says where it came from and whether it has settled. `storySource` is
|
|
245
|
+
`"ORIGINAL"` for an editorially authored SentiSense Original and `"AI"` for a
|
|
246
|
+
pipeline-generated story, and `isLive` is true while the story is still being revised as
|
|
247
|
+
the event develops. Both are optional: against an API build that predates them they are
|
|
248
|
+
`undefined`, which means "not known" rather than `"AI"` or `false`.
|
|
249
|
+
|
|
250
|
+
`getStoryDetail` returns `unknown`, so narrow it yourself. It carries the same two fields
|
|
251
|
+
plus a `timeline` array of dated updates, newest first and empty when a story has none.
|
|
252
|
+
The `StoryTimelineEntry` type is exported for that array:
|
|
253
|
+
|
|
254
|
+
```typescript
|
|
255
|
+
import type { StoryTimelineEntry } from "sentisense";
|
|
256
|
+
|
|
257
|
+
const detail = (await client.documents.getStoryDetail("cluster_abc123")) as {
|
|
258
|
+
timeline: StoryTimelineEntry[];
|
|
259
|
+
};
|
|
260
|
+
for (const update of detail.timeline) {
|
|
261
|
+
console.log(new Date(update.publishedAt), update.updateType, update.content);
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
244
265
|
### Institutional flows (13F)
|
|
245
266
|
|
|
246
267
|
```typescript
|
package/dist/cli.cjs
CHANGED
|
@@ -1324,7 +1324,7 @@ var flowsCommand = {
|
|
|
1324
1324
|
};
|
|
1325
1325
|
|
|
1326
1326
|
// src/version.ts
|
|
1327
|
-
var VERSION = "0.
|
|
1327
|
+
var VERSION = "0.53.0";
|
|
1328
1328
|
|
|
1329
1329
|
// src/resources/analyst.ts
|
|
1330
1330
|
var Analyst = class {
|
|
@@ -1507,7 +1507,14 @@ var Documents = class {
|
|
|
1507
1507
|
async getStories(options) {
|
|
1508
1508
|
return this.client.get("/api/v1/documents/stories", options);
|
|
1509
1509
|
}
|
|
1510
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* Get full story detail by cluster ID.
|
|
1512
|
+
*
|
|
1513
|
+
* Deliberately untyped: narrow it yourself. The response carries `storySource` and
|
|
1514
|
+
* `isLive` alongside the story body, plus a `timeline` array of dated updates,
|
|
1515
|
+
* newest first and empty when the story has none. {@link StoryTimelineEntry} is
|
|
1516
|
+
* exported for that array.
|
|
1517
|
+
*/
|
|
1511
1518
|
async getStoryDetail(clusterId) {
|
|
1512
1519
|
return this.client.get(`/api/v1/documents/stories/${encodeURIComponent(clusterId)}`);
|
|
1513
1520
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -255,7 +255,14 @@ var Documents = class {
|
|
|
255
255
|
async getStories(options) {
|
|
256
256
|
return this.client.get("/api/v1/documents/stories", options);
|
|
257
257
|
}
|
|
258
|
-
/**
|
|
258
|
+
/**
|
|
259
|
+
* Get full story detail by cluster ID.
|
|
260
|
+
*
|
|
261
|
+
* Deliberately untyped: narrow it yourself. The response carries `storySource` and
|
|
262
|
+
* `isLive` alongside the story body, plus a `timeline` array of dated updates,
|
|
263
|
+
* newest first and empty when the story has none. {@link StoryTimelineEntry} is
|
|
264
|
+
* exported for that array.
|
|
265
|
+
*/
|
|
259
266
|
async getStoryDetail(clusterId) {
|
|
260
267
|
return this.client.get(`/api/v1/documents/stories/${encodeURIComponent(clusterId)}`);
|
|
261
268
|
}
|
|
@@ -1242,7 +1249,7 @@ var Trackers = class {
|
|
|
1242
1249
|
};
|
|
1243
1250
|
|
|
1244
1251
|
// src/version.ts
|
|
1245
|
-
var VERSION = "0.
|
|
1252
|
+
var VERSION = "0.53.0";
|
|
1246
1253
|
|
|
1247
1254
|
// src/client.ts
|
|
1248
1255
|
var DEFAULT_BASE_URL = "https://app.sentisense.ai";
|