@vectorize-io/hindsight-client 0.0.11
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 +57 -0
- package/dist/generated/client/client.gen.d.ts +3 -0
- package/dist/generated/client/client.gen.d.ts.map +1 -0
- package/dist/generated/client/client.gen.js +233 -0
- package/dist/generated/client/client.gen.js.map +1 -0
- package/dist/generated/client/index.d.ts +9 -0
- package/dist/generated/client/index.d.ts.map +1 -0
- package/dist/generated/client/index.js +18 -0
- package/dist/generated/client/index.js.map +1 -0
- package/dist/generated/client/types.gen.d.ts +118 -0
- package/dist/generated/client/types.gen.d.ts.map +1 -0
- package/dist/generated/client/types.gen.js +4 -0
- package/dist/generated/client/types.gen.js.map +1 -0
- package/dist/generated/client/utils.gen.d.ts +34 -0
- package/dist/generated/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/client/utils.gen.js +245 -0
- package/dist/generated/client/utils.gen.js.map +1 -0
- package/dist/generated/client.gen.d.ts +13 -0
- package/dist/generated/client.gen.d.ts.map +1 -0
- package/dist/generated/client.gen.js +7 -0
- package/dist/generated/client.gen.js.map +1 -0
- package/dist/generated/core/auth.gen.d.ts +19 -0
- package/dist/generated/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/core/auth.gen.js +19 -0
- package/dist/generated/core/auth.gen.js.map +1 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.js +61 -0
- package/dist/generated/core/bodySerializer.gen.js.map +1 -0
- package/dist/generated/core/params.gen.d.ts +44 -0
- package/dist/generated/core/params.gen.d.ts.map +1 -0
- package/dist/generated/core/params.gen.js +105 -0
- package/dist/generated/core/params.gen.js.map +1 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.js +124 -0
- package/dist/generated/core/pathSerializer.gen.js.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.js +106 -0
- package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.js +140 -0
- package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
- package/dist/generated/core/types.gen.d.ts +79 -0
- package/dist/generated/core/types.gen.d.ts.map +1 -0
- package/dist/generated/core/types.gen.js +4 -0
- package/dist/generated/core/types.gen.js.map +1 -0
- package/dist/generated/core/utils.gen.d.ts +20 -0
- package/dist/generated/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/core/utils.gen.js +94 -0
- package/dist/generated/core/utils.gen.js.map +1 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +19 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/sdk.gen.d.ts +200 -0
- package/dist/generated/sdk.gen.d.ts.map +1 -0
- package/dist/generated/sdk.gen.js +254 -0
- package/dist/generated/sdk.gen.js.map +1 -0
- package/dist/generated/types.gen.d.ts +1437 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.js +4 -0
- package/dist/generated/types.gen.js.map +1 -0
- package/dist/src/index.d.ts +100 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +216 -0
- package/dist/src/index.js.map +1 -0
- package/generated/client/client.gen.ts +301 -0
- package/generated/client/index.ts +25 -0
- package/generated/client/types.gen.ts +241 -0
- package/generated/client/utils.gen.ts +332 -0
- package/generated/client.gen.ts +16 -0
- package/generated/core/auth.gen.ts +42 -0
- package/generated/core/bodySerializer.gen.ts +100 -0
- package/generated/core/params.gen.ts +176 -0
- package/generated/core/pathSerializer.gen.ts +181 -0
- package/generated/core/queryKeySerializer.gen.ts +136 -0
- package/generated/core/serverSentEvents.gen.ts +264 -0
- package/generated/core/types.gen.ts +118 -0
- package/generated/core/utils.gen.ts +143 -0
- package/generated/index.ts +4 -0
- package/generated/sdk.gen.ts +267 -0
- package/generated/types.gen.ts +1577 -0
- package/package.json +42 -0
- package/src/index.ts +273 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getUrl = exports.defaultPathSerializer = exports.PATH_PARAM_RE = void 0;
|
|
5
|
+
exports.getValidRequestBody = getValidRequestBody;
|
|
6
|
+
const pathSerializer_gen_1 = require("./pathSerializer.gen");
|
|
7
|
+
exports.PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
8
|
+
const defaultPathSerializer = ({ path, url: _url }) => {
|
|
9
|
+
let url = _url;
|
|
10
|
+
const matches = _url.match(exports.PATH_PARAM_RE);
|
|
11
|
+
if (matches) {
|
|
12
|
+
for (const match of matches) {
|
|
13
|
+
let explode = false;
|
|
14
|
+
let name = match.substring(1, match.length - 1);
|
|
15
|
+
let style = 'simple';
|
|
16
|
+
if (name.endsWith('*')) {
|
|
17
|
+
explode = true;
|
|
18
|
+
name = name.substring(0, name.length - 1);
|
|
19
|
+
}
|
|
20
|
+
if (name.startsWith('.')) {
|
|
21
|
+
name = name.substring(1);
|
|
22
|
+
style = 'label';
|
|
23
|
+
}
|
|
24
|
+
else if (name.startsWith(';')) {
|
|
25
|
+
name = name.substring(1);
|
|
26
|
+
style = 'matrix';
|
|
27
|
+
}
|
|
28
|
+
const value = path[name];
|
|
29
|
+
if (value === undefined || value === null) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (Array.isArray(value)) {
|
|
33
|
+
url = url.replace(match, (0, pathSerializer_gen_1.serializeArrayParam)({ explode, name, style, value }));
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (typeof value === 'object') {
|
|
37
|
+
url = url.replace(match, (0, pathSerializer_gen_1.serializeObjectParam)({
|
|
38
|
+
explode,
|
|
39
|
+
name,
|
|
40
|
+
style,
|
|
41
|
+
value: value,
|
|
42
|
+
valueOnly: true,
|
|
43
|
+
}));
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (style === 'matrix') {
|
|
47
|
+
url = url.replace(match, `;${(0, pathSerializer_gen_1.serializePrimitiveParam)({
|
|
48
|
+
name,
|
|
49
|
+
value: value,
|
|
50
|
+
})}`);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
54
|
+
url = url.replace(match, replaceValue);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return url;
|
|
58
|
+
};
|
|
59
|
+
exports.defaultPathSerializer = defaultPathSerializer;
|
|
60
|
+
const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
61
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
62
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
63
|
+
if (path) {
|
|
64
|
+
url = (0, exports.defaultPathSerializer)({ path, url });
|
|
65
|
+
}
|
|
66
|
+
let search = query ? querySerializer(query) : '';
|
|
67
|
+
if (search.startsWith('?')) {
|
|
68
|
+
search = search.substring(1);
|
|
69
|
+
}
|
|
70
|
+
if (search) {
|
|
71
|
+
url += `?${search}`;
|
|
72
|
+
}
|
|
73
|
+
return url;
|
|
74
|
+
};
|
|
75
|
+
exports.getUrl = getUrl;
|
|
76
|
+
function getValidRequestBody(options) {
|
|
77
|
+
const hasBody = options.body !== undefined;
|
|
78
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
79
|
+
if (isSerializedBody) {
|
|
80
|
+
if ('serializedBody' in options) {
|
|
81
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
82
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
83
|
+
}
|
|
84
|
+
// not all clients implement a serializedBody property (i.e. client-axios)
|
|
85
|
+
return options.body !== '' ? options.body : null;
|
|
86
|
+
}
|
|
87
|
+
// plain/text body
|
|
88
|
+
if (hasBody) {
|
|
89
|
+
return options.body;
|
|
90
|
+
}
|
|
91
|
+
// no body was provided
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=utils.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.gen.js","sourceRoot":"","sources":["../../../generated/core/utils.gen.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAmHrD,kDA2BC;AA3ID,6DAK8B;AAOjB,QAAA,aAAa,GAAG,aAAa,CAAC;AAEpC,MAAM,qBAAqB,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAkB,EAAE,EAAE;IAC3E,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAa,CAAC,CAAC;IAC1C,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAChD,IAAI,KAAK,GAAwB,QAAQ,CAAC;YAE1C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,OAAO,GAAG,IAAI,CAAC;gBACf,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC5C,CAAC;YAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAA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EAAE,CAAC;YAChC,MAAM,iBAAiB,GACrB,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,EAAE,CAAC;YAExE,OAAO,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,CAAC;QAED,0EAA0E;QAC1E,OAAO,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;IAED,kBAAkB;IAClB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB,CAAC;IAED,uBAAuB;IACvB,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAEA,mBAAmB,aAAa,CAAC;AACjC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./sdk.gen"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;;;;;;;;;;;;;;AAGrD,4CAA0B"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
+
import type { AddBankBackgroundData, AddBankBackgroundErrors, AddBankBackgroundResponses, CancelOperationData, CancelOperationErrors, CancelOperationResponses, ClearBankMemoriesData, ClearBankMemoriesErrors, ClearBankMemoriesResponses, CreateOrUpdateBankData, CreateOrUpdateBankErrors, CreateOrUpdateBankResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, GetAgentStatsData, GetAgentStatsErrors, GetAgentStatsResponses, GetBankProfileData, GetBankProfileErrors, GetBankProfileResponses, GetChunkData, GetChunkErrors, GetChunkResponses, GetDocumentData, GetDocumentErrors, GetDocumentResponses, GetEntityData, GetEntityErrors, GetEntityResponses, GetGraphData, GetGraphErrors, GetGraphResponses, ListBanksData, ListBanksResponses, ListDocumentsData, ListDocumentsErrors, ListDocumentsResponses, ListEntitiesData, ListEntitiesErrors, ListEntitiesResponses, ListMemoriesData, ListMemoriesErrors, ListMemoriesResponses, ListOperationsData, ListOperationsErrors, ListOperationsResponses, MetricsEndpointMetricsGetData, MetricsEndpointMetricsGetResponses, RecallMemoriesData, RecallMemoriesErrors, RecallMemoriesResponses, ReflectData, ReflectErrors, ReflectResponses, RegenerateEntityObservationsData, RegenerateEntityObservationsErrors, RegenerateEntityObservationsResponses, RetainMemoriesData, RetainMemoriesErrors, RetainMemoriesResponses, UpdateBankPersonalityData, UpdateBankPersonalityErrors, UpdateBankPersonalityResponses } from './types.gen';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Prometheus metrics endpoint
|
|
18
|
+
*
|
|
19
|
+
* Exports metrics in Prometheus format for scraping
|
|
20
|
+
*/
|
|
21
|
+
export declare const metricsEndpointMetricsGet: <ThrowOnError extends boolean = false>(options?: Options<MetricsEndpointMetricsGetData, ThrowOnError>) => import("./client").RequestResult<MetricsEndpointMetricsGetResponses, unknown, ThrowOnError, "fields">;
|
|
22
|
+
/**
|
|
23
|
+
* Get memory graph data
|
|
24
|
+
*
|
|
25
|
+
* Retrieve graph data for visualization, optionally filtered by type (world/agent/opinion). Limited to 1000 most recent items.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getGraph: <ThrowOnError extends boolean = false>(options: Options<GetGraphData, ThrowOnError>) => import("./client").RequestResult<GetGraphResponses, GetGraphErrors, ThrowOnError, "fields">;
|
|
28
|
+
/**
|
|
29
|
+
* List memory units
|
|
30
|
+
*
|
|
31
|
+
* List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
|
|
32
|
+
*/
|
|
33
|
+
export declare const listMemories: <ThrowOnError extends boolean = false>(options: Options<ListMemoriesData, ThrowOnError>) => import("./client").RequestResult<ListMemoriesResponses, ListMemoriesErrors, ThrowOnError, "fields">;
|
|
34
|
+
/**
|
|
35
|
+
* Recall memory
|
|
36
|
+
*
|
|
37
|
+
* Recall memory using semantic similarity and spreading activation.
|
|
38
|
+
*
|
|
39
|
+
* The type parameter is optional and must be one of:
|
|
40
|
+
* - 'world': General knowledge about people, places, events, and things that happen
|
|
41
|
+
* - 'agent': Memories about what the AI agent did, actions taken, and tasks performed
|
|
42
|
+
* - 'opinion': The bank's formed beliefs, perspectives, and viewpoints
|
|
43
|
+
* - 'observation': Synthesized observations about entities (generated automatically)
|
|
44
|
+
*
|
|
45
|
+
* Set include_entities=true to get entity observations alongside recall results.
|
|
46
|
+
*/
|
|
47
|
+
export declare const recallMemories: <ThrowOnError extends boolean = false>(options: Options<RecallMemoriesData, ThrowOnError>) => import("./client").RequestResult<RecallMemoriesResponses, RecallMemoriesErrors, ThrowOnError, "fields">;
|
|
48
|
+
/**
|
|
49
|
+
* Reflect and generate answer
|
|
50
|
+
*
|
|
51
|
+
* Reflect and formulate an answer using bank identity, world facts, and opinions.
|
|
52
|
+
*
|
|
53
|
+
* This endpoint:
|
|
54
|
+
* 1. Retrieves agent facts (bank's identity)
|
|
55
|
+
* 2. Retrieves world facts relevant to the query
|
|
56
|
+
* 3. Retrieves existing opinions (bank's perspectives)
|
|
57
|
+
* 4. Uses LLM to formulate a contextual answer
|
|
58
|
+
* 5. Extracts and stores any new opinions formed
|
|
59
|
+
* 6. Returns plain text answer, the facts used, and new opinions
|
|
60
|
+
*/
|
|
61
|
+
export declare const reflect: <ThrowOnError extends boolean = false>(options: Options<ReflectData, ThrowOnError>) => import("./client").RequestResult<ReflectResponses, ReflectErrors, ThrowOnError, "fields">;
|
|
62
|
+
/**
|
|
63
|
+
* List all memory banks
|
|
64
|
+
*
|
|
65
|
+
* Get a list of all agents with their profiles
|
|
66
|
+
*/
|
|
67
|
+
export declare const listBanks: <ThrowOnError extends boolean = false>(options?: Options<ListBanksData, ThrowOnError>) => import("./client").RequestResult<ListBanksResponses, unknown, ThrowOnError, "fields">;
|
|
68
|
+
/**
|
|
69
|
+
* Get statistics for memory bank
|
|
70
|
+
*
|
|
71
|
+
* Get statistics about nodes and links for a specific agent
|
|
72
|
+
*/
|
|
73
|
+
export declare const getAgentStats: <ThrowOnError extends boolean = false>(options: Options<GetAgentStatsData, ThrowOnError>) => import("./client").RequestResult<GetAgentStatsResponses, GetAgentStatsErrors, ThrowOnError, "fields">;
|
|
74
|
+
/**
|
|
75
|
+
* List entities
|
|
76
|
+
*
|
|
77
|
+
* List all entities (people, organizations, etc.) known by the bank, ordered by mention count.
|
|
78
|
+
*/
|
|
79
|
+
export declare const listEntities: <ThrowOnError extends boolean = false>(options: Options<ListEntitiesData, ThrowOnError>) => import("./client").RequestResult<ListEntitiesResponses, ListEntitiesErrors, ThrowOnError, "fields">;
|
|
80
|
+
/**
|
|
81
|
+
* Get entity details
|
|
82
|
+
*
|
|
83
|
+
* Get detailed information about an entity including observations (mental model).
|
|
84
|
+
*/
|
|
85
|
+
export declare const getEntity: <ThrowOnError extends boolean = false>(options: Options<GetEntityData, ThrowOnError>) => import("./client").RequestResult<GetEntityResponses, GetEntityErrors, ThrowOnError, "fields">;
|
|
86
|
+
/**
|
|
87
|
+
* Regenerate entity observations
|
|
88
|
+
*
|
|
89
|
+
* Regenerate observations for an entity based on all facts mentioning it.
|
|
90
|
+
*/
|
|
91
|
+
export declare const regenerateEntityObservations: <ThrowOnError extends boolean = false>(options: Options<RegenerateEntityObservationsData, ThrowOnError>) => import("./client").RequestResult<RegenerateEntityObservationsResponses, RegenerateEntityObservationsErrors, ThrowOnError, "fields">;
|
|
92
|
+
/**
|
|
93
|
+
* List documents
|
|
94
|
+
*
|
|
95
|
+
* List documents with pagination and optional search. Documents are the source content from which memory units are extracted.
|
|
96
|
+
*/
|
|
97
|
+
export declare const listDocuments: <ThrowOnError extends boolean = false>(options: Options<ListDocumentsData, ThrowOnError>) => import("./client").RequestResult<ListDocumentsResponses, ListDocumentsErrors, ThrowOnError, "fields">;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a document
|
|
100
|
+
*
|
|
101
|
+
* Delete a document and all its associated memory units and links.
|
|
102
|
+
*
|
|
103
|
+
* This will cascade delete:
|
|
104
|
+
* - The document itself
|
|
105
|
+
* - All memory units extracted from this document
|
|
106
|
+
* - All links (temporal, semantic, entity) associated with those memory units
|
|
107
|
+
*
|
|
108
|
+
* This operation cannot be undone.
|
|
109
|
+
*/
|
|
110
|
+
export declare const deleteDocument: <ThrowOnError extends boolean = false>(options: Options<DeleteDocumentData, ThrowOnError>) => import("./client").RequestResult<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError, "fields">;
|
|
111
|
+
/**
|
|
112
|
+
* Get document details
|
|
113
|
+
*
|
|
114
|
+
* Get a specific document including its original text
|
|
115
|
+
*/
|
|
116
|
+
export declare const getDocument: <ThrowOnError extends boolean = false>(options: Options<GetDocumentData, ThrowOnError>) => import("./client").RequestResult<GetDocumentResponses, GetDocumentErrors, ThrowOnError, "fields">;
|
|
117
|
+
/**
|
|
118
|
+
* Get chunk details
|
|
119
|
+
*
|
|
120
|
+
* Get a specific chunk by its ID
|
|
121
|
+
*/
|
|
122
|
+
export declare const getChunk: <ThrowOnError extends boolean = false>(options: Options<GetChunkData, ThrowOnError>) => import("./client").RequestResult<GetChunkResponses, GetChunkErrors, ThrowOnError, "fields">;
|
|
123
|
+
/**
|
|
124
|
+
* List async operations
|
|
125
|
+
*
|
|
126
|
+
* Get a list of all async operations (pending and failed) for a specific agent, including error messages for failed operations
|
|
127
|
+
*/
|
|
128
|
+
export declare const listOperations: <ThrowOnError extends boolean = false>(options: Options<ListOperationsData, ThrowOnError>) => import("./client").RequestResult<ListOperationsResponses, ListOperationsErrors, ThrowOnError, "fields">;
|
|
129
|
+
/**
|
|
130
|
+
* Cancel a pending async operation
|
|
131
|
+
*
|
|
132
|
+
* Cancel a pending async operation by removing it from the queue
|
|
133
|
+
*/
|
|
134
|
+
export declare const cancelOperation: <ThrowOnError extends boolean = false>(options: Options<CancelOperationData, ThrowOnError>) => import("./client").RequestResult<CancelOperationResponses, CancelOperationErrors, ThrowOnError, "fields">;
|
|
135
|
+
/**
|
|
136
|
+
* Get memory bank profile
|
|
137
|
+
*
|
|
138
|
+
* Get personality traits and background for a memory bank. Auto-creates agent with defaults if not exists.
|
|
139
|
+
*/
|
|
140
|
+
export declare const getBankProfile: <ThrowOnError extends boolean = false>(options: Options<GetBankProfileData, ThrowOnError>) => import("./client").RequestResult<GetBankProfileResponses, GetBankProfileErrors, ThrowOnError, "fields">;
|
|
141
|
+
/**
|
|
142
|
+
* Update memory bank personality
|
|
143
|
+
*
|
|
144
|
+
* Update bank's Big Five personality traits and bias strength
|
|
145
|
+
*/
|
|
146
|
+
export declare const updateBankPersonality: <ThrowOnError extends boolean = false>(options: Options<UpdateBankPersonalityData, ThrowOnError>) => import("./client").RequestResult<UpdateBankPersonalityResponses, UpdateBankPersonalityErrors, ThrowOnError, "fields">;
|
|
147
|
+
/**
|
|
148
|
+
* Add/merge memory bank background
|
|
149
|
+
*
|
|
150
|
+
* Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers personality traits.
|
|
151
|
+
*/
|
|
152
|
+
export declare const addBankBackground: <ThrowOnError extends boolean = false>(options: Options<AddBankBackgroundData, ThrowOnError>) => import("./client").RequestResult<AddBankBackgroundResponses, AddBankBackgroundErrors, ThrowOnError, "fields">;
|
|
153
|
+
/**
|
|
154
|
+
* Create or update memory bank
|
|
155
|
+
*
|
|
156
|
+
* Create a new agent or update existing agent with personality and background. Auto-fills missing fields with defaults.
|
|
157
|
+
*/
|
|
158
|
+
export declare const createOrUpdateBank: <ThrowOnError extends boolean = false>(options: Options<CreateOrUpdateBankData, ThrowOnError>) => import("./client").RequestResult<CreateOrUpdateBankResponses, CreateOrUpdateBankErrors, ThrowOnError, "fields">;
|
|
159
|
+
/**
|
|
160
|
+
* Clear memory bank memories
|
|
161
|
+
*
|
|
162
|
+
* Delete memory units for a memory bank. Optionally filter by type (world, agent, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (personality and background) will be preserved.
|
|
163
|
+
*/
|
|
164
|
+
export declare const clearBankMemories: <ThrowOnError extends boolean = false>(options: Options<ClearBankMemoriesData, ThrowOnError>) => import("./client").RequestResult<ClearBankMemoriesResponses, ClearBankMemoriesErrors, ThrowOnError, "fields">;
|
|
165
|
+
/**
|
|
166
|
+
* Retain memories
|
|
167
|
+
*
|
|
168
|
+
* Retain memory items with automatic fact extraction.
|
|
169
|
+
*
|
|
170
|
+
* This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing
|
|
171
|
+
* via the async parameter.
|
|
172
|
+
*
|
|
173
|
+
* Features:
|
|
174
|
+
* - Efficient batch processing
|
|
175
|
+
* - Automatic fact extraction from natural language
|
|
176
|
+
* - Entity recognition and linking
|
|
177
|
+
* - Document tracking with automatic upsert (when document_id is provided on items)
|
|
178
|
+
* - Temporal and semantic linking
|
|
179
|
+
* - Optional asynchronous processing
|
|
180
|
+
*
|
|
181
|
+
* The system automatically:
|
|
182
|
+
* 1. Extracts semantic facts from the content
|
|
183
|
+
* 2. Generates embeddings
|
|
184
|
+
* 3. Deduplicates similar facts
|
|
185
|
+
* 4. Creates temporal, semantic, and entity links
|
|
186
|
+
* 5. Tracks document metadata
|
|
187
|
+
*
|
|
188
|
+
* When async=true:
|
|
189
|
+
* - Returns immediately after queuing the task
|
|
190
|
+
* - Processing happens in the background
|
|
191
|
+
* - Use the operations endpoint to monitor progress
|
|
192
|
+
*
|
|
193
|
+
* When async=false (default):
|
|
194
|
+
* - Waits for processing to complete
|
|
195
|
+
* - Returns after all memories are stored
|
|
196
|
+
*
|
|
197
|
+
* Note: If a memory item has a document_id that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior). Items with the same document_id are grouped together for efficient processing.
|
|
198
|
+
*/
|
|
199
|
+
export declare const retainMemories: <ThrowOnError extends boolean = false>(options: Options<RetainMemoriesData, ThrowOnError>) => import("./client").RequestResult<RetainMemoriesResponses, RetainMemoriesErrors, ThrowOnError, "fields">;
|
|
200
|
+
//# sourceMappingURL=sdk.gen.d.ts.map
|
|
@@ -0,0 +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;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,kBAAkB,EAAE,YAAY,CAAC,4GAA4J,CAAC;AAEpR;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC,0HAOnI,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,qBAAqB,EAAE,YAAY,CAAC,kHAO3H,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,sBAAsB,EAAE,YAAY,CAAC,oHAO7H,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,qBAAqB,EAAE,YAAY,CAAC,kHAAsK,CAAC;AAEpS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,kBAAkB,EAAE,YAAY,CAAC,4GAOrH,CAAC"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.retainMemories = exports.clearBankMemories = exports.createOrUpdateBank = exports.addBankBackground = exports.updateBankPersonality = exports.getBankProfile = exports.cancelOperation = exports.listOperations = exports.getChunk = exports.getDocument = exports.deleteDocument = exports.listDocuments = exports.regenerateEntityObservations = exports.getEntity = exports.listEntities = exports.getAgentStats = exports.listBanks = exports.reflect = exports.recallMemories = exports.listMemories = exports.getGraph = exports.metricsEndpointMetricsGet = void 0;
|
|
5
|
+
const client_gen_1 = require("./client.gen");
|
|
6
|
+
/**
|
|
7
|
+
* Prometheus metrics endpoint
|
|
8
|
+
*
|
|
9
|
+
* Exports metrics in Prometheus format for scraping
|
|
10
|
+
*/
|
|
11
|
+
const metricsEndpointMetricsGet = (options) => (options?.client ?? client_gen_1.client).get({ url: '/metrics', ...options });
|
|
12
|
+
exports.metricsEndpointMetricsGet = metricsEndpointMetricsGet;
|
|
13
|
+
/**
|
|
14
|
+
* Get memory graph data
|
|
15
|
+
*
|
|
16
|
+
* Retrieve graph data for visualization, optionally filtered by type (world/agent/opinion). Limited to 1000 most recent items.
|
|
17
|
+
*/
|
|
18
|
+
const getGraph = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/graph', ...options });
|
|
19
|
+
exports.getGraph = getGraph;
|
|
20
|
+
/**
|
|
21
|
+
* List memory units
|
|
22
|
+
*
|
|
23
|
+
* List memory units with pagination and optional full-text search. Supports filtering by type. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
|
|
24
|
+
*/
|
|
25
|
+
const listMemories = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/memories/list', ...options });
|
|
26
|
+
exports.listMemories = listMemories;
|
|
27
|
+
/**
|
|
28
|
+
* Recall memory
|
|
29
|
+
*
|
|
30
|
+
* Recall memory using semantic similarity and spreading activation.
|
|
31
|
+
*
|
|
32
|
+
* The type parameter is optional and must be one of:
|
|
33
|
+
* - 'world': General knowledge about people, places, events, and things that happen
|
|
34
|
+
* - 'agent': Memories about what the AI agent did, actions taken, and tasks performed
|
|
35
|
+
* - 'opinion': The bank's formed beliefs, perspectives, and viewpoints
|
|
36
|
+
* - 'observation': Synthesized observations about entities (generated automatically)
|
|
37
|
+
*
|
|
38
|
+
* Set include_entities=true to get entity observations alongside recall results.
|
|
39
|
+
*/
|
|
40
|
+
const recallMemories = (options) => (options.client ?? client_gen_1.client).post({
|
|
41
|
+
url: '/v1/default/banks/{bank_id}/memories/recall',
|
|
42
|
+
...options,
|
|
43
|
+
headers: {
|
|
44
|
+
'Content-Type': 'application/json',
|
|
45
|
+
...options.headers
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
exports.recallMemories = recallMemories;
|
|
49
|
+
/**
|
|
50
|
+
* Reflect and generate answer
|
|
51
|
+
*
|
|
52
|
+
* Reflect and formulate an answer using bank identity, world facts, and opinions.
|
|
53
|
+
*
|
|
54
|
+
* This endpoint:
|
|
55
|
+
* 1. Retrieves agent facts (bank's identity)
|
|
56
|
+
* 2. Retrieves world facts relevant to the query
|
|
57
|
+
* 3. Retrieves existing opinions (bank's perspectives)
|
|
58
|
+
* 4. Uses LLM to formulate a contextual answer
|
|
59
|
+
* 5. Extracts and stores any new opinions formed
|
|
60
|
+
* 6. Returns plain text answer, the facts used, and new opinions
|
|
61
|
+
*/
|
|
62
|
+
const reflect = (options) => (options.client ?? client_gen_1.client).post({
|
|
63
|
+
url: '/v1/default/banks/{bank_id}/reflect',
|
|
64
|
+
...options,
|
|
65
|
+
headers: {
|
|
66
|
+
'Content-Type': 'application/json',
|
|
67
|
+
...options.headers
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
exports.reflect = reflect;
|
|
71
|
+
/**
|
|
72
|
+
* List all memory banks
|
|
73
|
+
*
|
|
74
|
+
* Get a list of all agents with their profiles
|
|
75
|
+
*/
|
|
76
|
+
const listBanks = (options) => (options?.client ?? client_gen_1.client).get({ url: '/v1/default/banks', ...options });
|
|
77
|
+
exports.listBanks = listBanks;
|
|
78
|
+
/**
|
|
79
|
+
* Get statistics for memory bank
|
|
80
|
+
*
|
|
81
|
+
* Get statistics about nodes and links for a specific agent
|
|
82
|
+
*/
|
|
83
|
+
const getAgentStats = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/stats', ...options });
|
|
84
|
+
exports.getAgentStats = getAgentStats;
|
|
85
|
+
/**
|
|
86
|
+
* List entities
|
|
87
|
+
*
|
|
88
|
+
* List all entities (people, organizations, etc.) known by the bank, ordered by mention count.
|
|
89
|
+
*/
|
|
90
|
+
const listEntities = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/entities', ...options });
|
|
91
|
+
exports.listEntities = listEntities;
|
|
92
|
+
/**
|
|
93
|
+
* Get entity details
|
|
94
|
+
*
|
|
95
|
+
* Get detailed information about an entity including observations (mental model).
|
|
96
|
+
*/
|
|
97
|
+
const getEntity = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/entities/{entity_id}', ...options });
|
|
98
|
+
exports.getEntity = getEntity;
|
|
99
|
+
/**
|
|
100
|
+
* Regenerate entity observations
|
|
101
|
+
*
|
|
102
|
+
* Regenerate observations for an entity based on all facts mentioning it.
|
|
103
|
+
*/
|
|
104
|
+
const regenerateEntityObservations = (options) => (options.client ?? client_gen_1.client).post({ url: '/v1/default/banks/{bank_id}/entities/{entity_id}/regenerate', ...options });
|
|
105
|
+
exports.regenerateEntityObservations = regenerateEntityObservations;
|
|
106
|
+
/**
|
|
107
|
+
* List documents
|
|
108
|
+
*
|
|
109
|
+
* List documents with pagination and optional search. Documents are the source content from which memory units are extracted.
|
|
110
|
+
*/
|
|
111
|
+
const listDocuments = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/documents', ...options });
|
|
112
|
+
exports.listDocuments = listDocuments;
|
|
113
|
+
/**
|
|
114
|
+
* Delete a document
|
|
115
|
+
*
|
|
116
|
+
* Delete a document and all its associated memory units and links.
|
|
117
|
+
*
|
|
118
|
+
* This will cascade delete:
|
|
119
|
+
* - The document itself
|
|
120
|
+
* - All memory units extracted from this document
|
|
121
|
+
* - All links (temporal, semantic, entity) associated with those memory units
|
|
122
|
+
*
|
|
123
|
+
* This operation cannot be undone.
|
|
124
|
+
*/
|
|
125
|
+
const deleteDocument = (options) => (options.client ?? client_gen_1.client).delete({ url: '/v1/default/banks/{bank_id}/documents/{document_id}', ...options });
|
|
126
|
+
exports.deleteDocument = deleteDocument;
|
|
127
|
+
/**
|
|
128
|
+
* Get document details
|
|
129
|
+
*
|
|
130
|
+
* Get a specific document including its original text
|
|
131
|
+
*/
|
|
132
|
+
const getDocument = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/documents/{document_id}', ...options });
|
|
133
|
+
exports.getDocument = getDocument;
|
|
134
|
+
/**
|
|
135
|
+
* Get chunk details
|
|
136
|
+
*
|
|
137
|
+
* Get a specific chunk by its ID
|
|
138
|
+
*/
|
|
139
|
+
const getChunk = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/chunks/{chunk_id}', ...options });
|
|
140
|
+
exports.getChunk = getChunk;
|
|
141
|
+
/**
|
|
142
|
+
* List async operations
|
|
143
|
+
*
|
|
144
|
+
* Get a list of all async operations (pending and failed) for a specific agent, including error messages for failed operations
|
|
145
|
+
*/
|
|
146
|
+
const listOperations = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/operations', ...options });
|
|
147
|
+
exports.listOperations = listOperations;
|
|
148
|
+
/**
|
|
149
|
+
* Cancel a pending async operation
|
|
150
|
+
*
|
|
151
|
+
* Cancel a pending async operation by removing it from the queue
|
|
152
|
+
*/
|
|
153
|
+
const cancelOperation = (options) => (options.client ?? client_gen_1.client).delete({ url: '/v1/default/banks/{bank_id}/operations/{operation_id}', ...options });
|
|
154
|
+
exports.cancelOperation = cancelOperation;
|
|
155
|
+
/**
|
|
156
|
+
* Get memory bank profile
|
|
157
|
+
*
|
|
158
|
+
* Get personality traits and background for a memory bank. Auto-creates agent with defaults if not exists.
|
|
159
|
+
*/
|
|
160
|
+
const getBankProfile = (options) => (options.client ?? client_gen_1.client).get({ url: '/v1/default/banks/{bank_id}/profile', ...options });
|
|
161
|
+
exports.getBankProfile = getBankProfile;
|
|
162
|
+
/**
|
|
163
|
+
* Update memory bank personality
|
|
164
|
+
*
|
|
165
|
+
* Update bank's Big Five personality traits and bias strength
|
|
166
|
+
*/
|
|
167
|
+
const updateBankPersonality = (options) => (options.client ?? client_gen_1.client).put({
|
|
168
|
+
url: '/v1/default/banks/{bank_id}/profile',
|
|
169
|
+
...options,
|
|
170
|
+
headers: {
|
|
171
|
+
'Content-Type': 'application/json',
|
|
172
|
+
...options.headers
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
exports.updateBankPersonality = updateBankPersonality;
|
|
176
|
+
/**
|
|
177
|
+
* Add/merge memory bank background
|
|
178
|
+
*
|
|
179
|
+
* Add new background information or merge with existing. LLM intelligently resolves conflicts, normalizes to first person, and optionally infers personality traits.
|
|
180
|
+
*/
|
|
181
|
+
const addBankBackground = (options) => (options.client ?? client_gen_1.client).post({
|
|
182
|
+
url: '/v1/default/banks/{bank_id}/background',
|
|
183
|
+
...options,
|
|
184
|
+
headers: {
|
|
185
|
+
'Content-Type': 'application/json',
|
|
186
|
+
...options.headers
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
exports.addBankBackground = addBankBackground;
|
|
190
|
+
/**
|
|
191
|
+
* Create or update memory bank
|
|
192
|
+
*
|
|
193
|
+
* Create a new agent or update existing agent with personality and background. Auto-fills missing fields with defaults.
|
|
194
|
+
*/
|
|
195
|
+
const createOrUpdateBank = (options) => (options.client ?? client_gen_1.client).put({
|
|
196
|
+
url: '/v1/default/banks/{bank_id}',
|
|
197
|
+
...options,
|
|
198
|
+
headers: {
|
|
199
|
+
'Content-Type': 'application/json',
|
|
200
|
+
...options.headers
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
exports.createOrUpdateBank = createOrUpdateBank;
|
|
204
|
+
/**
|
|
205
|
+
* Clear memory bank memories
|
|
206
|
+
*
|
|
207
|
+
* Delete memory units for a memory bank. Optionally filter by type (world, agent, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (personality and background) will be preserved.
|
|
208
|
+
*/
|
|
209
|
+
const clearBankMemories = (options) => (options.client ?? client_gen_1.client).delete({ url: '/v1/default/banks/{bank_id}/memories', ...options });
|
|
210
|
+
exports.clearBankMemories = clearBankMemories;
|
|
211
|
+
/**
|
|
212
|
+
* Retain memories
|
|
213
|
+
*
|
|
214
|
+
* Retain memory items with automatic fact extraction.
|
|
215
|
+
*
|
|
216
|
+
* This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing
|
|
217
|
+
* via the async parameter.
|
|
218
|
+
*
|
|
219
|
+
* Features:
|
|
220
|
+
* - Efficient batch processing
|
|
221
|
+
* - Automatic fact extraction from natural language
|
|
222
|
+
* - Entity recognition and linking
|
|
223
|
+
* - Document tracking with automatic upsert (when document_id is provided on items)
|
|
224
|
+
* - Temporal and semantic linking
|
|
225
|
+
* - Optional asynchronous processing
|
|
226
|
+
*
|
|
227
|
+
* The system automatically:
|
|
228
|
+
* 1. Extracts semantic facts from the content
|
|
229
|
+
* 2. Generates embeddings
|
|
230
|
+
* 3. Deduplicates similar facts
|
|
231
|
+
* 4. Creates temporal, semantic, and entity links
|
|
232
|
+
* 5. Tracks document metadata
|
|
233
|
+
*
|
|
234
|
+
* When async=true:
|
|
235
|
+
* - Returns immediately after queuing the task
|
|
236
|
+
* - Processing happens in the background
|
|
237
|
+
* - Use the operations endpoint to monitor progress
|
|
238
|
+
*
|
|
239
|
+
* When async=false (default):
|
|
240
|
+
* - Waits for processing to complete
|
|
241
|
+
* - Returns after all memories are stored
|
|
242
|
+
*
|
|
243
|
+
* Note: If a memory item has a document_id that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior). Items with the same document_id are grouped together for efficient processing.
|
|
244
|
+
*/
|
|
245
|
+
const retainMemories = (options) => (options.client ?? client_gen_1.client).post({
|
|
246
|
+
url: '/v1/default/banks/{bank_id}/memories',
|
|
247
|
+
...options,
|
|
248
|
+
headers: {
|
|
249
|
+
'Content-Type': 'application/json',
|
|
250
|
+
...options.headers
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
exports.retainMemories = retainMemories;
|
|
254
|
+
//# sourceMappingURL=sdk.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.gen.js","sourceRoot":"","sources":["../../generated/sdk.gen.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,6CAAsC;AAiBtC;;;;GAIG;AACI,MAAM,yBAAyB,GAAG,CAAuC,OAA8D,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,IAAI,mBAAM,CAAC,CAAC,GAAG,CAA4D,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAAlQ,QAAA,yBAAyB,6BAAyO;AAE/Q;;;;GAIG;AACI,MAAM,QAAQ,GAAG,CAAuC,OAA4C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,mBAAM,CAAC,CAAC,GAAG,CAAkD,EAAE,GAAG,EAAE,mCAAmC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAA7O,QAAA,QAAQ,YAAqO;AAE1P;;;;GAIG;AACI,MAAM,YAAY,GAAG,CAAuC,OAAgD,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,mBAAM,CAAC,CAAC,GAAG,CAA0D,EAAE,GAAG,EAAE,2CAA2C,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAArQ,QAAA,YAAY,gBAAyP;AAElR;;;;;;;;;;;;GAYG;AACI,MAAM,cAAc,GAAG,CAAuC,OAAkD,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,mBAAM,CAAC,CAAC,IAAI,CAA8D;IACrN,GAAG,EAAE,6CAA6C;IAClD,GAAG,OAAO;IACV,OAAO,EAAE;QACL,cAAc,EAAE,kBAAkB;QAClC,GAAG,OAAO,CAAC,OAAO;KACrB;CACJ,CAAC,CAAC;AAPU,QAAA,cAAc,kBAOxB;AAEH;;;;;;;;;;;;GAYG;AACI,MAAM,OAAO,G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