@bitbitpress/client 1.0.1 → 1.0.2
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 +4 -2
- package/dist/generated/openapi.d.ts +2 -0
- package/dist/user/index.d.ts +1 -1
- package/dist/user/synthesize.d.ts +1 -1
- package/dist/user/synthesize.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -455,7 +455,7 @@ client.user.synthesizeItem(
|
|
|
455
455
|
|
|
456
456
|
##### Parameters
|
|
457
457
|
|
|
458
|
-
- `item` (required): A single synthesize item (same shape as items in `synthesize`): `inputs`, `output` (schema as JSON string or Zod 4 schema), optional `configurationKeyName`, optional `searchOptionsOverrides` (e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback)
|
|
458
|
+
- `item` (required): A single synthesize item (same shape as items in `synthesize`): `inputs`, `output` (schema as JSON string or Zod 4 schema), optional `configurationKeyName`, optional `limit` (number of results to return; defaults to `1`), optional `searchOptionsOverrides` (e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback)
|
|
459
459
|
- `onStreamingData` (optional): Callback invoked with streaming data whenever a stream event has `complete: false` for this item. Type: `(data: unknown) => void`.
|
|
460
460
|
|
|
461
461
|
##### Returns
|
|
@@ -515,6 +515,7 @@ client.user.synthesize(
|
|
|
515
515
|
- `inputs` (optional): Context for synthesis — array of `{ type: "externalId" | "text" | "excludeExternalIds", value: string }` (article ID, freeform text, or comma-separated external IDs to exclude)
|
|
516
516
|
- `output`: `{ schema: string | ZodType }` — output schema as a JSON string or Zod 4 schema (top-level type must be `"object"`; supports object, string, number, boolean, array, and enum)
|
|
517
517
|
- `configurationKeyName` (optional): Key name for configuration
|
|
518
|
+
- `limit` (optional): Number of results to return. Defaults to `1`.
|
|
518
519
|
- `searchOptionsOverrides` (optional): Per-request overrides, e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback.
|
|
519
520
|
- `options` (optional): `{ onStreamingData?: (index: number, data: unknown) => void }` — if provided, `onStreamingData` is called for each data event with `complete: false`, with the item's index and streaming data
|
|
520
521
|
|
|
@@ -839,12 +840,13 @@ type SignalResponse = {
|
|
|
839
840
|
|
|
840
841
|
#### SynthesizeRequest
|
|
841
842
|
|
|
842
|
-
Request body for POST `/v1/user/synthesize` (from OpenAPI). Each item has `inputs`, `output`, optional `configurationKeyName`, and optional `searchOptionsOverrides`.
|
|
843
|
+
Request body for POST `/v1/user/synthesize` (from OpenAPI). Each item has `inputs`, `output`, optional `configurationKeyName`, optional `limit` (defaults to `1`), and optional `searchOptionsOverrides`.
|
|
843
844
|
|
|
844
845
|
```typescript
|
|
845
846
|
type SynthesizeRequest = {
|
|
846
847
|
items: Array<{
|
|
847
848
|
configurationKeyName?: string;
|
|
849
|
+
limit?: number; // number of results to return; defaults to 1
|
|
848
850
|
searchOptionsOverrides?: { lookbackMinutes?: number };
|
|
849
851
|
inputs?: Array<{ type: 'externalId' | 'text' | 'excludeExternalIds'; value: string }>;
|
|
850
852
|
output: {
|
|
@@ -675,6 +675,8 @@ export interface paths {
|
|
|
675
675
|
items: {
|
|
676
676
|
/** @description Optional configuration key name. Loads an existing synthesis config by this name; omit for default configuration. */
|
|
677
677
|
configurationKeyName?: string;
|
|
678
|
+
/** @description Number of results to return. Defaults to 1. */
|
|
679
|
+
limit?: number;
|
|
678
680
|
/** @description Per-request overrides for search options. */
|
|
679
681
|
searchOptionsOverrides?: {
|
|
680
682
|
/** @description Override for search lookback window in minutes (e.g. 1440 for last 24 hours). */
|
package/dist/user/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export interface UserMethods {
|
|
|
71
71
|
/**
|
|
72
72
|
* Synthesize content items personalized to the user (streaming SSE).
|
|
73
73
|
*
|
|
74
|
-
* @param items - Array of items: optional inputs (type: externalId | text | excludeExternalIds, value), output (schema), optional configurationKeyName, optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
74
|
+
* @param items - Array of items: optional inputs (type: externalId | text | excludeExternalIds, value), output (schema), optional configurationKeyName, optional limit (number of results to return; defaults to 1), optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
75
75
|
* @param options - Optional: onStreamingData(index, data) called for each streaming data update per item index
|
|
76
76
|
* @returns AsyncIterable yielding connection events (connected, complete) and data events (index, data?, complete, error?)
|
|
77
77
|
*/
|
|
@@ -30,7 +30,7 @@ export interface SynthesizeOptions {
|
|
|
30
30
|
* Synthesize content items personalized to the user (streaming SSE).
|
|
31
31
|
*
|
|
32
32
|
* @param config - Request configuration with base URL, timeout, fetch, and optional token
|
|
33
|
-
* @param items - Array of items: each has optional inputs (`type`: externalId | text | excludeExternalIds, `value`), output (schema as JSON string or Zod 4 schema), optional configurationKeyName, optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
33
|
+
* @param items - Array of items: each has optional inputs (`type`: externalId | text | excludeExternalIds, `value`), output (schema as JSON string or Zod 4 schema), optional configurationKeyName, optional limit (number of results to return; defaults to 1), optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
34
34
|
* @param options - Optional: onStreamingData(index, data) called for each streaming data update per item index
|
|
35
35
|
* @returns AsyncIterable yielding connection events (connected, complete) and data events (index, data?, complete, error?). Data may be partial until an event with complete: true for that index.
|
|
36
36
|
*/
|
package/dist/user/synthesize.js
CHANGED
|
@@ -27,7 +27,7 @@ function normalizeSynthesizeItems(items) {
|
|
|
27
27
|
* Synthesize content items personalized to the user (streaming SSE).
|
|
28
28
|
*
|
|
29
29
|
* @param config - Request configuration with base URL, timeout, fetch, and optional token
|
|
30
|
-
* @param items - Array of items: each has optional inputs (`type`: externalId | text | excludeExternalIds, `value`), output (schema as JSON string or Zod 4 schema), optional configurationKeyName, optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
30
|
+
* @param items - Array of items: each has optional inputs (`type`: externalId | text | excludeExternalIds, `value`), output (schema as JSON string or Zod 4 schema), optional configurationKeyName, optional limit (number of results to return; defaults to 1), optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
31
31
|
* @param options - Optional: onStreamingData(index, data) called for each streaming data update per item index
|
|
32
32
|
* @returns AsyncIterable yielding connection events (connected, complete) and data events (index, data?, complete, error?). Data may be partial until an event with complete: true for that index.
|
|
33
33
|
*/
|