@chatpanel/sdk 0.16.1 → 0.18.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/dist/api.generated.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ export declare const OPERATIONS: {
|
|
|
160
160
|
readonly since: "0.10.0";
|
|
161
161
|
readonly stream: null;
|
|
162
162
|
readonly pathParams: readonly [];
|
|
163
|
-
readonly queryParams: readonly ["since", "cursor", "limit", "kind"];
|
|
163
|
+
readonly queryParams: readonly ["since", "cursor", "limit", "kind", "bytes", "after_rev"];
|
|
164
164
|
};
|
|
165
165
|
readonly "history.putRecords": {
|
|
166
166
|
readonly id: "history.putRecords";
|
|
@@ -1048,6 +1048,8 @@ export declare class HistoryApi {
|
|
|
1048
1048
|
cursor?: string;
|
|
1049
1049
|
limit?: number;
|
|
1050
1050
|
kind?: string;
|
|
1051
|
+
bytes?: number;
|
|
1052
|
+
after_rev?: number;
|
|
1051
1053
|
}, opts?: RequestOptions): Promise<T.RecordsPage>;
|
|
1052
1054
|
/** Push whole records; the gateway derives the searchable text itself. — Requires the gateway token. Gateway 0.10.0+. */
|
|
1053
1055
|
putRecords(body: T.PutRecordsRequest, opts?: RequestOptions): Promise<T.PutRecordsResponse>;
|
package/dist/api.generated.js
CHANGED
|
@@ -15,7 +15,7 @@ export const OPERATIONS = {
|
|
|
15
15
|
"history.status": { id: "history.status", method: "GET", path: "/v1/history/status", auth: "open", since: null, stream: null, pathParams: [], queryParams: [] },
|
|
16
16
|
"history.list": { id: "history.list", method: "GET", path: "/v1/history/list", auth: "open", since: null, stream: null, pathParams: [], queryParams: ["limit", "offset", "type"] },
|
|
17
17
|
"history.get": { id: "history.get", method: "GET", path: "/v1/history/get", auth: "open", since: null, stream: null, pathParams: [], queryParams: ["id", "maxChars", "offset"] },
|
|
18
|
-
"history.records": { id: "history.records", method: "GET", path: "/v1/history/records", auth: "open", since: "0.10.0", stream: null, pathParams: [], queryParams: ["since", "cursor", "limit", "kind"] },
|
|
18
|
+
"history.records": { id: "history.records", method: "GET", path: "/v1/history/records", auth: "open", since: "0.10.0", stream: null, pathParams: [], queryParams: ["since", "cursor", "limit", "kind", "bytes", "after_rev"] },
|
|
19
19
|
"history.putRecords": { id: "history.putRecords", method: "PUT", path: "/v1/history/records", auth: "token", since: "0.10.0", stream: null, pathParams: [], queryParams: [] },
|
|
20
20
|
"history.stream": { id: "history.stream", method: "GET", path: "/v1/history/stream", auth: "open", since: "0.11.0", stream: "sse", pathParams: [], queryParams: [] },
|
|
21
21
|
"events.since": { id: "events.since", method: "GET", path: "/v1/events", auth: "token", since: "0.24.0", stream: null, pathParams: [], queryParams: ["cursor", "limit", "host"] },
|
|
@@ -605,10 +605,12 @@ export interface RecordsPage {
|
|
|
605
605
|
ok: boolean;
|
|
606
606
|
/** Whole records; a tombstone carries `deletedAt`. */
|
|
607
607
|
records: Array<AnyObject>;
|
|
608
|
-
/** The cursor for the next page — pass it as `cursor
|
|
608
|
+
/** The cursor for the next page — pass it as `cursor` (or, paging by revision, as `after_rev`); absent on the last page. */
|
|
609
609
|
next?: string;
|
|
610
610
|
size?: number;
|
|
611
611
|
newest?: number;
|
|
612
|
+
/** The newest revision (gateway 0.63.0+). Each record carries its own `rev` too. */
|
|
613
|
+
rev?: number;
|
|
612
614
|
[key: string]: unknown;
|
|
613
615
|
}
|
|
614
616
|
/** One durable event in the CloudEvents 1.0 envelope. `seq`, `host`, `chatpanelv` are ChatPanel's extension attributes (the per-host order, the producer, the log schema version); `causes` is the comma-joined ids this event follows; `data` is the payload — refs and counts, never content. */
|
|
@@ -706,9 +708,12 @@ export interface PutRecordsRequest {
|
|
|
706
708
|
/** Who is pushing — recorded on every record. */
|
|
707
709
|
host?: string;
|
|
708
710
|
at?: number;
|
|
711
|
+
/** Whole records or tombstones. A record with `baseRev` (gateway 0.63.0+) is written only while the stored one is at that revision (0 = none stored); otherwise it comes back in `conflicts`. Without it the newer stamp wins. */
|
|
709
712
|
records?: Array<AnyObject>;
|
|
710
713
|
/** Sealed backup entries, opened with the stored passphrase. */
|
|
711
714
|
entries?: Array<AnyObject>;
|
|
715
|
+
/** Gateway 0.64.0+: a NOTE sent with a `baseRev` that is no longer current is merged against that version (title, tags and text three-way) instead of coming back in `conflicts`; the result is in `merged`. */
|
|
716
|
+
merge?: boolean;
|
|
712
717
|
}
|
|
713
718
|
export interface PutRecordsResponse {
|
|
714
719
|
ok: boolean;
|
|
@@ -716,6 +721,16 @@ export interface PutRecordsResponse {
|
|
|
716
721
|
ids?: Array<string>;
|
|
717
722
|
sealed?: number;
|
|
718
723
|
size?: number;
|
|
724
|
+
/** Each written record's new revision (gateway 0.63.0+). */
|
|
725
|
+
revs?: {
|
|
726
|
+
[key: string]: number;
|
|
727
|
+
};
|
|
728
|
+
/** The current record for each one sent with a `baseRev` that is no longer current — merge and send again. */
|
|
729
|
+
conflicts?: Array<AnyObject>;
|
|
730
|
+
/** Gateway 0.64.0+, with `merge: true`: each note merged from an outdated copy, as stored (with its new `rev`) — replace yours with it. */
|
|
731
|
+
merged?: Array<AnyObject>;
|
|
732
|
+
/** The newest revision after this write. */
|
|
733
|
+
rev?: number;
|
|
719
734
|
}
|
|
720
735
|
export interface IngestRequest {
|
|
721
736
|
upserts?: Array<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Typed client for the local ChatPanel gateway — chat through the privacy proxy, search the user's history, read and write memory, follow team runs. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|