@bitbitpress/client 0.1.12 → 0.1.14
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 +6 -7
- package/dist/examples/basic-usage.d.ts.map +1 -1
- package/dist/examples/basic-usage.js +0 -2
- package/dist/examples/basic-usage.js.map +1 -1
- package/dist/generated/openapi.d.ts +7 -4
- 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
|
@@ -447,7 +447,7 @@ client.user.synthesizeItem(
|
|
|
447
447
|
|
|
448
448
|
##### Parameters
|
|
449
449
|
|
|
450
|
-
- `item` (required): A single synthesize item (same shape as items in `synthesize`): `inputs`, `output` (schema as JSON string or Zod 4 schema
|
|
450
|
+
- `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 `sourceAssetFields`, optional `sourceBitFields`, optional `searchOptionsOverrides` (e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback)
|
|
451
451
|
- `onStreamingData` (optional): Callback invoked with streaming data whenever a stream event has `complete: false` for this item. Type: `(data: unknown) => void`.
|
|
452
452
|
|
|
453
453
|
##### Returns
|
|
@@ -484,7 +484,6 @@ const result2 = await client.user.synthesizeItem({
|
|
|
484
484
|
inputs: [{ type: 'text', value: 'Summarize this' }],
|
|
485
485
|
output: {
|
|
486
486
|
schema: z.object({ headline: z.string().meta({ description: 'headline, uppercase', characterLimitHint: 100 }) }),
|
|
487
|
-
staleAfter: '30m',
|
|
488
487
|
},
|
|
489
488
|
});
|
|
490
489
|
```
|
|
@@ -506,10 +505,11 @@ client.user.synthesize(
|
|
|
506
505
|
|
|
507
506
|
- `items` (required): Array of items. Each item has:
|
|
508
507
|
- `inputs` (optional): Context for synthesis — array of `{ type: "externalId" | "text" | "excludeExternalIds", value: string }` (article ID, freeform text, or comma-separated external IDs to exclude)
|
|
509
|
-
- `output`: `{ schema: string | ZodType
|
|
508
|
+
- `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)
|
|
510
509
|
- `configurationKeyName` (optional): Key name for configuration
|
|
511
510
|
- `sourceAssetFields` (optional): Asset fields to return for sources used for generation (dot or bracket notation). Allowed: `title`, `tags`, `images`, `videos`, `publishedAt`, `externalId`, `externalData`, and subfields. Returned as JSON string of an array of objects in `sourceAssets`.
|
|
512
511
|
- `sourceBitFields` (optional): Bit fields to return for sources used for generation. Allowed: `text`. Returned as JSON string of an array of objects in `sourceBits`.
|
|
512
|
+
- `searchOptionsOverrides` (optional): Per-request overrides, e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback.
|
|
513
513
|
- `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
|
|
514
514
|
|
|
515
515
|
##### Returns
|
|
@@ -541,7 +541,6 @@ const stream = await client.user.synthesize([
|
|
|
541
541
|
inputs: [{ type: 'text', value: 'Summarize recent tech news' }],
|
|
542
542
|
output: {
|
|
543
543
|
schema: z.object({ headline: z.string() }),
|
|
544
|
-
staleAfter: '1h',
|
|
545
544
|
},
|
|
546
545
|
},
|
|
547
546
|
// Richer Zod schema: array of objects with description and characterLimitHint
|
|
@@ -706,7 +705,7 @@ type SignalResponse = {
|
|
|
706
705
|
|
|
707
706
|
#### SynthesizeRequest
|
|
708
707
|
|
|
709
|
-
Request body for POST `/v1/user/synthesize` (from OpenAPI). Each item has `inputs`, `output`, optional `configurationKeyName`, optional `sourceAssetFields`, and optional `
|
|
708
|
+
Request body for POST `/v1/user/synthesize` (from OpenAPI). Each item has `inputs`, `output`, optional `configurationKeyName`, optional `sourceAssetFields`, optional `sourceBitFields`, and optional `searchOptionsOverrides`.
|
|
710
709
|
|
|
711
710
|
```typescript
|
|
712
711
|
type SynthesizeRequest = {
|
|
@@ -714,10 +713,10 @@ type SynthesizeRequest = {
|
|
|
714
713
|
configurationKeyName?: string;
|
|
715
714
|
sourceAssetFields?: string[];
|
|
716
715
|
sourceBitFields?: string[];
|
|
716
|
+
searchOptionsOverrides?: { lookbackMinutes?: number };
|
|
717
717
|
inputs?: Array<{ type: 'externalId' | 'text' | 'excludeExternalIds'; value: string }>;
|
|
718
718
|
output: {
|
|
719
|
-
schema: string; // JSON schema string; top-level type must be "object"
|
|
720
|
-
staleAfter?: string;
|
|
719
|
+
schema: string; // JSON schema string; top-level type must be "object"; supports object, string, number, boolean, array, enum
|
|
721
720
|
};
|
|
722
721
|
}>;
|
|
723
722
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-usage.d.ts","sourceRoot":"","sources":["../../src/examples/basic-usage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,iBAAe,YAAY,kBA2B1B;AAGD,iBAAe,gBAAgB,
|
|
1
|
+
{"version":3,"file":"basic-usage.d.ts","sourceRoot":"","sources":["../../src/examples/basic-usage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,iBAAe,YAAY,kBA2B1B;AAGD,iBAAe,gBAAgB,kBAuC9B;AAGD,iBAAe,uBAAuB,kBAgCrC;AAGD,iBAAe,aAAa,kBAgC3B;AAGD,iBAAe,oBAAoB,kBA+BlC;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -54,7 +54,6 @@ async function streamingExample() {
|
|
|
54
54
|
type: 'object',
|
|
55
55
|
properties: { headline: { type: 'string' } },
|
|
56
56
|
}),
|
|
57
|
-
staleAfter: '1h',
|
|
58
57
|
},
|
|
59
58
|
},
|
|
60
59
|
]);
|
|
@@ -99,7 +98,6 @@ async function batchedSynthesisExample() {
|
|
|
99
98
|
inputs: [{ type: 'text', value: 'Summarize this' }],
|
|
100
99
|
output: {
|
|
101
100
|
schema: JSON.stringify({ type: 'object', properties: { headline: { type: 'string' } } }),
|
|
102
|
-
staleAfter: '30m',
|
|
103
101
|
},
|
|
104
102
|
});
|
|
105
103
|
console.log('Synthesized:', result2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-usage.js","sourceRoot":"","sources":["../../src/examples/basic-usage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,6CAA6C;AAC7C,KAAK,UAAU,YAAY;IACzB,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC;QACnC,OAAO,EAAE,mDAAmD;KAC7D,CAAC,CAAC;IAEH,gFAAgF;IAChF,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAE7D,sBAAsB;IACtB,MAAM,eAAe,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;QACxD,KAAK,EAAE,EAAE;KACV,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAEvD,yDAAyD;IACzD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QAC5C,OAAO,EAAE;YACP;gBACE,MAAM,EAAE,6BAA6B;gBACrC,cAAc,EAAE;oBACd,SAAS,EAAE,aAAa;oBACxB,WAAW,EAAE,SAAS;iBACvB;aACF;SACF;KACF,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED,iCAAiC;AACjC,KAAK,UAAU,gBAAgB;IAC7B,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC;QACnC,OAAO,EAAE,mDAAmD;KAC7D,CAAC,CAAC;IAEH,qBAAqB;IACrB,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,4BAA4B,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AE,6BAA6B;gBACrC,QAAQ,EAAE,IAAI;aACf;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,6CAA6C;AAC7C,KAAK,UAAU,oBAAoB;IACjC,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC;QACnC,OAAO,EAAE,mDAAmD;QAC5D,kBAAkB,EAAE,GAAG,EAAE,oCAAoC;KAC9D,CAAC,CAAC;IAEH,qBAAqB;IACrB,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAE7D,wEAAwE;IACxE,gDAAgD;IAChD,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QAC7C,MAAM,EAAE,6EAA6E;QACrF,cAAc,EAAE;YACd,SAAS,EAAE,aAAa;YACxB,WAAW,EAAE,SAAS;SACvB;KACF,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;QAC7C,MAAM,EAAE,uBAAuB;QAC/B,cAAc,EAAE;YACd,SAAS,EAAE,aAAa;YACxB,WAAW,EAAE,SAAS;SACvB;KACF,CAAC,CAAC;IAEH,2DAA2D;IAC3D,yDAAyD;IACzD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -679,6 +679,11 @@ export interface paths {
|
|
|
679
679
|
sourceBitFields?: string[];
|
|
680
680
|
/** @description Optional configuration key name. Loads an existing synthesis config by this name; omit for default configuration. */
|
|
681
681
|
configurationKeyName?: string;
|
|
682
|
+
/** @description Per-request overrides for search options. */
|
|
683
|
+
searchOptionsOverrides?: {
|
|
684
|
+
/** @description Override for search lookback window in minutes (e.g. 1440 for last 24 hours). */
|
|
685
|
+
lookbackMinutes?: number;
|
|
686
|
+
};
|
|
682
687
|
/** @description Inputs used as context for the synthesis: externalId (article ID), or text (freeform text). */
|
|
683
688
|
inputs?: {
|
|
684
689
|
/**
|
|
@@ -689,12 +694,10 @@ export interface paths {
|
|
|
689
694
|
/** @description External ID (e.g. article) for externalId, freeform text for text, or comma-separated list of external IDs to exclude */
|
|
690
695
|
value: string;
|
|
691
696
|
}[];
|
|
692
|
-
/** @description Output definition: schema
|
|
697
|
+
/** @description Output definition: schema. */
|
|
693
698
|
output: {
|
|
694
|
-
/** @description Output schema as a JSON string. Top-level type must be "object". Example: {"type":"object","properties":{"title":{"type":"string","description":"title"}}} */
|
|
699
|
+
/** @description Output schema as a JSON string. Top-level type must be "object". Supports object, string, number, boolean, array, and enum. Example: {"type":"object","properties":{"title":{"type":"string","description":"title"},"status":{"type":"string","enum":["draft","published"]}}} */
|
|
695
700
|
schema: string;
|
|
696
|
-
/** @description Time after which the result is considered stale and will be regenerated again. Examples: "1h", "30m", "1d", "3600" (seconds). */
|
|
697
|
-
staleAfter?: string;
|
|
698
701
|
};
|
|
699
702
|
}[];
|
|
700
703
|
};
|
package/dist/user/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface UserMethods {
|
|
|
69
69
|
/**
|
|
70
70
|
* Synthesize content items personalized to the user (streaming SSE).
|
|
71
71
|
*
|
|
72
|
-
* @param items - Array of items: optional inputs (type: externalId | text | excludeExternalIds, value), output (schema, optional
|
|
72
|
+
* @param items - Array of items: optional inputs (type: externalId | text | excludeExternalIds, value), output (schema), optional configurationKeyName, optional searchOptionsOverrides (e.g. lookbackMinutes)
|
|
73
73
|
* @param options - Optional: onStreamingData(index, data) called for each streaming data update per item index
|
|
74
74
|
* @returns AsyncIterable yielding connection events (connected, complete) and data events (index, data?, complete, error?)
|
|
75
75
|
*/
|
|
@@ -38,7 +38,7 @@ export interface SynthesizeOptions {
|
|
|
38
38
|
* Synthesize content items personalized to the user (streaming SSE).
|
|
39
39
|
*
|
|
40
40
|
* @param config - Request configuration with base URL, timeout, fetch, and optional token
|
|
41
|
-
* @param items - Array of items: each has optional inputs (`type`: externalId | text | excludeExternalIds, `value`), output (schema as JSON string or Zod 4 schema, optional
|
|
41
|
+
* @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)
|
|
42
42
|
* @param options - Optional: onStreamingData(index, data) called for each streaming data update per item index
|
|
43
43
|
* @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.
|
|
44
44
|
*/
|
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
|
|
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)
|
|
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
|
*/
|